r592@rob-kinyons-computer-2 (orig r10555): rkinyon | 2008-01-15 14:19:42 -0500
[dbsrgits/DBM-Deep.git] / t / common.pm
index 3b4958c..97cd1c9 100644 (file)
@@ -1,4 +1,5 @@
-package t::common;
+package # Hide from PAUSE
+    t::common;
 
 use 5.006_000;
 
@@ -18,16 +19,16 @@ use Fcntl qw( :flock );
 
 my $parent = $ENV{WORK_DIR} || File::Spec->tmpdir;
 my $dir = tempdir( CLEANUP => 1, DIR => $parent );
+#my $dir = tempdir( DIR => '.' );
 
 sub new_fh {
-    my ($fh, $filename) = tempfile( 'tmpXXXX', DIR => $dir );
+    my ($fh, $filename) = tempfile( 'tmpXXXX', DIR => $dir, UNLINK => 1 );
 
     # This is because tempfile() returns a flock'ed $fh on MacOSX.
     flock $fh, LOCK_UN;
 
     return ($fh, $filename);
 }
-#END{<>}
+
 1;
 __END__
-