I use cygwin (with and without perl) and ActiveState perl in a variety of
situations. To modify @INC so that Apache uses the right one in the right
situation I was using a begin block to modify @INC where needed. Then I
thought a module might be more to the point:
#!E:/Perl/bin/perl -w # my path to a particular perl flavor
package APApache; # call it what ever you might deem appropriate
BEGIN {
my $addinc;
my $i = 0;
foreach (@INC) {
if (m|^/usr(/.+)|) { # here I use a regex to go after /usr/.....
$addinc = "/cygdrive/e/perl".$1; #and replace it with the path to an
alternate perl install
$INC[$i] = $addinc;
}
$i++;
}
}
1;
The advantage of this approach is that it is easy to modify and
I can use the 'standard' /usr/bin/perl then
use APApache;
This particular package sits in the CGI-Bin directory and allows me to have
my script access ActivePerl when it needs to.
HTH
Teggy P Veerapen <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello people,
>
> Well, I'm trying to figure out how to modify the perl @INC directory
> list so that perl is able to find all required modules. In fact my problem
> is that the @INC variable doesn't contain any of the directories where
perl
> and its modules are installed and I would like to set this problem right
> directly in the @INC setting, instead of having to set the PERL5LIB
> environment variable.
>
> Surely there is some file or some configuration somewhere in the perl
> installation where @INC is set. Where is that configuration done ?
>
> Thanks for your replies ...
>
> Teggy P Veerapen
> [EMAIL PROTECTED]
>
>
>
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]