There are a few things I disagree with in PBP, but I'm just going to name the one that is current causing me the most inconvenience because I can't just ignore the rule.
Damian says, "use three-part version numbers."
No. Do not do this, at least not if you're going to use version.pm.
Because Damian is using "qv(0.99.2)" and the like, the CPAN indexer considers the version number in IO/Prompt.pm to be undef, so it is not newer than the one that had "$VERSION = '0.02'" and so the new version isn't installed when I run "cpanp install IO::Prompt"
Maybe the indexer should be fixed, but in the meantime, do not do what Damian does.
use version; $VERSION = qv('3.0.8');
This is slightly ugly, but will work.
-Dom
Re:Class::DBI has a solution
jk2addict on 2005-09-26T18:55:17
Actually, it doesn't. I believe Matt Trout was cursing the virtues of the 3 part number when CPAN/CPANPLUS read the one of the package gz files and the three part versions were listed as 3.0; making upgrading to a newer verison broken.
Ahh...here.. ftp://ftp.cpan.org/pub/CPAN/modules/02packages.details.txt.gzThat's from the current file:Class::DBI 3.0 T/TM/TMTM/Class-DBI-3.0.1.tar.gz09/26/05 07:14AM 393,184 02packages.details.txt.gz
Andreas is working on a change to the indexer that will use version.pm to translate x.y.z to a float that can be , but it's not there yet. Until then, I agree with the poster -- do not use x.y.z versions unless you *absolutely* must, and be aware of the consequences if you do.