perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stanisław T. Findeisen" <>
Subject How to require() a file?
Date Fri, 27 Feb 2009 18:28:19 GMT
I am trying to require() a file using its absolute name. In command line 
mode everything works fine, but not in Apache:

[Fri Feb 27 17:45:07 2009] [error] Can't locate 
/home/stf/public_html/test/arcv/public_html/../ in @INC (@INC 
contains: /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi 
/usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7 
/usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5 
/usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7 
/usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5 
/usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi 
/usr/lib/perl5/5.8.8 . /etc/httpd) at 
/home/stf/public_html/test/arcv/public_html/ line 13, 
<DATA> line 344.\n

How can I require() a file when using Perl in CGI mode? Do I have to 
modify @INC?

I don't really feel like making it a module, and putting it into Some 
Well Known Location is something I don't feel like even more. It's just 
a supporting file that I want to keep together with the rest of the 

I guess I am using mod_perl:

[Fri Feb 27 16:31:48 2009] [notice] Apache/2.2.6 (Unix) DAV/2 PHP/5.2.4 
mod_perl/2.0.3 Perl/v5.8.8 configured -- resuming normal operations



======================================================================= . My PGP key fingerprint is:
9D25 3D89 75F1 DF1D F434  25D7 E87F A1B9 B80F 8062

View raw message