Randy W. Sims wrote:

darren chamberlain wrote:

* Randy W. Sims <RandyS at ThePierianSpring.org> [2003-11-10 15:49]:

Also, as I noted in the AFS thread the other day, this info should be written in META.yml so that cpan-testers can determine programatically whether a module should be tested. Info like required non-perl packages and libraries, whether the build/test/install process is interactive (or scriptable) or automated, and whether it runs only on certain OSs or excludes certain OSs.



I like this idea; I must have not been paying close enough attention to your other message. How could it be done, though? I can see a simple exression -> expected value scheme working for a lot of things (e.g., "$^0 eq 'MacOS'", or "eval { getpwuid };" ), but how would things like AFS be detectible?

(darren)


I'm making this up as I go, but I'm thinking that META.yml would just contain a list of required packages and possibly the minimum version required. Initially, that should be enough to flag it for cpan-testers. Ideally, there would be a module (Module::Build::Configure) that could try to determine whether those requirements are satisfied for a particular system. This could be done by a which/where like routine to search for binaries, looking for config files, analyzing the install log of package managers like rpm, dpkg, etc.


In addition for larger packages like Apache there could be, for example an Module::Build::Configure::Apache module that provided other usefull info about that package like paths and other configuration info that might be usefull to module authors.

Randy.


Thinking more about this, I guess META.yml would need to provide a little more info to a configure module. Would something like the following work?


# Sequence of $^O values to include/exclude certains OSs
# One of the following as apropriate:
requires_os: *
excludes_os: MSWin32

# extra-perl requirements
# The has_* keys may map to a function call
# with it's values as arguments. If all calls return
# success the requirement is considered to be satisfied.
required_packages:
  - killerapp:
    version: 4.0
    has_program:
      - foo
      - bar
    has_lib:
      - a
      - z
  - libintl:
    version: 2

# One of auto/interactive/scriptable for cpan-testers
# to know how to setup testing
testing_mode: auto






Reply via email to