Copyright (C) 2000-2012 |
Manpages Apache::StatINCSection: User Contributed Perl Documentation (3)Updated: 2001-06-14 Index Return to Main Contents NAMEApache::StatINC - Reload %INC files when updated on diskSYNOPSIS#httpd.conf or some such #can be any Perl*Handler PerlInitHandler Apache::StatINC DESCRIPTIONWhen 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.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. In other words, if you want StatINC to work with modules that live in custom @INC paths, you should modify @INC when the server is started. Besides, 'use lib' in startup scripts, you can also set the PERL5LIB variable in the httpd's environment to include any non-standard 'lib' directories that you choose. 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 PERL5LIBWhen you have problems with modules not being reloaded, please refer to the following lines in 'perlmodlib': "Always use -w. Try to "use strict;" (or "use strict qw(...);"). Remember that you can add "no strict qw(...);" to individual blocks of code that need less strictness. Always use -w. Always use -w! Follow the guidelines in the perlstyle(1) manual." Warnings when running under mod_perl is enabled with 'PerlWarn On' in your httpd.conf. It will most likely help you to find the problem. Really. OPTIONS
SEE ALSOmod_perl(3)AUTHORCurrently maintained by Ask Bjoern Hansen <ask@netcetera.dk>. Written by Doug MacEachern.
IndexThis document was created by man2html, using the manual pages. Time: 00:26:33 GMT, April 25, 2024 |