Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^5: Moose: using value of one attribute in another attribute

by tobyink (Abbot)
on Jan 13, 2013 at 07:10 UTC ( #1013092=note: print w/ replies, xml ) Need Help??


in reply to Re^4: Moose: using value of one attribute in another attribute
in thread Moose: using value of one attribute in another attribute

True; that slipped my mind (even though I use the technique occasionally). These things are mostly circumventable (Scope::Upper for caller, PadWalker for lexical coderefs, etc), but perhaps the lexical subs coming in Perl 5.18 will be different.

perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'


Comment on Re^5: Moose: using value of one attribute in another attribute

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1013092]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (15)
As of 2015-07-29 12:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (263 votes), past polls