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

vstring guidance needed

Thread Next
From:
John Peacock
Date:
August 17, 2001 10:46
Subject:
vstring guidance needed
Message ID:
3B7D51D1.EB3BB2AF@rowman.com
I just got this working:

	$ ./perl -e 'print sprintf("v%vd\n",v5.005_03);'
	v5.5.30

which is how I read perl56delta.pod to read.  I get no errors during
make (including the miniperl tests), but I get coredumps for more than
a few tests.  It seems that my quest to eradicate non-vstring versions
is still lacking.  :~(

I discovered where PL_patchlevel is being set and I can deal with it
by making it call new_vstring, but it sort of begs the question:

	WHAT ARE VSTRINGS ANYWAY?

Internally, do we want to store a PV only, and make all version code
use cmp, lt, eq, etc., or do we want to continue to store both a 
NV numeric representation and a SV (U8) representation?

Do we want this:

SV = PV(0xa011468) at 0xa01f7c8
  REFCNT = 1
  FLAGS = (POK,READONLY,pNOK,pPOK)
  PV = 0xa017b68 "\0\35\0\1"\0
  CUR = 4
  LEN = 5

or this

SV = PV(0xa011468) at 0xa01f7c8
  REFCNT = 1
  NV = 0.029000001
  FLAGS = (NOK,POK,READONLY,pNOK,pPOK)
  PV = 0xa017b68 "\0\35\0\1"\0
  CUR = 4
  LEN = 5

be the representation of

Dump(v0.29.0.1);

I am willing to go either way.  It would be nice for both

	$vstring < v1.2.3     and      $vstring lt v1.2.3

to yield the same answer.  What do people think, given that vstrings
are also intended to be used to code UNICODE strings?

TIA

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

Thread Next


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