in reply to adding temporary method to a class
{ local *Class::method = sub { ... }; ... }
For anything in "...", called by "..." directly, or called by "..." indirectly, the method will exist.
I'm not sure doing so is a good idea, however. Why do you want to do this?
In Section
Seekers of Perl Wisdom