On Tue, Mar 23, 2010 at 2:54 PM, Michael Ludwig <mil...@gmx.de> wrote: > # A list of handlers configured to run at the response phase: > my @handlers = @{ $r->get_handlers('PerlResponseHandler') || [] }; > > Now what do I do with that bunch of code references? I think there might > be something useful about this that escapes me.
If you want to know what handlers are set to run for the current request, this is how you find out. > Almost the same story for set_handlers: Do people use this to > dynamically reconfigure their server? Could it be used to dynamically > take a handler out of service once a certain error condition is met > with, like, say, a Berkeley database in need of recovery (which requires > single-threaded access to perform), or a search engine backend having > become irresponsive? More likely you would use them to do your own dispatch of some kind where you choose between multiple possible handlers based on something about the request. > What have you used these functions for in real code? 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. - Perrin