> Yes, and No. Read it. It seems to cover more of doing things like that
> in <Perl> sections. What I'm more curious is if it can be done during
> this phase:
> 
>     PerlModule MyCatalystApp

yes.  at least in mp1.  see

http://www.modperlcookbook.org/~geoff/modules/experimental/Apache-ReverseLocation-0.01.tar.gz

for a bizarre yet working example of adding to the PerlSections namespace.

fwiw, gozer tells me this is perfectly fine in mp2 as well.  however, I have
my doubts - PerlModule doesn't start the interpreter anymore, so you'd need
to use PerlLoadModule to insert these into apache's config time.  though I
can't recall if we altered PerlLoadModule so it can be used without custom
config directives (though I think gozer did that too).  if not, you can
trick the interpreter into starting with a dummy <Perl> section :)

> 
> What I don't yet grasp is if adding  to the httpd.conf at runtime is
> limited to a particular phase of if I could have any mod_perl handler
> actually alter the http config while serving live requests. 

well, you probably wouldn't want to do the latter - once you're serving a
request it makes little sense to add a full <Location> or whatnot, since
that directive would just disappear at the end of the request.  you'd be
better off just fiddling with the current request using stuff like
$r->handler than thinking about how to add real httpd.conf directives at
that point.

> Could I have
> a mod_perl page whereby the user submits a form, that in turn added a
> Location directive to the runnin apache processes?

yes, through means like $r->handler and whatnot.  not really in terms of
Location, at least not that I know about.  but as I said, you probably
wouldn't want to do that anyway.

--Geoff

Reply via email to