Skip Menu |

This queue is for tickets about the Attribute-Types CPAN distribution.

Report information
The Basics
Id: 27226
Status: open
Priority: 0/
Queue: Attribute-Types

People
Owner: Nobody in particular
Requestors: PEdwards [...] factset.com
Cc:
AdminCc:

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



Subject: Test case failures for Attribute::Types 0.10
Date: Mon, 21 May 2007 16:10:21 -0400
To: bug-Attribute-Types <bug-Attribute-Types [...] rt.cpan.org>
From: Peter Edwards <PEdwards [...] factset.com>
I posted the following on the forum: http://www.cpanforum.com/posts/5176 but thought I'd also mention it here at rt.cpan.org. Thanks for this module and all the others by the way. 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 My 2nd post: 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}) --- Show quoted text
> ref($val) && (ref($val)->isa($self->{type}) > || (ref($val) eq $self->{type}))
I've not dug any deeper than this, I'm not sure if the patch is appropriate or if the tests fail for anyone else, they seem to fail in the exact same way for me on multiple platforms and using different versions of Perl. Thanks for any insight anyone can provide. Peter (Stig) Edwards
Same on 5.10RC2 -- Alexandr Ciornii, http://chorny.net