summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/gv.c b/gv.c
index 9a72996f93..b2cb5a4146 100644
--- a/gv.c
+++ b/gv.c
@@ -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 == ':')