Harry Danilevsky wrote:
> I certainly agree with attaching a common prefix to a library, but what 
> if I am already dealing
> with a bunch of modules written without prefix, and enough application 
> code using those packages ?
> I suppose I could change the code, or alias names in symbol table, or do 
> some other trick;
> I just figured that one extra directive, plus one patched line was a 
> cheap solution to my
> problems.
> 
> I guess if nobody else sees any value in it, I'll just keep the private 
> patched version for myself :-)

No, no, I was asking whether you can re-use the existing options without 
adding new ones. Nobody has asked for this feature since the package was 
created. It certainly has a value. e.g. you may want to watch only 
Apache:: packages from a certain private directory.

I guess you should send the patch to Matt and I'll sync the version in 
mod_perl 2.0 (CC me). Though we need to figure out how to resolve the 
versioning conflict. so when you ask for Apache::Reload from CPAN.pm, it 
won't install mod_perl 2.0. Ideas?

> Stas Bekman wrote:
> 
>> Harry Danilevsky wrote:
>>
>>> Two reasons :
>>>
>>> 1.  My site-specific modules don't necessarily have a common 
>>> namespace (or even several namespaces);
>>> they just all live in /site/lib. Without a ReloadDirectories-like 
>>> filter every time I add another module,
>>> say, /site/lib/Reports.pm I'll need to add Reports to ReloadModules, 
>>> and restart the server. 
>>
>>
>>
>> That's the thing. It's a good idea to alway use some prefix package 
>> name in all your modules, to avoid future clashes with other modules. 
>> And it automatically solves your problem with Apache::Reload.
>>
>>> 2.  Much more obscure,  related to HTML::Mason. As I mentioned in my 
>>> post:
>>>
>>> In Mason components are precompiled and cached, so that perl code 
>>> doesn't have to be re-parsed for every request.
>>> The cached files are require(d), and they end up in %INC.
>>> It appears from ReloadDebug's output that those cached files are 
>>> being checked by Apache::Reload,
>>> and if they have been modified - they'll be reloaded. The problem is, 
>>> if the code has a syntax
>>> error, that error will occur when Apache::Reload re-require()s that 
>>> file, and the error message
>>> will be printed to a log file, not to the browser - which is what 
>>> Mason would do.
>>> So your browser will simply tell you that 'Internal error has occurred'
>>> ReloadDirectories will simply ignore them, and let Mason deal with 
>>> modified files.
>>
>>
>>
>> If you tell Apache::Reload to look only at certain namespaces, this 
>> problem doesn't exist anymore.
>>
>>> Am I still missing something ?
>>>
>>>
>>> Harry Danilevsky
>>> [EMAIL PROTECTED]
>>>
>>> Stas Bekman wrote:
>>>
>>>> [...]
>>>>
>>>>> Anyway, I decided to add another directive to Apache::Reload
>>>>>
>>>>> PerlSetVar ReloadDirectories "/site/lib /usr/local/apache/conf"
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Apache::Reload allows you to define which modules to reload using 
>>>> the patterns like so:
>>>>
>>>> PerlSetVar ReloadAll Off
>>>> PerlSetVar ReloadModules "Apache::* My::*"
>>>>
>>>> Is there any reason why you cannot use this approach?
>>>>
>>>> I've no objection to your proposal, just wondering whether the 
>>>> existing features can be used instead.
>>>>
>>>> __________________________________________________________________
>>>> Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
>>>> http://stason.org/     mod_perl Guide ---> http://perl.apache.org
>>>> mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
>>>> http://modperlbook.org http://apache.org   http://ticketmaster.com
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
> 



-- 


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Reply via email to