http://www.perlmonks.org?node_id=996768


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'