This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldiag: constant redef warning is not always default
authorFather Chrysostomos <sprout@cpan.org>
Mon, 21 Nov 2011 21:16:56 +0000 (13:16 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Mon, 21 Nov 2011 21:16:56 +0000 (13:16 -0800)
If the value of the new constant is the same as the old, this warning
only occurs under ‘use warnings 'redefine'’ and $^W=1, not under $^W=0
outside of any warnings scope.

pod/perldiag.pod

index 624835e..05d1365 100644 (file)
@@ -1470,9 +1470,9 @@ See L<perlsub/"Constant Functions"> and L<constant>.
 
 =item Constant subroutine %s redefined
 
-(S) You redefined a subroutine which had previously been
-eligible for inlining.  See L<perlsub/"Constant Functions"> for
-commentary and workarounds.
+(W redefine)(S) You redefined a subroutine which had previously
+been eligible for inlining.  See L<perlsub/"Constant Functions">
+for commentary and workarounds.
 
 =item Constant subroutine %s undefined