Skip Menu |

This queue is for tickets about the re-engine-RE2 CPAN distribution.

Report information
The Basics
Id: 67153
Status: resolved
Priority: 0/
Queue: re-engine-RE2

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

Bug Information
Severity: Normal
Broken in: 0.05
Fixed in: (no value)



Subject: interpolation of re2-regex into re2-regex is broken
First of all, I wanna thank you for mentioning your module in discussion if bug 76546! $ perl -e 'use re::engine::RE2; $a1 = qr/a/; $a2 = "(?-im:a)"; $b1 = qr/b$a1/; $b2 = qr/b$a2/; printf "a1=%d b1=%d b2=%d <$a1> <$a2>\n", map {$_->isa("re::engine::RE2")} $a1,$b1,$b2 ' a1=1 b1=0 b2=1 <(?-ixm:a)> <(?-im:a)> Looks like re2 regex created with qr// contain /x flag, unsupported by re2. Because of mentioning this flag (even in disabled state) another regex fall back to standard perl engine. I think two solutions possible: 1) Doesn't set /x flag in RE2's qr// - if user enabled re2 in this scope, he shouldn't expect to get from qr// re2-incompatible regexps. 2) When deciding to fall back to perl regexp doesn't take in account _disabled_ /x flag.
Subject: Re: [rt.cpan.org #67153] interpolation of re2-regex into re2-regex is broken
Date: Fri, 1 Apr 2011 18:50:50 +0100
To: bug-re-engine-RE2 [...] rt.cpan.org
From: David Leadbeater <dgl [...] dgl.cx>
Thanks for the bug report. Fixed in git.