[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CVS and Perl

From: Benjamin Goldberg
Subject: Re: CVS and Perl
Date: Sun, 17 Mar 2002 22:09:49 -0500

Matthew Persico wrote:
> Is there anyone reading who uses CVS to keep track of Perl modules?

Many people :)

> Any special tips or tricks?

You might want to do something like this for module's version:

our $VERSION = do { use utf8; pack("U*", q$Revision$ =~ /(\d+)/g) };

use vars qw($VERSION);
$VERSION = do { my($a,@b) = q$Revision$ =~ /(\d+)/; ($a||0) . "." . 
sprintf("%03d" x @b, @b) };

On checkout $Revision$ will get filled in by CVS to be the current
revision number.

print reverse( ",rekcah", " lreP", " rehtona", " tsuJ" )."\n";

reply via email to

[Prev in Thread] Current Thread [Next in Thread]