On Thu Nov 18 14:43:29 2004, MSCHWERN wrote:
Show quoted text> find_perl currently searches name first. This means if you do this:
>
> perl_some_version Makefile.PL
>
> And your PATH looks like this:
>
> /usr/bin:/usr/local/bin
>
> And perl_some_version is in /usr/local/bin and perl is in /usr/bin
> then find_perl will find /usr/bin/perl first because it always checks
> for 'perl'.
>
> It should probably search directory first to better simulate how PATH
> is really used. However, this might cause strange things to happen
> while building in the core.
I have, what I think is a related issue: a perl executable installed in
/usr/perl5.8.8d/bin/perl, but the directory is not in path. So entering
find_perl these arguments are set:
$names is
0 '/usr/perl5.8.8d/bin/perl'
1 'perl'
2 'perl5'
3 'perl5.8.8'
4 'miniperl'
and $dirs is
0 '/usr/X11R6/bin'
1 '/usr/X11/bin'
2 '/usr/local/bin'
3 '/usr/bin'
4 '/bin'
5 '/usr/gnu/bin'
6 '/usr/TeX/bin'
7 '/usr/local/sbin'
8 '/usr/sbin'
9 '/sbin'
10 '/usr/local/pilot/bin'
11 '/home/e/eserte/bin/FreeBSD'
12 '/home/e/eserte/bin/sh'
13 '/home/e/eserte/bin'
14 '/usr/X386/bin'
15 '/usr/games'
16 '/home/e/eserte/devel'
17 '/usr/perl5.8.8d/bin'
The last path seems to be added by ExtUtils::MakeMaker, it's not in my
$ENV{PATH}, which ends with /home/e/eserte/devel. Now
ExtUtils::MM_Unix::find_perl picks the wrong perl, the one in
/usr/local/bin. I think the fix might be quite simple: the full path of
the perl binary is already known in $names, so if it looks like an
absolute path and is really there (testing with -e), then use it.
Regards,
Slaven