From: Tim Jenness Date: Mon, 29 Jun 2009 07:44:20 +0000 (-1000) Subject: tjenness: dual life modules X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c3624cb8d7408c7bfe21b5f565063cc92cecfd19;p=p5sagit%2Fp5-mst-13.2.git 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 Date: Sun, 28 Jun 2009 21:41:14 -1000 Subject: [PATCH] Synchronize File::Temp with CPAN v0.22 Signed-off-by: H.Merijn Brand --- 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 function. Tim Jenness Etjenness@cpan.orgE -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