Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Using CVS for revision control

by Chmrr (Vicar)
on Aug 06, 2002 at 01:24 UTC ( #187881=note: print w/ replies, xml ) Need Help??


in reply to Using CVS for revision control

There is one additional point to bring up concerning Perl and CVS; the actual versioning itself. Perl's $VERSION variable assumes that version 5.101 is just a small update on 5.1 -- CVS believes that they are 100 revisions apart! Things get even more confusing when Perl claims that 5.2 is more recent than 5.101 This can lead to Wacky Hijinks(tm) if you set the $VERSION variable in your program based directly on CVS' $Revision$ tag. You have been warned.

perl -pe '"I lo*`+$^X$\"$]!$/"=~m%(.*)%s;$_=$1;y^`+*^e v^#$&V"+@( NO CARRIER'


Comment on Re: Using CVS for revision control
Select or Download Code
Re: Re: Using CVS for revision control
by Joost (Canon) on Aug 06, 2002 at 11:41 UTC
    I usually do something like
    $VERSION = sprintf "%d.%03d",q$Revision: 1.15 $ =~ /(\d+)\.(\d+)/;

    That will give a $VERSION = '1.015' for $Revision 1.15

    -- Joost downtime n. The period during which a system is error-free and immune from user input.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://187881]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (8)
As of 2014-12-28 19:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (182 votes), past polls