in reply to Best way to track an error string in module?
May I suggest that you use real wrappers?
You can automatically replace all methods in a list with new ones which call the old ones internally.
my $old_ref = \&meth; *meth = sub { before(); &$old_ref ; after() };
No more code, because I'm not sure if that's your case, search for "Perl monkey-patching" if interested.
AFAIK do some OOP models like Moose provide extra functionality for such "upgrades".
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
°) and as I explained in my other reply, using AUTOLOAD in classes is a tough choice leading to a lot of problems.
|
|---|