summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-10-02 03:45:37 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-10-02 03:45:37 +0000
commit4eb79ab512b1332d593701ae7f01c47eac3323b4 (patch)
treea23c2de7fc23aaa46f1c2883368bd1ca84e80a5b /pp_hot.c
parent17feb5d536e7c1a1b75d6e8e85a12d67b3d41c04 (diff)
downloadperl-4eb79ab512b1332d593701ae7f01c47eac3323b4.tar.gz
make warning about glob process failure optional
p4raw-id: //depot/perl@1912
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/pp_hot.c b/pp_hot.c
index 4ca41bbab4..75bdb4fa98 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -1258,8 +1258,12 @@ do_readline(void)
IoFLAGS(io) |= IOf_START;
}
else if (type == OP_GLOB) {
- if (!do_close(PL_last_in_gv, FALSE))
- warn("internal error: glob failed");
+ if (!do_close(PL_last_in_gv, FALSE) && ckWARN(WARN_CLOSED)) {
+ warner(WARN_CLOSED,
+ "glob failed (child exited with status %d%s)",
+ STATUS_CURRENT >> 8,
+ (STATUS_CURRENT & 0xFF) ? ", core dumped" : "");
+ }
}
if (gimme == G_SCALAR) {
(void)SvOK_off(TARG);