On Tue, Mar 23, 2010 at 3:47 PM, Michael Ludwig <mil...@gmx.de> wrote: > Well, you don't - unless you can tell from the code reference which > handler it actually is.
You could examine a coderef if you really needed to. You could also get the list of handlers, add something to it, and set it again. If you notice, set clears the previous handlers. I don't know if anyone uses this. > 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. > 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. >> Sometimes people use them to tell apache to handle a certain request >> as a static file and skip the mod_perl response handler that would >> normally be configured for the URI. > > That makes sense, but I would rather have taken care to ensure that only > properly dynamic requests hit mod_perl. 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." - Perrin