perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoffrey Young <ge...@modperlcookbook.org>
Subject Re: [mp1 bug] mp_preload_module() bustage
Date Wed, 11 Jun 2003 12:14:48 GMT

>     if(!perl_module_is_loaded(*name)) { 

> PerlLogHandler My::Module->somehandler
> or
> PerlLogHandler $My::Obj->somehandler


> 
> First of them is that My::Module->somehandler gets called on startup (or
> once per request if in a .htaccess) without a valid $r as argument.
> 
> Second one, the require call itself will most likely fail, trying to
> require the value of Apache::OK.
> 
> I propose to fix mp_preload_module to be a bit smarter and skip those
> odd cases... 
> 
> But I wonder how come this issue hasn't been reported already? Am I
> missing something terribly simple here?

I suspect the reason it hasn't been reported is because it tends to fix 
itself :)  method handlers (in mp1 at least) require the module to be 
preloaded - otherwise mod_perl doesn't resolve the ($class, $r) stuff 
properly and it doesn't work anyway.

so, I suspect that most people figure it out when the module doesn't work as 
expected, preload the module, and don't see a problem.

does that seem to gel with what you've found?

--Geoff


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message