DBIx::C...xBuilder(3)

πŸ“¦ version 0.075, in opensuse-leap 16.0

🌸 NAME 🌸

Okay bestie, welcome to DBIx::C...xBuilder(3) β€” a page from the User Contributed Perl Documentation β€” and the actual module is DBIx::Class::Migration::TempDirSandboxBuilder. It's a helper class that builds a sandbox in a temporary directory. Cute, useful, iconic. πŸ’…βœ¨

✨ SYNOPSIS ✨

Here's the whole setup in code, no cap:

use DBIx::Class::Migration;

my $migration = DBIx::Class::Migration->new(
  schema_class => 'MyApp::Schema',
  db_sandbox_builder_class => 'DBIx::Class::Migration::TempDirSandboxBuilder');

$migration->install;

$migration->schema->resultset('User')
  ->create({name=>'Test User'});

$migration->schema->resultset('Role')
  ->create({name=>'Administrator'});

$migration->dump_named_sets('users', 'roles');

πŸ¦‹ DESCRIPTION πŸ¦‹

So this helper class creates a "db_sandbox" in the temporary directory, and then it deletes that directory when the migration object goes out of scope. Poof, gone, that's the vibe. 🫢 You might wish to use this for testing. Fr fr, that's the whole deal.

πŸ‘€ SEE ALSO πŸ‘€

  • DBIx::Class::Migration β€” your next stop, bestie.

πŸ’– AUTHOR πŸ’–

Author information? It's over in DBIx::Class::Migration. Go look there. 🫢

Copyright and license info? Also over in DBIx::Class::Migration. Periodt.

This page was served with perl v5.42.0 on 2020-06-03 β€” slay, bye! πŸ’…πŸŒˆβœ¨

πŸ“¦ where this page comes from