Subject: | The latest version is not indexed |
In a CPAN shell:
Show quoted text
cpan> m List::Uniq
Module id = List::Uniq
CPAN_USERID JFITZ (James FitzGibbon <JFITZ@cpan.org>)
CPAN_VERSION 0.20
CPAN_FILE J/JF/JFITZ/List-Uniq-0.20.tar.gz
UPLOAD_DATE 2010-06-18
INST_FILE (not installed)
-> which is not the (apparently) latest version 0.21.0. MetaCPAN also thinks that 0.20 is the latest version (by accessing the https://metacpan.org/release/List-Uniq URL).
I guess that the problem is the switch from the one-dot to two-dot-version numbers. It's easy to get the transition wrong, and this seemed to happen here:
$ perl -MTest::More=no_plan -Mversion -e 'cmp_ok(version->new("0.20"), "<", version->new("0.21.0"))'
not ok 1
# Failed test at -e line 1.
# '0.2'
# <
# '0.021'
1..1
# Looks like you failed 1 test of 1.
To do it right you have to use something like 0.201.0 for the newer version:
$ perl -MTest::More=no_plan -Mversion -e 'cmp_ok(version->new("0.20"), "<", version->new("0.201.0"))'
ok 1
1..1
Or maybe got to a 1.00 or 1.0.0, which would be least ambiguous.