summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pp.c b/pp.c
index 2a543b3b34..f63b372edf 100644
--- a/pp.c
+++ b/pp.c
@@ -601,7 +601,8 @@ PP(pp_gelem)
case 'P':
if (strEQ(elem2, "ACKAGE")) {
const char *name = HvNAME_get(GvSTASH(gv));
- sv = newSVpv(name ? name : "__ANON__", 0);
+ sv = newSVpvn(name ? name : "__ANON__",
+ name ? HvNAMELEN_get(GvSTASH(gv)) : 8);
}
break;
case 'S':