summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2013-09-05 14:14:00 +1000
committerTony Cook <tony@develop-help.com>2013-09-09 15:22:18 +1000
commitde7dabb6fc03820bf19d0872e77db964a5e10731 (patch)
treea3f9e4e4f5dfa5b37d9ed5a88d6b3f3f91535e44 /pp_hot.c
parentace0afd9d8231117ac1fa7ccd053348db7f9abf5 (diff)
downloadperl-de7dabb6fc03820bf19d0872e77db964a5e10731.tar.gz
[perl #117265] move the "glob failed" warning to the point of failure
This avoids an extraneous warning when globbing fails for other reasons.
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/pp_hot.c b/pp_hot.c
index d3f8976f9b..9641b19222 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -1569,14 +1569,10 @@ Perl_do_readline(pTHX)
}
if (!fp) {
if ((!io || !(IoFLAGS(io) & IOf_START))
- && ckWARN2(WARN_GLOB, WARN_CLOSED))
+ && ckWARN(WARN_CLOSED)
+ && type != OP_GLOB)
{
- if (type == OP_GLOB)
- Perl_ck_warner_d(aTHX_ packWARN(WARN_GLOB),
- "glob failed (can't start child: %s)",
- Strerror(errno));
- else
- report_evil_fh(PL_last_in_gv);
+ report_evil_fh(PL_last_in_gv);
}
if (gimme == G_SCALAR) {
/* undef TARG, and push that undefined value */