develooper Front page | perl.perl5.porters | Postings from May 2003

Re: [PATCH pod/perlmod.pod] Simpler $Revision$ based $VERSION. Plus, repentance!

Thread Previous | Thread Next
From:
Michael G Schwern
Date:
May 3, 2003 21:18
Subject:
Re: [PATCH pod/perlmod.pod] Simpler $Revision$ based $VERSION. Plus, repentance!
Message ID:
20030504041851.GA2015@windhund.schwern.org
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


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About