diff options
author | Father Chrysostomos <sprout@cpan.org> | 2010-10-30 14:27:48 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2010-10-30 14:28:22 -0700 |
commit | d7fbb1de45aa77d305eccd94d8c07d7a1491fc45 (patch) | |
tree | c3ca64e54d5db7ccd4fc61a05932f841e1e9515c /mro.c | |
parent | 435e8dd0d80d4d354981c5cf9051cdea58fcf07e (diff) | |
download | perl-d7fbb1de45aa77d305eccd94d8c07d7a1491fc45.tar.gz |
Set stash names before calling mro_isa_changed_in3
mro_isa_changed_in3 cannot update isa caches properly if it only sees
an intermediate state.
Diffstat (limited to 'mro.c')
-rw-r--r-- | mro.c | 19 |
1 files changed, 9 insertions, 10 deletions
@@ -662,11 +662,19 @@ Perl_mro_package_moved(pTHX_ HV * const stash, HV * const oldstash, } if(newname_len < 0) newname_len = -newname_len; + if(oldstash && HvENAME_get(oldstash)) { + if(PL_stashcache) + (void) + hv_delete(PL_stashcache, newname, newname_len, G_DISCARD); + hv_ename_delete(oldstash, newname, newname_len); + } + if(stash) hv_ename_add(stash, newname, newname_len); + mro_isa_changed_in3((HV *)oldstash, newname, newname_len); if( (!stash || !HvARRAY(stash)) && (!oldstash || !HvARRAY(oldstash)) - ) goto set_names; + ) return; /* This is partly based on code in hv_iternext_flags. We are not call- ing that here, as we want to avoid resetting the hash iterator. */ @@ -810,15 +818,6 @@ Perl_mro_package_moved(pTHX_ HV * const stash, HV * const oldstash, } } } - - set_names: - if(oldstash && HvENAME_get(oldstash)) { - if(PL_stashcache) - (void) - hv_delete(PL_stashcache, newname, newname_len, G_DISCARD); - hv_ename_delete(oldstash, newname, newname_len); - } - if(stash) hv_ename_add(stash, newname, newname_len); } /* |