diff options
author | Father Chrysostomos <sprout@cpan.org> | 2010-10-12 10:13:58 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2010-10-12 12:52:12 -0700 |
commit | d056e33c1ea02abb0c031adb18b181624282ba3c (patch) | |
tree | be509216d46bd9a97ddb6013ce278f4f104d5f68 /hv.c | |
parent | 11f9f0eda0026b9120e2ceb1b15c72667d1c91ac (diff) | |
download | perl-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.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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); } } |