Does this patch look ok?

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 ;

-- 
Rick Delaney
[EMAIL PROTECTED]

Reply via email to