in reply to Moose type constraint failure
Are you passing something like thing => undef to your constructor?
package Bit::Vector { use Moose; } package Bit::Thing { use Moose; has thing => ( isa => "Bit::Vector", is =>"rw", default => sub { return Bit::Vector->new }, ); } Bit::Thing->new; # fine, "thing" gets the default value Bit::Thing->new(thing => undef); # croaks
|
|---|