Skip Menu |

This queue is for tickets about the Regexp-Parser CPAN distribution.

Report information
The Basics
Id: 73545
Status: resolved
Priority: 0/
Queue: Regexp-Parser

People
Owner: Nobody in particular
Requestors: gsullivan [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: No support for constructs added in Perl version 5.10 and later
Regexp::Parser does not support Perl regular expression constructs introduced in Perl version 5.10.0. Refer to the following URL: http://perldoc.perl.org/perl5100delta.html#Regular-expressions For example, the \K escape incorrectly parses as a Regexp::Parser::exact object. I have tried this on perl version 5.12.2; see the attached code and output produced. This limitation also exists in Regexp::Parser's predecessor module (YAPE::Regex). Although the Regexp::Parser POD alludes to Perl version 5.8.4, I think it would be useful to explicitly add some documentation to the POD mentioning the lack of support for 5.10 (and later) versions of Perl. Every time Perl changes its regular expression behavior, this module must also be changed, and the POD should denote the supported version of Perl.
Subject: parse.pl
use warnings; use strict; use Regexp::Parser; use Data::Dumper; print "Perl version: $]\n"; my $p = Regexp::Parser->new(qr/\K/); $p->parse; print Dumper($p); __END__ Unrecognized escape \K passed through; marked by <-- HERE in m/(?-xism:\K <-- HERE )/ at parse.pl line 7 Perl version: 5.012002 $VAR1 = bless( { 'len' => 11, 'next' => [], 'flags' => [ 0 ], 'tree' => [ bless( { 'flags' => 0, 'rx' => $VAR1, 'zerolen' => '', 'off' => 'xism', 'data' => [ bless( { 'flags' => 0, 'rx' => $VAR1, 'data' => [ 'K' ], 'vis' => [ 'K' ], 'family' => 'exact' }, 'Regexp::Parser::exact' ) ], 'on' => '', 'type' => 'group', 'down' => 1, 'family' => 'group' }, 'Regexp::Parser::group' ) ], 'nparen' => 0, 'maxpar' => 0, 'regex' => \'(?-xism:\\K)', 'captures' => [] }, 'Regexp::Parser' );
I agree with all of your comments. I took over maintenance mostly to clean up some minor test issues in the later Perls. This module really isn't my area of expertise. While I can't give you commit access, I am happy to take patches via github. If anyone else is interested in helping work on that I would welcome that too. https://github.com/toddr/Regexp-Parser