summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--av.c5
-rw-r--r--pod/perldiag.pod4
2 files changed, 5 insertions, 4 deletions
diff --git a/av.c b/av.c
index 7201b49d8f..6301043ac7 100644
--- a/av.c
+++ b/av.c
@@ -630,10 +630,11 @@ Perl_avhv_fetch_ent(pTHX_ AV *av, SV *keysv, I32 lval, U32 hash)
SV **indsvp;
HV *keys = avhv_keys(av);
HE *he;
-
+ STRLEN n_a;
+
he = hv_fetch_ent(keys, keysv, FALSE, hash);
if (!he)
- Perl_croak(aTHX_ "No such array field");
+ 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/pod/perldiag.pod b/pod/perldiag.pod
index d224a54bd7..caf88861a0 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -1967,9 +1967,9 @@ your system.
(F) The argument to B<-I> must follow the B<-I> immediately with no
intervening space.
-=item No such array field
+=item No such pseudo-hash field '%s'
-(F) You tried to access an array as a hash, but the field name used is
+(F) You tried to access a pseudo-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.