Re: get_handlers and set_handlers - purpose and use cases?

2010-03-24 Thread Michael Ludwig
Am 24.03.2010 um 13:08 schrieb Perrin Harkins: > On Tue, Mar 23, 2010 at 4:51 PM, Michael Ludwig wrote: >> My desire to believe in the wisdom of the designers of the API has kept >> me busy thinking about this. > > Keep in mind that most of the Perl API is just exposing the apache > module API t

Re: get_handlers and set_handlers - purpose and use cases?

2010-03-24 Thread Perrin Harkins
On Tue, Mar 23, 2010 at 6:03 PM, Michael Ludwig wrote: > 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

Re: get_handlers and set_handlers - purpose and use cases?

2010-03-24 Thread Perrin Harkins
On Tue, Mar 23, 2010 at 4:51 PM, Michael Ludwig wrote: > My desire to believe in the wisdom of the designers of the API has kept > me busy thinking about this. Keep in mind that most of the Perl API is just exposing the apache module API to Perl. It wasn't necessarily put there with a (Perl) use

Re: get_handlers and set_handlers - purpose and use cases?

2010-03-23 Thread Michael Ludwig
Perrin Harkins schrieb am 23.03.2010 um 16:54:44 (-0400): > On Tue, Mar 23, 2010 at 3:47 PM, Michael Ludwig 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 se

Re: get_handlers and set_handlers - purpose and use cases?

2010-03-23 Thread Michael Ludwig
Michael Ludwig schrieb am 23.03.2010 um 21:51:48 (+0100): > Maybe dynamic reconfiguration on a per-request basis as in this > example for a MyApache2::SendEmail handler [1] is what this is about. [1] http://perl.apache.org/docs/2.0/user/handlers/http.html -- Michael Ludwig

Re: get_handlers and set_handlers - purpose and use cases?

2010-03-23 Thread Perrin Harkins
On Tue, Mar 23, 2010 at 3:47 PM, Michael Ludwig 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 noti

Re: get_handlers and set_handlers - purpose and use cases?

2010-03-23 Thread Michael Ludwig
Michael Ludwig schrieb am 23.03.2010 um 00:50:43 (+0100): > What's the purpose and what are the use cases for the methods > get_handler and set_handler available from Apache2::RequestUtil > and Apache2::ServerUtil? My desire to believe in the wisdom of the designers of the API has kept me busy thi

Re: get_handlers and set_handlers - purpose and use cases?

2010-03-23 Thread Michael Ludwig
Perrin Harkins schrieb am 23.03.2010 um 15:14:56 (-0400): > On Tue, Mar 23, 2010 at 2:54 PM, Michael Ludwig 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

Re: get_handlers and set_handlers - purpose and use cases?

2010-03-23 Thread Perrin Harkins
On Tue, Mar 23, 2010 at 2:54 PM, Michael Ludwig 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 thi

Re: get_handlers and set_handlers - purpose and use cases?

2010-03-23 Thread Michael Ludwig
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 do

Re: get_handlers and set_handlers - purpose and use cases?

2010-03-23 Thread Perrin Harkins
On Mon, Mar 22, 2010 at 7:50 PM, Michael Ludwig wrote: > What's the purpose and what are the use cases for the methods > get_handler and set_handler available from Apache2::RequestUtil > and Apache2::ServerUtil? These are explained with examples in the docs: http://perl.apache.org/docs/2.0/api/Ap

get_handlers and set_handlers - purpose and use cases?

2010-03-22 Thread Michael Ludwig
What's the purpose and what are the use cases for the methods get_handler and set_handler available from Apache2::RequestUtil and Apache2::ServerUtil? I don't have a concrete use case myself where I'd think these methods might fit; I'm just studying the API and trying to make sense of it. -- Mich