Mailing List Archive

about ModPerl::Registry
Hello,

When my CGI scripts are moved to run under ModPerl::Registry, and when the script is changed, should I restart Apache each time?
I was thinking ModPerl::Registry is running the similiar way like PHP, but when php script is modified it doesn't need to restart the webserver.

Thanks.


--
Jeff Pang
jeffpang@mail.ru
Re: about ModPerl::Registry [ In reply to ]
On Fri, Sep 16, 2011 at 12:12 AM, Jeff Pang <jeffpang@mail.ru> wrote:

> Hello,
>
> When my CGI scripts are moved to run under ModPerl::Registry, and when the
> script is changed, should I restart Apache each time?
>

Hi Jeff,

In general you do, but look at modules like
Apache2::Reload<http://perl.apache.org/docs/2.0/api/Apache2/Reload.html>
for
ways to detect changed files then automatically reload the appropriate
modules.

The approach I usually use is to develop and test under CGI, then move to my
mod_perl environment once it is working reliably, and restart my server. In
my experience, that seems to be the most foolproof method.

Hope this helps,

------Scott.
Re: about ModPerl::Registry [ In reply to ]
2011/9/16 Scott Gifford <sgifford@suspectclass.com>:
> On Fri, Sep 16, 2011 at 12:12 AM, Jeff Pang <jeffpang@mail.ru> wrote:
>>
>> Hello,
>>
>> When my CGI scripts are moved to run under ModPerl::Registry, and when the
>> script is changed, should I restart Apache each time?
>
> Hi Jeff,
> In general you do, but look at modules likeĀ Apache2::ReloadĀ for ways to
> detect changed files then automatically reload the appropriate modules.

This is true for modules, but for scripts running under Registry, it
should not be necessary. They are recompiled when the file changes.

- Perrin