Perrin Harkins schrieb am 23.03.2010 um 16:54:44 (-0400): > On Tue, Mar 23, 2010 at 3:47 PM, Michael Ludwig <mil...@gmx.de> wrote:
> You could examine a coderef if you really needed to. Using some forsaken B:: module? Such wizardly demanour does raise some eye-brows with your fellow workers. > > Okay, I can see that for the case of setting a handler on the > > current request. But I figure it can get pretty confusing if you > > reconfigure your server by calling set_handlers on the > > Apache2::ServerRec object as shown here: > > Well, if you find it confusing, I'd advise you not to do it. I > wouldn't do it. Thanks. That makes me feel less uncertain about this dynamic handler configuration business. > > How do people keep track of who configured what handlers, and what > > is the current handler? > > Dynamic configuration of handlers is a pretty specialized situation > that you'd only use if you needed it. Normally you'd just configure > them in your conf file. Right. Never done anything else to this day. > Yes, obviously you would only do this for something where the decision > about what handler to run is actually dynamic based on the request or > some other current information. People often ask about it though. You > can see some typical questions in the mail archives if you search for > "default-handler." Thanks. Found some good examples. Although it seems to me that for such a case you would rather call $r->handler( 'default-handler' ), which is a pendant to 'perl-script', 'cgi-script' and others. But unless I'm mistaken here, this is not the same as the handlers we can manipulate using get_handlers, set_handlers and push_handlers, since these are sub-handlers of 'perl-script' (or any other Apache handler, for that matter). See this short thread to get the context of what I'm referring to: Defaulting to default-handler from custom handler http://www.gossamer-threads.com/lists/modperl/modperl/51739 -- Michael Ludwig