diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-11-24 00:10:15 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-11-24 07:35:51 -0800 |
commit | 64fbf0dd43246bda0d854a4cbf1884b785d4d890 (patch) | |
tree | 83e87554b6392498831a3de474588bcee68c118f /t/porting | |
parent | 2b141370e47820eefd315393146f44b116c3b058 (diff) | |
download | perl-64fbf0dd43246bda0d854a4cbf1884b785d4d890.tar.gz |
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...’.
Diffstat (limited to 't/porting')
-rw-r--r-- | t/porting/diag.t | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/t/porting/diag.t b/t/porting/diag.t index 4dcdf3b96f..a060268d04 100644 --- a/t/porting/diag.t +++ b/t/porting/diag.t @@ -78,7 +78,7 @@ my $cur_entry; open my $diagfh, "<", $pod or die "Can't open $pod: $!"; -my $category_re = qr/ [a-z0-9_]+?/; # Note: requires an initial space +my $category_re = qr/ [a-z0-9_:]+?/; # Note: requires an initial space my $severity_re = qr/ . (?: \| . )* /x; # A severity is a single char, but can # be of the form 'S|P|W' my @same_descr; @@ -296,6 +296,7 @@ sub check_file { : '[PFX]'; my $categories; if (defined $category) { + $category =~ s/__/::/g; $categories = join ", ", sort map {s/^WARN_//; lc $_} split /\s*[|,]\s*/, $category; |