diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-12-16 18:00:07 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-12-16 18:00:07 -0800 |
commit | b6a062341e3fe0df4e131975918361a0445e8673 (patch) | |
tree | 565ed8174a0896b7b0b99a6e06abf74334ae7278 /lib/diagnostics.pm | |
parent | 6728c8514a4b615a9cb94cab0e0682f066cefae1 (diff) | |
download | perl-b6a062341e3fe0df4e131975918361a0445e8673.tar.gz |
Teach splain about %X
Diffstat (limited to 'lib/diagnostics.pm')
-rw-r--r-- | lib/diagnostics.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/diagnostics.pm b/lib/diagnostics.pm index a40da9ea14..78e2c1533b 100644 --- a/lib/diagnostics.pm +++ b/lib/diagnostics.pm @@ -416,7 +416,7 @@ my %msg; # Since we strip "\.\n" when we search a warning, strip it here as well $header =~ s/\.?$//; - my @toks = split( /(%l?[dx]|%u|%c|%(?:\.\d+)?[fs])/, $header ); + my @toks = split( /(%l?[dxX]|%u|%c|%(?:\.\d+)?[fs])/, $header ); if (@toks > 1) { my $conlen = 0; for my $i (0..$#toks){ @@ -429,8 +429,8 @@ my %msg; $toks[$i] = $i == $#toks ? '.*' : '.*?'; } elsif( $toks[$i] =~ '%.(\d+)s' ){ $toks[$i] = ".{$1}"; - } elsif( $toks[$i] =~ '^%l*x$' ){ - $toks[$i] = '[\da-f]+'; + } elsif( $toks[$i] =~ '^%l*([xX])$' ){ + $toks[$i] = $1 eq 'x' ? '[\da-f]+' : '[\dA-F]+'; } } elsif( length( $toks[$i] ) ){ $toks[$i] = quotemeta $toks[$i]; |