in reply to Hijacking a method

CPAN is your friend. There are a number of modules available that automatically prepend or append standard code to a set of functions. There source code should give you some ideas about how to go about this. Better yet, download them and try them out yourself:

This is just for starters. There are several more: just search CPAN on the word "sub" to see what is out there.

Best, beth