From 6f87cb125dd0271ae560192c05c67ba062a4f16b Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Sat, 15 Sep 2012 21:56:25 -0700 Subject: 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 --- regen/warnings.pl | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'regen') 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. + =over 4 =item use warnings::register -- cgit v1.2.1