package DBIx::Class::Migration::TempDirBuilder;

use Moo;
use File::Temp 'tempdir';
use DBIx::Class::Migration::Types -all;

has schema_class => (
  is => 'ro',
  isa => Str,
  required => 1);

sub build { tempdir( CLEANUP=>1 ) }


=head1 NAME

DBIx::Class::Migration::TempDirBuilder - Build a tempory target_dir 


    use DBIx::Class::Migration::TempDirBuilder;


This creates your migration files in a temporary directory.  This might
be useful to you for testing.  Please understand that the lifespan of your
temporary directory will expire when your migration object goes out of

This probably isn't really user servicable, although if you need to make a
custom C<target_dir> builder, you could look at this for example.

=head1 SEE ALSO

L<DBIx::Class::Migration>, L<File::Temp>.

=head1 AUTHOR

See L<DBIx::Class::Migration> for author information


See L<DBIx::Class::Migration> for copyright and license information