On Fri, Jan 09, 2004 at 08:49:59AM +0000, Andy Wardley wrote:
> David Wheeler wrote:
> > So, what do people like or prefer, and why? Is there a consensus on
> > this? If so, what is it?
>
> I manually give the main module in a distribution a "real" version number
> such as 2.00, 2.01, and so on. Naturally this changes on every release.
>
> All the other modules in a distribution have a version number built
> automatically from the CVS revision. This changes only when the source
> file changes.
>
> $VERSION = sprintf("%d.%02d", q$Revision: 1.23$ =~ /(\d+)\.(\d+)/);
I do the same thing.
For what it's worth, I think %02d is asking for trouble. Some of my
modules have gone into triple-digit revisions:
$VERSION = do [EMAIL PROTECTED](q$Revision: 1.273
$=~/\d+/g);sprintf"%d."."%04d"x$#r,@r};
--
Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/