1package DBIx::Class::Migration::TargetDirSandboxBuilder; 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->target_dir, 14 schema_class=>$migration->_infer_schema_class); 15} 16 17__PACKAGE__->meta->make_immutable; 18 19=head1 NAME 20 21DBIx::Class::Migration::TargetDirSandboxBuilder - Build a sandbox at target_dir 22 23=head1 SYNOPSIS 24 25 use DBIx::Class::Migration::TargetDirSandboxBuilder; 26 27=head1 DESCRIPTION 28 29Helper class that creates a C<db_sandbox> in the C<target_dir>. 30 31=head1 SEE ALSO 32 33L<DBIx::Class::Migration>, L<DBIx::Class::Migration::Sandbox>. 34 35=head1 AUTHOR 36 37See L<DBIx::Class::Migration> for author information 38 39=head1 COPYRIGHT & LICENSE 40 41See L<DBIx::Class::Migration> for copyright and license information 42 43=cut 44 45 46