Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Test-Deep CPAN distribution.

Report information
The Basics
Id: 48452
Status: resolved
Priority: 0/
Queue: Test-Deep

People
Owner: Nobody in particular
Requestors: doughera [...] lafayette.edu
Cc:
AdminCc:

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



Subject: [PATCH] Version 5.10.1 should be treated the same as 5.10.0
Date: Wed, 5 Aug 2009 10:47:58 -0400 (EDT)
To: bug-Test-Deep [...] rt.cpan.org
From: Andy Dougherty <doughera [...] lafayette.edu>
Testing perl in the run-up to 5.10.1, a few test failures show up in Test::Deep. The problem is that 5.10.1 acts much like 5.10.0 when it comes to references. I suspect the real breaking point is 5.11, not 5.10.1. The following patch fixes them. diff -r -u Test-Deep-0.104/lib/Test/Deep/RegexpRef.pm fixed/lib/Test/Deep/RegexpRef.pm --- Test-Deep-0.104/lib/Test/Deep/RegexpRef.pm 2008-05-31 06:37:11.000000000 -0400 +++ fixed/lib/Test/Deep/RegexpRef.pm 2009-08-05 10:41:49.000000000 -0400 @@ -22,7 +22,7 @@ my $exp = $self->{val}; - if ($] <= 5.010) { + if ($] < 5.011) { return 0 unless $self->test_class($got, "Regexp"); return 0 unless $self->test_reftype($got, "SCALAR"); } else { diff -r -u Test-Deep-0.104/lib/Test/Deep.pm fixed/lib/Test/Deep.pm --- Test-Deep-0.104/lib/Test/Deep.pm 2009-03-05 17:53:03.000000000 -0500 +++ fixed/lib/Test/Deep.pm 2009-08-05 10:41:46.000000000 -0400 @@ -352,7 +352,7 @@ { $cmp = scalref($data); } - elsif($] <= 5.010 ? ($base eq 'Regexp') : ($base eq 'REGEXP')) + elsif($] < 5.011 ? ($base eq 'Regexp') : ($base eq 'REGEXP')) { $cmp = regexpref($data); } @@ -377,7 +377,7 @@ my $reftype = Scalar::Util::reftype($val); - if ($] <= 5.010) { + if ($] < 5.011) { if ($blessed eq "Regexp" and $reftype eq "SCALAR") { $reftype = "Regexp" diff -r -u Test-Deep-0.104/t/deep_utils.t fixed/t/deep_utils.t --- Test-Deep-0.104/t/deep_utils.t 2008-05-31 06:37:11.000000000 -0400 +++ fixed/t/deep_utils.t 2009-08-05 10:41:54.000000000 -0400 @@ -28,5 +28,5 @@ my ($class, $base) = class_base($a); is($class, "Regexp", "class_base class regexp"); - is($base, ($] <= 5.010 ? "Regexp" : "REGEXP"), "class_base base regexp"); + is($base, ($] < 5.011 ? "Regexp" : "REGEXP"), "class_base base regexp"); } -- Andy Dougherty doughera@lafayette.edu
I don't see a way to mark as dup in RT bu see http://rt.cpan.org/Ticket/Display.html?id=47946 . Thanks for the patch, F
FYI cpan testers shows good results so .106 is out with this change.
(ticked had been re-opened by mistake) -- rjbs