http://www.perlmonks.org?node_id=646651


in reply to Add a code to first and last line of all the subroutines in a perl package

You might be interested by Hook::LexWrap.