diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-11-29 08:22:49 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-11-29 08:22:49 +0000 |
commit | 5f2d631d316df23ef6c85417f986072d5c8e5834 (patch) | |
tree | 379f9695ef0d210f17975cdbf1d2f97368abe0f0 /gv.c | |
parent | 127ad2b7f46b3b186ffbada86b1d7dda9ffd2a05 (diff) | |
download | perl-5f2d631d316df23ef6c85417f986072d5c8e5834.tar.gz |
prefer IO::Handle for IO if FileHandle:: is empty (as suggested by
Tim Bunce)
p4raw-id: //depot/perl@2380
Diffstat (limited to 'gv.c')
-rw-r--r-- | gv.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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; |