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


in reply to Module for Printing Line Numbers in Debug?

Perhaps you could use Hook::LexWrap to wrap the subs in the modules that you're interested in. There was this thread Fun with Hook::LexWrap and code instrumentation that might be of interest.

Update - Huh? I've got a module that automagically wraps all of the subs of subsequently loaded modules and then during execution generates a SQLite database of call chains together with what was passed and what was returned. All one would have to insert/remove one use statement. Is that what you're looking for?

Dang - something I wrote might actually be useful!