diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-09-15 21:56:25 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-09-15 22:45:10 -0700 |
commit | 6f87cb125dd0271ae560192c05c67ba062a4f16b (patch) | |
tree | 13805908b1b10f4bfe6163e458d571132bb2ebb5 /regen | |
parent | ad0cc46c82c89c5da407ee3163b95c03d5a31426 (diff) | |
download | perl-6f87cb125dd0271ae560192c05c67ba062a4f16b.tar.gz |
Add experimental warnings categ and :lexical_subs warn ID
I reindented the tree in perllexwarn because I was simply copying and
pasting the output from:
perl regen/warnings.pl tree
Diffstat (limited to 'regen')
-rw-r--r-- | regen/warnings.pl | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/regen/warnings.pl b/regen/warnings.pl index 5ed8b12114..feb95c971b 100644 --- a/regen/warnings.pl +++ b/regen/warnings.pl @@ -84,6 +84,10 @@ my $tree = { 'unpack' => [ 5.008, DEFAULT_OFF], 'threads' => [ 5.008, DEFAULT_OFF], 'imprecision' => [ 5.011, DEFAULT_OFF], + 'experimental' => [ 5.017, { + 'experimental:lexical_subs' => + [ 5.017, DEFAULT_ON ], + }], #'default' => [ 5.008, DEFAULT_ON ], }], @@ -208,7 +212,7 @@ sub printTree } my ($ver, $rest) = @{ $v } ; - if (ref $rest) + if (ref $rest && $k ne 'experimental') { my $bar = @keys ? "|" : " "; print " -" . "-" x ($max - length $k ) . "+\n" ; @@ -313,7 +317,8 @@ foreach $k (sort { $a <=> $b } keys %ValueToName) { my ($name, $version) = @{ $ValueToName{$k} }; print $warn "\n/* Warnings Categories added in Perl $version */\n\n" if $last_ver != $version ; - print $warn tab(5, "#define WARN_$name"), "$k\n" ; + $name =~ y/:/_/; + print $warn tab(5, "#define WARN_$name"), " $k\n" ; $last_ver = $version ; } print $warn "\n" ; @@ -482,6 +487,10 @@ or disabled. A number of functions are provided to assist module authors. +In all the descriptions below, $category can also be a warnings category +and ID separated by a colon, such as "experimental:lexical_subs". See +L<perllexwarn/Individual Warning IDs>. + =over 4 =item use warnings::register |