Re: Can't locate <module>.pm in @INC even though it path exists and works outside mod_perl

Torsten Förtsch <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
On Saturday, December 18, 2010 08:17:43 ArulJothi wrote:
>  When i execute Apache error log reports that it cannot locate the module
> in @INC path even though the path very much exists and i am able to run
> the script without any issues outside mod_perl
> 
>  Basically, Here is my setup
> 
>  1) Modules are located under /opt/tools/perl/lib
>  2) @INC containts /opt/tools/perl/lib
>               - This is also confirmed by http://localhost/perl-status
>  3) Web perl scripts are located at /var/www/perl and apache is properly
> configured
>               - This is confirmed by executing a script which does not
> depend on any external modules
>  4) Now if i execute a perl script which has "use <module>;" pragma, it
> fails if this module is located under custom path, but works well for
> modules which are intalled with perl distribution

Are you sure the scripts are run by mod_perl instead of mod_cgi? If you are 
using mod_cgi use SetEnv to propagate the custom search path to the module.

Torsten Förtsch

-- 
Need professional modperl support? Hire me! (http://foertsch.name)

Like fantasy? http://kabatinte.net
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.