summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2010-11-22 09:25:40 -0800
committerFather Chrysostomos <sprout@cpan.org>2010-11-22 09:25:40 -0800
commit298d65111ee12fde3fed852c9fd487b479c7d919 (patch)
tree545ec5ab1a342ca9273bc24b05ea273fc2f35eb2 /gv.c
parentb58757d5ff9c7545317c6f3c3c7e6aaad3b34de6 (diff)
downloadperl-298d65111ee12fde3fed852c9fd487b479c7d919.tar.gz
Newly-created stashes may need effective names added
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gv.c b/gv.c
index 9f62066f74..9a72996f93 100644
--- a/gv.c
+++ b/gv.c
@@ -1075,7 +1075,13 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags,
stash = GvHV(gv) = newHV();
if (!HvNAME_get(stash))
+ {
hv_name_set(stash, nambeg, name_cursor - nambeg, 0);
+ /* If the containing stash has multiple effective
+ names, see that this one gets them, too. */
+ if (HvAUX(GvSTASH(gv))->xhv_name_count)
+ mro_package_moved(stash, NULL, gv, 1);
+ }
}
if (*name_cursor == ':')