[perl #88132] broken ISA lookup after aliasing packages ending with ::
authorFather Chrysostomos <sprout@cpan.org>
Wed, 13 Apr 2011 16:48:39 +0000 (09:48 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Wed, 13 Apr 2011 16:49:01 +0000 (09:49 -0700)
commit088225fdf76aeaafa844cf1a058d5c11106522c4
treee44ce8225af3d3b2e002aaed68c81de158f2b26c
parentac245c6aeb6d372e786d0dcce12b192efb29be7f
[perl #88132] broken ISA lookup after aliasing packages ending with ::

gv_fetchpvn_flags did not always assign a name to a return HV ending
with ::. This would result in code in various places skipping certain
‘stashes’ (in quotes because nameless HVs are technically not stashes)
because they were nameless when they should not have been.

So sometimes ISA caches would end up being out of date, as in the test
cases posted with [perl #88132] (and incorporated into this patch).

This commit fixes that by changing the parsing of glob names.

Formerly, a :: was not considered a package separator if it came imme-
diately after a ::. So foo:::: would become foo::/:: (with the final
:: considered a regular stash entry, not a ‘stash’ stash entry) and
foo:::::: would become foo::/:::/:.

Now a :: is always a package separator. So *foo::::bar is accessible
via $foo::{"::"}{bar} and *$foo:::::: via $foo::{"::"}{"::"}.

This happens to fix [perl #88134] as well.
gv.c
t/mro/package_aliases.t
t/op/stash.t