When I goto:
<http://localhost/perl-status?inc>
I get a list of loaded modules.
[...]
Here is an example that confuses me. Without any PerlRequire, I find this is already loaded:
Package Version Modified File CGI 3.00 Sat Nov 15 02:07:41 2003 /usr/share/perl/5.8.2/CGI.pm
It's rather simple: /perl-status is handled by Apache::Status, which loads CGI.pm.
If I PerlRequire this, everything is OK:
use CGI (); CGI->compile (':all');
If I PerlRequire this:
# use CGI (); CGI->compile (':all');
I get these errors:
# sudo apachectl configtest Processing config directory: /etc/apache/conf.d [Thu Dec 18 00:09:16 2003] [error] Can't locate object method "compile" via package "CGI" (perhaps you forgot to load "CGI"?) at /etc/apache//startup.pl line 5. Compilation failed in require at (eval 4) line 1.
Syntax error on line 1021 of /etc/apache/httpd.conf: Can't locate object method "compile" via package "CGI" (perhaps you forgot to load "CGI"?) at /etc/apache//startup.pl line 5. Compilation failed in require at (eval 4) line 1.
If this stuff is covered in TFM, please, direct me to the appropriate passages.
With pleasure:
http://perl.apache.org/docs/1.0/guide/config.html#The_Confusion_with_use___in_the_Server_Startup_File
You should always load the module before using it and never rely that something else will load it. Perl won't load the module again if it already has been loaded:
__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
-- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html