Be portable.
[p5sagit/p5-mst-13.2.git] / t / lib / st-forgive.t
index fd5204f..e5272f0 100644 (file)
@@ -29,6 +29,7 @@ sub BEGIN {
 }
 
 use Storable qw(store retrieve);
+use File::Spec;
 
 print "1..8\n";
 
@@ -42,6 +43,8 @@ print (($@ ne '')?"ok $test\n":"not ok $test\n"); $test++;
 
 $Storable::forgive_me=1;
 
+my $devnull = File::Spec->devnull;
+
 open(SAVEERR, ">&STDERR");
 open(STDERR, ">/dev/null") or 
   ( print SAVEERR "Unable to redirect STDERR: $!\n" and exit(1) );
@@ -60,4 +63,4 @@ print (($ret->[2] eq 'bar')?"ok $test\n":"not ok $test\n"); $test++;
 print ((ref $ret->[1] eq 'SCALAR')?"ok $test\n":"not ok $test\n"); $test++;
 
 
-END { unlink 'store' }
+END { 1 while unlink 'store' }