In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/c3624cb8d7408c7bfe21b5f565063cc92cecfd19?hp=74182dbd4562aa2e1f203924b0b5e6676faec47c>

- Log -----------------------------------------------------------------
commit c3624cb8d7408c7bfe21b5f565063cc92cecfd19
Author: Tim Jenness <[email protected]>
Date:   Sun Jun 28 21:44:20 2009 -1000

    tjenness: dual life modules
    
    On Mon, 8 Jun 2009, Dave Mitchell wrote:
    
    >    File::Temp
    >
    >   blead and maint have some local portability fixes to
    >   lib/File/Temp/t/fork.t, which is would be nice to see backported
    >   to a new CPAN release.
    
    V0.22 is on its way to CPAN. Patch against blead is attached. This only
    includes the patch to fork.t rather than risking changes to Temp.pm
    itself.
    
    From e4eb4ee45a57b117f82541fbc66320112da228d4 Mon Sep 17 00:00:00 2001
    From: Tim Jenness <[email protected]>
    Date: Sun, 28 Jun 2009 21:41:14 -1000
    Subject: [PATCH] Synchronize File::Temp with CPAN v0.22
    
    Signed-off-by: H.Merijn Brand <[email protected]>
-----------------------------------------------------------------------

Summary of changes:
 lib/File/Temp.pm       |    4 ++--
 lib/File/Temp/t/fork.t |   29 ++++++++++++++---------------
 2 files changed, 16 insertions(+), 17 deletions(-)

diff --git a/lib/File/Temp.pm b/lib/File/Temp.pm
index c0d7eef..a2d4ae0 100644
--- a/lib/File/Temp.pm
+++ b/lib/File/Temp.pm
@@ -203,7 +203,7 @@ Exporter::export_tags('POSIX','mktemp','seekable');
 
 # Version number
 
-$VERSION = '0.21';
+$VERSION = '0.22';
 
 # This is a list of characters that can be used in random filenames
 
@@ -2387,7 +2387,7 @@ the C<tempdir> function.
 
 Tim Jenness E<lt>[email protected]<gt>
 
-Copyright (C) 2007-2008 Tim Jenness.
+Copyright (C) 2007-2009 Tim Jenness.
 Copyright (C) 1999-2007 Tim Jenness and the UK Particle Physics and
 Astronomy Research Council. All Rights Reserved.  This program is free
 software; you can redistribute it and/or modify it under the same
diff --git a/lib/File/Temp/t/fork.t b/lib/File/Temp/t/fork.t
index a522ca7..fd3f5a6 100644
--- a/lib/File/Temp/t/fork.t
+++ b/lib/File/Temp/t/fork.t
@@ -6,25 +6,25 @@ $| = 1;
 use strict;
 
 BEGIN {
-    require Config;
-    my $can_fork = $Config::Config{d_fork} ||
-                   (($^O eq 'MSWin32' || $^O eq 'NetWare') and
-                    $Config::Config{useithreads} and 
-                    $Config::Config{ccflags} =~ /-DPERL_IMPLICIT_SYS/
-                   );
-    if ( $can_fork ) {
-        print "1..8\n";
-    } else {
-        print "1..0 # Skip No fork available\n";
-        exit;
-    }
+  require Config;
+  my $can_fork = $Config::Config{d_fork} ||
+    (($^O eq 'MSWin32' || $^O eq 'NetWare') and
+     $Config::Config{useithreads} and
+     $Config::Config{ccflags} =~ /-DPERL_IMPLICIT_SYS/
+    );
+  if ( $can_fork ) {
+    print "1..8\n";
+  } else {
+    print "1..0 # Skip No fork available\n";
+    exit;
+  }
 }
 
 use File::Temp;
 
 # OO interface
 
-my $file = File::Temp->new(CLEANUP=>1);
+my $file = File::Temp->new();
 
 myok( 1, -f $file->filename, "OO File exists" );
 
@@ -60,7 +60,7 @@ myok( 4, -f $file->filename(), "OO File exists in parent" );
 
 # non-OO interface
 
-my ($fh, $filename) = File::Temp::tempfile();
+my ($fh, $filename) = File::Temp::tempfile( UNLINK => 1 );
 
 myok( 5, -f $filename, "non-OO File exists" );
 
@@ -88,7 +88,6 @@ while ($children) {
     $children--;
 }
 myok(8, -f $filename, "non-OO File exists in parent" );
-unlink($filename);   # Cleanup
 
 
 # Local ok sub handles explicit number

--
Perl5 Master Repository

Reply via email to