http://qs321.pair.com?node_id=921556


in reply to Re^2: CPAN Smoke Tests: Some platforms are meant to be broken
in thread CPAN Smoke Tests: Some platforms are meant to be broken

I think there is some way of telling CPAN testers to emit n/a for those operating systems, but if somebody installs a module with Win32:: in its name on a system that is not Win32 (or Win64), I don't think that passing tests are their main problem :)

Replies are listed 'Best First'.
Re^4: CPAN Smoke Tests: Some platforms are meant to be broken
by syphilis (Bishop) on Aug 22, 2011 at 01:17 UTC
    I think there is some way of telling CPAN testers to emit n/a for those operating systems

    I think it's just a matter of beginning the Makefile.PL code with something like:
    exit 0 if $^O=~/MSWin/;
    That should put an NA into the matrix for any module being built on Windows - no report gets sent to the author.

    But I think the exit value is important, so it would be best to verify (eg on the cpan-testers mailing list) that 0 is, in fact, the correct value to specify.

    Cheers,
    Rob
Re^4: CPAN Smoke Tests: Some platforms are meant to be broken
by Anonymous Monk on Aug 22, 2011 at 08:36 UTC
    From the CPANTS FAQ for authors:

    "How can I indicate that my distribution only works on a particular operating system?"

    While it isn't a very elegant solution, the recommend approach is to either die in the Makefile.PL or Build.PL (or BAIL_OUT in a test file) with one of the following messages:

    • No support for OS
    • OS unsupported

    CPAN Testers tools will look for one of those phrases and will send an NA (Not Available) report for that platform.