summaryrefslogtreecommitdiff
path: root/hv.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2010-10-12 10:13:58 -0700
committerFather Chrysostomos <sprout@cpan.org>2010-10-12 12:52:12 -0700
commitd056e33c1ea02abb0c031adb18b181624282ba3c (patch)
treebe509216d46bd9a97ddb6013ce278f4f104d5f68 /hv.c
parent11f9f0eda0026b9120e2ceb1b15c72667d1c91ac (diff)
downloadperl-d056e33c1ea02abb0c031adb18b181624282ba3c.tar.gz
Reset isa caches on nonexistent substashes when stash trees are moved
This fixes the problem of isa cache linearisations’ and method caches’ not being reset on nonexistent packages when they are replaced with real packages as a result of parent stashes’ being moved. This can happen in cases like this: @left::ISA = 'outer::inner'; @right::ISA = 'clone::inner'; {package outer::inner} *clone:: = \%outer::; print "ok 1", "\n" if left->isa("clone::inner"); print "ok 2", "\n" if right->isa("outer::inner"); This changes mro_package_moved’s parameter list as documented in the diff for mro.c. See also the new comments in that function.
Diffstat (limited to 'hv.c')
-rw-r--r--hv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hv.c b/hv.c
index d2d594d3e5..5482306a5f 100644
--- a/hv.c
+++ b/hv.c
@@ -1043,7 +1043,8 @@ S_hv_delete_common(pTHX_ HV *hv, SV *keysv, const char *key, STRLEN klen,
if (klen > 1 && key[klen-2] == ':' && key[klen-1] == ':'
&& SvTYPE(sv) == SVt_PVGV) {
const HV * const stash = GvHV((GV *)sv);
- if (stash && HvNAME(stash)) mro_package_moved(stash);
+ if (stash && HvNAME(stash))
+ mro_package_moved(NULL, stash, NULL, NULL, 0);
}
}