Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: MooseX::Declare and Moose subtypes

by merlyn (Sage)
on Feb 23, 2010 at 02:05 UTC ( #824747=note: print w/replies, xml ) Need Help??

in reply to MooseX::Declare and Moose subtypes

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.

Replies are listed 'Best First'.
Re^2: MooseX::Declare and Moose subtypes
by Anonymous Monk on Feb 23, 2010 at 21:38 UTC
    This works ! This is awesome !

    Thanks !!!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://824747]
shmem .oO( someday I'll do something... and then I'll make it big. Now is the time! )
[LanX]: don't forget to flush the water
[shmem]: the day will come when LanX hits the fan
[Discipulus]: did you remember to commit?
[Discipulus]: if you hit the fan the cpu can overheat..

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2018-04-24 11:31 GMT
Find Nodes?
    Voting Booth?