You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Gerald Richter <ri...@ecos.de> on 2000/09/03 02:01:40 UTC

Re: Apache::Reload

>
> One thing I'd like to add,
> and I'll send a patch to you soonish if you think it's worthwhile, is
> the ability to specify a whole subtree to be reloaded: using ReloadModules
> is fine but after a while adding modules to the list gets tedious. In most
> cases I want to reload my application modules, and no others.
>

I append a patch that let you say

PerlSetVar ReloadModuleX  <perl-regex>

which allows you to specify a regex to reload modules. For example

PerlSetVar ReloadModuleX  ^Apache

will check all Apache modules. Note: You have to use the / instead of the ::
as package separator if you need any.

PerlSetVar ReloadModuleX  ^Apache/Auth

will realod all modules starting with Apache::Auth

I didn't have written the docs, Matt if you find this patch usefull maybe
you can do it (since your english is much better then mine :-), or drop me a
note and I will do it.

Gerald

P.S: The current version doesn't works with modules that uses pseudo hashs
(with "use fields qw{ .. }" ). I already solved this problem, but I have to
integrate it into Apache::Reload. When I have done it, I send a patch




-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de         Voice:    +49 6133 925151
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------


Re: Apache::Reload

Posted by Gerald Richter <ri...@ecos.de>.
> > PerlSetVar ReloadModuleX  <perl-regex>
>
> I already added something similar, only I didn't see the point in adding
> in regex support, so I just allow you to say:
>
> PerlSetVar ReloadModules "My::Foo My::Bar Foo::Bar::*"
>

Yes, my patch is against 0.04 which already contains ReloadModules, but for
example I have a project called symphony, which consists of serval modules,
in different files, but all starting with symphony::, now I just can say

PerlSetVar ReloadModulesX ^symphony

and all modules belonging to this projects gets reloaded, otherwise I have
to say

PerlSetVar ReloadModules "symphony::foo symphony::bar symphony::config ....
"

and I have to keep track when a new module is added to add it to this list
also.

Actualy I just made a copy of your code for ReloadModules and modified it a
little bit

Gerald



Re: Apache::Reload

Posted by Matt Sergeant <ma...@sergeant.org>.
On Sun, 3 Sep 2000, Ask Bjoern Hansen wrote:

> On Sun, 3 Sep 2000, Matt Sergeant wrote:
> 
> > > I append a patch that let you say
> > > 
> > > PerlSetVar ReloadModuleX  <perl-regex>
> > 
> > I already added something similar, only I didn't see the point in adding
> > in regex support, so I just allow you to say:
> > 
> > PerlSetVar ReloadModules "My::Foo My::Bar Foo::Bar::*"
> 
> I find regex support useful. Regex'es allow for your syntax, but not
> the other way, so why not do it the most flexible way?

I just didn't see a use for the power of regexps here. And I consider them
too ugly to be adding to configuration files. And I don't consider
flexible to be the ultimate best solution. One thing I am considering
though is adding support for exclusion, like do My::*, but not
My::Bar. I'll work something out maybe later.

-- 
<Matt/>

Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org | AxKit: http://axkit.org


Re: Apache::Reload

Posted by Ask Bjoern Hansen <as...@valueclick.com>.
On Sun, 3 Sep 2000, Matt Sergeant wrote:

> > I append a patch that let you say
> > 
> > PerlSetVar ReloadModuleX  <perl-regex>
> 
> I already added something similar, only I didn't see the point in adding
> in regex support, so I just allow you to say:
> 
> PerlSetVar ReloadModules "My::Foo My::Bar Foo::Bar::*"

I find regex support useful. Regex'es allow for your syntax, but not
the other way, so why not do it the most flexible way?


 - ask

-- 
ask bjoern hansen - <http://www.netcetera.dk/~ask/>
more than 70M impressions per day, <http://valueclick.com>


Re: Apache::Reload

Posted by Matt Sergeant <ma...@sergeant.org>.
On Sun, 3 Sep 2000, Gerald Richter wrote:

> 
> >
> > One thing I'd like to add,
> > and I'll send a patch to you soonish if you think it's worthwhile, is
> > the ability to specify a whole subtree to be reloaded: using ReloadModules
> > is fine but after a while adding modules to the list gets tedious. In most
> > cases I want to reload my application modules, and no others.
> >
> 
> I append a patch that let you say
> 
> PerlSetVar ReloadModuleX  <perl-regex>

I already added something similar, only I didn't see the point in adding
in regex support, so I just allow you to say:

PerlSetVar ReloadModules "My::Foo My::Bar Foo::Bar::*"

> P.S: The current version doesn't works with modules that uses pseudo hashs
> (with "use fields qw{ .. }" ). I already solved this problem, but I have to
> integrate it into Apache::Reload. When I have done it, I send a patch

Thanks - that would be great.

-- 
<Matt/>

Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org | AxKit: http://axkit.org