# 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
'threads' => [ 5.008, DEFAULT_OFF],
'imprecision' => [ 5.011, DEFAULT_OFF],
'experimental' => [ 5.017, {
- 'experimental:lexical_subs' =>
+ 'experimental::lexical_subs' =>
+ [ 5.017, DEFAULT_ON ],
+ 'experimental::regex_sets' =>
+ [ 5.017, DEFAULT_ON ],
+ 'experimental::lexical_topic' =>
+ [ 5.017, DEFAULT_ON ],
+ 'experimental::smartmatch' =>
[ 5.017, DEFAULT_ON ],
}],
}
my ($ver, $rest) = @{ $v } ;
- if (ref $rest && $k ne 'experimental')
+ if (ref $rest)
{
my $bar = @keys ? "|" : " ";
print " -" . "-" x ($max - length $k ) . "+\n" ;
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;
-our $VERSION = '1.14';
+our $VERSION = '1.18';
# Verify that we're called correctly so that warnings will work.
# see also strict.pm.
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
# These are not part of any public interface, so we can delete them to save
# space.
-delete $warnings::{$_} foreach qw(NORMAL FATAL MESSAGE);
+delete @warnings::{qw(NORMAL FATAL MESSAGE)};
1;