summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-05-17 09:06:45 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-05-17 09:06:45 +0000
commit3f4520fee5e3350893877859562bde5dfa18d3a8 (patch)
treefc46eb4b30c830bd5360b0e8fec7ca4faed8bbce
parent9d6e9d4dc69df06db9fc574444756ce7168620e7 (diff)
downloadperl-3f4520fee5e3350893877859562bde5dfa18d3a8.tar.gz
emit more appropriate diagnostic for failed glob (variant
of patch suggested by Graham Barr) p4raw-id: //depot/perl@3432
-rw-r--r--gv.c2
-rw-r--r--pod/perldiag.pod4
-rw-r--r--pp.c2
-rw-r--r--pp_hot.c11
4 files changed, 12 insertions, 7 deletions
diff --git a/gv.c b/gv.c
index df3e0e173c..8df41c5454 100644
--- a/gv.c
+++ b/gv.c
@@ -1130,7 +1130,7 @@ Gv_AMupdate(HV *stash)
(SvPOK(GvSV(gv)) ? SvPVX(GvSV(gv)) : "???" ),
cp, HvNAME(stash));
} else
- croak("Cannot resolve method `%.256s' overloading `%s' in package `%.256s'",
+ croak("Can't resolve method `%.256s' overloading `%s' in package `%.256s'",
(SvPOK(GvSV(gv)) ? SvPVX(GvSV(gv)) : "???" ),
cp, HvNAME(stash));
}
diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index b83b577b03..b7e2071b41 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -982,12 +982,12 @@ references can be weakened.
an assignment operator, which implies modifying the value itself.
Perhaps you need to copy the value to a temporary, and repeat that.
-=item Cannot find an opnumber for "%s"
+=item Can't find an opnumber for "%s"
(F) A string of a form C<CORE::word> was given to prototype(), but
there is no builtin with the name C<word>.
-=item Cannot resolve method `%s' overloading `%s' in package `%s'
+=item Can't resolve method `%s' overloading `%s' in package `%s'
(F|P) Error resolving overloading specified by a method name (as
opposed to a subroutine reference): no such method callable via the
diff --git a/pp.c b/pp.c
index e76266e1b2..afee215cd5 100644
--- a/pp.c
+++ b/pp.c
@@ -472,7 +472,7 @@ PP(pp_prototype)
goto set;
else { /* None such */
nonesuch:
- croak("Cannot find an opnumber for \"%s\"", s+6);
+ croak("Can't find an opnumber for \"%s\"", s+6);
}
}
}
diff --git a/pp_hot.c b/pp_hot.c
index 5fa2bef7b9..7709c53628 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -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;