Change 11810 by sky@sky-borderline on 2001/09/01 11:52:44

        Subject: [PATCH], was t/op/incode.t breaks make minitest
        From: Rafael Garcia-Suarez <[EMAIL PROTECTED]>
        Date: Sat, 1 Sep 2001 14:50:14 +0200
        Message-ID: <20010901145014.A691@rafael>

Affected files ...

... //depot/perl/t/op/inccode.t#4 edit

Differences ...

==== //depot/perl/t/op/inccode.t#4 (text) ====
Index: perl/t/op/inccode.t
--- perl/t/op/inccode.t.~1~     Sat Sep  1 06:00:06 2001
+++ perl/t/op/inccode.t Sat Sep  1 06:00:06 2001
@@ -8,18 +8,23 @@
 }
 
 use File::Spec;
-use File::Temp qw/tempfile/;
 use Test::More tests => 30;
 
+my @tempfiles = ();
+
 sub get_temp_fh {
-    my ($fh,$f) = tempfile("DummyModuleXXXX", DIR => File::Spec->curdir,
-       UNLINK => 1);
+    my $f = "DummyModule0000";
+    1 while -e ++$f;
+    push @tempfiles, $f;
+    open my $fh, ">$f" or die "Can't create $f: $!";
     print $fh "package ".substr($_[0],0,-3)."; 1;";
     close $fh;
     open $fh, $f or die "Can't open $f: $!";
     return $fh;
 }
 
+END { 1 while unlink @tempfiles }
+
 sub get_addr {
     my $str = shift;
     $str =~ /(0x[0-9a-f]+)/i;
End of Patch.

Reply via email to