On Sun, May 04, 2003 at 05:05:23AM +0200, Andreas J. Koenig wrote: > >>>>> On Sat, 3 May 2003 15:30:16 -0700, Michael G Schwern <schwern@pobox.com> said: > > > - $VERSION = do { my @r = (q$Revision: 1.1 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; # must be all one line, for MakeMaker > > + $VERSION = sprintf "%d.%03d", q$Revision: 1.1 $ =~ /(\d+)/g; > > IIRC, if you ever branch in RCS, you are forced to use N.N.N.N style > revision numbers. IMHO rather than making the common case n this simple example unnecessarily complex, dealing with branches is best left as an exercise for the reader. [1] I've put the full code for dealing with branches into ExtUtils::MakeMaker::FAQ. [1] Note how I RESISTED THE URGE to say that branching is extremely rare -- Do not try comedy at home! Milk & Cheese are advanced experts! Attempts at comedy can be dangerously unfunny!Thread Previous | Thread Next