blue_cowdawg has asked for the wisdom of the Perl Monks concerning the following question:
Let's say I have a Moose based module such that:
and I run a test on it I gethas 'thing' => ( isa=> "Bit::Vector, is=>"rw", default => sub { return Bit::Vector->new(32); } 1;
I'm sure I'm missing something here... Does the default not do what I think it does? How do I force this to initialize with a new Bit::Vector object?Attribute (orbitBitMap) does not pass the type constraint because: Val +idation failed for 'Bit::Vector' with value undef
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Moose type constraint failure
by CountZero (Bishop) on Feb 05, 2013 at 22:36 UTC | |
|
Re: Moose type constraint failure
by tobyink (Canon) on Feb 05, 2013 at 22:07 UTC | |
|
Re: Moose type constraint failure
by kcott (Archbishop) on Feb 06, 2013 at 07:45 UTC | |
|
Re: Moose type constraint failure
by blue_cowdawg (Monsignor) on Feb 06, 2013 at 18:20 UTC |