On Mon, 2008-02-18 at 10:08 -0500, David Coppit wrote:
> On Sun, 17 Feb 2008, Jerry D. Hedden wrote:
> 
> > There's a million and one opinions on this.

There aren't that many perl modules on CPAN.

> 
> One module I ran into uses "<" to compare version numbers. Here's what

I remember reading somewhere* that perl version numbers are strings and
that lexical comparison should be used.  As far as I can tell, this is
only compatible with the debian developers guide, if module authors do
something reasonable** but the debian-perl group has worked out a way to
deal with this.

Since this is readily available and some thought has gone into it, you
might start consulting:
http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Version
I read recently on debian-perl that 30% of debian packages are perl now.


>  I
> do:
> 
> $VERSION = sprintf "%d.%02d%02d", q/5.30.34/ =~ /(\d+)/g;

* In the 'official' documentation (i.e. perldoc X).
** TMTOWDI is excluded.

-- 
--gh


Reply via email to