[Chicago-talk] Perl and CVS

Paul Baker pbaker at where2getit.com
Thu Nov 13 16:03:06 CST 2003


Jay Strauss wrote:

> And then I'm using CVS, is there some way to make it when I check the module
> in, that CVS would replace the "0.01" with the CVS version?

Use this:

our $VERSION = do { my @r = (q$Revision: 1.2 $ =~ /\d+/g); sprintf "%d." . "%02d" x $#r, @r };

This would expand out the version number to 1.02 and it will be updated by CVS commits. If you think you may have more than one hundred revisions (the revision number could get up to 1.100, then change the "%02d" to "%03d".

--
Paul Baker




More information about the Chicago-talk mailing list