|Think about Loose Coupling|
Re: trying to extend Log::Log4perlby Bloodnok (Vicar)
|on Nov 23, 2012 at 23:19 UTC||Need Help??|
It's a bit late I know buuuut....I'm going to do this anyway:-)
Having encountered a not unrelated problem myself, I did a little investigating and AFAICT, L4P appears to construct it's methods dynamically (using closures) and doesn't make them available to an inheriting bespoke logger wrapper package via the standard route e.g. @ISA/SUPER:: etc., so they are available only to the L4P instance itself.
The only 'obvious' way I could think of at the time was to utilise MyWrapper::AUTOLOAD to dispatch non-overridden L4P method calls to the logger object via a get_logger(class) call and let L4P deal with unknown methods etc. e.g. in a manner something similar to ...
The usual caveat emptor applies, but that's close to the way I managed to do it - less an awful lot of extraneous code.
Hope that helps ...
A user level that continues to overstate my experience :-))