NAME
Apache::StatINC - Reload %INC files when updated on disk
SYNOPSIS
#httpd.conf or some such
#can be any Perl*Handler
PerlInitHandler Apache::StatINC
DESCRIPTION
When Perl pulls a file via "require", it stores the filename in theglobal hash %INC. The next time Perl tries to "require" the same file,
it sees the file in %INC and does not reload from disk. This module's
handler iterates over %INC and reloads the file if it has changed on
disk. Note that StatINC 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 Apache::Registry scripts, as the value of @INC is saved on server startup and restored to that value after each request. Inother words, if you want StatINC to work with modules that live in cus-
tom @INC paths, you should modify @INC when the server is started. Besides, 'use lib' in startup scripts, you can also set the PPEERRLL55LLIIBBvariable in the httpd's environment to include any non-standard 'lib'
directories that you choose. For example, you might use a script called 'starthttpd' to start apache, and include a line like this: PERL5LIB=/usr/local/foo/myperllibs; export PERL5LIB When you have problems with modules not being reloaded, please refer to the following lines in 'perlmodlib':"Always use -ww. Try to "use strict;" (or "use strict qw(...);").
Remember that you can add "no strict qw(...);" to individual blocks ofcode that need less strictness. Always use -ww. Always use -ww! Follow
the guidelines in the perlstyle(1) manual." Warnings when running under modperl is enabled with 'PerlWarn On' in your httpd.conf. It will most likely help you to find the problem. Really. OOPPTTIIOONNSS StatINCUndefOnReloadNormally, StatINC will turn of warnings to avoid "Subroutine rede-
fined" warnings when it reloads a file. However, this does notdisable the Perl mandatory warning when re-defining "constant" sub-
routines (see perldoc perlsub). With this option On, StatINC will invoke the AAppaacchhee::::SSyymmbbooll undeffunctions method to avoid these mandatory warnings: PerlSetVar StatINCUndefOnReload On StatINCDebug You can make StatINC tell when it reloads a module by setting this option to on. PerlSetVar StatINCDebug 1 The only used debug level is currently 1.SEE ALSO
modperl(3) AUTHOR Currently maintained by Ask Bjoern Hansen. Written by Doug MacEachern. perl v5.8.6 2000-03-30 Apache::StatINC(3)