Skip Menu |

This queue is for tickets about the ParseLex CPAN distribution.

Report information
The Basics
Id: 58128
Status: resolved
Priority: 0/
Queue: ParseLex

People
Owner: PSCUST [...] cpan.org
Requestors: jettero [...] cpan.org
Cc:
AdminCc:

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



Subject: regular expression parsing is broken for some special characters
my $x = Parse::Lex->new(VALUE=>'blarg(?<!blarg)'); $x->from("blarg"); (This works in perl5.8, but crashes in perl5.10.) I wish the new() method would accept pre-compiled regular expressions that would be considered "working" before whatever internal processing escapes the bang. I tried source diving to find the offending escaping issue, but I find the internals rather difficult to follow. -- If riding in an airplane is flying, then riding in a boat is swimming. 114 jumps, 47.2 minutes of freefall, 90.4 freefall miles.
On Fri Jun 04 10:21:29 2010, JETTERO wrote: Show quoted text
> I tried source diving to find the offending escaping > issue, but I find the internals rather difficult to follow.
Found it, finally: Parse::Template::ppregexp is apparently *INTENTIONALLY* ruining my regexp. I wish it wouldn't. Is there any solution for this? Show quoted text
> # Purpose: validate the regexp and replace "!" by "\!", and "/" by "\/" > # if not already escaped > # Arguments: a regexp > # Returns: the preprocessed regexp > sub ppregexp {
-- If riding in an airplane is flying, then riding in a boat is swimming. 114 jumps, 47.2 minutes of freefall, 90.4 freefall miles.
Solved in Parse::Template 3.04 Parse::Lex 2.20 requires Parse::Template 3.04 Solution was to revert the escape of the ! if it is part of (?!...) or (? Show quoted text
>!...)