perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Apache2/mod_perl2 test in module
Date Mon, 23 Nov 2009 22:24:18 GMT

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.

View raw message