Thread

Posted on Mon May 21 06:10:12 2007 by stig
Test case failures for Attribute::Types 0.10
Wondering if anyone else gets the test case failures I do for Attribute::Types 0.10 These are the test failures I get for Attribute::Types 0.10 not ok 172 not ok 185 not ok 198 not ok 212 not ok 226 not ok 240 not ok 268 not ok 282 (they are the SCALAR tests) I get the same failures on all of the following: v5.8.7 built for VMS_AXP (Attribute::Handlers 0.78_01) v5.8.7 built for x86_64-linux (Attribute::Handlers 0.78_01) v5.8.5 built for x86_64-linux-thread-multi (Attribute::Handlers 0.78_01) v5.8.7 built for i686-linux (Attribute::Handlers 0.78_01) v5.8.0 built for i386-linux-thread-multi (patch MAINT18379) (Attribute::Handlers 0.78) There are currently no RT bugs on this module and the only testers failure I can find seems unrelated: http://www.nntp.perl.org/group/perl.cpan.testers/2001/05/msg23122.html I did notice Attribute::Handlers has a version 0.78_02 in more recent Perl http://www.mail-archive.com/perl5-porters@perl.org/msg88509.html If anyone does not get the same test failures as above for 5.87 or above I'm interested to know what version of Perl you have and what version of Attribute::Handlers. Thanks, Peter (Stig) Edwards
Direct Responses: 5183 | Write a response
Posted on Mon May 21 17:13:26 2007 by stig in response to 5176
Re: Test case failures for Attribute::Types 0.10
I can boil down the failure to: use Attribute::Types qw(SCALAR); my $x : SCALAR; $x = \7; This returns: Cannot assign SCALAR(0x506380) to SCALAR variable at scalar.t line 3 In the debugger: Attribute::Types::reference::STORE(/Attribute-Types-0.10/blib/lib/Attribute/Types.pm:123): 123: ref($val) && ref($val)->isa($self->{type}) 124: or croak "Cannot assign $value to $type variable" ; DB<2> print ref($val) SCALAR DB<3> print $self->{type} SCALAR DB<4> print ref($val)->isa($self->{type}) The following patch, allows the above to run without croaking, and all the test cases now pass. ==== Attribute-Types-0.10/lib/Attribute/Types.pm#1 - Attribute-Types-0.10/lib/Attribute/Types.pm == +== 123c123,124 < ref($val) && ref($val)->isa($self->{type}) --- > ref($val) && (ref($val)->isa($self->{type}) > || (ref($val) eq $self->{type})) I'm beginning to to think this is a bug. Peter (Stig) Edwards
Write a response