From: Simon Cozens Date: Sun, 17 Dec 2000 12:31:56 +0000 (+0000) Subject: Re: The long awaited feature ... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=50f846a78cb1380a050b0b517546043c11cbd578;p=p5sagit%2Fp5-mst-13.2.git Re: The long awaited feature ... Message-ID: <20001217123156.A3891@deep-dark-truthful-mirror.perlhacker.org> Add a warning to binmode() about using bad filehandles (can happen e.g. if someone forgets the filehandle argument) p4raw-id: //depot/perl@8145 --- diff --git a/pp_sys.c b/pp_sys.c index 7d6386e..0c834ca 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -709,8 +709,10 @@ PP(pp_binmode) } EXTEND(SP, 1); - if (!(io = GvIO(gv)) || !(fp = IoIFP(io))) - RETPUSHUNDEF; + if (!(io = GvIO(gv)) || !(fp = IoIFP(io))) { + report_evil_fh(gv, io, PL_op->op_type); + RETPUSHUNDEF; + } if (discp) { names = SvPV(discp,len);