Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Mouse CPAN distribution.

Report information
The Basics
Id: 50421
Status: resolved
Priority: 0/
Queue: Mouse

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

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



Subject: ArrayRef[Class] broken if Class is not a Mouse class
Download (untitled) / with headers
text/plain 287b
The type constraints ArrayRef[ClassName] and HashRef[ClassName] are broken in master for empty array and hash refs UNLESS the Class in question is a Mouse class. I noticed this because it breaks Test::Builder2. Moose 0.92 does not have this bug nor does Mouse 0.35. Test is attached.
Subject: foo.t
Download foo.t
text/x-perl 753b
#!/usr/bin/perl -w use Test; # This bug breaks Test::More plan tests => 4; { package Class; sub new {} } { package MooseClass; use Moose; } { package MouseClass; use Mouse; } { package Foo; use Mouse; has unknown => ( is => 'rw', isa => 'HashRef[Unknown]' ); has class => ( is => 'rw', isa => 'HashRef[Class]', ); has moose => ( is => 'rw', isa => 'HashRef[MooseClass]', ); has mouse => ( is => 'rw', isa => 'HashRef[MouseClass]', ); } my $obj = Foo->new; ok eval { $obj->unknown({}); }; ok eval { $obj->class({}); }; ok eval { $obj->moose({}); }; ok eval { $obj->mouse({}); };
Download (untitled) / with headers
text/plain 185b
Hello, Michael. Thank you for your report. Unfortunately, I found your report after released 0.38, but I have fixed it and shipped 0.39. Regards, -- Goro Fuji (gfx) GFUJI at CPAN.org


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.