At 07.50 -0700 01-05-21, Daniel Lord wrote:
>Maybe it's in some release notes somewhere that I have missed, but 
>has anyone noticed that the version variable is wrong?
>
>i.e, running the following program gives 'version=5.006' instead of 
>the version shown by 'perl -v' , 'This is perl, v5.6.0 built for 
>darwin' .
>
>#!/usr/bin/perl
>print "version=", $];

That's not an error, but a different way of writing the version 
number, a way that makes it compatible with the old versioning 
system. v5.6.0 in the new system is the same as 5.006 in the old 
system. If you want v5.6.0, use $^V, not $].


 From the perldelta manpage:

        Improved Perl version numbering system

        Beginning with Perl version 5.6.0, the version number
        convention has been changed to a "dotted integer" scheme
        that is more commonly found in open source projects.

        Maintenance versions of v5.6.0 will be released as v5.6.1,
        v5.6.2 etc.  The next development series following v5.6.0
        will be numbered v5.7.x, beginning with v5.7.0, and the
        next major production release following v5.6.0 will be
        v5.8.0.

        The v1.2.3 syntax is also now legal in Perl.  See the
        Support for strings represented as a vector of ordinals
        entry elsewhere in this document for more on that.

        To cope with the new versioning system's use of at least
        three significant digits for each version component, the
        method used for incrementing the subversion number has
        also changed slightly.  We assume that versions older than
        v5.6.0 have been incrementing the subversion component in
        multiples of 10.  Versions after v5.6.0 will increment
        them by 1.  Thus, using the new notation, 5.005_03 is the
        "same" as v5.5.30, and the first maintenance version
        following v5.6.0 will be v5.6.1 (which should be read as
        being equivalent to a floating point value of 5.006_001 in
        the older format, stored in `$]').

Cajo.
-- 
Carl Johan Berglund, [EMAIL PROTECTED], 0708-136 236
Adverb Information, http://www.adverb.se, 08-555 788 80

Reply via email to