Re: [Module::Build] Re: [PATCH] add Module::Build 0.27_08
Status: Beta
Brought to you by:
kwilliams
|
From: Randy W. S. <ml...@th...> - 2006-03-07 20:12:00
|
Yitzchak Scott-Thoennes wrote:
> On Tue, Mar 07, 2006 at 01:32:52PM -0600, Ken Williams wrote:
>
>>On Mar 7, 2006, at 11:57 AM, Andy Dougherty wrote:
>>
>>
>>>On Tue, 7 Mar 2006, Yitzchak Scott-Thoennes wrote:
>>>
>>>
>>>>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.
>>
>>Hmm - so in your case is $^X just 'perl'? If that's the only pointer
>>to the currently running perl, we might have to do a PATH search for
>>it. Maybe only when it doesn't contain slashes or something.
>
>
> The above code does do a PATH search, but this perl isn't installed.
> We might have to do a search up cwd like
> ExtUtils::CBuilder::Base::perl_src().
I suspect this needs a way to apply the fixup only when running the test
&& $ENV{PERL_CORE}. The test files are being executed by perl's Makefile
or TEST, not being loaded and run from M::B, right? So, when each test
file is run it needs (or MBTest.pm needs) to figure out where the perl
is that loaded it and apply a fixup. We'll also need to put a hook in
M::B to allow the fixup.
Randy.
|