What is the problem here?
| Newsgroups | perl.moose |
|---|---|
| Message-ID | <530918682.2370879.1348948021388.JavaMail.root@sz0115a.emeryville.ca.mail.comcast.net> |
I cannot make this work:
use MooseX::Declare;
class Foo {
use Moose::Util::TypeConstraints;
subtype 'NewType' => as 'Object';
method bar (NewType $arg) {
}
}
I get the following error:
'NewType' could not be parsed to a type constraint - maybe you need to pre-declare the type with class_type at reader Parse::Method::Signatures::TypeConstraint::tc (defined at /home/yshtil/ lib/perl5/site_perl/5.14.1/Parse/Method/Signatures/TypeConstraint.pm line 20) line 7