I am a new Perl developer and just found out about the great benefits of
mod_perl.
I had a Perl cgi script that ran fine. It consisted of 1 main.pl file
and multiple subroutines that each had their own file in a directory
called libs (it is in the same directory as main.pl). When I got
mod_perl properly configured (or to what I thought was properly
configured), I got strange errors like:
ModPerl::PerlRun: Not a CODE reference at /var/www/cgi-bin/main.pl line
31.
Line 31 turned out to be a function call.
If I commented out line 31 it would give me the same error for the next
line with a subroutine call.
The strange thing is that the script would run for like 3 or 4 times
after each apache restart.
Now I kind of (I emphasize kind of) worked out a solution. If I take all
my subroutine files and merge them to the end of main.pl. Everything
runs fine, not only fine...but blazingly quick.
Anyone have any ideas?
My box info:
RedHat 8.0 (pretty much a stock system...other than the RH updates)
httpd-2.0.40-15 (apache)
perl-5.8.0-55
mod_perl-1.99_05-3
I added the following to httpd.conf to get mod_perl working...please
school me if I am totally out of line.
************BEGIN ADDITION TO HTTPD.CONF*************
PerlModule Apache2
PerlModule DBI
<Directory /var/www/cgi-bin>
SetHandler perl-script
PerlHandler ModPerl::PerlRun
PerlSendHeader On
PerlOptions +ParseHeaders
Options ExecCGI FollowSymLinks Includes
</Directory>
********************END******************************
Thank you for your time,
-Ben Grabkowitz