You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Jan Poslusny <pa...@gingerall.cz> on 2005/05/02 10:55:13 UTC

PERL5LIB vs. httpd.conf

Hi modperl gentlemen,
I am newbie in this list, but I have some experience with mod_perl. I 
use apache 1.3 with statically linked mod_perl 1.29 on Fedora Core III, 
i386. Now I started development of Apache::MyModule from scratch. I 
don't want to install MyModule.pm into standard perl directories now, so 
I want to install into /usr/local/myproject/...
If I export the PERL5LIB to bash environment and then start apache with 
this environment, PerlModule Apache::MyModule in httpd.conf causes no 
problems. But if I don't export PERL5LIB into environment and try to 
declare exactly the same value via PerlSetEnv PERL5LIB 
"/usr/local/myproject/..." and then PerlModule Apache::MyModule, apache 
cannot start with error: Can't locate Apache/MyModule.pm in @INC...

Where is the problem? I see only one workaround, to create symbolic link 
on /usr/local/apache/lib/perl directory, which is in @INC. But I would 
like to understand, what is wrong on PerlSetEnv PERL5LIB, and, of 
course, the clear way how to load modules on non-perl paths.

Regards,
pajout

Re: PERL5LIB vs. httpd.conf

Posted by Enno <bu...@xs4all.nl>.
Why not just do that in your modperl startup script?

use lib '/usr/local/myproject/...';

Enno

On Mon, 2 May 2005, Jan Poslusny wrote:

> Hi modperl gentlemen,
> I am newbie in this list, but I have some experience with mod_perl. I
> use apache 1.3 with statically linked mod_perl 1.29 on Fedora Core III,
> i386. Now I started development of Apache::MyModule from scratch. I
> don't want to install MyModule.pm into standard perl directories now, so
> I want to install into /usr/local/myproject/...
> If I export the PERL5LIB to bash environment and then start apache with
> this environment, PerlModule Apache::MyModule in httpd.conf causes no
> problems. But if I don't export PERL5LIB into environment and try to
> declare exactly the same value via PerlSetEnv PERL5LIB
> "/usr/local/myproject/..." and then PerlModule Apache::MyModule, apache
> cannot start with error: Can't locate Apache/MyModule.pm in @INC...
>
> Where is the problem? I see only one workaround, to create symbolic link
> on /usr/local/apache/lib/perl directory, which is in @INC. But I would
> like to understand, what is wrong on PerlSetEnv PERL5LIB, and, of
> course, the clear way how to load modules on non-perl paths.
>
> Regards,
> pajout
>