Search code examples
perlcpan

Makefile.PL meta.json prereqs for OS so module won't be installed on Windows


I'm working on a Perl Module which won't run on Windows, to prevent CPAN Testers failing it on Windows I want to use the meta files in the distribution generated from the Makefile to prevent the module from being installed or tested on Windows.

If the situation were the opposite (module only works on Windows) specifying a dependency on Win32 would make it installable on Windows only.

Also if the module is converted to Dist::Zilla, need a corresponding dist.ini solution.


Solution

  • The CPAN Testers FAQ says:

    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