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

$] and $^V and PL_patchlevel

John Peacock
August 20, 2001 10:21
$] and $^V and PL_patchlevel
Message ID:
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, 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 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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About