diff options
author | Simon Cozens <simon@netthink.co.uk> | 2000-12-17 12:31:56 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-12-17 17:39:35 +0000 |
commit | 50f846a78cb1380a050b0b517546043c11cbd578 (patch) | |
tree | b2768b13ca1602e660a969cfac4d8b17d6f820f5 /pp_sys.c | |
parent | 4d69506c2d1d71db8d32dc38aa9aa6beb5cd8d07 (diff) | |
download | perl-50f846a78cb1380a050b0b517546043c11cbd578.tar.gz |
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
Diffstat (limited to 'pp_sys.c')
-rw-r--r-- | pp_sys.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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); |