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 





Reply via email to