From: Mark-Jason Dominus Date: Mon, 15 Apr 2002 00:30:26 +0000 (-0400) Subject: Re: [PATCH 5.7.3] Suppress warnings about @F when -a flag supplied X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d8c5566640fb9132fbfa47d3c76f472959a1dc29;p=p5sagit%2Fp5-mst-13.2.git Re: [PATCH 5.7.3] Suppress warnings about @F when -a flag supplied Message-Id: <20020415043026.11417.qmail@plover.com> p4raw-id: //depot/perl@15917 --- diff --git a/perl.c b/perl.c index 4c69293..3da8a12 100644 --- a/perl.c +++ b/perl.c @@ -3472,6 +3472,10 @@ Perl_init_argv_symbols(pTHX_ register int argc, register char **argv) (void)sv_utf8_decode(sv); } } + + if (PL_minus_a) { + (void) get_av("main::F", TRUE | GV_ADDMULTI); + } } #ifdef HAS_PROCSELFEXE diff --git a/t/lib/warnings/toke b/t/lib/warnings/toke index 73dd229..7f7d84d 100644 --- a/t/lib/warnings/toke +++ b/t/lib/warnings/toke @@ -744,7 +744,7 @@ EXPECT Unrecognized escape \q passed through at - line 4. ######## # toke.c -# 20020328 mjd@plover.com at behest of jfriedl@yahoo.com +# 20020328 mjd-perl-patch+@plover.com at behest of jfriedl@yahoo.com use warnings 'regexp'; "foo" =~ /foo/c; "foo" =~ /foo/cg; @@ -755,7 +755,7 @@ EXPECT Use of /c modifier is meaningless without /g at - line 4. ######## # toke.c -# 20020328 mjd@plover.com at behest of jfriedl@yahoo.com +# 20020328 mjd-perl-patch+@plover.com at behest of jfriedl@yahoo.com use warnings 'regexp'; $_ = "ab" ; s/ab/ab/c; @@ -766,3 +766,25 @@ s/ab/ab/cg; EXPECT Use of /c modifier is meaningless in s/// at - line 5. Use of /c modifier is meaningless in s/// at - line 6. +######## +-wa +# toke.c +# 20020414 mjd-perl-patch+@plover.com # -a flag should suppress these warnings +print "@F\n"; +EXPECT + +######## +-w +# toke.c +# 20020414 mjd-perl-patch+@plover.com # -a flag should suppress these warnings +print "@F\n"; +EXPECT +Possible unintended interpolation of @F in string at - line 4. +Name "main::F" used only once: possible typo at - line 4. +######## +-wa +# toke.c +# 20020414 mjd-perl-patch+@plover.com +EXPECT + +