in reply to localizing __PACKAGE__?
You can do something like the following but it's a horrible thing to do in the long run:
package main; sub foo { local *main::hello = \&other::hello; $_[0]->(); };
What problem are you trying to solve that you can't solve by rewriting the calling code?
|
|---|