Re: Lancaster Consensus, deal with PUREPERL_ONLY=0

[email protected] (Jens Rehsack)
Newsgroups perl.cpan.workers
Message-ID <[email protected]>
Am 04.06.2014 um 04:32 schrieb David Golden <[email protected]>:

> On Tue, Jun 3, 2014 at 1:35 AM, Jens Rehsack <[email protected]> wrote:
>> 1) compiler cannot create executables
>> 2) compiler works, but no perl headers
>> 3) compiler does, but shared library building fails (that is fragile and minor modifications at the system causes that process to fail)
> 
> These three would all fail to make, which would abort installation.
> 
>> 4) As you say: https://rt.cpan.org/Ticket/Display.html?id=75672
> 
> Oooh!  Excellent example.
> 
> "make" succeeds and "make test" could fall back to PP when dynaloading fails.
> 
> I wonder if there's a way to be clever about this such that under
> PUREPERL_ONLY, make never compiles the extension, and then the main
> module doesn't just try bootstrap inside eval{} but actually checks to
> see if the extension is in @INC. If so, bootstrap it or die; if not,
> fall back to pure Perl.

talked yesterday with riba about that in deeper detail.
We decided to do as (probably) suggested by you and

sub legacy_exists { die "bogus legacy XS" if the extension is in @INC; return false }

autoconf->check_pp_wanted and return legacy_exists;
autoconf->have_compiler or return legacy_exists;
autoconf->check_perl_api or die;
if( autoconf->extensive_testing ) {
  autoconf->check_perl_extension_links or die;
  autoconf->check_perl_extension_loads or die;
}
return ok

http://www.cpantesters.org/cpan/report/a25a36da-ea1d-11e3-9cf0-a01f06268b4b is also an excellent example.

Regarding "if the extension is in @INC" (have separate installed XS module) needs a migration plan for LMU, P::U etc.
This is the final solution and we had several ideas yesterday for a migration plan - but wasn't complete.

Cheers
-- 
Jens Rehsack
[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.