http://qs321.pair.com?node_id=728996

lima1 has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

did anyone wrote a test-script that tries to find the minimal version numbers for the modules listed in Build.PL or Makefile.PL? Probably something that fetches old versions from http://backpan.cpan.org and runs the test suite with each of them?

Replies are listed 'Best First'.
Re: Find minimum required module version
by davidrw (Prior) on Dec 08, 2008 at 17:43 UTC
    This might be a good question to cross-post to the cpan-testers mail list, too.

    Some initial thoughts on it:
    • What do you test again? So your module Z requires A, B, C. Do you prep w/the newest of B & C, and then try all versions of A (newest->oldest), running the test suite Z until it breaks?
    • This would definitely require pretty decent coverage by Z's test suite.
    • Might there be recursive problems with this? Maybe Z works fine with any B ... but A requires (for functionality that Z doesn't use; but still a requirement for install) a certain version of B. How does that get handled?
    • Maybe such a script, instead of finding the min versions for each prereq independently, finds a point in time that they work?
      Construct a time line of release dates like this:
      2000-01-01  Av1
      2000-02-01  Bv1
      2000-03-01  Av2
      2000-04-01  Cv1
      2000-05-01  Av3
      2000-06-01  Bv2
      2000-07-01  Bv3
      2000-08-01  Cv2
      
      So start with the newest. Now back through the timeline .. so the sets to check, in order, would be:
      • Av3,Bv3,Cv2
      • Av3,Bv3,Cv1
      • Av3,Bv2,Cv1
      • Av3,Bv1,Cv1
      • Av2,Bv1,Cv1
      Note that A1 never gets tested, cause A2 was out already by the time B & C existed. Now, maybe A1,B1,C1 will work, too .. but is that something we'd be concerned with?
    • What's the common view (if any) on providing min version numbers for the sake of not blindly saying "any"?
      my assumption was that the min version was usually when the author knows he's using a feature that's non-existent or broken previous to a certain version.
      Using the min version from backpan that works may not be the true min version ...
      But also, may not care about those edge cases.