develooper Front page | perl.perl5.porters | Postings from September 2005

[perl #3269] no warnings "bareword" turns off too many warnings.

Thread Next
From:
Guest via RT
Date:
September 27, 2005 07:01
Subject:
[perl #3269] no warnings "bareword" turns off too many warnings.
Message ID:
rt-3.0.11-3269-121631.19.694426802946@perl.org
Ping.

> [rickdelaney - Sat Sep 17 08:07:20 2005]:
> 
> Does this patch look ok?

   $self->talking_to("Why, yes it does!");

It would be nice if this could make it into 5.8.8.

--rick

> On Wed, Jul 13, 2005 at 03:48:26AM -0400, Rick Delaney wrote:
> >
> > diff -ruN perl-current/mg.c perl-current-dev/mg.c
> > --- perl-current/mg.c	2005-07-07 11:16:35.000000000 -0400
> > +++ perl-current-dev/mg.c	2005-07-13 03:37:46.973571403 -0400
> > @@ -781,11 +781,16 @@
> >  	if (*(mg->mg_ptr+1) == '\0')
> >  	    sv_setiv(sv, (IV)((PL_dowarn & G_WARN_ON) ? TRUE : FALSE));
> >  	else if (strEQ(mg->mg_ptr+1, "ARNING_BITS")) {
> > -	    if (PL_compiling.cop_warnings == pWARN_NONE ||
> > -	        PL_compiling.cop_warnings == pWARN_STD)
> > -	    {
> > +	    if (PL_compiling.cop_warnings == pWARN_NONE) {
> >  	        sv_setpvn(sv, WARN_NONEstring, WARNsize) ;
> > -            }
> > +	    }
> > +	    else if (PL_compiling.cop_warnings == pWARN_STD) {
> > +		sv_setpvn(
> > +		    sv,
> > +		    (PL_dowarn & G_WARN_ON) ? WARN_ALLstring : WARN_NONEstring,
> > +		    WARNsize
> > +		);
> > +	    }
> >              else if (PL_compiling.cop_warnings == pWARN_ALL) {
> >  		/* Get the bit mask for $warnings::Bits{all}, because
> >  		 * it could have been extended by warnings::register */
> > diff -ruN perl-current/t/lib/warnings/2use perl-current-
> dev/t/lib/warnings/2use
> > --- perl-current/t/lib/warnings/2use	2004-04-23 17:05:07.000000000
> -0400
> > +++ perl-current-dev/t/lib/warnings/2use	2005-07-13
> 03:27:32.832203077 -0400
> > @@ -72,6 +72,12 @@
> >  EXPECT
> >  Reversed += operator at - line 3.
> >  ########
> > +-w
> > +no warnings 'reserved' ;
> > +foo.bar;
> > +EXPECT
> > +Useless use of concatenation (.) or string in void context at -
> line 3.
> > +########
> >
> >  --FILE-- abc
> >  my $a =+ 1 ;
> 
> 
> 


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About