Skip Menu |

This queue is for tickets about the ExtUtils-MakeMaker CPAN distribution.

Report information
The Basics
Id: 8518
Status: resolved
Worked: 10 min
Priority: 0/
Queue: ExtUtils-MakeMaker

People
Owner: Nobody in particular
Requestors: schwern [...] pobox.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: find_perl should search directory-first
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.
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
Please disregard my last reply. I have a better explanation for my problem, and it is really unrelated to the original bug report. Regards, Slaven
Subject: Re: [rt.cpan.org #8518] find_perl should search directory-first
Date: Sun, 03 Dec 2006 14:02:06 -0800
To: bug-ExtUtils-MakeMaker [...] rt.cpan.org
From: Michael G Schwern <schwern [...] gmail.com>
Slaven_Rezic via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=8518 > > > Please disregard my last reply. I have a better explanation for my > problem, and it is really unrelated to the original bug report.
Am I disregarding 8518 or 23178?
I've just tried a few variations on trying to make this break and it appears to be resolved. Many thanks.