Re: Many handlers in the same module

2008-03-31 Thread Perrin Harkins
On Sat, Mar 29, 2008 at 6:41 AM, André Warnier <[EMAIL PROTECTED]> wrote: > Just for the rest of us : does anyone care to summarise what works and > works not (inasfar as not necessarily documented and/or intuitive) ? I think it's pretty well-documented: http://perl.apache.org/docs/2.0/user/port

Re: Many handlers in the same module

2008-03-31 Thread Perrin Harkins
On Wed, Mar 26, 2008 at 9:47 AM, Colin Wetherbee <[EMAIL PROTECTED]> wrote: > > what about... > > > > PerlAccessHandler JetSet::Handler::AccessHandler > > > > sub AccessHandler { > > my ($r) = @_; > > } > > We seem to have solved the problem, but for the sake of conversation... > > Whe

Re: Many handlers in the same module

2008-03-31 Thread Perrin Harkins
On Wed, Mar 19, 2008 at 2:41 PM, John ORourke <[EMAIL PROTECTED]> wrote: > The only down-side is that (AFAICR) it is creating a new object for each > request No, it's a class method. No object is created. > PerlResponseHandler $My::Handlers::Persistent->response_handler > PerlFixupHandler $M

Re: Many handlers in the same module

2008-03-31 Thread Perrin Harkins
On Wed, Mar 19, 2008 at 2:22 PM, Colin Wetherbee <[EMAIL PROTECTED]> wrote: > In order to have many handlers in a file, I've put the following lines > and other, similar lines in my virtual host configuration: > > PerlAccessHandler JetSet::Handler->AccessHandler > PerlResponseHandler JetSet::Ha

Re: Many handlers in the same module

2008-03-31 Thread Ryan Gies
I imagine you're already aware of this, but just in case... "PerlInitHandler When configured inside any container directive, except , this handler is an alias for PerlHeaderParserHandler described earlier. Otherwise it acts as an alias for PerlPostReadRequestHandler described earlier." (htt

Re: Many handlers in the same module

2008-03-31 Thread Colin Wetherbee
� wrote: Just for the rest of us : does anyone care to summarise what works and works not (inasfar as not necessarily documented and/or intuitive) ? And maybe what the original point of this interesting thread was ? Sure, but I don't think we're finished quite yet. ;) Colin

Re: Many handlers in the same module

2008-03-31 Thread Colin Wetherbee
Jonathan Vanasco wrote: On Mar 28, 2008, at 3:11 PM, Colin Wetherbee wrote: Care to add one, just to see what happens? :) You know you've been working too much on the Business Side when you stop testing stuff like that automatically. sigh... Indeed. :) ok... it works if i have [snip]

Re: Many handlers in the same module

2008-03-29 Thread André Warnier
Hi. Just for the rest of us : does anyone care to summarise what works and works not (inasfar as not necessarily documented and/or intuitive) ? And maybe what the original point of this interesting thread was ? Thanks André Jonathan Vanasco wrote: On Mar 28, 2008, at 3:11 PM, Colin Wether

Re: Many handlers in the same module

2008-03-28 Thread Jonathan Vanasco
On Mar 28, 2008, at 3:11 PM, Colin Wetherbee wrote: Care to add one, just to see what happens? :) You know you've been working too much on the Business Side when you stop testing stuff like that automatically. sigh... ok... it works if i have package MyApp; sub handler {} sub handler_

Re: Many handlers in the same module

2008-03-28 Thread Colin Wetherbee
Jonathan Vanasco wrote: On Mar 27, 2008, at 8:43 PM, Colin Wetherbee wrote: Hm. Yep. ResponseHandler can interpret the ::ResponseHandler part as being a function within Handler.pm, but that does *not* work for InitHandler. i have it set up using PerlFixupHandler PerlResponseHandler

Re: Many handlers in the same module

2008-03-28 Thread Jonathan Vanasco
On Mar 27, 2008, at 8:43 PM, Colin Wetherbee wrote: Hm. Yep. ResponseHandler can interpret the ::ResponseHandler part as being a function within Handler.pm, but that does *not* work for InitHandler. i have it set up using PerlFixupHandler PerlResponseHandler PerlC

Re: Many handlers in the same module

2008-03-27 Thread Colin Wetherbee
Jonathan Vanasco wrote: On Mar 26, 2008, at 9:47 AM, Colin Wetherbee wrote: We seem to have solved the problem, but for the sake of conversation... When I've tried that in the past, mod_perl would always look for handler() within JetSet::Handler::AccessHandler.pm. Wow. I've got 5 sites in p

Re: Many handlers in the same module

2008-03-27 Thread Jonathan Vanasco
On Mar 26, 2008, at 9:47 AM, Colin Wetherbee wrote: We seem to have solved the problem, but for the sake of conversation... When I've tried that in the past, mod_perl would always look for handler() within JetSet::Handler::AccessHandler.pm. Wow. I've got 5 sites in production right now..

Re: Many handlers in the same module

2008-03-26 Thread Colin Wetherbee
Jonathan Vanasco wrote: On Mar 19, 2008, at 2:22 PM, Colin Wetherbee wrote: PerlAccessHandler JetSet::Handler->AccessHandler PerlResponseHandler JetSet::Handler->ResponseHandler sub ResponseHandler { my (undef, $r) = @_; # ... } what about... PerlAccessHandler JetSet::Handler::AccessHand

Re: Many handlers in the same module

2008-03-25 Thread Jonathan Vanasco
On Mar 19, 2008, at 2:22 PM, Colin Wetherbee wrote: PerlAccessHandler JetSet::Handler->AccessHandler PerlResponseHandler JetSet::Handler->ResponseHandler sub ResponseHandler { my (undef, $r) = @_; # ... } what about... PerlAccessHandler JetSet::Handler::AccessHandler sub AccessHandler

Re: Many handlers in the same module

2008-03-19 Thread Colin Wetherbee
André Warnier wrote: PerlResponseHandler AM::TestStuff->handler and sub handler { my ($self,$r) = @_; $r->print('$self is a [' . ref($self) . '] and contains [' . $self . "]\n"); [...] and the result is $self is a [] and contains [AM::TestStuff] doesn't seem to be an object. I get the

Re: Many handlers in the same module

2008-03-19 Thread André Warnier
John, It does not look as if what you write below is true though. I just tested with PerlResponseHandler AM::TestStuff->handler and sub handler { my ($self,$r) = @_; $r->print('$self is a [' . ref($self) . '] and contains [' . $self . "]\n"); [...] and the result is $self is a [] and con

Re: Many handlers in the same module

2008-03-19 Thread Colin Wetherbee
John ORourke wrote: The only down-side is that (AFAICR) it is creating a new object for each request - my handler is quite expensive to set up, so I have a persistent object and use method handlers like this: Ah, that's quite neat. I might give that a shot. Thanks for the suggestion. Colin

Re: Many handlers in the same module

2008-03-19 Thread John ORourke
André Warnier wrote: In a similat setup, I successfuly use my ($self, $r) = @_; Colin Wetherbee wrote: PerlAccessHandler JetSet::Handler->AccessHandler PerlResponseHandler JetSet::Handler->ResponseHandler The only down-side is that (AFAICR) it is creating a new object for each request - my h

Re: Many handlers in the same module

2008-03-19 Thread Colin Wetherbee
André Warnier wrote: In a similat setup, I successfuly use my ($self, $r) = @_; so, if the undef bothers you .. :) Do you actually use $self for anything? Colin

Re: Many handlers in the same module

2008-03-19 Thread André Warnier
In a similat setup, I successfuly use my ($self, $r) = @_; so, if the undef bothers you .. ;-) Colin Wetherbee wrote: Greetings. In order to have many handlers in a file, I've put the following lines and other, similar lines in my virtual host configuration: PerlAccessHandler JetSet::Handle

Many handlers in the same module

2008-03-19 Thread Colin Wetherbee
Greetings. In order to have many handlers in a file, I've put the following lines and other, similar lines in my virtual host configuration: PerlAccessHandler JetSet::Handler->AccessHandler PerlResponseHandler JetSet::Handler->ResponseHandler Then, my handlers look like this: sub ResponseHan