# Version number
-$VERSION = '0.21';
+$VERSION = '0.22';
# This is a list of characters that can be used in random filenames
Tim Jenness E<lt>tjenness@cpan.orgE<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
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" );
# 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" );
$children--;
}
myok(8, -f $filename, "non-OO File exists in parent" );
-unlink($filename); # Cleanup
# Local ok sub handles explicit number