Bill Moseley wrote:
> 
> >From my quick look at Registry.pm it looks like there's no way to disable
> the feature where a script will be re-compiled if it changes on disk.
> 
> Is this correct?
> 
> This is a problem if I update both the main script, and modules used by the
> script. For example, adding a new subroutine to a module and then calling
> it from the main Registry script.  The main script will be recompiled, but
> not the module, so I'll get an undefinded subroutine called.
> 
> I'm not using Apache::StatINC - the module isn't in the @INC path at startup.
> 
> I'd like to be able to move the updated script and module into place and
> either do a -USR1 restart or just wait for the Apache processes to go
> through their normal life cycle.  As is, it seems as if I have to bring
> down the server, move in the updated scripts in, and restart.  Not the most
> graceful process.

Here is a pretty way to disable script reloading.  It is not the most
efficient.

--- Registry.pm Tue Jan 11 10:00:45 2000
+++ Registry-no_reload.pm       Tue Jan 11 17:17:44 2000
@@ -85,11 +85,7 @@
 
        $r->chdir_file;
 
-       if (
-           exists $Apache::Registry->{$package}{'mtime'}
-           &&
-           $Apache::Registry->{$package}{'mtime'} <= $mtime
-          ){
+       if (exists $Apache::Registry->{$package}{'mtime'}) {
            # we have compiled this subroutine already, nothing left to do
        } else {
            $r->log_error("Apache::Registry::handler reading $filename")

Reply via email to