From comp.lang.perl Fri Jan 21 14:26:05 1994
Newsgroups: comp.lang.perl
Path: ruuinf!sun4nl!EU.net!howland.reston.ans.net!europa.eng.gtefsd.com!wx.gtegsc.com!news.cerf.net!netlabs!lwall
From: lwall@netlabs.com (Larry Wall)
Subject: Perl 5 Alpha 5 available
Message-ID: <1994Jan21.024815.13752@netlabs.com>
Organization: NetLabs, Inc.
Date: Fri, 21 Jan 1994 02:48:15 GMT
Lines: 46

Okay, I put Alpha 5 out there on ftp.netlabs.com.  It's mostly just bug
fixes.  If the customary mirror sites would grab it I'd be much obliged.

There is at least one interesting change.  Negative subscripts on
arrays and slices now return elements counting from the end instead
of the beginning.  In other words, $foo[$#foo] can be written $foo[-1].

The rest of this article is only for people interested in internals.

The biggest difference is that references are stored differently now.
If you've been hacking external subroutines, you'll have to use the
SvRV() macro to dereference a reference now, instead of SvANY().
You'll also note that I changed how the sv_storage byte works--it's
now a set of bit flags instead of a character.  If you've written any
code that says

    if (SvSTORAGE(sv) == 'O')

you'll have to change that to

    if (SvOBJECT(sv))

SVt_REF is not longer a valid SV type.  There's an SVt_RV type, but
references can now be stored in other types than just that--SVt_RV
is just the smallest type that can store a reference.  An SV of whatever
type contains a reference if SvROK(sv) is true.  So references can
now also be magical, and can be objects.

Another difference is that SvREADONLY has been relegated to being
a second-class bit.  It is now "hidden" behind a SvTHINKFIRST bit,
which, if true, says that something else must be checked before
modifying this value.  Currently, two things are checked for:

    1) SvREADONLY, in which case modification is rejected.
    2) SvROK, in which case the old reference is freed before being clobbered.

Eventually we may also have scalars that point to un-malloced memory.
These would allow a restricted set of operations, like only in-place
modifications.

If anybody wants to tackle anything in the Todo list, let me know so we
don't duplicate effort.  I really appreciate all the suggestions and
bug fixes that everyone has been sending.

Love,
Larry

