|
|
| go ahead... be a heretic | |
| PerlMonks |
Re^5: Moose: using value of one attribute in another attributeby tobyink (Prior) |
| on Jan 13, 2013 at 07:10 UTC ( #1013092=note: print w/ replies, xml ) | Need Help?? |
|
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'
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||