On Wednesday, July 23, 2003, at 07:32 AM, Dan Kogai wrote:
Anyway, As an Encode Maintainer I naturally typed
perl -MEncode -le 'print Encode->VERSION'
and here is what Panther said
1.04
Ohmygod! Even Perl 5.8.0 comes with Encode ver. 1.75. WHAT HAS HAPPEND!? So I 'perldoc -m Encode' and found this.
#
# $Id: Encode.pm,v 1.4 2003/05/20 22:49:15 emoy Exp $
#
package Encode;
use strict;
our $VERSION = do { my @r = (q$Revision: 1.4 $ =~~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
Really, it's a bad idea to use a CVS revision as $VERSION. For one thing, it can cause the problem you found when other people integrate the sources into other projects. For another thing, it means you can't make frequent commits to CVS unless you want to skip several version numbers with each release.
This is why the CVS manuals recommend against using %Revision% to generate release versions:
http://www.loria.fr/~molli/cvs/doc/cvs_4.html
I used to do things the same way you do, but life's gotten much better now that I just increment $VERSION manually. =)
-Ken