projects
/
p5sagit/p5-mst-13.2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
d2d2313
)
FileHandle::DESTROY for fd 0
Roderick Schertler [Wed, 4 Sep 1996 02:55:31 +0000 (
02:55
+0000)]
This fixes FileHandle::DESTROY when called on stdin.
ext/FileHandle/FileHandle.pm
patch
|
blob
|
blame
|
history
diff --git
a/ext/FileHandle/FileHandle.pm
b/ext/FileHandle/FileHandle.pm
index
03a698d
..
1c030ec
100644
(file)
--- a/
ext/FileHandle/FileHandle.pm
+++ b/
ext/FileHandle/FileHandle.pm
@@
-270,10
+270,10
@@
sub DESTROY {
if ($fh =~ /=FILEHANDLE\(/) {
local *TMP = $fh;
- close(TMP) if fileno(TMP);
+ close(TMP) if defined fileno(TMP);
}
else {
- close($fh) if fileno($fh);
+ close($fh) if defined fileno($fh);
}
}