push @headers, $header if defined $header;
}
- unless ( s/=item (.*?)\s*\z//) {
+ unless ( s/=item (.*?)\s*\z//s) {
if ( s/=head1\sDESCRIPTION//) {
$msg{$header = 'DESCRIPTION'} = '';
if( $for_item ) { $header = $for_item; undef $for_item }
else {
$header = $1;
- while( $header =~ /[;,]\z/ ) {
- <POD_DIAG> =~ /^\s*(.*?)\s*\z/;
- $header .= ' '.$1;
- }
+
+ $header =~ s/\n/ /gs; # Allow multi-line headers
}
# strip formatting directives from =item line
$header =~ s/[A-Z]<(.*?)>/$1/g;
- # Since we strip "\.\n" when we search a warning, strip it here as well
- $header =~ s/\.?$//;
+ # Since we strip "(\.\s*)\n" when we search a warning, strip it here as well
+ $header =~ s/(\.\s*)?$//;
my @toks = split( /(%l?[dxX]|%[ucp]|%(?:\.\d+)?[fs])/, $header );
if (@toks > 1) {
}
}
my $lhs = join( '', @toks );
+ $lhs =~ s/(\\\s)+/\\s+/g; # Replace lit space with multi-space match
$transfmt{$header}{pat} =
- " s\a^$lhs\a\Q$header\E\as\n\t&& return 1;\n";
+ " s\a^\\s*$lhs\\s*\a\Q$header\E\as\n\t&& return 1;\n";
$transfmt{$header}{len} = $conlen;
} else {
+ my $lhs = "\Q$header\E";
+ $lhs =~ s/(\\\s)+/\\s+/g; # Replace lit space with multi-space match
$transfmt{$header}{pat} =
- " m\a^\Q$header\E\a && return 1;\n";
+ " s\a^\\s*$lhs\\s*\a\Q$header\E\a\n\t && return 1;\n";
$transfmt{$header}{len} = length( $header );
}
local $\;
local $!;
### &finish_compilation unless %msg;
- s/\.?\n+$//;
+ s/(\.\s*)?\n+$//;
my $orig = $_;
# return unless defined;
$_ .= ' at ' . $secs[$i];
}
}
-
+
# remove parenthesis occurring at the end of some messages
s/^\((.*)\)$/$1/;
=item Code point 0x%X is not Unicode, may not be portable
-=item Code point 0x%X is not Unicode, all \p{} matches fail; all \P{} matches succeed
+=item Code point 0x%X is not Unicode, all \p{} matches fail; all \P{} matches
+succeed
(S utf8, non_unicode) You had a code point above the Unicode maximum
of U+10FFFF.
it's loaded, etc.
-=item (?(DEFINE)....) does not allow branches in regex; marked by <-- HERE in m/%s/
+=item (?(DEFINE)....) does not allow branches in regex; marked by <-- HERE in
+m/%s/
(F) You used something like C<(?(DEFINE)...|..)> which is illegal. The
most likely cause of this error is that you left out a parenthesis inside
assertion, but that construct is only allowed when the C<use re 'eval'>
pragma is in effect. See L<perlre/(?{ code })>.
-=item EVAL without pos change exceeded limit in regex; marked by <-- HERE in m/%s/
+=item EVAL without pos change exceeded limit in regex; marked by <-- HERE in
+m/%s/
(F) You used a pattern that nested too many EVAL calls without consuming
any text. Restructure the pattern so that text is consumed.
(F) A ()-group started with a count. A count is supposed to follow
something: a template character or a ()-group. See L<perlfunc/pack>.
-=item Group name must start with a non-digit word character in regex; marked by <-- HERE in m/%s/
+=item Group name must start with a non-digit word character in regex; marked by
+<-- HERE in m/%s/
(F) Group names must follow the rules for perl identifiers, meaning
they must start with a non-digit word character. A common cause of
Failure of user callbacks dispatched using the C<G_KEEPERR> flag could
also result in this warning. See L<perlcall/G_KEEPERR>.
-=item Inconsistent hierarchy during C3 merge of class '%s': merging failed on parent '%s'
+=item Inconsistent hierarchy during C3 merge of class '%s': merging failed on
+parent '%s'
(F) The method resolution order (MRO) of the given class is not
C3-consistent, and you have enabled the C3 MRO for this class. See the C3
(W printf) Perl does not understand the given format conversion. See
L<perlfunc/sprintf>.
-=item Invalid escape in the specified encoding in regex; marked by <-- HERE in m/%s/
+=item Invalid escape in the specified encoding in regex; marked by <-- HERE in
+m/%s/
(W regexp) The numeric escape (for example C<\xHH>) of value < 256
didn't correspond to a single character through the conversion
=item Invalid hexadecimal number in \N{U+...}
-=item Invalid hexadecimal number in \N{U+...} in regex; marked by <-- HERE in m/%s/
+=item Invalid hexadecimal number in \N{U+...} in regex; marked by <-- HERE in
+m/%s/
(F) The character constant represented by C<...> is not a valid hexadecimal
number. Either it is empty, or you tried to use a character other than
the same; if a program uses $c only once but also uses any of the others it
will not trigger this warning.
-=item \N in a character class must be a named character: \N{...} in regex; marked by <-- HERE in m/%s/
+=item \N in a character class must be a named character: \N{...} in regex;
+marked by <-- HERE in m/%s/
(F) The new (5.12) meaning of C<\N> as C<[^\n]> is not valid in a bracketed
character class, for the same reason that C<.> in a character class loses
(F) Parsing code supplied by an extension violated the parser's API in
a detectable way.
-=item Pattern subroutine nesting without pos change exceeded limit in regex; marked by <-- HERE in m/%s/
+=item Pattern subroutine nesting without pos change exceeded limit in regex;
+marked by <-- HERE in m/%s/
(F) You used a pattern that uses too many nested subpattern calls without
consuming any text. Restructure the pattern so text is consumed before
"Can't locate object method \"%s\" via package \"%s\"". It often means
that a method requires a package that has not been loaded.
-=item Perl folding rules are not up-to-date for 0x%x; please use the perlbug utility to report
+=item Perl folding rules are not up-to-date for 0x%x; please use the perlbug
+utility to report;
(W regex, deprecated) You used a regular expression with
case-insensitive matching, and there is a bug in Perl in which the
time you run Perl. How to really fix the problem can be found in
L<perllocale> section B<LOCALE PROBLEMS>.
-=item perl: warning: Non hex character in '$ENV{PERL_HASH_SEED}', seed only partially set
+=item perl: warning: Non hex character in '$ENV{PERL_HASH_SEED}', seed only
+partially set
(W) PERL_HASH_SEED should match /^\s*(?:0x)?[0-9a-fA-F]+\s*\z/ but it
contained a non hex character. This could mean your hash randomization
(F) Your system has POSIX getpgrp(), which takes no argument, unlike
the BSD version, which takes a pid.
-=item POSIX syntax [%s] belongs inside character classes in regex; marked by <-- HERE in m/%s/
+=item POSIX syntax [%s] belongs inside character classes in regex; marked by
+<-- HERE in m/%s/
(W regexp) The character class constructs [: :], [= =], and [. .] go
I<inside> character classes, the [] are part of the construct, for example:
will cause fatal errors. The <-- HERE shows whereabouts in the regular
expression the problem was discovered. See L<perlre>.
-=item POSIX syntax [. .] is reserved for future extensions in regex; marked by <-- HERE in m/%s/
+=item POSIX syntax [. .] is reserved for future extensions in regex; marked by
+<-- HERE in m/%s/
(F) Within regular expression character classes ([]) the syntax beginning
with "[." and ending with ".]" is reserved for future extensions. If you
and ".\]". The <-- HERE shows whereabouts in the regular expression the
problem was discovered. See L<perlre>.
-=item POSIX syntax [= =] is reserved for future extensions in regex; marked by <-- HERE in m/%s/
+=item POSIX syntax [= =] is reserved for future extensions in regex; marked by
+<-- HERE in m/%s/
(F) Within regular expression character classes ([]) the syntax beginning
with "[=" and ending with "=]" is reserved for future extensions. If you
the {min,max} construct. The <-- HERE shows whereabouts in the regular
expression the problem was discovered. See L<perlre>.
-=item Quantifier unexpected on zero-length expression; marked by <-- HERE in m/%s/
+=item Quantifier unexpected on zero-length expression; marked by <-- HERE in
+m/%s/
(W regexp) You applied a regular expression quantifier in a place where
it makes no sense, such as on a zero-width assertion. Try putting the
The <-- HERE shows whereabouts in the regular expression the problem was
discovered.
-=item Reference to nonexistent or unclosed group in regex; marked by <-- HERE in m/%s/
+=item Reference to nonexistent or unclosed group in regex; marked by <-- HERE
+in m/%s/
(F) You used something like C<\g{-7}> in your regular expression, but there
are not at least seven sets of closed capturing parentheses in the
(F syntax, regexp) The regular expression pattern had too many occurrences
of the specified modifier. Remove the extraneous ones.
-=item Regexp modifier "%c" may not appear after the "-" in regex; marked by <-- HERE in m/%s/
+=item Regexp modifier "%c" may not appear after the "-" in regex; marked by <--
+HERE in m/%s/
(F) Turning off the given modifier has the side effect of turning on
another one. Perl currently doesn't allow this. Reword the regular
(P) Perl tried to force the upgrade of an SV to a type which was actually
inferior to its current type.
-=item Switch (?(condition)... contains too many branches in regex; marked by <-- HERE in m/%s/
+=item Switch (?(condition)... contains too many branches in regex; marked by
+<-- HERE in m/%s/
(F) A (?(condition)if-clause|else-clause) construct can have at most
two branches (the if-clause and the else-clause). If you want one or
in your Perl script (or eval) near the specified column. Perhaps you tried
to run a compressed script, a binary program, or a directory as a Perl program.
-=item Unrecognized escape \%c in character class passed through in regex; marked by <-- HERE in m/%s/
+=item Unrecognized escape \%c in character class passed through in regex;
+marked by <-- HERE in m/%s/
(W regexp) You used a backslash-character combination which is not
recognized by Perl inside character classes. The character was
the subroutine returned was a temporary scalar about to
be discarded, so the assignment had no effect.
-=item Useless (?-%s) - don't use /%s modifier in regex; marked by <-- HERE in m/%s/
+=item Useless (?-%s) - don't use /%s modifier in regex; marked by <-- HERE in
+m/%s/
(W regexp) You have used an internal modifier such as (?-o) that has no
meaning unless removed from the entire regexp:
allow this syntax, but shouldn't have. It is now deprecated,
and will be removed in a future version.
-=item Using just the first character returned by \N{} in character class in regex; marked by <-- HERE in m/%s/
+=item Using just the first character returned by \N{} in character class in
+regex; marked by <-- HERE in m/%s/
(W regexp) A charnames handler may return a sequence of more than one
character. Currently all but the first one are discarded when used in
(S printf) The %vd (s)printf format does not support version objects
with alpha parts.
-=item Verb pattern '%s' has a mandatory argument in regex; marked by <-- HERE in m/%s/
+=item Verb pattern '%s' has a mandatory argument in regex; marked by <-- HERE
+in m/%s/
(F) You used a verb pattern that requires an argument. Supply an
argument or check that you are using the right verb.
-=item Verb pattern '%s' may not have an argument in regex; marked by <-- HERE in m/%s/
+=item Verb pattern '%s' may not have an argument in regex; marked by <-- HERE
+in m/%s/
(F) You used a verb pattern that is not allowed an argument. Remove the
argument or check that you are using the right verb.