See Devel::TraceFuncs for one way to do this.
It wouldn't be too hard to write a module, say Devel::TraceMethods that would be used like:
And would import all function from Module::Name into Devel::TraceMethods::Module::Name and then undef them from Module::Name. Then it would define Module::Name::AUTOLOAD that logged the call and then called the real function Devel::TraceMethods::Module::Name.use Module::Name; use Devel::TraceMethods qw( Module::Name );
You could even make this work in the face of a module that used AUTOLOAD (by having your AUTOLOAD log and then, if needed, call their AUTOLOAD, but then shuffle the new routine into the other namespace when that returns).
Unfortunately, I'm not free to write one at the moment.
Update: The above would break can for this module, so the start-up and AUTOLOAD should build shim routines that log and then call the real routine.
- tye (but my friends call me "Tye")In reply to (tye)Re: Automatic Debugging
by tye
in thread Automatic Debugging
by DBX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |