Apache::StatINC - Reload %INC files when updated on disk
#httpd.conf or some such #can be any Perl*Handler PerlInitHandler Apache::StatINC
When Perl pulls a file via require, it stores the filename in the global 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.
require
%INC
Note that since StatINC operates above the context of any 'use lib' statments you might have in your handler modules or scripts, you must set the PERL5LIB variable in the httpd's environment to include any non-standard 'lib' directories that you want StatINC to monitor. For example, you might use a script called 'start_httpd' to start apache, and include a line like this:
PERL5LIB=/usr/local/foo/myperllibs; export PERL5LIB
mod_perl(3)
Doug MacEachern
To install mod_perl, copy and paste the appropriate command in to your terminal.
cpanm
cpanm mod_perl
CPAN shell
perl -MCPAN -e shell install mod_perl
For more information on module installation, please visit the detailed CPAN module installation guide.