Clone this wiki locally
Ebuild versions of CPAN distributions
Ebuild versions and CPAN distribution versions are ordered differently.
The order of ebuild versions is specified in PMS.
Perl version objects have different schemes: There are actually two distinct kinds of version objects:
These correspond to historical versions of Perl itself prior to 5.6.0, as well as all other modules which follow the Camel rules for the $VERSION scalar. A Decimal version is initialized with what looks like a floating point number. Leading zeros are significant and trailing zeros are implied so that a minimum of three places is maintained between subversions. What this means is that any subversion (digits to the right of the decimal place) that contains less than three digits will have trailing zeros added to make up the difference, but only for purposes of comparison with other version objects
Also referred to as "Dotted-Integer", these contains more than one decimal point and may have an optional embedded underscore... This is what is commonly used in most open source software as the "external" version (the one used as part of the tag or tarfile name). A leading 'v' character is now required and will warn if it missing.
equivalent decimal zero-padded dotted-decimal ------- ----------- -------------- 1.2 1.200 v1.200.0 1.02 1.020 v1.20.0 1.002 1.002 v1.2.0 1.0023 1.002300 v1.2.300 1.00203 1.002030 v1.2.30 1.002003 1.002003 v1.2.3
00:03 < vincent>: I'm seriously leaning towards making all ebuilds generated by CPANPLUS-Dist-Gentoo follow a versioning scheme more compatible with CPAN's : if the version starts by 'v' or has at least two dots, then it's used as-is (thus 'v1.2' becames '1.2' and '1.2.3' stays the same) ; otherwise the version number is a float 1.xxxyyyzzz... which is mapped to 1.xxx.yyy.zzz with padding zeros if needed ('1.1' would become '1.100', and '1.0701' would be '1.070.100')
Different implementations (increasing cpan version)
CPAN EBUILD NUMIFY NORMAL 1.0001 1.000.100 1.0.100 1.001 1.001 1.1 1.1.1 *1.1.1* 1.1.1 1.01 1.010 1.10 1.1 1.100 1.100 1.2 1.200 1.200 * 1.1.1 > 1.010 as ebuild version