more useful options | |
PerlMonks |
Re: Rewriting sub code on import to add loggingby jettero (Monsignor) |
on May 14, 2008 at 16:07 UTC ( [id://686556]=note: print w/replies, xml ) | Need Help?? |
This method isn't exactly recommended. Look carefully at the other methods mentioned above (possibly except the B::Deparse method, which is likely at least as fragile as this). I ran into a problem like this a while back where I wanted to write a custom function profiler that used DBD::SQLite to store the profile data. It didn't work very well, but it was fun and it's no trouble for me to cut and paste the code in here. (I ripped off ideas from Memoize directly.) I think this can easily be adapted to what you're trying to do.
-Paul
In Section
Seekers of Perl Wisdom
|
|