This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
127ad2b
)
prefer IO::Handle for IO if FileHandle:: is empty (as suggested by
author
Gurusamy Sarathy
<gsar@cpan.org>
Sun, 29 Nov 1998 08:22:49 +0000
(08:22 +0000)
committer
Gurusamy Sarathy
<gsar@cpan.org>
Sun, 29 Nov 1998 08:22:49 +0000
(08:22 +0000)
Tim Bunce)
p4raw-id: //depot/perl@2380
gv.c
patch
|
blob
|
blame
|
history
diff --git
a/gv.c
b/gv.c
index
beffabf
..
85ac8f9
100644
(file)
--- a/
gv.c
+++ b/
gv.c
@@
-875,7
+875,8
@@
newIO(void)
SvREFCNT(io) = 1;
SvOBJECT_on(io);
iogv = gv_fetchpv("FileHandle::", FALSE, SVt_PVHV);
- if (!iogv)
+ /* unless exists($main::{FileHandle}) and defined(%main::FileHandle::) */
+ if (!(iogv && GvHV(iogv) && HvARRAY(GvHV(iogv))))
iogv = gv_fetchpv("IO::Handle::", TRUE, SVt_PVHV);
SvSTASH(io) = (HV*)SvREFCNT_inc(GvHV(iogv));
return io;