summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-07-26 23:51:26 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-07-26 23:51:26 +0000
commitd62e1b7f399551c90af66e0f875a63c4e21b5cc8 (patch)
tree2b7ce51b525a286b255abd24031973816b8b3740
parentc0a6bf0945a4ebade7d5943982aa3f61e63bc713 (diff)
downloadperl-d62e1b7f399551c90af66e0f875a63c4e21b5cc8.tar.gz
Further File::Temp patches from Yitzchak Scott-Thoennes
and Craig A. Berry. p4raw-id: //depot/perl@6452
-rw-r--r--lib/File/Temp.pm10
-rw-r--r--pod/perlport.pod7
2 files changed, 11 insertions, 6 deletions
diff --git a/lib/File/Temp.pm b/lib/File/Temp.pm
index dd0ee9c7eb..aac8b7a93c 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 7f779c955e..ee147e902c 100644
--- a/pod/perlport.pod
+++ b/pod/perlport.pod
@@ -1640,6 +1640,10 @@ Not implemented. (S<Mac OS>, Win32, VMS, S<RISC OS>, 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<Mac OS>)
@@ -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<RISC OS>)
+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<RISC OS>)