nite_man has asked for the wisdom of the Perl Monks concerning the following question:

Hi friends,

I need your help. I develop a large Perl application with web user's interface. There are some other developers in that project and we all have separated versions of the application in the our work directory. So, I develop myself version and then commit all changes in the CVS.

By this reason, I need to use myself Perl modules to test functionality. When we've used Apache1 we've just specified PERL5LIB variable in the .htaccess. But after migration to Apache2 that feature stopped work.

Can anybody soggest me how can I define PERL5LIB in the .htaccess file?
Thanks in advanced.

P. S. Sure, I understand that I can use use lib qw(my_lib) inside all scripts
but it's not good approach for me!

~ Schiller

Replies are listed 'Best First'.
Re: Problem with Apache2, htaccess and PERL5LIB.
by thraxil (Prior) on Apr 23, 2004 at 15:34 UTC
    SetEnv PERL5LIB /foo/bin/

    should still work. the syntax hasn't changed for 2.0. are you sure you have the server configured to allow .htaccess configuration?

    update: i just tried it on a fresh apache 2.0.49 install and SetEnv in .htaccess works fine out of the box. you're probably going to have to give us more info on your setup.

Re: Problem with Apache2, htaccess and PERL5LIB.
by bart (Canon) on Apr 24, 2004 at 01:54 UTC
Re: Problem with Apache2, htaccess and PERL5LIB.
by nite_man (Deacon) on Apr 26, 2004 at 07:35 UTC

    Problem is not to specify PERL5LIB. If I print %ENV I see that PERL5LIB is defined correctly. But mod_perl doesn't read that variable if it's specified only in the .htaccess.
    I don't understand why!
    Maybe there is a some flag in the mod_perl configuration?
    I use RedHat 9, Apache 2.0.40, mod_perl 1.99_07-dev, Perl 5.8.0.

    ~ Schiller

      If taint is on, PERLLIB/PERL5LIB won't be honored (and rightly so), and taint is likely on.

      MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
      I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
      ** The third rule of perl club is a statement of fact: pod is sexy.

        +++++++++++++++++++++++++++
        Thanks a lot, PodMaster!

        ~ Schiller