Fix failures with DBICTEST_SQLITE_USE_FILE=1 introduced by 50261284
Peter Rabbitson [Mon, 12 Mar 2012 06:47:10 +0000 (07:47 +0100)]
t/52leaks.t
t/lib/DBICTest.pm

index 793e036..13158e1 100644 (file)
@@ -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 },
index df3587e..92c16f7 100644 (file)
@@ -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:";
 }