I think what Andreas means it that you always want this:

    system($^X, @args)

Not this:

    system("perl", @args)

The former invokes the current interpreter.  The latter invokes the first
perl in PATH.

David


On Fri, Jul 1, 2016 at 9:31 PM, Rocky Bernstein <rocky.bernst...@gmail.com>
wrote:

> $^X implies the invoking program was Perl. It probably wasn't, thougyh
> rather a shell script of some sort possibly invoked from make.
>
> And when you think of it, even a perl script that runs $^X has to have
> been invoked somehow.
>
> So what's the right thing to do from a makefile or shell script? On Linux,
> which is so far the only place where this is a problem,  maybe it is
> "/usr/bin/env perl"?
>
>
>
> On Fri, Jul 1, 2016 at 9:18 PM, Andreas Koenig <
> andreas.koenig.7os6v...@franz.ak.mind.de> wrote:
>
>> >>>>> On Fri, 1 Jul 2016 10:08:05 -0400, Rocky Bernstein <
>> rocky.bernst...@gmail.com> said:
>>
>>   > Ok. Will try that. Thanks!
>>   > (Module::Build is in "configure_requires" already, but I do distribute
>>   > Makefile.PL)
>>
>>   > What I don't understand though is why the failures are intermittent.
>>   > It happens right now only on certain GNU/Linux smokers. FreeBSD works
>>   > fine. MSWindows fails but I guess for a different reason.
>>
>> One of my smokers sent this report:
>>
>>
>> http://www.cpantesters.org/cpan/report/d6a07946-3f0b-11e6-96f0-1bbc5bc2a771
>>
>> From the error message it is clear that system perl (see @INC contains
>> ...) was asked for Module::Build while the invoking perl was
>> /home/sand/src/perl/repoperls/installed-perls/perl/v5.22.2/8942/bin/perl
>>
>> So somebody called something like 'perl' instead of $^X
>>
>> I think I've heard, that staying away from Module::Build::Compat is a
>> good advice. But your milage may vary.
>>
>> --
>> andreas
>>
>
>


-- 
David Golden <x...@xdg.me> Twitter/IRC/GitHub: @xdg

Reply via email to