diff options
author | Nicholas Clark <nick@ccl4.org> | 2000-12-05 12:44:31 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-12-05 14:38:53 +0000 |
commit | 4c80c0b28d91ade6a9768a49b70f648aabec579b (patch) | |
tree | f5f9af3bd155cef5f27b65436f08069b62e51805 /util.c | |
parent | e11947490c2e87179a2e8ad633598bddc45928c9 (diff) | |
download | perl-4c80c0b28d91ade6a9768a49b70f648aabec579b.tar.gz |
shrink pp_hot fractionally
Message-ID: <20001205124431.E74518@plum.flirble.org>
Use report_evil_fh().
p4raw-id: //depot/perl@7990
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -3958,7 +3958,15 @@ Perl_report_evil_fh(pTHX_ GV *gv, IO *io, I32 op) name = SvPVX(sv); } - if (name && *name) { + if (op == OP_phoney_OUTPUT_ONLY || op == OP_phoney_INPUT_ONLY) { + if (name && *name) + Perl_warner(aTHX_ WARN_IO, "Filehandle %s opened only for %sput", + name, + (op == OP_phoney_INPUT_ONLY ? "in" : "out")); + else + Perl_warner(aTHX_ WARN_IO, "Filehandle opened only for %sput", + (op == OP_phoney_INPUT_ONLY ? "in" : "out")); + } else if (name && *name) { Perl_warner(aTHX_ warn_type, "%s%s on %s %s %s", func, pars, vile, type, name); if (io && IoDIRP(io) && !(IoFLAGS(io) & IOf_FAKE_DIRP)) |