In article <[EMAIL PROTECTED]>,
Elaine -HFB- Ashton <[EMAIL PROTECTED]> wrote:
>One note about $VERSION - 
>
>For a regular version it should be 1.01 and for an alpha/beta it should be
>1.01_01 or somesuch where the "_nn" denotes the alpha.

I thought the alpha/beta distinction was only relevant when there was a
earlier GA release (so CPAN.pm doesn't upgrade 1.01 to 1.01_01 or some
such.)  Nevertheless, $VERSION should always be a number so that required
version numbers work without extraneous warnings:

~ $perl -we'use Date::Roman 1.0'
Argument "1.0.1" isn't numeric in subroutine entry at -e line 1.

Same thing happens with $VERSION="1.00_01" though, and MakeMaker (e.g.
make dist's tarball name) loses the _ if you only say $VERSION=1.00_01;

Extensive discussion of this problem occured on perl5-porters in Feb
and Mar under subjects '$VERSION problem', 'UNIVERSAL::version objects',
and 'Argument "1.23_45" isn't numeric in subroutine entry'.

perlmodstyle now recommends (change #15420) a two or three line
incantation for alpha/beta $VERSION's:
  $VERSION = "1.12_01";
  $XS_VERSION = $VERSION; # only needed if you have XS code
  $VERSION = eval $VERSION;

(Automatic VERSION objectification didn't make it into 5.8.0.)

Reply via email to