develooper Front page | perl.perl5.porters | Postings from September 2001

[PATCH], was t/op/incode.t breaks make minitest

Thread Previous | Thread Next
From:
Rafael Garcia-Suarez
Date:
September 1, 2001 05:47
Subject:
[PATCH], was t/op/incode.t breaks make minitest
Message ID:
20010901145014.A691@rafael
On 2001.09.01 01:17 Michael G Schwern wrote:
> When running make minitest, I get...
> 
> op/inccode.........Can't load module Fcntl, dynamic loading not available in this perl.

Here's a patch:

--- t/op/inccode.t.orig	Wed Aug 29 09:37:34 2001
+++ t/op/inccode.t	Sat Sep  1 14:14:00 2001
@@ -8,17 +8,22 @@
 }
 
 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;

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About