[Module::Build] Re: [PATCH] add Module::Build 0.27_08
Status: Beta
Brought to you by:
kwilliams
|
From: Andy D. <dou...@la...> - 2006-03-07 17:56:51
|
On Tue, 7 Mar 2006, Yitzchak Scott-Thoennes wrote:
> On Tue, Mar 07, 2006 at 11:20:13AM -0600, Steve Peters wrote:
> > On Tue, Mar 07, 2006 at 11:59:17AM -0500, Randy W. Sims wrote:
> > > Dominic Dunlop wrote:
> > > >On 2006?03?07, at 16:24, Yitzchak Scott-Thoennes wrote:
> > > >
> > > >>On Tue, Mar 07, 2006 at 06:38:13AM -0500, Randy W. Sims wrote:
> > > >>
> > > >>>
> > > >>>Looks like the problem happens here:
> > > >
> > > >...
> > > >
> > > >>> foreach my $perl ( $c->{perlpath},
> > > >>> map File::Spec->catfile($_, $thisperl),
> > > >>> File::Spec->path()
> > > >>> ) {
> > > >>> return $perl if -f $perl and $proto->_perl_is_same($perl);
> > > >>> }
> > > >>>
> > > >>>Where we try to find the interpreter. It's falling all the way through
> > > >>>and returning undef. Any idea where we're missing it here?
> > > Ah, this is because we don't expect to be run from a non-installed perl.
> > > Notice we pretty much throw $^X away if it's not absolute? Is there any
> > > reason we can't add:
> > >
> > > return $^X if $proto->_perl_is_same($^X);
> > >
> > > at the top of find_perl_interpreter(). Or do we need to be more guarded?
> > >
> > Well, here's the rub. It looks like, while it runs, Module::Build
> > changes directories. When I ran, it tries to look for ./perl in
> > /home/steve/smoke/perl-current/t/_tmp/Simple, which it won't be able to.
> > So, Module::Build is completely dependent on what is an absolute path $^X,
> > $Config, or the environment to figure out what Perl is running it. So,
> > operating system where $^X returns a relative path (apparently BSDs and Mac
> > OS X) will all fail the the Module::Build tests. Whether Build.PL
> > scripts work with a Perl not in the $PATH and run using a relative path
> > on these OS's is left as an exercise for the reader.
You can add Solaris to that list. It's also getting $^X=./perl,
and then failing to find it in .../t/_tmp/Simple/perl . Failing that, it
then looks through $ENV{PATH} where it might (or might not) find some
other perl that might (or might not) run the test successfully.
> Can you try:
>
> --- lib/Module/Build/Base.pm.orig 2006-03-06 07:43:57.093750000 -0800
> +++ lib/Module/Build/Base.pm 2006-03-07 09:00:28.884844800 -0800
> @@ -334,7 +334,8 @@
> $thisperl .= $exe unless $thisperl =~ m/$exe$/i;
> }
>
> - foreach my $perl ( $c->{perlpath},
> + foreach my $perl ( File::Spec->rel2abs($^X),
> + $c->{perlpath},
> map File::Spec->catfile($_, $thisperl), File::Spec->path()
> ) {
> return $perl if -f $perl and $proto->_perl_is_same($perl);
I'm afraid that didn't help either, since the t/_tmp/Simple/ directory
doesn't have a perl executable.
--
Andy Dougherty dou...@la...
|