Re: Lancaster Consensus, deal with PUREPERL_ONLY=0

[email protected] (David Golden)
Newsgroups perl.cpan.workers
Message-ID <CAOeq1c-CacN4LmS5axDYCUVncO05gTTk4ej2dH4KaB-AsK5NgA@mail.gmail.com>
On Mon, Jun 2, 2014 at 7:53 AM, Jens Rehsack <[email protected]> wrote:
>
> Am 02.06.2014 um 13:34 schrieb David Golden <[email protected]>:
>
>> On Mon, Jun 2, 2014 at 7:28 AM, Jens Rehsack <[email protected]> wrote:
>>> Others (eg. packagers) have always a compiler and want benefit from XS when
>>> available and what is more important: if the "DEVELOPER MODE FLAGS IS ON",
>>> they want to have a -Werror behavior even for "I enabled foo and it doesn't
>>> appear".
>>
>> I don't understand what you mean by this.
>
> http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html

Dude!  I know what the compiler flag does!

I don't understand if you're using "-Werror" as an analogy for how you
want cpan clients to behave or if you mean you want "-Werror" to halt
CPAN installation on error even when a PP fallback is available, or
something else entirely.

In my example, if not PUREPERL_ONLY, then if a compiler is present,
compilation works or it fails (possibly due to -Werror), and the
install is halted.

> But ... that brings me to another point of view. Take Unix::Statgrab,
> File::LibMagic or BSD::Resource as example - they won't work without XS
> either. Shall they generally bail-out when PUREPERL_ONLY=1 is set?

Yes and no.  Because they don't offer a PP option, PUREPERL_ONLY is
irrelevant to them. They will fail in their "make" stage as usual.

A more user-friendly author could probe for a compiler and bail out in
Makefile.PL if one doesn't exist, possibly with one of the CPAN
Testers magic strings like "OS unsupported: need a compiler".

It's an incorrect and possibly misleading error message, but it will
result in a CPAN Testers report of "NA" instead of "FAIL".  The other
option is "exit 0" which will just not send a report at all.  E.g.
Devel::CheckLib

David

-- 
David Golden <[email protected]> Twitter/IRC: @xdg
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.