Hi.

I created a perl object module which can be used by mod_perl2 handlers, cgi scripts, or stand-alone perl programs. It has a new() method which creates an object $obj, which is later used via standard $obj->method() calls. What would be a recommended/elegant mechanism/idiom, to have this module log warnings and errors appropriately, depending on where it is currently being used, e.g. :
- to the Apache2 error log when it is used within Apache/mod_perl2
- warn() if it is used by a stand-alone program
- ?? when used in a cgi script

Thanks for ideas/examples/pointers.


Reply via email to