This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Restore the package name to overload errors; fix crash
authorFather Chrysostomos <sprout@cpan.org>
Sat, 1 Oct 2011 01:27:58 +0000 (18:27 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Sat, 1 Oct 2011 03:16:31 +0000 (20:16 -0700)
commitf0e9f182fe3d00c8f9a8a6697fbd198f07fcc242
treee1f225f58885de9a2eccdcb3d080fc12b46a3911
parent2e3468793982c433c4b3838a57fb434ecca63875
Restore the package name to overload errors; fix crash

Commit bfcb351493b (which was backported to 5.8.8) caused these error
messages always to mention the overload package, instead of the pack-
age involved:

Can't resolve method "foo" overloading "+" in package "baz"
Stub found while resolving method "foo" overloading "+" in package "baz"

This commit fixes that.  A compiler warning alerted me to the possi-
bility of HvNAME being null, so I wrote a small test for that, found
that it crashed, and incorporated the fix for the crash into the same
commit (since it’s the same line of code).
gv.c
lib/overload.t