LPM: MakeMaker and version numbers

Rich Bowen rbowen at rcbowen.com
Wed Dec 15 09:06:07 CST 1999


Rich Bowen wrote:
> 
> On Monday, someone asked what the limitations were on the version
> numbers used when setting $VERSION in a module. I was tinkering with
> that this morning, and observed the following. When I set $VERSION to
> 
> $VERSION = 0.001.001.03;
> 
> the file that was generated by 'make dist' was
> 
> testing-0.00113.tar.gz

And, my second observation is that if $VERSION is a string, rather than
a bareword, that this works. 

I hate it when I send out dumb things in email. Obviously, the line of
code above:

$VERSION = 0.001.001.03;

is not particularly valid, since 0.001.001.03 is not a number or a valid
expression of any kind. Perl converts it to a number in the best way
that it can figure out. So 0.001.001.03 becomes 0.00113

$VERSION = '0.001.001.03';

would have been just fine. As would

$VERSION = 'this_is_my_way_cool_version_number';

Rich 'RTFM' Bowen
-- 
http://www.ApacheUnleashed.com/
Lexington Perl Mongers - http://lexington.pm.org/
PGP Key - http://www.rcbowen.com/pgp.txt



More information about the Lexington-pm mailing list