diff options
Diffstat (limited to 'gv.c')
-rw-r--r-- | gv.c | 18 |
1 files changed, 10 insertions, 8 deletions
@@ -1072,16 +1072,18 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags, return NULL; if (!(stash = GvHV(gv))) - 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); + 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); + } } + else if (!HvNAME_get(stash)) + hv_name_set(stash, nambeg, name_cursor - nambeg, 0); } if (*name_cursor == ':') |