diff options
author | Paul Marquess <paul.marquess@btinternet.com> | 1998-07-29 10:28:45 +0100 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-08-09 11:31:53 +0000 |
commit | 599cee73f2261c5e09cde7ceba3f9a896989e117 (patch) | |
tree | ca10c96d845fe755d35da930b1935926856e99b9 /gv.c | |
parent | 33938b7370f825af073cea6d9fadf7e82857ec9c (diff) | |
download | perl-599cee73f2261c5e09cde7ceba3f9a896989e117.tar.gz |
lexical warnings; tweaks to places that didn't apply correctly
Message-Id: <9807290828.AA26286@claudius.bfsec.bt.co.uk>
Subject: lexical warnings patch for 5.005_50
p4raw-id: //depot/perl@1773
Diffstat (limited to 'gv.c')
-rw-r--r-- | gv.c | 17 |
1 files changed, 10 insertions, 7 deletions
@@ -221,8 +221,8 @@ gv_fetchmeth(HV *stash, char *name, STRLEN len, I32 level) SV* sv = *svp++; HV* basestash = gv_stashsv(sv, FALSE); if (!basestash) { - if (PL_dowarn) - warn("Can't locate package %s for @%s::ISA", + if (ckWARN(WARN_MISC)) + warner(WARN_MISC, "Can't locate package %s for @%s::ISA", SvPVX(sv), HvNAME(stash)); continue; } @@ -356,8 +356,9 @@ gv_autoload4(HV *stash, char *name, STRLEN len, I32 method) /* * Inheriting AUTOLOAD for non-methods works ... for now. */ - if (PL_dowarn && !method && (GvCVGEN(gv) || GvSTASH(gv) != stash)) - warn( + if (ckWARN(WARN_DEPRECATED) && !method && + (GvCVGEN(gv) || GvSTASH(gv) != stash)) + warner(WARN_DEPRECATED, "Use of inherited AUTOLOAD for non-method %s::%.*s() is deprecated", HvNAME(stash), (int)len, name); @@ -728,8 +729,8 @@ gv_fetchpv(char *nambeg, I32 add, I32 sv_type) goto magicalize; case '#': case '*': - if (PL_dowarn && len == 1 && sv_type == SVt_PV) - warn("Use of $%s is deprecated", name); + if (ckWARN(WARN_DEPRECATED) && len == 1 && sv_type == SVt_PV) + warner(WARN_DEPRECATED, "Use of $%s is deprecated", name); /* FALL THROUGH */ case '[': case '^': @@ -747,6 +748,7 @@ gv_fetchpv(char *nambeg, I32 add, I32 sv_type) case '/': case '|': case '\001': + case '\002': case '\004': case '\005': case '\006': @@ -885,7 +887,8 @@ gv_check(HV *stash) PL_curcop->cop_filegv = filegv; if (filegv && GvMULTI(filegv)) /* Filename began with slash */ continue; - warn("Name \"%s::%s\" used only once: possible typo", + warner(WARN_ONCE, + "Name \"%s::%s\" used only once: possible typo", HvNAME(stash), GvNAME(gv)); } } |