[Bps-public-commit] r17058 - DBIx-SearchBuilder/trunk/t

jesse at bestpractical.com jesse at bestpractical.com
Mon Dec 1 09:53:34 EST 2008


Author: jesse
Date: Mon Dec  1 09:53:34 2008
New Revision: 17058

Modified:
   DBIx-SearchBuilder/trunk/t/utils.pl

Log:
* Updated t/utils.t to put sqlite databases in a tempdir for better GC

Modified: DBIx-SearchBuilder/trunk/t/utils.pl
==============================================================================
--- DBIx-SearchBuilder/trunk/t/utils.pl	(original)
+++ DBIx-SearchBuilder/trunk/t/utils.pl	Mon Dec  1 09:53:34 2008
@@ -1,8 +1,8 @@
 #!/usr/bin/perl -w
 
 use strict;
-use File::Temp qw/ tempfile /;
-
+use File::Temp qw/ tempdir /;
+use File::Spec;
 =head1 VARIABLES
 
 =head2 @SupportedDrivers
@@ -95,12 +95,12 @@
 
 sub connect_sqlite {
 
-    my ( $fh, $filename ) = tempfile();
-    close($fh);
+    my $dir = tempdir(CLEANUP => 1);
+    
     my $handle = shift;
     return $handle->Connect(
         Driver   => 'SQLite',
-        Database => $filename
+        Database => File::Spec->catfile($dir => "db.sqlite")
     );
 }
 



More information about the Bps-public-commit mailing list