On Wed, 4 Apr 2001, Thomas A. Lowery wrote:

> I've changed my version of DBD::ADO to 2.0, instead of continuing the
> 1.X line.  This may help in future releases.
> 
> > > Why did the version regress?  Let's take a look at the code for
> > > blib/DBD/ADO.pm in DBI 1.15 and 1.14:
> 
> Tim and I we're attempting to maintain DBD::ADO is two different CVS 
> libraries I believe.  
> Now, my question:  Is this the standard "version" syntax?
>       $VERSION = substr(q$Revision: 2.0 $, 9,-1) +0; 
> 
> using: perl -MDBD::ADO -e "print $DBD::ADO::VERSION"
> I get 2
> 
> Is there a better method?

For what it's worth, I use this (second line wrapped to fit in mail
message):

our ($VER,$VERSION);
($VER) = '$Name:  $' =~ /Name:\s+v([\d_]+)/; $VER ||= '1_0'; \
   ($VERSION = $VER) =~ s/_/./g;

CVS doesn't deal with '.' in release tags, so this brain-damage derives it
on-the-fly ('cvs extract' produces a release and substitutes e.g. 'Name:  
1_0' for '$Name$').

Steve


Reply via email to