tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

perl version numbering

On Mon, 20 Oct 2008, Havard Eidnes wrote:
> I've been told (this may not be accurate?) that a perl $VERSION
> with x.y.z format will be incorrectly interpreted (by perl?).
> This is what gives rise to sequences similar to 1.1 -> 1.1001 ->
> 1.2 which can sometimes be found in certain perl packages.  If
> we're to strictly adhere to the pkgsrc numbering conventions, 1.2
> should probably be 1.2000, or 1.1001 should have been 1.1.1 in
> pkgsrc.

In at least some parts of perl, version numbers 1.2.3,,
1.002003, and 1.002003000 are all equivalent, and are all smaller than
1.003.  If there's only one "." things get more tricky, but sometimes
the "v" prefix is used as a disambiguator, so v1.1 and 1.001 (no "v")
are equivalent to each other, but 1.1 (no "v") is not equivalent to
v1.1.  See "perldoc version" or search for VERSION in "man perlvar" for
more details.

I don't much care whether pkgsrc version numbers for perl packages
follow the 1.2.3 or the 1.002003 style, though I have a minor preference
for the 1.2.3 style.  Whatever style is used, I think it's important
that the pkgsrc version number never goes backwards as interpreted
by pkgsrc conventions.  If pkgsrc uses the 1.002003 style, then it
will sometimes have to append trailing zeros to ensure that the number
doesn't go backwards.

--apb (Alan Barrett)

Home | Main Index | Thread Index | Old Index