Disclaimer: I have never used Apache::Reload, but: Apache::Registry already looks for changes to your scripts and reloads them as necessary. So you shouldn't need to use both of them. However, reading the docs for Apache2::Reload, it mentions using it at the same time as Registry scripts, which I think refers to using reload for other modules, rather than duplicating the effort for Registry scripts.
It says that you will have a problem if, in your Registry script, you 'use' another module. Updates to that module will not be noticed by Registry. Instead, you should do an explicit 'require module; import(...)'. > The first time after an apache restart (on the development box) it works > fine; obviously it is able to find CCC in the project directory, but after I > edit one of the .pm files, it all goes titsup. Secondly, the problem of it not finding your modules - you need to add a : use lib '/path/to/my/modules'; somewhere early on, for instance in a startup.pl file that is included in your config, or in one of the first lines of your .pl files. Actually, reading the Apache2::Reload docs: Note that Apache2::Reload operates on the current context of @INC. Which means, when called as a Perl*Handler it will not see @INC paths added or removed by ModPerl::Registry scripts, as the value of @INC is saved on server startup and restored to that value after each request. In other words, if you want Apache2::Reload to work with modules that live in custom @INC paths, you should modify @INC when the server is started. Besides, 'use lib' in the startup script, you can also set the PERL5LIB variable in the httpd's environment to include any non-standard 'lib' directories that you choose. For example, to accomplish that you can include a line: PERL5LIB=/home/httpd/perl/extra; export PERL5LIB in the script that starts Apache. Alternatively, you can set this environment variable in httpd.conf: PerlSetEnv PERL5LIB /home/httpd/perl/extra > > Note that "." is present in @INC, but I guess it refers to "/", because I > can work round this by placing a symlink to CCC in my root directory on the > development server, and in my chroot home on the production server. > Annoying, but not too desperate. > > The second, and I assume associated, problem is that I get a shedload of > warnings each time the modules are recompiled, of the form: With regards the redefined warnings, what about this: use strict; use warnings FATAL => 'all'; no warnings 'redefine'; >From the source for ModPerl::Registry: # we try to develop so we reload ourselves without die'ing on the warning no warnings qw(redefine); # XXX, this should go away in production! It doesn't explain WHY they should go away in production, but I presume that having the warnings means that you can spot a redefine that SHOULDN'T have happened. With regards using Apache::Reload in production, my understanding is that, while Apache::Reload is really useful for development, there are edge cases where things get messed up, and which require a stop-start to get them working again. And for this reason, we would not usually consider using this module in production. If you are not able to restart your server, then you need to rely on some sort of stat'ing mechanism: Registry for scripts, and Reload for modules. A lot of people use this setup successfully. Just be aware that there may be non-obvious issues. Repeated disclaimer: I have never used either Registry or Reload, but have a look at the docs for Apache2::Reload - it sheds more light on the issues you've been having, and probably works in a similar way to Apache::Reload. good luck Clint