This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Rename stashes when they move around
authorFather Chrysostomos <sprout@cpan.org>
Mon, 25 Oct 2010 06:45:49 +0000 (23:45 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Mon, 25 Oct 2010 06:45:49 +0000 (23:45 -0700)
commit35759254f69c7bfa698c7a24b1031806ea41bbae
tree039bd04d14a8964552b84834ef8a0b0cfc9a9529
parent96517a90c6cb5ea3aaf4304897cd4eb1db2d2305
Rename stashes when they move around

This is yet another patch in preparation for [perl #75176] (I keep
saying that.).

It uses the recently-added functions hv_name_add and hv_name_delete, to add and remove names when mro_package_moved is called.

mro_package_moved’s calling convention needed to change to make this
work, which is the bulk of the patch.

Code that was calling mro_package_moved was also doing it sometimes
when it was unnecessary. If the stash being assigned over had no name,
then there was no possibiiity of its being in the symbol table.

This probably fixes [perl #77358] (isa warnings), though I have not
tested that yet.

One user-visible change this introduces is that a detached glob whose
stash loses its name will no longer stringify the same way (a bit like
a glob that loses its stash pointer; except that it becomes
*__ANON__::foo instead of "").
embed.fnc
hv.c
mro.c
proto.h
sv.c