From: Jarkko Hietaniemi Date: Wed, 26 Jul 2000 23:51:26 +0000 (+0000) Subject: Further File::Temp patches from Yitzchak Scott-Thoennes X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d62e1b7f399551c90af66e0f875a63c4e21b5cc8;p=p5sagit%2Fp5-mst-13.2.git Further File::Temp patches from Yitzchak Scott-Thoennes and Craig A. Berry. p4raw-id: //depot/perl@6452 --- diff --git a/lib/File/Temp.pm b/lib/File/Temp.pm index dd0ee9c..aac8b7a 100644 --- a/lib/File/Temp.pm +++ b/lib/File/Temp.pm @@ -1454,18 +1454,16 @@ sub unlink0 { my @okstat = (0..$#fh); # Use all by default if ($^O eq 'MSWin32') { @okstat = (1,2,3,4,5,7,8,9,10); - } elsif ($^O eq 'VMS') { - @okstat = (0,1,2,3,4,5,7,8,9,10); } elsif ($^O eq 'os2') { - @okstat = (0, 2..10, 13..$#fh); + @okstat = (0, 2..$#fh); } # Now compare each entry explicitly by number for (@okstat) { print "Comparing: $_ : $fh[$_] and $path[$_]\n" if $DEBUG; - # Use eq rather than == since on OS/2 elements 11 and 12 return - # the empty string rather than a null. This is fine since we - # are only comparing integers. + # Use eq rather than == since rdev, blksize, and blocks (6, 11, + # and 12) will be '' on platforms that do not support them. This + # is fine since we are only comparing integers. unless ($fh[$_] eq $path[$_]) { warn "Did not match $_ element of stat\n" if $DEBUG; return 0; diff --git a/pod/perlport.pod b/pod/perlport.pod index 7f779c9..ee147e9 100644 --- a/pod/perlport.pod +++ b/pod/perlport.pod @@ -1640,6 +1640,10 @@ Not implemented. (S, Win32, VMS, S, VOS, VM/ESA) =item stat +Platforms that do not have rdev, blksize, or blocks will return these +as '', so numeric comparison or manipulation of these fields may cause +'not numeric' warnings. + mtime and atime are the same thing, and ctime is creation time instead of inode change time. (S) @@ -1650,6 +1654,9 @@ device and inode are not necessarily reliable. (VMS) mtime, atime and ctime all return the last modification time. Device and inode are not necessarily reliable. (S) +dev, rdev, blksize, and blocks are not available. inode is not +meaningful and will differ between stat calls on the same file. (os2) + =item symlink OLDFILE,NEWFILE Not implemented. (Win32, VMS, S)