Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: ModPerl

Apache2/mod_perl2 test in module

 

 

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded


aw at ice-sa

Nov 23, 2009, 2:24 PM

Post #1 of 1 (613 views)
Permalink
Apache2/mod_perl2 test in module

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.

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.