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

Have a look at London's Devel::AutoProfiler. He does essentially what you want but you'll need to modify some code.
  • Comment on Re: Add a code to first and last line of all the subroutines in a perl package