David Golden wrote:
11. OS/arch/platform-specific requirements
Proposal:
I would like to see a way to specify OS-specific requirements. One option
might be to use Devel::CheckOS, which already seems to have a comprehensive
list of supported OS names, and have a hash like:
os_requires:
Linux:
Linux::Hax: 0
FreeBSD:
FreeBSD::Voodoo: 1.2
BSD::Stuff: 0.999
-0.000001
Generally it would be nice to have OS-specific forks in the META's
requirement specs. For example I don't really want to see Win32 deps
when looking at the FreeBSD cpandeps result for Tk::Wizard
<http://deps.cpantesters.org/?module=Tk%3A%3AWizard&perl=any+version&os=FreeBSD>
(these dependencies are correctly switched on/off in the module's
Makefile.PL, and it's probably just coincidence that the win32
dependencies show up in META.yml, because the distribution was built on
a Windows machine).
On the other hand there should be no attempt, not in META 2.0 not in any
other future version, to have OS-specific requirements specified in a
static file. It's much better to have autoconf-like tests to test for
available features than to have some check against the OS name (which is
probably not enough, as there could be OS version-specific differences,
or even differences based on different OS distributions).
Also, the requirement specification would get unsightly, because it
would add a third dimension to the existing two. So we would have
build:
requires:
Windows:
- Win32::Foobar
default:
- Foo::Bar
recommends:
...
test:
...
Regards,
Slaven