[prev in list] [next in list] [prev in thread] [next in thread]
List: apache-modperl
Subject: Re: mod_perl 2.0 custom directive clarification
From: Geoffrey Young <geoff () modperlcookbook ! org>
Date: 2006-02-21 13:34:19
Message-ID: 43FB16DB.7090507 () modperlcookbook ! org
[Download RAW message or body]
Dag-Erling Smørgrav wrote:
> Frank Wiles <frank@wiles.org> writes:
>
>>des@des.no (Dag-Erling Smørgrav) wrote:
>>
>>>To quote a slightly longer excerpt:
>>>
>>>| This object can be later retrieved at request time via:
>>>|
>>>| my $dir_cfg = $self->get_config($s, $r->per_dir_config);
>>>
>>>which is clearly incorrect, unless "at request time" means something
>>>different to you than it does to me.
>>
>>Yes, that's exactly what I'm talking about. :) You are referencing
>>the wrong section for how to use these configs in your sub handler().
>>[...]
>>Hopefully that is more clear.
>
>
> No, it isn't. You didn't address my key point: what does "at request
> time" mean in the sentence I quoted?
"request time" means the time from the PerlPostReadRequestHandler through
the PerlCleanupHandler. in essence, the time under which httpd is serving a
request (as opposed to the time httpd spends configuring itself, for example).
nevertheless, the syntax given above is wrong without additional perl foo
(like adding Apache::Module to your @INC). I suspect that the example was
lifted from the tests where that syntax is indeed used but get_config() is a
wrapper function and not the official API. I'd suggest changing that example to
Apache::Module::get_config(__PACKAGE__, $s, $r->per_dir_config);
instead of $self.
HTH
--Geoff
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic