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
Alternatively, it could just look for keys matching $^O. Pioto 21:12, 27
August 2009 (BST)
Comments:
* Does this add any usefulness? What automation behaviour would it drive?
This would also be impossible to auto-generate using current code-based
methods in Makefile.PL and would require additional work to produce the
static hash. Also, how are junctions covered? File::HomeDir has one dep
for Win32 and cygwin, one for Mac, and a different one for all 30 other
platforms. AdamKennedy
* Hrm. For the "all 30 other platforms" case, I'd say it there should be a
special case name, like "default", which is used if no other key matches.
Yes, it would likely require a new config paramater for the various build
systems. I figure it would basically be a straight passthrough of a hash
like the above. Admittedly, for my own use case for this (Unix::Uptime),
I don't need special deps on all platforms, just on some of them.
* Another possible answer... instead of doing a simple if
$conf->{os_requires}{$^O}, do something like foreach (keys
%{$conf->{os_requires}}) { if ($^O =~ /$_/) ... } Pioto 12:24, 28 August
2009 (BST)
* I think this is going to rapidly approach taking the place of dynamic
configuration, and in a bad way. Save a complete proposal for META 3.0
rjbs 15:31, 28 August 2009 (BST)