summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2004-12-03 18:56:31 +0000
committerNicholas Clark <nick@ccl4.org>2004-12-03 18:56:31 +0000
commit9dde0ab5b19ba4c8e14ce23a6ead155daca1526e (patch)
treeef66918d75fa27e50650b11549cfef798b01e9e2 /gv.c
parent70ec62655df91a127fc208eb77497a9be5917f1b (diff)
downloadperl-9dde0ab5b19ba4c8e14ce23a6ead155daca1526e.tar.gz
Small code tidy up in gv_fullname4
p4raw-id: //depot/perl@23605
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/gv.c b/gv.c
index 5ea5141f99..64acb371b3 100644
--- a/gv.c
+++ b/gv.c
@@ -1092,13 +1092,12 @@ Perl_gv_fullname4(pTHX_ SV *sv, GV *gv, const char *prefix, bool keepmain)
}
sv_setpv(sv, prefix ? prefix : "");
- if (!HvNAME(hv))
+ name = HvNAME(hv);
+ if (!name)
name = "__ANON__";
- else
- name = HvNAME(hv);
+
if (keepmain || strNE(name, "main")) {
- sv_catpv(sv,name);
- sv_catpvn(sv,"::", 2);
+ Perl_sv_catpvf(aTHX_ sv,"%s::", name);
}
sv_catpvn(sv,GvNAME(gv),GvNAMELEN(gv));
}