Michael G. Schwern [Sun, 3 Oct 1999 13:16:47 +0000 (09:16 -0400)]
To: perl5-porters@perl.org
Subject: [PATCH av.c, perldiag.pod] Added field name to "No such array field"
Message-ID: <
19991003131647.A2816@blackrider>
plus changed the error message to say "No such pseudo-hash field"
as discussed in the above mail message.
p4raw-id: //depot/cfgperl@4296
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);
}
(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.