develooper Front page | perl.perl5.porters | Postings from August 2001

$] and $^V and PL_patchlevel

From:
John Peacock
Date:
August 20, 2001 10:21
Subject:
$] and $^V and PL_patchlevel
Message ID:
3B81471C.4CDAB5B6@rowman.com
Looking at the code in gv.c, I see now how I can support $] being a
number and printing properly, but making PL_patchlevel (and by extension
$^V) be "pure" v-strings (i.e. no NV representation).  Per the following
entry from Changes5.6, I think I have ample support for this:

[  5186] By: gsar                             on 2000/02/21  21:10:26
   Log: remove dual-valueness of v-strings (i.e., they are pure strings
        now); avoid the word "tuple" to describe strings represented as
        character ordinals; usurp $PERL_VERSION for $^V as suggested by
        Larry, deprecate $] ; adjust the documentation and testsuite
        accordingly

Accordingly, PL_patchlevel will contain only an SV with a v-string and
$] will get an sprintf("%vd",...) of that v-string, plus a numeric
representation of that as well (to cover all bases).

I still need a way to distinguish whether an SV is a v-string or not;
any suggestions?

John

--
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4720 Boston Way
Lanham, MD 20706
301-459-3366 x.5010
fax 301-429-5747



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About