Subject: | a generic base class perhaps? |
Would you consider a module (perhaps a base class for Test::Needs) that is the generic version? So say Test::Prerequisite provides test_prereq(\&code) which can skip tests when code returns non-empty failure message string. Where Test::Needs is a special case for when the condition is "certain module is available".
For example, in one of my distributions, I'm testing with node.js. It would be nice to be able to say something like:
subtest "js1" => sub {
test_prereq { "node" or "nodejs" is in PATH };
...
};
or even:
subtest "js1" => sub {
test_prereq { "node" or "nodejs" is in PATH and it supports --harmony_scoping option };
...
};