diff options
author | Paul Marquess <paul.marquess@btinternet.com> | 1999-06-27 00:19:52 +0100 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-07-07 09:45:43 +0000 |
commit | 0453d815b8a74697ff1e5451c27aba2fe537b8e0 (patch) | |
tree | b6275867deb61ba13fb0e665d516f115dd9f1d69 /gv.c | |
parent | 69e210baba6414aba2758bc791a6dc3e9e167d9d (diff) | |
download | perl-0453d815b8a74697ff1e5451c27aba2fe537b8e0.tar.gz |
lexical warnings update (warning.t fails one test
due to leaked scalar, investigation pending)
Message-ID: <5104D4DBC598D211B5FE0000F8FE7EB29C6C8E@mbtlipnt02.btlabs.bt.co.uk>
Subject: [PATCH 5.005_57] Lexical Warnings - mandatory warning are now default warnings
p4raw-id: //depot/perl@3640
Diffstat (limited to 'gv.c')
-rw-r--r-- | gv.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -609,12 +609,15 @@ Perl_gv_fetchpv(pTHX_ const char *nambeg, I32 add, I32 sv_type) /* Adding a new symbol */ - if (add & GV_ADDWARN) - Perl_warn(aTHX_ "Had to create %s unexpectedly", nambeg); + if (add & GV_ADDWARN && ckWARN_d(WARN_INTERNAL)) + Perl_warner(aTHX_ WARN_INTERNAL, "Had to create %s unexpectedly", nambeg); gv_init(gv, stash, name, len, add & GV_ADDMULTI); gv_init_sv(gv, sv_type); GvFLAGS(gv) |= add_gvflags; + if (isLEXWARN_on && isALPHA(name[0]) && ! ckWARN(WARN_ONCE)) + GvMULTI_on(gv) ; + /* set up magic where warranted */ switch (*name) { case 'A': @@ -946,11 +949,12 @@ Perl_gp_free(pTHX_ GV *gv) { GP* gp; CV* cv; + dTHR; if (!gv || !(gp = GvGP(gv))) return; - if (gp->gp_refcnt == 0) { - Perl_warn(aTHX_ "Attempt to free unreferenced glob pointers"); + if (gp->gp_refcnt == 0 && ckWARN_d(WARN_INTERNAL)) { + Perl_warner(aTHX_ WARN_INTERNAL, "Attempt to free unreferenced glob pointers"); return; } if (gp->gp_cv) { |