From: Gurusamy Sarathy Date: Sun, 29 Nov 1998 08:22:49 +0000 (+0000) Subject: prefer IO::Handle for IO if FileHandle:: is empty (as suggested by X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5f2d631d316df23ef6c85417f986072d5c8e5834;p=p5sagit%2Fp5-mst-13.2.git prefer IO::Handle for IO if FileHandle:: is empty (as suggested by Tim Bunce) p4raw-id: //depot/perl@2380 --- diff --git a/gv.c b/gv.c index beffabf..85ac8f9 100644 --- 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;