in reply to Invoking a method whose name is computed
Not really.
You could potentially use Object::Tap...
use 5.010; use Object::Tap -package => 'UNIVERSAL'; sub Foo::bar { say "Foo::bar"; } Foo->tap(join 'a', 'b', 'r');
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