On 12/26/13, ikegami via RT<bug-App-JobLog@rt.cpan.org> wrote:
<URL:
https://rt.cpan.org/Ticket/Display.html?id=91660 >
On Wed Dec 25 20:56:25 2013, JKEENAN wrote:
Show quoted text> In looking at the failing test report cited above, I noted that in
> lib/App/JobLog/Log/Line.pm you have many lines that make use of
> regexes with one or more instances of two consecutive '+' signs:
>
> #####
> 27: (?<ts> (\d{4}+\s++\d++\s++\d++\s++\d++\s++\d++\s++\d++)
> (?{$date = $^N}) )
> 33: (?<tags> (?:(?&tag)(\s++(?&tag))*+)?)
> 34: (?<tag> ((?:[^\s:\\]|(?&escaped))++) (?{push @tags, $^N}))
> 37: (?<description> ((?:[^;\\]|(?&escaped))++) (?{push
> @description, $^N}))
> 86: $description =~ s/^\s++|\s++$//g;
> 87: $description =~ s/\s++/ /g;
> 123: my @time = split /\s++/, $date;
> 141: $v =~ s/^\s++|\s++$//g;
> 142: $v =~ s/\s++/ /g;
> #####
>
> Do the log lines you are parsing actually have so many plus signs in
> them?
Those "+" aren't being matched literally. \s++ means (?>\s+)
####
One of those new-fangled Perl ragex features I've never personally used! Had to look it up in 'perlre'. Thanks for the pointer.
jimk