1package DBIx::Class::Migration::SandboxDirSandboxBuilder; 2 3use Moo; 4 5has migration => ( 6 is => 'ro', 7 weak_ref => 1, 8 required => 1); 9 10sub build { 11 my $migration = shift->migration; 12 return $migration->db_sandbox_class 13 ->new(target_dir=>$migration->db_sandbox_dir, 14 schema_class=>$migration->_infer_schema_class); 15} 16 17__PACKAGE__->meta->make_immutable; 18 19=head1 NAME 20 21DBIx::Class::Migration::SandboxDirSandboxBuilder - Build a sandbox at db_sandbox_dir 22 23=head1 SYNOPSIS 24 25 use DBIx::Class::Migration::SandboxDirSandboxBuilder; 26 27=head1 DESCRIPTION 28 29Helper class that creates a C<db_sandbox> in the C<db_sandbox_dir>. 30 31Useful when you want your sandbox in a different directory from the rest of your 32deployment and fixture files. 33 34=head1 SEE ALSO 35 36L<DBIx::Class::Migration>, L<DBIx::Class::Migration::Sandbox>. 37 38=head1 AUTHOR 39 40See L<DBIx::Class::Migration> for author information 41 42=head1 COPYRIGHT & LICENSE 43 44See L<DBIx::Class::Migration> for copyright and license information 45 46=cut 47 48 49