Skip Menu |

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

Report information
The Basics
Id: 70003
Status: resolved
Priority: 0/
Queue: Regexp-Optimizer

People
Owner: Nobody in particular
Requestors:
Cc:
AdminCc:

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



From: gregoa [...] cpan.org
Subject: libregexp-optimizer-perl: FTBFS with perl 5.14: test failures
This bug has been forwarded from http://bugs.debian.org/636517 This package FTBFS with perl 5.14: Global symbol "$RE_PAREN" requires explicit package name at (re_eval 10) line 2. Compilation failed in regexp at /build/dom-libregexp-optimizer-perl_0.15-2-i386- O72bYO/libregexp-optimizer-perl-0.15/blib/lib/Regexp/List.pm line 253. # Looks like you planned 24 tests but ran 1. # Looks like your test exited with 2 just after 1. t/02-list.t .. Dubious, test returned 2 (wstat 512, 0x200) Failed 23/24 subtests Global symbol "$RE_PAREN" requires explicit package name at (re_eval 12) line 2. Compilation failed in regexp at /build/dom-libregexp-optimizer-perl_0.15-2-i386-O72bYO/libregexp-optimizer-perl-0.15/blib/lib/Regexp/List.pm line 253. # Looks like you planned 15 tests but ran 1. # Looks like your test exited with 255 just after 1. t/03-utf8.t .. Dubious, test returned 255 (wstat 65280, 0xff00) Failed 14/15 subtests Test Summary Report ------------------- t/02-list.t (Wstat: 512 Tests: 1 Failed: 0) Non-zero exit status: 2 Parse errors: Bad plan. You planned 24 tests but ran 1. t/03-utf8.t (Wstat: 65280 Tests: 1 Failed: 0) Non-zero exit status: 255 Parse errors: Bad plan. You planned 15 tests but ran 1. Files=3, Tests=4, 0 wallclock secs ( 0.03 usr 0.02 sys + 0.14 cusr 0.02 csys = 0.21 CPU) Result: FAIL Failed 2/3 test programs. 0/4 subtests failed. ~ Cheers, gregor, Debian Perl Group
Quick patch attached.
Subject: perl5.14.patch
Description: adjust for perl 5.14: declare used variable, handle differently stringified regexp Origin: vendor Bug: https://rt.cpan.org/Public/Bug/Display.html?id=70003 Forwarded: https://rt.cpan.org/Public/Bug/Display.html?id=70003 Bug-Debian: http://bugs.debian.org/636517 Author: gregor herrmann <gregoa@debian.org> Last-Update: 2011-11-16 --- a/lib/Regexp/List.pm +++ b/lib/Regexp/List.pm @@ -16,6 +16,7 @@ our $FILLER = "\x{fffd}"; # fallback +our $RE_PAREN; # predeclear our $RE_START = qr{(?: (?!\\)\((?:\? --- a/t/02-list.t +++ b/t/02-list.t @@ -38,11 +38,15 @@ q/\cZ|\cA/ => qr/\\c[ZA]/, ); +# perldelta 5.14 +# Accept both old and new-style stringification +my $modifiers = (qr/foobar/ =~ /\Q(?^/) ? "^" : "-xism"; + my %t_o = ( q/\012|\015/ => qr/[\012\015]/, q/\x20|\x3F/ => => qr/[\x20\x3F]/, - q/\cZ|\cA/ => $] < 5.008005 ? qr/[\cZ\cA]/ : '(?-xism:[\cZ\cA])', + q/\cZ|\cA/ => $] < 5.008005 ? qr/[\cZ\cA]/ : "(?$modifiers:[\\cZ\\cA])", ); for (sort {length $a <=> length $b} keys %t_l){
As of version 0.20 of Regexp::Optimizer now uses Regexp::Assemble instead of Regexp::List to optimize alteration. Dan