I've been studying Chapter 8 "Customizing the Apache Configuration 
Process" in the Eagle book, and working through some test modules.

In the process, I been wondering is it possible to peek at the
configuration directives/values of other modules (both Perl and C)
via mod_perl?

Also, in my tests I tried the following code..

   my $fname = $r->server->error_fname;
   $log->debug("error log filename = $fname");

   my $loglevel = $r->server->loglevel;
   $log->debug("loglevel = = $loglevel");

and to my surprise they worked and came back with values.  ($fname
with the value of my ErrorLog directive, and $loglevel with 7 which
corresponds to the debug level my LogLevel directive was set to.

error_fname() is not documented (at least my eyes didn't find it in
the Eagle book), but to my surprise it worked.  I later found it
in the mod_perl sources.  

loglevel() does not appear to be documented either, nor did I find a
sub for it in the mod_perl source.  Why did that work?  Is there 
some AUTOLOADing going on here?


Reply via email to