Doug MacEachern wrote:

> On Sat, 6 Oct 2001, Stas Bekman wrote:
> 
> 
>>As I go with Apache::Registry I'm playing with stuff from 1.x, and see
>>some problems. Let me know whether these should be fixed==implemented
>>or fixed==compat, ignored, documented.
>>
>>Trying Apache::Reload:
>>
>>- PerlInitHandler doesn't exist. I've used PerlPostReadRequestHandler 
>>instead.
>>
> 
>>>todo for PerlInitHandler
>>>
>  
> 
>>- %INC is supposed to include correct filenames as its values.
>>Apache::Reload tries to get the file and:
>>
>>Apache::Reload: Can't locate Apache.pm => 1
>>Apache::Reload: Can't locate Apache/Constants.pm => 1
>>
> 
> Apache::Reload should be changed to only re-load the file if it exists
> (-e), Apache::compat is not the only case where a value is added to %INC
> that is not a file.

Now when I think about it, it's not a very good solution. Consider a 
registry script that loads some module which is not relative to the @INC 
path, but uses a relative path. In this case Apache::Reload will fail to 
reload the file, and if we silence the warning, it's not a good thing. 
(in this case the user has to add the dir with local modules to @INC to 
solve the problem, but we have to flag the problem)

May be we assign '/dev/null' instead of '1' in compat? /dev/null never 
changes, which is what we want. Or isn't it portable?

Another suggestion would be to point to itseldf, i.e. Apache/compat.pm 
instead of '1'. I think that this is a safe assumption, and if it gets 
reloaded, the module itself will reassign correct values in %INC.

_____________________________________________________________________
Stas Bekman             JAm_pH      --   Just Another mod_perl Hacker
http://stason.org/      mod_perl Guide   http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to