Chris Dolan wrote:
On Apr 6, 2005, at 7:13 AM, Robert Rothenberg wrote:
Is there a way tests to determine that a module cannot be installed on a platform so that CPANPLUS or CPAN::YACSmoke can issue an "NA" (Not Applicable) report?
CPANPLUS relies on module names (e.g. "Solaris::" or "Win32::") but that is not always appropriate in cases where a module runs on many platforms except some that do not have the capability.
It won't help you *today* but there is a proposed META.yml field called "excludes_os" which fits your request perfectly.
http://module-build.sourceforge.net/META-spec-new.html#excludes_os

Let's take my module File::Find::Rule::Permissions as an example. I know it doesn't work on Windows, but not having access to a Windows machine, I have *no idea* what $^O should be on that platform, especially for any odd Windows environments like Cygwin or WinCE. I also know it doesn't work on VMS.


That restriction, along with the reason why, is documented.

However, I have no idea whether it works on a platform like MiNT or ODT, whatever those might be. At best, any list here will be incomplete.

Better, I think, to have some way of specifying which features of the underlying system are required. In this case, I require a Unix-ish permissions system, with rwxrwxrwx bits, users, and groups.

Presumably my need for a filesystem (not all platforms have one!) would be inherited both from File::Find::Rule and from my requiring the Unix-ish perms system, and so I wouldn't need to specify it myself.

Let's ignore the fact that FFRP has no useful tests anyway :-)

Oh, and to the list of fields at http://module-build.sourceforge.net/META-spec-new.html how about adding 'requires_application'. Mac::iTunes::Applescript has an obvious prerequisite. The module Net::P0fq that I am slowly working on requires a running copy of p0f.

--
David Cantrell

Reply via email to