Syntactic Confectionery Delight | |
PerlMonks |
Re: MooseX::Declare and Moose subtypesby merlyn (Sage) |
on Feb 23, 2010 at 02:05 UTC ( [id://824747]=note: print w/replies, xml ) | Need Help?? |
Your problem is compile-time vs run-time. The subtype isn't being created until runtime, but it needs to be present at compiletime when you get to the method header. Solution: use BEGIN or put it in a separate file and "use" the file.
-- Randal L. Schwartz, Perl hacker The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.
In Section
Seekers of Perl Wisdom
|
|