in reply to Package level scope callbacks.
slow, ugly, complicated but it should do what you want.BEGIN{ %SomePackage::copy:: = %SomePackage::; %SomePackage:: = (); # actually, you should probably only move the subs # and leave the variables etc where they are. } package SomePackage; sub AUTOLOAD { # in here check caller() to see if you're crossing # package boundaries and then call the pre-function # wrappers and then call the real function, paying # attention to wantarry etc then call the post-function # then return the data }
|
|---|