Skip Menu |

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

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

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

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



Subject: Test failures with bleadperl
The test suite fails since perl 5.13.8. See http://matrix.cpantesters.org/?dist=Regexp-Parser&maxver= Here's a sample test report: http://www.cpantesters.org/cpan/report/de259ed8-3d3d-11e0-a7f6-18d43dc7ed87 Regards, Slaven
Perl 5.14 has been released and it seems to be broken in the same way.
RT 42096 quiets down alot of this noise. Which leaves us with this problem: # gmake; prove -wlvm t/02subclass.t t/02subclass.t .. 1..12 # Running under perl version 5.014000 for linux # Current time local: Tue May 24 12:18:50 2011 # Current time GMT: Tue May 24 17:18:50 2011 # Using Test.pm version 1.25 ok 1 ok 2 ok 3 not ok 4 # Test 4 got: "(?^:^(?:(?=.*foo)\\D*(\\d+)))" (t/02subclass.t at line 80) # Expected: "139222276" # t/02subclass.t line 80 is: ok( $r1->qr, ~~qr/^(?:(?=.*foo)\D*(\d+))/ ); ok 5 ok 6 not ok 7 # Test 7 got: "(?^:^(?:(?!.*foo)\\D*(\\d+)))" (t/02subclass.t at line 84) # Expected: "137905812" # t/02subclass.t line 84 is: ok( $r2->qr, ~~qr/^(?:(?!.*foo)\D*(\d+))/ ); ok 8 ok 9 ok 10 ok 11 ok 12
The problem appears to be the assumption that ~~ will stringify a qr//. I think 5.14 has broken this. The simplest fix I can suggest would be to convert to Test::More for this test, at which point is seems to test right across all perls.
suggested patch
Subject: patch.txt
diff --git a/t/02subclass.t b/t/02subclass.t index 3cf1b59..d0d3288 100644 --- a/t/02subclass.t +++ b/t/02subclass.t @@ -5,8 +5,7 @@ # change 'tests => 1' to 'tests => last_test_to_print'; -use Test; -BEGIN { plan tests => 12 }; +use Test::More tests => 12; { package Regexp::AndBranch::__object__; @@ -76,17 +75,17 @@ my $r1 = Regexp::AndBranch->new; my $r2 = Regexp::AndBranch->new; ok( $r1->regex('^(?:.*foo&\D*(\d+))') ); -ok( $r1->visual, '^(?:.*foo&\D*(\d+))' ); -ok( $r1->qr, ~~qr/^(?:(?=.*foo)\D*(\d+))/ ); +is( $r1->visual, '^(?:.*foo&\D*(\d+))' ); +is( $r1->qr, qr/^(?:(?=.*foo)\D*(\d+))/ ); ok( $r2->regex('^(?:.*foo!\D*(\d+))') ); -ok( $r2->visual, '^(?:.*foo!\D*(\d+))' ); -ok( $r2->qr, ~~qr/^(?:(?!.*foo)\D*(\d+))/ ); +is( $r2->visual, '^(?:.*foo!\D*(\d+))' ); +is( $r2->qr, qr/^(?:(?!.*foo)\D*(\d+))/ ); -ok( "1 foo 2" =~ $r1->qr && $1, 1 ); +is( "1 foo 2" =~ $r1->qr && $1, 1 ); ok( "1 foo 2" !~ $r2->qr ); ok( "1 bar 2" !~ $r1->qr ); -ok( "1 bar 2" =~ $r2->qr && $1, 1 ); +is( "1 bar 2" =~ $r2->qr && $1, 1 ); -ok( $r1->object(and => 1)->my_method, "blah" ); +is( $r1->object(and => 1)->my_method, "blah" );
This has been released to CPAN as a dev release 0.20_01. Will bump to 0.21 on Friday if no issues are found.
On 2011-05-24 18:36:41, TODDR wrote: Show quoted text
> This has been released to CPAN as a dev release 0.20_01. Will bump to > 0.21 on Friday if no > issues are found.
0.20_01 works fine with my 5.14.0 Regards, Slaven
fixed in 0.20_01. 0.21 is on it's way to CPAN now.