in reply to Automatic Debugging
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")
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (tye)Re: Automatic Debugging
by chromatic (Archbishop) on May 30, 2001 at 08:24 UTC | |
|
Re: (tye)Re: Automatic Debugging
by DBX (Pilgrim) on May 30, 2001 at 03:34 UTC | |
by tye (Sage) on May 30, 2001 at 03:42 UTC |