Re: [Module::Build] MB uses wrong perl
Status: Beta
Brought to you by:
kwilliams
|
From: Nicholas C. <ni...@cc...> - 2003-11-29 11:24:57
|
On Fri, Nov 28, 2003 at 05:51:16PM -0700, Jim Cromie wrote:
> sub find_perl_interpreter {
> my $perl;
> File::Spec->file_name_is_absolute($perl = $^X)
> - or -f ($perl = $Config::Config{perlpath})
> - or ($perl = $^X);
> + or ($perl = $^X)
^^ that will always be true (unless perl is named "0" and . is in
your PATH)
> + or -f ($perl = $Config::Config{perlpath});
hence this will never be reached
> perl -V
>
> WAG. Is @INC pointing to the right places.
Inline had what seemed to be the same problem. It occurs when you
install (say) 5.6.1, and it "knows" that it is /usr/local/bin/perl
(ie
/usr/local/bin/perl5.6.1 -MConfig -le 'print $Config::Config{perlpath}'
will give that.)
Later you install 5.8.2 in /usr/local/bin. /usr/local/bin/perl is now
a hard link to /usr/local/bin/perl5.8.2
and its Config thinks (correctly) that it is /usr/local/bin/perl
However, 5.6.1 is still available as /usr/local/bin/perl5.6.1, and so:
$ /usr/local/bin/perl5.6.1 -MConfig -le 'print $Config::Config{perlpath}'
/usr/local/bin/perl
So if you explictly run your script as /usr/local/bin/perl5.6.1 Build.PL
$^X points to the right thing, but $Config::Config{perlpath} no longer does.
If this is the same problem, offhand I can't remember the best way to solve
it. Pinch the code from Inline :-)
Nicholas Clark
|