note
hdb
<p>
In the headline, you are asking a <c>Moose</c> question but in the code you are using <c>Moo</c>. Does <c>Moo</c> support <c>'ArrayRef'</c> etc as well? If I change <c>use Moo;</c> to <c>use Moose;</c> and follow [moritz]' advise, I get no error anymore. I am not too familiar with <c>Moo</c> and <c>Moose</c>, just a guess..
</p>
<p>
UPDATE: Just found this on [http://search.cpan.org/~mstrout/Moo-1.001000/lib/Moo.pm]:
</p>
<p><em>
isa
</em></p>
<p><em>
Takes a coderef which is meant to validate the attribute. Unlike Moose, Moo does not include a basic type system, so instead of doing isa => 'Num', one should do
</em></p>
<c>
isa => sub {
die "$_[0] is not a number!" unless looks_like_number $_[0]
},
</c>
1029628
1029628