diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-05-17 09:06:45 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-05-17 09:06:45 +0000 |
commit | 3f4520fee5e3350893877859562bde5dfa18d3a8 (patch) | |
tree | fc46eb4b30c830bd5360b0e8fec7ca4faed8bbce /pp_hot.c | |
parent | 9d6e9d4dc69df06db9fc574444756ce7168620e7 (diff) | |
download | perl-3f4520fee5e3350893877859562bde5dfa18d3a8.tar.gz |
emit more appropriate diagnostic for failed glob (variant
of patch suggested by Graham Barr)
p4raw-id: //depot/perl@3432
Diffstat (limited to 'pp_hot.c')
-rw-r--r-- | pp_hot.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -1270,9 +1270,14 @@ do_readline(void) SP--; } if (!fp) { - if (ckWARN(WARN_CLOSED) && io && !(IoFLAGS(io) & IOf_START)) - warner(WARN_CLOSED, - "Read on closed filehandle <%s>", GvENAME(PL_last_in_gv)); + if (ckWARN(WARN_CLOSED) && io && !(IoFLAGS(io) & IOf_START)) { + if (type == OP_GLOB) + warner(WARN_CLOSED, "glob failed (can't start child: %s)", + Strerror(errno)); + else + warner(WARN_CLOSED, "Read on closed filehandle <%s>", + GvENAME(PL_last_in_gv)); + } if (gimme == G_SCALAR) { (void)SvOK_off(TARG); PUSHTARG; |