Re: get_handlers and set_handlers - purpose and use cases?

Michael Ludwig <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <20100323185425.GA3932@wladimir>
Perrin Harkins schrieb am 23.03.2010 um 13:08:27 (-0400):
> 
> These are explained with examples in the docs:
> http://perl.apache.org/docs/2.0/api/Apache2/RequestUtil.html
> 
> Is there something there that's confusing you?  Can you ask a more
> specific question?

I did see the examples in the doc but fail to understand their
relevance. The first one goes:

  # 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.

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?

What have you used these functions for in real code?

I'm sorry I don't have a concrete use case of my own at hand - I'm
really only try to figure out the details of the API so I know how to
best make use of it.
-- 
Michael Ludwig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.