in reply to modifying sub routine behaviour
Debug::Trace and Devel::TraceCalls look like useful starting points.