Skip Menu |

This queue is for tickets about the Moose CPAN distribution.

Report information
The Basics
Id: 33301
Status: resolved
Priority: 0/
Queue: Moose

People
Owner: stevan.little [...] gmail.com
Requestors: andy [...] hexten.net
Cc:
AdminCc:

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



Subject: Over-strict regexes in tests
In three places regexes in the tests that match against stringified references are too strict. As a result the tests fail on Ubuntu-PPC and probably on 64 bit Perls too. Here's a patch that fixes them.
Subject: aa-moose.patch
diff -ur Moose-0.37.orig/t/020_attributes/012_misc_attribute_tests.t Moose-0.37/t/020_attributes/012_misc_attribute_tests.t --- Moose-0.37.orig/t/020_attributes/012_misc_attribute_tests.t 2008-01-28 02:35:07.000000000 +0000 +++ Moose-0.37/t/020_attributes/012_misc_attribute_tests.t 2008-02-16 14:11:58.000000000 +0000 @@ -120,7 +120,7 @@ throws_ok { $moose_obj->a_str( $moose_obj ) - } qr/Attribute \(a_str\) does not pass the type constraint because\: Validation failed for 'Str' failed with value OverloadedStr=HASH\(0x.......\)/, + } qr/Attribute \(a_str\) does not pass the type constraint because\: Validation failed for 'Str' failed with value OverloadedStr=HASH\(0x[a-fA-F0-9]+?\)/, '... dies without overloading the string'; } diff -ur Moose-0.37.orig/t/040_type_constraints/008_union_types.t Moose-0.37/t/040_type_constraints/008_union_types.t --- Moose-0.37.orig/t/040_type_constraints/008_union_types.t 2008-01-28 02:29:17.000000000 +0000 +++ Moose-0.37/t/040_type_constraints/008_union_types.t 2008-02-16 14:08:56.000000000 +0000 @@ -56,11 +56,11 @@ ok(!defined($HashOrArray->validate({})), '... (ArrayRef | HashRef) can accept {}'); like($HashOrArray->validate(\(my $var2)), -qr/Validation failed for \'ArrayRef\' failed with value SCALAR\(0x.......\) and Validation failed for \'HashRef\' failed with value SCALAR\(0x.......\) in \(ArrayRef \| HashRef\)/, +qr/Validation failed for \'ArrayRef\' failed with value SCALAR\(0x[a-fA-F0-9]+?\) and Validation failed for \'HashRef\' failed with value SCALAR\(0x[0-9a-fA-F]+?\) in \(ArrayRef \| HashRef\)/, '... (ArrayRef | HashRef) cannot accept scalar refs'); like($HashOrArray->validate(sub {}), -qr/Validation failed for \'ArrayRef\' failed with value CODE\(0x.......\) and Validation failed for \'HashRef\' failed with value CODE\(0x.......\) in \(ArrayRef \| HashRef\)/, +qr/Validation failed for \'ArrayRef\' failed with value CODE\(0x[a-fA-F0-9]+?\) and Validation failed for \'HashRef\' failed with value CODE\(0x[a-fA-F0-9]+?\) in \(ArrayRef \| HashRef\)/, '... (ArrayRef | HashRef) cannot accept code refs'); is($HashOrArray->validate(50),
Thanks, This has been fixed in the 0.38 release, available on CPAN. - Stevan
On Sun Feb 17 11:05:42 2008, STEVAN wrote: Show quoted text
> Thanks, > > This has been fixed in the 0.38 release, available on CPAN.
Thank Stevan!