in reply to Module updates require webserver restart?

in mod_perl
your httpd.conf should have:
PerlInitHandler Apache::Reload PerlSetVar ReloadModules "Foo::* Bar::Foo" -or- PerlInitHandler Apache::Reload PerlSetVar ReloadTouchFile /usr/bin/perl/lib
The first will reload on change the packages it contains allowing wild cards. The second will reload a directory if it has been touched.

As non-mod_perl goes. I find it odd that you need to restart the web server to load the modules. It may tie into the mod_cgi.

As well i may be making a dangerous assumption to believe you are using apache. Can you be more detailed with your problem

Replies are listed 'Best First'.
Re^2: Module updates require webserver restart?
by Calm (Acolyte) on May 02, 2007 at 19:36 UTC
    Good information. Thank you.

    Can you be more detailed with your problem

    I've updated the question to include some of my system info. I'm apache on windows. My specific problem currently is that I don't know how to update the httpd.conf file to refresh my modules automatically. I added

    PerlInitHandler Apache2::Reload PerlSetVar ReloadTouchFile c:/apps/xampp/perl/lib

    to the very bottom of the file. I've got a test file where I change a single return value, but when I rerun the script calling it the return value doesn't change. This is just my test case, but I'd like to have my modules automatically refresh when I change them, at least during development. Simplified code example:

    package Planning::SysFunctions; require Exporter; @ISA = qw(Exporter); @EXPORT = qw(fetchFY); @EXPORT_OK = qw(); use strict; use Time::localtime; use Apache2::Reload; sub fetchFY { # return localtime->year() - 100; return 53; }

    I run the script that calls this code, then I change the return value to 54, run the script again, but it still returns 53. If I stop and start my webserver, then it will return 54.