|
|
| There's more than one way to do things | |
| PerlMonks |
Re^3: Ruby vs Perl vs LISP; the killer feature lacking in Rubyby tobyink (Prior) |
| on May 23, 2012 at 07:38 UTC ( #971970=note: print w/ replies, xml ) | Need Help?? |
|
As well as Jenda's suggestion, it's also possible to declare a little wrapper like this:
Enabling you to do this:
This is what Moose does for its type constraints system, providing little wrappers like via, where and message so you can write code like:
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
In Section
Meditations
|
|
||||||||||||||||||||