Debug::Trace and Devel::TraceCalls look like useful starting points.
In reply to Re: modifying sub routine behaviour by adrianh in thread modifying sub routine behaviour by Anonymous Monk