From: Michael G. Schwern Date: Sun, 3 Oct 1999 13:54:23 +0000 (-0400) Subject: A better version of #4296. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=88e9b055d1d2b36d019a3b541f111de4d9b71e3e;p=p5sagit%2Fp5-mst-13.2.git A better version of #4296. To: perl5-porters@perl.org Subject: [PATCH av.c, op.c, perldiag.pod] "array field" -> "pseudo-hash field" Message-ID: <19991003135423.A3050@blackrider> p4raw-id: //depot/cfgperl@4297 --- diff --git a/av.c b/av.c index 6301043..8f3b4f8 100644 --- a/av.c +++ b/av.c @@ -634,7 +634,7 @@ Perl_avhv_fetch_ent(pTHX_ AV *av, SV *keysv, I32 lval, U32 hash) he = hv_fetch_ent(keys, keysv, FALSE, hash); if (!he) - Perl_croak(aTHX_ "No such pseudo-hash field '%s'", SvPV(keysv,n_a)); + Perl_croak(aTHX_ "No such pseudo-hash field \"%s\"", SvPV(keysv,n_a)); return av_fetch(av, avhv_index_sv(HeVAL(he)), lval); } diff --git a/op.c b/op.c index 40f4e36..c0abbf8 100644 --- a/op.c +++ b/op.c @@ -6141,7 +6141,7 @@ Perl_peep(pTHX_ register OP *o) key = SvPV(*svp, keylen); indsvp = hv_fetch(GvHV(*fields), key, keylen, FALSE); if (!indsvp) { - Perl_croak(aTHX_ "No such field \"%s\" in variable %s of type %s", + Perl_croak(aTHX_ "No such pseudo-hash field \"%s\" in variable %s of type %s", key, SvPV(lexname, n_a), HvNAME(SvSTASH(lexname))); } ind = SvIV(*indsvp); diff --git a/pod/perldiag.pod b/pod/perldiag.pod index caf8886..b35d260 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -1967,13 +1967,13 @@ your system. (F) The argument to B<-I> must follow the B<-I> immediately with no intervening space. -=item No such pseudo-hash field '%s' +=item No such pseudo-hash field "%s" -(F) You tried to access a pseudo-hash, but the field name used is +(F) You tried to access an array as a hash, but the field name used is not defined. The hash at index 0 should map all valid field names to array indices for that to work. -=item No such field "%s" in variable %s of type %s +=item No such pseudo-hash field "%s" in variable %s of type %s (F) You tried to access a field of a typed variable where the type does not know about the field name. The field names are looked up in