The current hierarchy is:
+=for comment
+This tree is generated by regen/warnings.pl. Any changes made here
+will be lost.
+
+=for warnings.pl begin
+
all -+
|
+- closure
+- experimental --+
| |
| +- experimental::lexical_subs
+ | |
+ | +- experimental::lexical_topic
+ | |
+ | +- experimental::regex_sets
+ | |
+ | +- experimental::smartmatch
|
+- glob
|
|
+- void
+=for warnings.pl end
+
Just like the "strict" pragma any of these categories can be combined
use warnings qw(void redefine);
# Regenerate (overwriting only if changed):
#
# lib/warnings.pm
+# pod/perllexwarn.pod
# warnings.h
#
# from information hardcoded into this script (the $tree hash), plus the
-# template for warnings.pm in the DATA section.
+# template for warnings.pm in the DATA section. Only part of
+# pod/perllexwarn.pod (the warnings category hierarchy) is generated,
+# the other parts remaining untouched.
#
# When changing the number of warnings, t/op/caller.t should change to
# correspond with the value of $BYTES in lib/warnings.pm
read_only_bottom_close_and_rename($pm);
+my $lexwarn = open_new 'pod/perllexwarn.pod', '>';
+open my $oldlexwarn, "pod/perllexwarn.pod"
+ or die "$0 cannot open pod/perllexwarn.pod for reading: $!";
+select +(select($lexwarn), do {
+ while(<$oldlexwarn>) {
+ print;
+ last if /=for warnings.pl begin/;
+ }
+ print "\n";
+ printTree($tree, " ") ;
+ print "\n";
+ while(<$oldlexwarn>) {
+ last if /=for warnings.pl end/;
+ }
+ do { print } while <$oldlexwarn>;
+})[0];
+
+close_and_rename($lexwarn);
+
__END__
package warnings;
skip_all( "- regen.pl needs porting." );
}
-my $in_regen_pl = 23; # I can't see a clean way to calculate this automatically.
+my $in_regen_pl = 24; # I can't see a clean way to calculate this automatically.
my @files = qw(perly.act perly.h perly.tab keywords.c keywords.h uconfig.h);
my @progs = qw(regen/regcharclass.pl regen/mk_PL_charclass.pl
regen/unicode_constants.pl regen/genpacksizetables.pl);