From: Peter Rabbitson Date: Mon, 12 Mar 2012 06:47:10 +0000 (+0100) Subject: Fix failures with DBICTEST_SQLITE_USE_FILE=1 introduced by 50261284 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=39b80a73228310b5fc0f7ab0cc138c6b26d0a453;p=dbsrgits%2FDBIx-Class-Historic.git Fix failures with DBICTEST_SQLITE_USE_FILE=1 introduced by 50261284 --- diff --git a/t/52leaks.t b/t/52leaks.t index 793e036..13158e1 100644 --- a/t/52leaks.t +++ b/t/52leaks.t @@ -290,7 +290,7 @@ my @compose_ns_classes; { my $phantom; for ( - sub { DBICTest->init_schema }, + sub { DBICTest->init_schema( sqlite_use_file => 0 ) }, sub { shift->source('Artist') }, sub { shift->resultset }, sub { shift->result_source }, diff --git a/t/lib/DBICTest.pm b/t/lib/DBICTest.pm index df3587e..92c16f7 100644 --- a/t/lib/DBICTest.pm +++ b/t/lib/DBICTest.pm @@ -63,7 +63,9 @@ sub _sqlite_dbfilename { sub _sqlite_dbname { my $self = shift; my %args = @_; - return $self->_sqlite_dbfilename if $args{sqlite_use_file} or $ENV{"DBICTEST_SQLITE_USE_FILE"}; + return $self->_sqlite_dbfilename if ( + defined $args{sqlite_use_file} ? $args{sqlite_use_file} : $ENV{'DBICTEST_SQLITE_USE_FILE'} + ); return ":memory:"; }