summaryrefslogtreecommitdiff
path: root/hv.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2010-11-13 11:19:38 -0800
committerFather Chrysostomos <sprout@cpan.org>2010-11-13 11:19:38 -0800
commitb9e3049212ebaa8a7f488eb927dee6e3d28f569f (patch)
tree38820770657b3521af8b47970934a9a40bee7f04 /hv.c
parentf3d2f32d14be3c0a0c8b7228649181b430f8d11a (diff)
downloadperl-b9e3049212ebaa8a7f488eb927dee6e3d28f569f.tar.gz
Fix undef %Foo:: to update subclasses
This is something I think I broke with 80ebaca, which made sure that isa linearisations were cached on subclasses after calls to mro_isa_changed_in (so the data could be used to delete isarev entries). The result is that hv_undef, which calls mro_isa_changed_in before deleting everything, was updating the subclasses’ isa caches while its own @ISA was still visible.
Diffstat (limited to 'hv.c')
-rw-r--r--hv.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/hv.c b/hv.c
index e82b74f5df..b43523954a 100644
--- a/hv.c
+++ b/hv.c
@@ -1857,7 +1857,12 @@ Perl_hv_undef(pTHX_ HV *hv)
xhv = (XPVHV*)SvANY(hv);
if ((name = HvENAME_get(hv)) && !PL_dirty)
- mro_isa_changed_in(hv);
+ {
+ /* Delete the @ISA element before calling mro_package_moved, so it
+ does not see it. */
+ (void)hv_delete(hv, "ISA", 3, G_DISCARD);
+ mro_package_moved(NULL, hv, NULL, name, HvENAMELEN_get(hv));
+ }
hfreeentries(hv);
if (name || (name = HvNAME(hv))) {