Skip Menu |

Preferred bug tracker

Please email the preferred bug tracker to report your issue.

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

Report information
The Basics
Id: 56864
Status: resolved
Priority: 0/
Queue: PPIx-Regexp

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

Bug Information
Severity: Critical
Broken in: 0.006
Fixed in: 0.007



Subject: PPIx::Regexp::Lexer fails in Perl::Critic under Perl 5.13.0
Perl::Critic test xt/author/40_criticize_code.t fails with messages like # Failed test 'Test::Perl::Critic for "blib/lib/Perl/Critic/TestUtils.pm"' # at /usr/local/perl/5.13.0/lib/site_perl/5.13.0/Test/Perl/Critic.pm line 110. # # Perl::Critic had errors in "blib/lib/Perl/Critic/TestUtils.pm": # Modification of non-creatable array value attempted, subscript -1 at /Users/tom/Code/perl/PPIx-Regexp/lib/PPIx/Regexp/Lexer.pm line 444. All I know about the problem so far is that: * It does not fail under 5.12.0. * It does not fail when I feed lib/Perl/Critic/TestUtils.pm directly to PPIx::Regexp. * The diagnostic is not new with 5.13.0.
The problem turned out to be that one of the utility routines in the tokenizer was returning $+[0]. Under 5.13.0 this was getting transmogrified somewhere in the return process, causing the tokenizer to grab too many characters for the token. When this caused to tokenizer to include a left parenthesis in a white space token, the lexer got really confused when it saw the corresponding right parenthesis. The fix was to stage the return value in a lexical variable, and return that. This fix is in PPIx::Regexp::Lexer 0.006_01, which was just uploaded to PAUSE. Even after this, the lexer will still die on something like m{)}. So does Perl, so it's not likely to occur in the wild, and I'm not opening another ticket on it. But a secondary goal of the package is not to die on invalid regexps, so I do intend to do something about this before the next production release.
PPIx::Regexp 0.007 has been out since late April, so I suppose I can call this one fixed.