my $self = shift;
my %args = @_;
- my $db_file = "t/var/DBIxClass.db";
+ my $db_file
+ = $args{db_dir}
+ ? "$args{db_dir}/DBIxClass.db"
+ : "t/var/DBIxClass.db"
+ ;
mkdir("t/var") unless -d "t/var";
if ( !$args{no_deploy} ) {
my $schema = shift;
my $file = shift || $self->get_ddl_file($schema);
- open IN, $file;
+ open( my $fh, "<",$file ) or die "couldnt open $file, $!";
my $sql;
- { local $/ = undef; $sql = <IN>; }
- close IN;
+ { local $/ = undef; $sql = <$fh>; }
foreach my $line (split(/;\n/, $sql)) {
print "$line\n";
[ 2, 'Random Boy Band' ],
[ 3, 'We Are Goth' ],
[ 4, '' ], # Test overridden new will default name to "Test Name" using use_create => 1.
- [ 329482389748937, 'Big PK' ],
+ [ 32948, 'Big PK' ],
]);
$schema->populate('CD', [