diff options
author | Nicholas Clark <nick@ccl4.org> | 2004-12-03 18:56:31 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2004-12-03 18:56:31 +0000 |
commit | 9dde0ab5b19ba4c8e14ce23a6ead155daca1526e (patch) | |
tree | ef66918d75fa27e50650b11549cfef798b01e9e2 /gv.c | |
parent | 70ec62655df91a127fc208eb77497a9be5917f1b (diff) | |
download | perl-9dde0ab5b19ba4c8e14ce23a6ead155daca1526e.tar.gz |
Small code tidy up in gv_fullname4
p4raw-id: //depot/perl@23605
Diffstat (limited to 'gv.c')
-rw-r--r-- | gv.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -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)); } |