From: Samuel Kaufman Date: Wed, 14 Jan 2015 15:15:48 +0000 (+0000) Subject: test fixin X-Git-Tag: v1.001_029^0 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a9fe6f36ac3d911da91bc28f2c473ddf1d98008c;hp=d41af55bf5eed58f83abc04e58d90dbebca14c16;p=dbsrgits%2FDBIx-Class-Fixtures.git test fixin --- diff --git a/Makefile.PL b/Makefile.PL index bd3e8f5..c752fca 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -14,6 +14,7 @@ my %WriteMakefileArgs = ( "AUTHOR" => "Luke Saunders ", "BUILD_REQUIRES" => { "DBIx::Class::InflateColumn::FS" => "0.01007", + "Devel::Confess" => 0, "ExtUtils::MakeMaker" => "6.59", "Test::More" => "0.98" }, @@ -51,7 +52,7 @@ my %WriteMakefileArgs = ( "IPC::Open3" => 0, "Test::More" => "0.98" }, - "VERSION" => "1.001028", + "VERSION" => "1.001_029", "test" => { "TESTS" => "t/*.t" } @@ -70,6 +71,7 @@ my %FallbackPrereqs = ( "DateTime::Format::MySQL" => 0, "DateTime::Format::Pg" => 0, "DateTime::Format::SQLite" => "0.1", + "Devel::Confess" => 0, "ExtUtils::MakeMaker" => "6.59", "File::Copy::Recursive" => "0.38", "File::Spec" => 0, diff --git a/t/13-populate-two-dbs.t b/t/13-populate-two-dbs.t index af917ab..d05d51a 100644 --- a/t/13-populate-two-dbs.t +++ b/t/13-populate-two-dbs.t @@ -7,7 +7,7 @@ use DBICTest; use Path::Class; use Data::Dumper; use DBICTest::Schema2; - +use Devel::Confess; use IO::All; # set up and populate normal schema @@ -27,7 +27,7 @@ ok $schema2; unlink($dbix_class_different) if (-e $dbix_class_different ); -DBICTest->deploy_schema($schema2, 't lib sqlite_different.sql'); +DBICTest->deploy_schema($schema2, io->catfile(qw't lib sqlite_different.sql')->name); # do dump ok(my $fixtures = DBIx::Class::Fixtures->new({ diff --git a/t/lib/DBICTest.pm b/t/lib/DBICTest.pm index 988e02b..08c0e27 100755 --- a/t/lib/DBICTest.pm +++ b/t/lib/DBICTest.pm @@ -97,10 +97,9 @@ sub deploy_schema { 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 = ; } - close IN; + { local $/ = undef; $sql = <$fh>; } foreach my $line (split(/;\n/, $sql)) { print "$line\n";