Warn when declaring lexsubs, not when enabling them
authorFather Chrysostomos <sprout@cpan.org>
Sat, 24 Nov 2012 08:10:15 +0000 (00:10 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Sat, 24 Nov 2012 15:35:51 +0000 (07:35 -0800)
commit64fbf0dd43246bda0d854a4cbf1884b785d4d890
tree83e87554b6392498831a3de474588bcee68c118f
parent2b141370e47820eefd315393146f44b116c3b058
Warn when declaring lexsubs, not when enabling them

feature.pm has an ":all" tag.  So if we warn when lexical subs are
enabled, then ‘use feature ":all"’ will also warn.  That’s unkind.

Instead, warn when a lexical sub is declared via
‘my/our/state sub...’.
lib/feature.pm
pod/perldiag.pod
regen/feature.pl
t/cmd/lexsub.t
t/lib/croak/toke
t/lib/warnings/op
t/lib/warnings/toke
t/porting/diag.t
toke.c