Return-Path: Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 13151 invoked by uid 500); 5 Mar 2003 07:01:06 -0000 Mailing-List: contact modperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Delivered-To: mailing list modperl@perl.apache.org Received: (qmail 13139 invoked from network); 5 Mar 2003 07:01:05 -0000 From: "Benjamin Grabkowitz" To: Subject: Problem with mod_perl and subroutines in multiple files. Date: Wed, 5 Mar 2003 02:01:02 -0500 Message-ID: <000601c2e2e4$ff053f30$7f4fee80@Tetanus> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4024 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 In-Reply-To: <1046846608.97746.ezmlm@perl.apache.org> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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 SetHandler perl-script PerlHandler ModPerl::PerlRun PerlSendHeader On PerlOptions +ParseHeaders Options ExecCGI FollowSymLinks Includes ********************END****************************** Thank you for your time, -Ben Grabkowitz