summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doio.c6
-rw-r--r--pp_hot.c10
2 files changed, 9 insertions, 7 deletions
diff --git a/doio.c b/doio.c
index 3988c78873..f2c3752b6d 100644
--- a/doio.c
+++ b/doio.c
@@ -2447,6 +2447,12 @@ Perl_vms_start_glob
fp = IoIFP(io);
#endif /* !VMS */
LEAVE;
+
+ if (!fp && ckWARN(WARN_GLOB)) {
+ Perl_warner(aTHX_ packWARN(WARN_GLOB), "glob failed (can't start child: %s)",
+ Strerror(errno));
+ }
+
return fp;
}
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 */