summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-03-20 03:28:02 -0800
committerJarkko Hietaniemi <jhi@iki.fi>2000-08-02 04:26:46 +0000
commit436933950535d3942db23a87c1a6344f566a9af4 (patch)
tree53a51ada91219346920fcaa7071e8b0f32861fea /gv.c
parentef7adf26b48d8441a94b9133216b2ca93f1f3137 (diff)
downloadperl-436933950535d3942db23a87c1a6344f566a9af4.tar.gz
Remove the extraneous "main::" prefix from all the
"opened only for", "on closed", and "never opened" warnings. Subject: Re: inappropriate warning Message-Id: <200003201928.LAA32224@maul.ActiveState.com> p4raw-id: //depot/perl@6489
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/gv.c b/gv.c
index 22e419ec24..02f428b45b 100644
--- a/gv.c
+++ b/gv.c
@@ -919,6 +919,22 @@ Perl_gv_fetchpv(pTHX_ const char *nambeg, I32 add, I32 sv_type)
}
void
+Perl_gv_fullname4(pTHX_ SV *sv, GV *gv, const char *prefix, bool keepmain)
+{
+ HV *hv = GvSTASH(gv);
+ if (!hv) {
+ (void)SvOK_off(sv);
+ return;
+ }
+ sv_setpv(sv, prefix ? prefix : "");
+ if (keepmain || strNE(HvNAME(hv), "main")) {
+ sv_catpv(sv,HvNAME(hv));
+ sv_catpvn(sv,"::", 2);
+ }
+ sv_catpvn(sv,GvNAME(gv),GvNAMELEN(gv));
+}
+
+void
Perl_gv_fullname3(pTHX_ SV *sv, GV *gv, const char *prefix)
{
HV *hv = GvSTASH(gv);
@@ -933,6 +949,15 @@ Perl_gv_fullname3(pTHX_ SV *sv, GV *gv, const char *prefix)
}
void
+Perl_gv_efullname4(pTHX_ SV *sv, GV *gv, const char *prefix, bool keepmain)
+{
+ GV *egv = GvEGV(gv);
+ if (!egv)
+ egv = gv;
+ gv_fullname4(sv, egv, prefix, keepmain);
+}
+
+void
Perl_gv_efullname3(pTHX_ SV *sv, GV *gv, const char *prefix)
{
GV *egv = GvEGV(gv);