Re: [mp2] Runtime PerlResponseHandler

2005-07-22 Thread Tim Esselens
sume that since the Dispatcher is called from PerlInitHandler, $r->filename is still pointing to / ? -- kind regards, Tim Esselens

Re: [mp2] Runtime PerlResponseHandler

2005-07-22 Thread Tim Esselens
really solve my problem since my Dispatcher gets hit too early in the chain, the code behind it (CGI::Builder::Magic) doesn't get the template name (index.phtml). I'm presuming this is because the uri (/) isn't translated to the directoryindex (/index.phtml) yet. I'll report back If I have any more clues. > --Geoff -- kind regards. Tim Esselens

[mp2] Runtime PerlResponseHandler

2005-07-22 Thread Tim Esselens
special I need to do when I'm in my Dispatcher's handler? (ie: return DECLINED or something similar to force processing of other handlers maybe? I'm clueless) -- kind regards, Tim Esselens

Re: [mp2] Method Handlers creating a new object vs ref

2005-07-21 Thread Tim Esselens
ever seen it used in real life like that - certainly not by me. but > maybe ask or someone else has :) OK, one more mystery solved. On a sidenote, I've bought mod_perl cookbook, very nice to be talking to one of the people involved, your work is very much appreciated! > --Geoff -- kind regards, Tim Esselens

Re: [mp2] Method Handlers creating a new object vs ref

2005-07-21 Thread Tim Esselens
Geoffrey Young wrote: >> sub handler : method { >> my ($self,$r) = @_; >> $self = $self->new unless ref $self; >> $self->{r} = $r; >> } >> >> When exactly is this ref used? AFAIK $_[0] will never be a reference. > it will when you use the :method attribute :) > in short,

[mp2] Method Handlers creating a new object vs ref

2005-07-21 Thread Tim Esselens
ed? AFAIK $_[0] will never be a reference. kind regards, Tim Esselens

Re: [mp2] lifetime of Apache2::RequestRec

2005-07-21 Thread Tim Esselens
es of $r start to change in a more random fashion. -- kind regards, Tim Esselens

Re: [mp2] Apache2::Reload using runtime PerlResponseHandlers

2005-07-20 Thread Tim Esselens
s or use a > method name instead of a code ref. > if ($mod->can($sub)) { > $r->set_handlers(PerlResponseHandler => join '::', $mod, $sub); > } The init handlers were in the right order, but your suggestion of using a method name worked like a charm. Thanks! -- kind regards, Tim Esselens

[mp2] Apache2::Reload using runtime PerlResponseHandlers

2005-07-20 Thread Tim Esselens
return 0 } If I change the "hello world" string, the module gets reloaded ok, but I presume the $coderef is pointing to the wrong piece of code? I've also tried: if(my $coderef = eval { $mod->can($sub) }) { ... } but with no difference. -- kind regards, Tim Esselens

Re: [mp2] lifetime of Apache2::RequestRec

2005-07-20 Thread Tim Esselens
ALAR(0x922937c) 26700 Apache2::RequestRec=SCALAR(0x922937c) 26702 Apache2::RequestRec=SCALAR(0x922937c) 26704 Apache2::RequestRec=SCALAR(0x922937c) - my apache has 10 children at the moment 26687 Apache2::RequestRec=SCALAR(0x9193884) - stays the same for another 9 hits, then changes again > Tom -- kind regards, Tim Esselens

Re: [mp2] lifetime of Apache2::RequestRec

2005-07-20 Thread Tim Esselens
Tom Schindl wrote: > Does this really make sense? You are printing the pointer of the pointer > to the apache request object. You're right, I've should have printed $r, which yields: Apache2::RequestRec=SCALAR(0x9d44644) [first n times] Apache2::RequestRec=SCALAR(0x9d7e0a4) (n begin the number o

[mp2] lifetime of Apache2::RequestRec

2005-07-20 Thread Tim Esselens
0x1 [req 1 child 2] 0x2 [req 2 child 1] 0x2 [req 2 child 2] ... So I was wondering wether or not this is normal behaviour. (The Apache2::RequestRec is only re-new()ed every n-hits, n being the number of apache children) And where I could find out more about why it's doing this.