Version comparisons
[email protected] (Jos Boumans) 29 Oct 2003 10:58:21 -0000
| Newsgroups | perl.cpan.metadata |
|---|---|
| Organization | <none> |
| Message-ID | <[email protected]> |
Greetings,
We're running in to problems now with version comparisons;
EU::MM, Version, Module::Build and CPAN(PLUS) all have their own
code to compare versions. Sadly, they're not always 100% the same
which can cause discrepancies. But even more so, Module::Build has
a much more extensive way of comparing versions and prerequisites
than any of the other tools.
Right now, we're lacking a standard and a clear definition of how
versions should be compared, written down and specified.
To be able to reliably, and cross-module compare versions, we need to
come up with a standard for doing this. I personally like the way M::B
has solved it, but it's not something we can easily emulate.
Also, my gut feeling says that version comparison is somethign that
belongs in version.PM.
Autrijus proposed a syntax like this:
version->new('1.403')->satisfy('> 1.10 != 1.40');
or
version->new('1.403')->match('> 1.10 != 1.40');
which may be a good point to start the discussion from ;)