Take a close look at Jiri Cloudaโs suggestion that you step back and review what you are trying to accomplish. You almost never want to do what you are trying to do.
But, if you're really sure you want it, here's how to get enough pure Perl rope to hang yourself ...
subs pragma takes a list of subheadings for pre-launch. As Tchrist said above, you can predict the subtitles, but not really define them. This will be a short circuit method to send to superclasses and immediately call your AUTOLOAD.
As for the list of subscriptions to go to pragma, you can use Class :: Inspector-> methods (thanks to Nick Gibson's answer to find out about this module).
According to Brian d foy, Nic Nic Gibson's answer, Class :: Inspector will not process methods defined in UNIVERSAL. If you need to do this separately, you can get inspiration from the "use subs" line in my Class :: LazyObject module.
daxelrod
source share