You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Stas Bekman <st...@stason.org> on 2001/10/10 05:46:52 UTC
modules get reloaded on each request?
Is there some code that resets %INC in the current mod_perl setup?
I observe a very weird behavior in the ModPerl-Registry setup, I preload
all the modules that I use from httpd.conf, but then I see them reloaded
on every request (It's not Apache::Reload, I've commented it out in
extra.conf.in and rebuild config). Even worse, the reload happens
without mod_perl env, so I cannot do Apache->server even if it now exists.
try putting:
warn "!!! NO MODPERL" unless exists $ENV{MOD_PERL};
use Carp;
Carp::cluck("why loading me again?");
for example into lib/ModPerl/Registry.pm and run t/TEST.
Just to be on the safe side, comment out the 4 Apache::Reload lines in
t/conf/extra.conf.in before you go.
I guess I miss something obvious, but I cannot figure out what is it :(
Thanks a bunch!!!
_____________________________________________________________________
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide http://perl.apache.org/guide
mailto:stas@stason.org http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: modules get reloaded on each request?
Posted by Stas Bekman <st...@stason.org>.
Doug MacEachern wrote:
> On Wed, 10 Oct 2001, Stas Bekman wrote:
>
>
>>Is there some code that resets %INC in the current mod_perl setup?
>>
>
> must be something specific to your setup.
>
> % cd ModPerl-Registry
> % t/TEST -start
> ...
> % grep "why loading" t/logs/error_log | wc -l
> 2
> % t/TEST -get /registry/basic.pl
> ...
> % grep "why loading" t/logs/error_log | wc -l
> 2
>
> my only suspect the save/restore code for @INC (happens with
> perl-script handler) that might have stomped %INC too, but i don't see
> that happening.
>
> oh wait, i see something with t/TEST -run, but that is the client side,
> not server, still get 2 grepping the error_log.
> your .t's 'use Modperl::Registry', that would explain it.
yes, that was the reason. I've fixed it and it works now :)
thanks!!!
_____________________________________________________________________
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide http://perl.apache.org/guide
mailto:stas@stason.org http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org
Re: modules get reloaded on each request?
Posted by Doug MacEachern <do...@covalent.net>.
On Wed, 10 Oct 2001, Stas Bekman wrote:
> Is there some code that resets %INC in the current mod_perl setup?
must be something specific to your setup.
% cd ModPerl-Registry
% t/TEST -start
...
% grep "why loading" t/logs/error_log | wc -l
2
% t/TEST -get /registry/basic.pl
...
% grep "why loading" t/logs/error_log | wc -l
2
my only suspect the save/restore code for @INC (happens with
perl-script handler) that might have stomped %INC too, but i don't see
that happening.
oh wait, i see something with t/TEST -run, but that is the client side,
not server, still get 2 grepping the error_log.
your .t's 'use Modperl::Registry', that would explain it.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org