From comp.lang.perl Sat Jan 15 22:03:27 1994
Newsgroups: comp.lang.perl
Path: ruuinf!sun4nl!EU.net!howland.reston.ans.net!agate!netsys!pagesat.net!news.cerf.net!netlabs!lwall
From: lwall@netlabs.com (Larry Wall)
Subject: Perl 5 Alpha 4 available
Message-ID: <1994Jan14.133740.1096@netlabs.com>
Organization: NetLabs, Inc.
Date: Fri, 14 Jan 1994 13:37:40 GMT
Lines: 124

Perl 5 Alpha 4 is now available from ftp.netlabs.com:pub/outgoing/perl5.0,
filename perl5a4.tar.Z.

This is alpha software, which means it's unsupported (hah!) and there's
no Configure script for it.  It is only likely to work as-is on a Sparc
running SunOS.  The directory contains a pre-compiled executable,
compiled with -g -DDEBUGGING.  If you recompile with -O2 it runs about
25% faster.

Below is the current Changes list for Perl 5.  Have some amount of fun.

Oh, by the way, if you've been writing tkperl, the meanings of some of
the macros have changed:

	SvPVn	is now	SvPV
	SvIVn	is now	SvIV
	SvNVn	is now	SvNV

(The old internal SvPV etc. macros were renamed to SvPVX etc., but you don't
want to use them without severe provocation.)

Look in ext/dbm for some examples of how to link in extra modules.  The
currently compiled executable has DBM, NDBM and SDBM linked in all at once.

Larry

New things
----------
    The -w switch is much more informative.

    References.  See t/op/ref.t for examples.  All entities in Perl 5 are
    reference counted so that it knows when each item should be destroyed.

    Objects.  See t/op/ref.t for examples.

    => is now a synonym for comma.  This is useful as documentation for
    arguments that come in pairs, such as initializers for associative arrays,
    or named arguments to a subroutine.

    All functions have been turned into list operators or unary operators,
    meaning the parens are optional.  Even subroutines may be called as
    list operators if they've already been declared.

    More embeddible.  See main.c and embed_h.SH.  Multiple interpreters
    in the same process are supported (though not with interleaved
    execution yet).

    The interpreter is now flattened out.  Compare Perl 4's eval.c with
    the perl 5's pp.c.  Compare Perl 4's 900 line interpreter loop in cmd.c
    with Perl 5's 1 line interpreter loop in run.c.  Eventually we'll make
    everything non-blocking so we can interface nicely with a scheduler.

    eval is now treated more like a subroutine call.  Among other things,
    this means you can return from it.

    Format value lists may be spread over multiple lines by enclosing in
    curlies.

    You may now define BEGIN and END subroutines for each package.  The BEGIN
    subroutine executes the moment it's parsed.  The END subroutine executes
    just before exiting.

    Flags on the #! line are interpreted even if the script wasn't
    executed directly.  (And even if the script was located by "perl -x"!)

    The ?: operator is now legal as an lvalue.

    List context now propagates to the right side of && and ||, as well
    as the 2nd and 3rd arguments to ?:.

    The "defined" function can now take a general expression.

    Lexical scoping available via "my".  eval can see the current lexical
    variables.

    Saying "package;" requires explicit package name on global symbols.

    The preferred package delimiter is now :: rather than '.

    tie/untie are now preferred to dbmopen/dbmclose.  Multiple DBM
    implementations are allowed in the same executable, so you can
    write scripts to interchange data among different formats.

    New "and" and "or" operators work just like && and || but with
    a precedence lower than comma, so they work better with list operators.

    New functions include: abs(), chr(), uc(), ucfirst(), lc(), lcfirst()

Incompatibilities
-----------------
    @ now always interpolates an array in double-quotish strings.  Some programs
    may now need to use backslash to protect any @ that shouldn't interpolate.

    s'$lhs'$rhs' now does no interpolation on either side.  It used to
    interplolate $lhs but not $rhs.

    The second and third arguments of splice are now evaluated in scalar
    context (like the book says) rather than list context.

    Saying "shift @foo + 20" is now a semantic error because of precedence.

    "open FOO || die" is now incorrect.  You need parens around the filehandle.

    The elements of argument lists for formats are now evaluated in list
    context.  This means you can interpolate list values now.

    You can't do a goto into a block that is optimized away.  Darn.

    It is no longer syntactically legal to use whitespace as the name
    of a variable.

    Some error messages will be different.

    The caller function now returns a false value in a scalar context if there
    is no caller.  This lets library files determine if they're being required.

    m//g now attaches its state to the searched string rather than the
    regular expression.

    "reverse" is no longer allowed as the name of a sort subroutine.

    taintperl is no longer a separate executable.  There is now a -T
    switch to turn on tainting when it isn't turned on automatically.


