Plan 9 from Bell Labs’s /usr/web/sources/contrib/gabidiaz/root/sys/man/1perl/perl571delta

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


.\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sh \" Subsection heading
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings.  \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote.  | will give a
.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
.\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
.\" expand to `' in nroff, nothing in troff, for use with C<>.
.tr \(*W-|\(bv\*(Tr
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
.    ds -- \(*W-
.    ds PI pi
.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
.    ds L" ""
.    ds R" ""
.    ds C` ""
.    ds C' ""
'br\}
.el\{\
.    ds -- \|\(em\|
.    ds PI \(*p
.    ds L" ``
.    ds R" ''
'br\}
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
.\" entries marked with X<> in POD.  Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.if \nF \{\
.    de IX
.    tm Index:\\$1\t\\n%\t"\\$2"
..
.    nr % 0
.    rr F
.\}
.\"
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.hy 0
.if n .na
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
.    \" fudge factors for nroff and troff
.if n \{\
.    ds #H 0
.    ds #V .8m
.    ds #F .3m
.    ds #[ \f1
.    ds #] \fP
.\}
.if t \{\
.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
.    ds #V .6m
.    ds #F 0
.    ds #[ \&
.    ds #] \&
.\}
.    \" simple accents for nroff and troff
.if n \{\
.    ds ' \&
.    ds ` \&
.    ds ^ \&
.    ds , \&
.    ds ~ ~
.    ds /
.\}
.if t \{\
.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.\}
.    \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
.    \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
.    \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
\{\
.    ds : e
.    ds 8 ss
.    ds o a
.    ds d- d\h'-1'\(ga
.    ds D- D\h'-1'\(hy
.    ds th \o'bp'
.    ds Th \o'LP'
.    ds ae ae
.    ds Ae AE
.\}
.rm #[ #] #H #V #F C
.\" ========================================================================
.\"
.IX Title "PERL571DELTA 1"
.TH PERL571DELTA 1 "2002-11-24" "perl v5.8.0" "Perl Programmers Reference Guide"
.SH "NAME"
perl571delta \- what's new for perl v5.7.1
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
This document describes differences between the 5.7.0 release and the
5.7.1 release.  
.PP
(To view the differences between the 5.6.0 release and the 5.7.0
release, see perl570delta.)
.SH "Security Vulnerability Closed"
.IX Header "Security Vulnerability Closed"
(This change was already made in 5.7.0 but bears repeating here.)
.PP
A potential security vulnerability in the optional suidperl component
of Perl was identified in August 2000.  suidperl is neither built nor
installed by default.  As of April 2001 the only known vulnerable
platform is Linux, most likely all Linux distributions.  \s-1CERT\s0 and
various vendors and distributors have been alerted about the vulnerability.
See http://www.cpan.org/src/5.0/sperl\-2000\-08\-05/sperl\-2000\-08\-05.txt
for more information.
.PP
The problem was caused by Perl trying to report a suspected security
exploit attempt using an external program, /bin/mail.  On Linux
platforms the /bin/mail program had an undocumented feature which
when combined with suidperl gave access to a root shell, resulting in
a serious compromise instead of reporting the exploit attempt.  If you
don't have /bin/mail, or if you have 'safe setuid scripts', or if
suidperl is not installed, you are safe.
.PP
The exploit attempt reporting feature has been completely removed from
all the Perl 5.7 releases (and will be gone also from the maintenance
release 5.6.1), so that particular vulnerability isn't there anymore.
However, further security vulnerabilities are, unfortunately, always
possible.  The suidperl code is being reviewed and if deemed too risky
to continue to be supported, it may be completely removed from future
releases.  In any case, suidperl should only be used by security
experts who know exactly what they are doing and why they are using
suidperl instead of some other solution such as sudo
( see http://www.courtesan.com/sudo/ ).
.SH "Incompatible Changes"
.IX Header "Incompatible Changes"
.IP "\(bu" 4
Although \*(L"you shouldn't do that\*(R", it was possible to write code that
depends on Perl's hashed key order (Data::Dumper does this).  The new
algorithm \*(L"One\-at\-a\-Time\*(R" produces a different hashed key order.
More details are in \*(L"Performance Enhancements\*(R".
.IP "\(bu" 4
The list of filenames from \fIglob()\fR (or <...>) is now by default sorted
alphabetically to be csh\-compliant.  (\fIbsd_glob()\fR does still sort platform
natively, \s-1ASCII\s0 or \s-1EBCDIC\s0, unless \s-1GLOB_ALPHASORT\s0 is specified.)
.SH "Core Enhancements"
.IX Header "Core Enhancements"
.Sh "\s-1AUTOLOAD\s0 Is Now Lvaluable"
.IX Subsection "AUTOLOAD Is Now Lvaluable"
\&\s-1AUTOLOAD\s0 is now lvaluable, meaning that you can add the :lvalue attribute
to \s-1AUTOLOAD\s0 subroutines and you can assign to the \s-1AUTOLOAD\s0 return value.
.Sh "PerlIO is Now The Default"
.IX Subsection "PerlIO is Now The Default"
.IP "\(bu" 4
\&\s-1IO\s0 is now by default done via PerlIO rather than system's \*(L"stdio\*(R".
PerlIO allows \*(L"layers\*(R" to be \*(L"pushed\*(R" onto a file handle to alter the
handle's behaviour.  Layers can be specified at open time via 3\-arg
form of open:
.Sp
.Vb 1
\&   open($fh,'>:crlf :utf8', $path) || ...
.Ve
.Sp
or on already opened handles via extended \f(CW\*(C`binmode\*(C'\fR:
.Sp
.Vb 1
\&   binmode($fh,':encoding(iso-8859-7)');
.Ve
.Sp
The built-in layers are: unix (low level read/write), stdio (as in
previous Perls), perlio (re\-implementation of stdio buffering in a
portable manner), crlf (does \s-1CRLF\s0 <=> \*(L"\en\*(R" translation as on Win32,
but available on any platform).  A mmap layer may be available if
platform supports it (mostly UNIXes).
.Sp
Layers to be applied by default may be specified via the 'open' pragma.
.Sp
See \*(L"Installation and Configuration Improvements\*(R" for the effects
of PerlIO on your architecture name.
.IP "\(bu" 4
File handles can be marked as accepting Perl's internal encoding of Unicode
(\s-1UTF\-8\s0 or UTF-EBCDIC depending on platform) by a pseudo layer \*(L":utf8\*(R" :
.Sp
.Vb 1
\&   open($fh,">:utf8","Uni.txt");
.Ve
.Sp
Note for \s-1EBCDIC\s0 users: the pseudo layer \*(L":utf8\*(R" is erroneously named
for you since it's not \s-1UTF\-8\s0 what you will be getting but instead
\&\s-1UTF\-EBCDIC\s0.  See perlunicode, utf8, and
http://www.unicode.org/unicode/reports/tr16/ for more information.
In future releases this naming may change.
.IP "\(bu" 4
File handles can translate character encodings from/to Perl's internal
Unicode form on read/write via the \*(L":\fIencoding()\fR\*(R" layer.
.IP "\(bu" 4
File handles can be opened to \*(L"in memory\*(R" files held in Perl scalars via:
.Sp
.Vb 1
\&   open($fh,'>', \e$variable) || ...
.Ve
.IP "\(bu" 4
Anonymous temporary files are available without need to
\&'use FileHandle' or other module via
.Sp
.Vb 1
\&   open($fh,"+>", undef) || ...
.Ve
.Sp
That is a literal undef, not an undefined value.
.IP "\(bu" 4
The list form of \f(CW\*(C`open\*(C'\fR is now implemented for pipes (at least on \s-1UNIX\s0):
.Sp
.Vb 1
\&   open($fh,"-|", 'cat', '/etc/motd')
.Ve
.Sp
creates a pipe, and runs the equivalent of exec('cat', '/etc/motd') in
the child process.
.IP "\(bu" 4
The following builtin functions are now overridable: \fIchop()\fR, \fIchomp()\fR,
\&\fIeach()\fR, \fIkeys()\fR, \fIpop()\fR, \fIpush()\fR, \fIshift()\fR, \fIsplice()\fR, \fIunshift()\fR.
.IP "\(bu" 4
Formats now support zero-padded decimal fields.
.IP "\(bu" 4
Perl now tries internally to use integer values in numeric conversions
and basic arithmetics (+ \- * /) if the arguments are integers, and
tries also to keep the results stored internally as integers.
This change leads into often slightly faster and always less lossy
arithmetics. (Previously Perl always preferred floating point numbers
in its math.)
.IP "\(bu" 4
The \fIprintf()\fR and \fIsprintf()\fR now support parameter reordering using the
\&\f(CW\*(C`%\ed+\e$\*(C'\fR and \f(CW\*(C`*\ed+\e$\*(C'\fR syntaxes.  For example
.Sp
.Vb 1
\&    print "%2\e$s %1\e$s\en", "foo", "bar";
.Ve
.Sp
will print \*(L"bar foo\en\*(R"; This feature helps in writing
internationalised software.
.IP "\(bu" 4
Unicode in general should be now much more usable.  Unicode can be
used in hash keys, Unicode in regular expressions should work now,
Unicode in tr/// should work now (though tr/// seems to be a
particularly tricky to get right, so you have been warned)
.IP "\(bu" 4
The Unicode Character Database coming with Perl has been upgraded
to Unicode 3.1.  For more information, see http://www.unicode.org/ ,
and http://www.unicode.org/unicode/reports/tr27/
.Sp
For developers interested in enhancing Perl's Unicode capabilities:
almost all the \s-1UCD\s0 files are included with the Perl distribution in
the lib/unicode subdirectory.  The most notable omission, for space
considerations, is the Unihan database.
.IP "\(bu" 4
The Unicode character classes \ep{Blank} and \ep{SpacePerl} have been
added.  \*(L"Blank\*(R" is like C \fIisblank()\fR, that is, it contains only
\&\*(L"horizontal whitespace\*(R" (the space character is, the newline isn't),
and the \*(L"SpacePerl\*(R" is the Unicode equivalent of \f(CW\*(C`\es\*(C'\fR (\ep{Space}
isn't, since that includes the vertical tabulator character, whereas
\&\f(CW\*(C`\es\*(C'\fR doesn't.)
.Sh "Signals Are Now Safe"
.IX Subsection "Signals Are Now Safe"
Perl used to be fragile in that signals arriving at inopportune moments
could corrupt Perl's internal state.
.SH "Modules and Pragmata"
.IX Header "Modules and Pragmata"
.Sh "New Modules"
.IX Subsection "New Modules"
.IP "\(bu" 4
B::Concise, by Stephen McCamant, is a new compiler backend for
walking the Perl syntax tree, printing concise info about ops.
The output is highly customisable.
.Sp
See B::Concise for more information.
.IP "\(bu" 4
Class::ISA, by Sean Burke, for reporting the search path for a
class's \s-1ISA\s0 tree, has been added.
.Sp
See Class::ISA for more information.
.IP "\(bu" 4
Cwd has now a split personality: if possible, an extension is used,
(this will hopefully be both faster and more secure and robust) but
if not possible, the familiar Perl library implementation is used.
.IP "\(bu" 4
Digest, a frontend module for calculating digests (checksums),
from Gisle Aas, has been added.
.Sp
See Digest for more information.
.IP "\(bu" 4
Digest::MD5 for calculating \s-1MD5\s0 digests (checksums), by Gisle Aas,
has been added.
.Sp
.Vb 1
\&    use Digest::MD5 'md5_hex';
.Ve
.Sp
.Vb 1
\&    $digest = md5_hex("Thirsty Camel");
.Ve
.Sp
.Vb 1
\&    print $digest, "\en"; # 01d19d9d2045e005c3f1b80e8b164de1
.Ve
.Sp
\&\s-1NOTE:\s0 the \s-1MD5\s0 backward compatibility module is deliberately not
included since its use is discouraged.
.Sp
See Digest::MD5 for more information.
.IP "\(bu" 4
Encode, by Nick Ing\-Simmons, provides a mechanism to translate
between different character encodings.  Support for Unicode,
ISO\-8859\-*, \s-1ASCII\s0, CP*, \s-1KOI8\-R\s0, and three variants of \s-1EBCDIC\s0 are
compiled in to the module.  Several other encodings (like Japanese,
Chinese, and MacIntosh encodings) are included and will be loaded at
runtime.
.Sp
Any encoding supported by Encode module is also available to the
\&\*(L":\fIencoding()\fR\*(R" layer if PerlIO is used.
.Sp
See Encode for more information.
.IP "\(bu" 4
Filter::Simple is an easy-to-use frontend to Filter::Util::Call,
from Damian Conway.
.Sp
.Vb 1
\&    # in MyFilter.pm:
.Ve
.Sp
.Vb 1
\&    package MyFilter;
.Ve
.Sp
.Vb 5
\&    use Filter::Simple sub {
\&        while (my ($from, $to) = splice @_, 0, 2) {
\&                s/$from/$to/g;
\&        }
\&    };
.Ve
.Sp
.Vb 1
\&    1;
.Ve
.Sp
.Vb 1
\&    # in user's code:
.Ve
.Sp
.Vb 1
\&    use MyFilter qr/red/ => 'green';
.Ve
.Sp
.Vb 2
\&    print "red\en";   # this code is filtered, will print "green\en"
\&    print "bored\en"; # this code is filtered, will print "bogreen\en"
.Ve
.Sp
.Vb 1
\&    no MyFilter;
.Ve
.Sp
.Vb 1
\&    print "red\en";   # this code is not filtered, will print "red\en"
.Ve
.Sp
See Filter::Simple for more information.
.IP "\(bu" 4
Filter::Util::Call, by Paul Marquess, provides you with the
framework to write \fISource Filters\fR in Perl.  For most uses
the frontend Filter::Simple is to be preferred.
See Filter::Util::Call for more information.
.IP "\(bu" 4
Locale::Constants, Locale::Country, Locale::Currency, and Locale::Language,
from Neil Bowers, have been added.  They provide the codes for various
locale standards, such as \*(L"fr\*(R" for France, \*(L"usd\*(R" for \s-1US\s0 Dollar, and
\&\*(L"jp\*(R" for Japanese.
.Sp
.Vb 1
\&    use Locale::Country;
.Ve
.Sp
.Vb 2
\&    $country = code2country('jp');               # $country gets 'Japan'
\&    $code    = country2code('Norway');           # $code gets 'no'
.Ve
.Sp
See Locale::Constants, Locale::Country, Locale::Currency,
and Locale::Language for more information.
.IP "\(bu" 4
MIME::Base64, by Gisle Aas, allows you to encode data in base64.
.Sp
.Vb 1
\&    use MIME::Base64;
.Ve
.Sp
.Vb 2
\&    $encoded = encode_base64('Aladdin:open sesame');
\&    $decoded = decode_base64($encoded);
.Ve
.Sp
.Vb 1
\&    print $encoded, "\en"; # "QWxhZGRpbjpvcGVuIHNlc2FtZQ=="
.Ve
.Sp
See MIME::Base64 for more information.
.IP "\(bu" 4
MIME::QuotedPrint, by Gisle Aas, allows you to encode data in
quoted-printable encoding.
.Sp
.Vb 1
\&    use MIME::QuotedPrint;
.Ve
.Sp
.Vb 2
\&    $encoded = encode_qp("Smiley in Unicode: \ex{263a}");
\&    $decoded = decode_qp($encoded);
.Ve
.Sp
.Vb 1
\&    print $encoded, "\en"; # "Smiley in Unicode: =263A"
.Ve
.Sp
MIME::QuotedPrint has been enhanced to provide the basic methods
necessary to use it with PerlIO::Via as in :
.Sp
.Vb 2
\&    use MIME::QuotedPrint;
\&    open($fh,">Via(MIME::QuotedPrint)",$path)
.Ve
.Sp
See MIME::QuotedPrint for more information.
.IP "\(bu" 4
PerlIO::Scalar, by Nick Ing\-Simmons, provides the implementation of
\&\s-1IO\s0 to \*(L"in memory\*(R" Perl scalars as discussed above.  It also serves as
an example of a loadable layer.  Other future possibilities include
PerlIO::Array and PerlIO::Code.  See PerlIO::Scalar for more
information.
.IP "\(bu" 4
PerlIO::Via, by Nick Ing\-Simmons, acts as a PerlIO layer and wraps
PerlIO layer functionality provided by a class (typically implemented
in perl code).
.Sp
.Vb 2
\&    use MIME::QuotedPrint;
\&    open($fh,">Via(MIME::QuotedPrint)",$path)
.Ve
.Sp
This will automatically convert everything output to \f(CW$fh\fR
to Quoted\-Printable.  See PerlIO::Via for more information.
.IP "\(bu" 4
Pod::Text::Overstrike, by Joe Smith, has been added.
It converts \s-1POD\s0 data to formatted overstrike text.
See Pod::Text::Overstrike for more information.
.IP "\(bu" 4
Switch from Damian Conway has been added.  Just by saying
.Sp
.Vb 1
\&    use Switch;
.Ve
.Sp
you have \f(CW\*(C`switch\*(C'\fR and \f(CW\*(C`case\*(C'\fR available in Perl.
.Sp
.Vb 1
\&    use Switch;
.Ve
.Sp
.Vb 1
\&    switch ($val) {
.Ve
.Sp
.Vb 11
\&                case 1          { print "number 1" }
\&                case "a"        { print "string a" }
\&                case [1..10,42] { print "number in list" }
\&                case (@array)   { print "number in list" }
\&                case /\ew+/      { print "pattern" }
\&                case qr/\ew+/    { print "pattern" }
\&                case (%hash)    { print "entry in hash" }
\&                case (\e%hash)   { print "entry in hash" }
\&                case (\e&sub)    { print "arg to subroutine" }
\&                else            { print "previous case not true" }
\&    }
.Ve
.Sp
See Switch for more information.
.IP "\(bu" 4
Text::Balanced from Damian Conway has been added, for
extracting delimited text sequences from strings.
.Sp
.Vb 1
\&    use Text::Balanced 'extract_delimited';
.Ve
.Sp
.Vb 1
\&    ($a, $b) = extract_delimited("'never say never', he never said", "'", '');
.Ve
.Sp
$a will be \*(L"'never say never'\*(R", \f(CW$b\fR will be ', he never said'.
.Sp
In addition to \fIextract_delimited()\fR there are also \fIextract_bracketed()\fR,
\&\fIextract_quotelike()\fR, \fIextract_codeblock()\fR, \fIextract_variable()\fR,
\&\fIextract_tagged()\fR, \fIextract_multiple()\fR, \fIgen_delimited_pat()\fR, and
\&\fIgen_extract_tagged()\fR.  With these you can implement rather advanced
parsing algorithms.  See Text::Balanced for more information.
.IP "\(bu" 4
Tie::RefHash::Nestable, by Edward Avis, allows storing hash references
(unlike the standard Tie::RefHash)  The module is contained within
Tie::RefHash.
.IP "\(bu" 4
XS::Typemap, by Tim Jenness, is a test extension that exercises \s-1XS\s0
typemaps.  Nothing gets installed but for extension writers the code
is worth studying.
.Sh "Updated And Improved Modules and Pragmata"
.IX Subsection "Updated And Improved Modules and Pragmata"
.IP "\(bu" 4
B::Deparse should be now more robust.  It still far from providing a full
round trip for any random piece of Perl code, though, and is under active
development: expect more robustness in 5.7.2.
.IP "\(bu" 4
Class::Struct can now define the classes in compile time.
.IP "\(bu" 4
Math::BigFloat has undergone much fixing, and in addition the \fIfmod()\fR
function now supports modulus operations.
.Sp
( The fixed Math::BigFloat module is also available in \s-1CPAN\s0 for those
who can't upgrade their Perl: http://www.cpan.org/authors/id/J/JP/JPEACOCK/ )
.IP "\(bu" 4
Devel::Peek now has an interface for the Perl memory statistics
(this works only if you are using perl's malloc, and if you have
compiled with debugging).
.IP "\(bu" 4
IO::Socket has now \fIatmark()\fR method, which returns true if the socket
is positioned at the out-of-band mark.  The method is also exportable
as a \fIsockatmark()\fR function.
.IP "\(bu" 4
IO::Socket::INET has support for ReusePort option (if your platform
supports it).  The Reuse option now has an alias, ReuseAddr.  For clarity
you may want to prefer ReuseAddr.
.IP "\(bu" 4
Net::Ping has been enhanced.  There is now \*(L"external\*(R" protocol which
uses Net::Ping::External module which runs external \fIping\fR\|(1) and parses
the output.  An alpha version of Net::Ping::External is available in
\&\s-1CPAN\s0 and in 5.7.2 the Net::Ping::External may be integrated to Perl.
.IP "\(bu" 4
The \f(CW\*(C`open\*(C'\fR pragma allows layers other than \*(L":raw\*(R" and \*(L":crlf\*(R" when
using PerlIO.
.IP "\(bu" 4
\&\fIPOSIX::sigaction()\fR is now much more flexible and robust.
You can now install coderef handlers, '\s-1DEFAULT\s0', and '\s-1IGNORE\s0'
handlers, installing new handlers was not atomic.
.IP "\(bu" 4
The Test module has been significantly enhanced.  Its use is
greatly recommended for module writers.
.IP "\(bu" 4
The utf8:: name space (as in the pragma) provides various
Perl-callable functions to provide low level access to Perl's
internal Unicode representation.  At the moment only \fIlength()\fR
has been implemented.
.PP
The following modules have been upgraded from the versions at \s-1CPAN:\s0
\&\s-1CPAN\s0, \s-1CGI\s0, DB_File, File::Temp, Getopt::Long, Pod::Man, Pod::Text,
Storable, Text\-Tabs+Wrap.
.SH "Performance Enhancements"
.IX Header "Performance Enhancements"
.IP "\(bu" 4
Hashes now use Bob Jenkins \*(L"One\-at\-a\-Time\*(R" hashing key algorithm
( http://burtleburtle.net/bob/hash/doobs.html ).  This algorithm is
reasonably fast while producing a much better spread of values than
the old hashing algorithm (originally by Chris Torek, later tweaked by
Ilya Zakharevich).  Hash values output from the algorithm on a hash of
all 3\-char printable \s-1ASCII\s0 keys comes much closer to passing the
\&\s-1DIEHARD\s0 random number generation tests.  According to perlbench, this
change has not affected the overall speed of Perl.
.IP "\(bu" 4
\&\fIunshift()\fR should now be noticeably faster.
.SH "Utility Changes"
.IX Header "Utility Changes"
.IP "\(bu" 4
h2xs now produces template \s-1README\s0.
.IP "\(bu" 4
s2p has been completely rewritten in Perl.  (It is in fact a full
implementation of sed in Perl.)
.IP "\(bu" 4
xsubpp now supports \s-1OUT\s0 keyword.
.SH "New Documentation"
.IX Header "New Documentation"
.Sh "perlclib"
.IX Subsection "perlclib"
Internal replacements for standard C library functions.
(Interesting only for extension writers and Perl core hackers.)
.Sh "perliol"
.IX Subsection "perliol"
Internals of PerlIO with layers.
.Sh "\s-1README\s0.aix"
.IX Subsection "README.aix"
Documentation on compiling Perl on \s-1AIX\s0 has been added.  \s-1AIX\s0 has
several different C compilers and getting the right patch level
is essential.  On install \s-1README\s0.aix will be installed as perlaix.
.Sh "\s-1README\s0.bs2000"
.IX Subsection "README.bs2000"
Documentation on compiling Perl on the POSIX-BC platform (an \s-1EBCDIC\s0
mainframe environment) has been added.
.PP
This was formerly known as \s-1README\s0.posix\-bc but the name was considered
to be too confusing (it has nothing to do with the \s-1POSIX\s0 module or the
\&\s-1POSIX\s0 standard).  On install \s-1README\s0.bs2000 will be installed as perlbs2000.
.Sh "\s-1README\s0.macos"
.IX Subsection "README.macos"
In perl 5.7.1 (and in the 5.6.1) the MacPerl sources have been
synchronised with the standard Perl sources.  To compile MacPerl
some additional steps are required, and this file documents those
steps.  On install \s-1README\s0.macos will be installed as perlmacos.
.Sh "\s-1README\s0.mpeix"
.IX Subsection "README.mpeix"
The \s-1README\s0.mpeix has been podified, which means that this information
about compiling and using Perl on the MPE/iX miniframe platform will
be installed as perlmpeix.
.Sh "\s-1README\s0.solaris"
.IX Subsection "README.solaris"
\&\s-1README\s0.solaris has been created and Solaris wisdom from elsewhere
in the Perl documentation has been collected there.  On install
\&\s-1README\s0.solaris will be installed as perlsolaris.
.Sh "\s-1README\s0.vos"
.IX Subsection "README.vos"
The \s-1README\s0.vos has been podified, which means that this information
about compiling and using Perl on the Stratus \s-1VOS\s0 miniframe platform
will be installed as perlvos.
.Sh "Porting/repository.pod"
.IX Subsection "Porting/repository.pod"
Documentation on how to use the Perl source repository has been added.
.SH "Installation and Configuration Improvements"
.IX Header "Installation and Configuration Improvements"
.IP "\(bu" 4
Because PerlIO is now the default on most platforms, \*(L"\-perlio\*(R" doesn't
get appended to the \f(CW$Config\fR{archname} (also known as $^O) anymore.
Instead, if you explicitly choose not to use perlio (Configure command
line option \-Uuseperlio), you will get \*(L"\-stdio\*(R" appended.
.IP "\(bu" 4
Another change related to the architecture name is that \*(L"\-64all\*(R"
(\-Duse64bitall, or \*(L"maximally 64\-bit\*(R") is appended only if your
pointers are 64 bits wide.  (To be exact, the use64bitall is ignored.)
.IP "\(bu" 4
\&\s-1APPLLIB_EXP\s0, a less-know configuration-time definition, has been
documented.  It can be used to prepend site-specific directories
to Perl's default search path (@INC), see \s-1INSTALL\s0 for information.
.IP "\(bu" 4
Building Berkeley \s-1DB3\s0 for compatibility modes for \s-1DB\s0, \s-1NDBM\s0, and \s-1ODBM\s0
has been documented in \s-1INSTALL\s0.
.IP "\(bu" 4
If you are on \s-1IRIX\s0 or Tru64 platforms, new profiling/debugging options
have been added, see perlhack for more information about pixie and
Third Degree.
.Sh "New Or Improved Platforms"
.IX Subsection "New Or Improved Platforms"
For the list of platforms known to support Perl,
see \*(L"Supported Platforms\*(R" in perlport.
.IP "\(bu" 4
\&\s-1AIX\s0 dynamic loading should be now better supported.
.IP "\(bu" 4
After a long pause, AmigaOS has been verified to be happy with Perl.
.IP "\(bu" 4
\&\s-1EBCDIC\s0 platforms (z/OS, also known as \s-1OS/390\s0, \s-1POSIX\-BC\s0, and \s-1VM/ESA\s0)
have been regained.  Many test suite tests still fail and the
co-existence of Unicode and \s-1EBCDIC\s0 isn't quite settled, but the
situation is much better than with Perl 5.6.  See perlos390,
perlbs2000 (for \s-1POSIX\-BC\s0), and perlvmesa for more information.
.IP "\(bu" 4
Building perl with \-Duseithreads or \-Duse5005threads now works under
HP-UX 10.20 (previously it only worked under 10.30 or later). You will
need a thread library package installed. See \s-1README\s0.hpux.
.IP "\(bu" 4
Mac \s-1OS\s0 Classic (MacPerl has of course been available since
perl 5.004 but now the source code bases of standard Perl
and MacPerl have been synchronised)
.IP "\(bu" 4
\&\s-1NCR\s0 MP-RAS is now supported.
.IP "\(bu" 4
NonStop-UX is now supported.
.IP "\(bu" 4
Amdahl \s-1UTS\s0 is now supported.
.IP "\(bu" 4
z/OS (formerly known as \s-1OS/390\s0, formerly known as \s-1MVS\s0 \s-1OE\s0) has now
support for dynamic loading.  This is not selected by default,
however, you must specify \-Dusedl in the arguments of Configure.
.Sh "Generic Improvements"
.IX Subsection "Generic Improvements"
.IP "\(bu" 4
Configure no longer includes the \s-1DBM\s0 libraries (dbm, gdbm, db, ndbm)
when building the Perl binary.  The only exception to this is SunOS 4.x,
which needs them.
.IP "\(bu" 4
Some new Configure symbols, useful for extension writers:
.RS 4
.IP "d_cmsghdr" 8
.IX Item "d_cmsghdr"
For struct cmsghdr.
.IP "d_fcntl_can_lock" 8
.IX Item "d_fcntl_can_lock"
Whether \fIfcntl()\fR can be used for file locking.
.IP "d_fsync" 8
.IX Item "d_fsync"
.PD 0
.IP "d_getitimer" 8
.IX Item "d_getitimer"
.IP "d_getpagsz" 8
.IX Item "d_getpagsz"
.PD
For \fIgetpagesize()\fR, though you should prefer POSIX::sysconf(_SC_PAGE_SIZE))
.IP "d_msghdr_s" 8
.IX Item "d_msghdr_s"
For struct msghdr.
.IP "need_va_copy" 8
.IX Item "need_va_copy"
Whether one needs to use \fIPerl_va_copy()\fR to copy varargs.
.IP "d_readv" 8
.IX Item "d_readv"
.PD 0
.IP "d_recvmsg" 8
.IX Item "d_recvmsg"
.IP "d_sendmsg" 8
.IX Item "d_sendmsg"
.IP "sig_size" 8
.IX Item "sig_size"
.PD
The number of elements in an array needed to hold all the available signals.
.IP "d_sockatmark" 8
.IX Item "d_sockatmark"
.PD 0
.IP "d_strtoq" 8
.IX Item "d_strtoq"
.IP "d_u32align" 8
.IX Item "d_u32align"
.PD
Whether one needs to access character data aligned by U32 sized pointers.
.IP "d_ualarm" 8
.IX Item "d_ualarm"
.PD 0
.IP "d_usleep" 8
.IX Item "d_usleep"
.RE
.RS 4
.RE
.IP "\(bu" 4
.PD
Removed Configure symbols: the \s-1PDP\-11\s0 memory model settings: huge,
large, medium, models.
.IP "\(bu" 4
\&\s-1SOCKS\s0 support is now much more robust.
.IP "\(bu" 4
If your file system supports symbolic links you can build Perl outside
of the source directory by
.Sp
.Vb 3
\&        mkdir /tmp/perl/build/directory
\&        cd /tmp/perl/build/directory
\&        sh /path/to/perl/source/Configure -Dmksymlinks ...
.Ve
.Sp
This will create in /tmp/perl/build/directory a tree of symbolic links
pointing to files in /path/to/perl/source.  The original files are left
unaffected.  After Configure has finished you can just say
.Sp
.Vb 1
\&        make all test
.Ve
.Sp
and Perl will be built and tested, all in /tmp/perl/build/directory.
.SH "Selected Bug Fixes"
.IX Header "Selected Bug Fixes"
Numerous memory leaks and uninitialized memory accesses have been hunted down.
Most importantly anonymous subs used to leak quite a bit.
.IP "\(bu" 4
chop(@list) in list context returned the characters chopped in
reverse order.  This has been reversed to be in the right order.
.IP "\(bu" 4
The order of DESTROYs has been made more predictable.
.IP "\(bu" 4
\&\fImkdir()\fR now ignores trailing slashes in the directory name,
as mandated by \s-1POSIX\s0.
.IP "\(bu" 4
Attributes (like :shared) didn't work with \fIour()\fR.
.IP "\(bu" 4
The \s-1PERL5OPT\s0 environment variable (for passing command line arguments
to Perl) didn't work for more than a single group of options.
.IP "\(bu" 4
The tainting behaviour of \fIsprintf()\fR has been rationalized.  It does
not taint the result of floating point formats anymore, making the
behaviour consistent with that of string interpolation.
.IP "\(bu" 4
All but the first argument of the \s-1IO\s0 \fIsyswrite()\fR method are now optional.
.IP "\(bu" 4
Tie::ARRAY \s-1SPLICE\s0 method was broken.
.IP "\(bu" 4
\&\fIvec()\fR now tries to work with characters <= 255 when possible, but it leaves
higher character values in place.  In that case, if \fIvec()\fR was used to modify
the string, it is no longer considered to be utf8\-encoded.
.Sh "Platform Specific Changes and Fixes"
.IX Subsection "Platform Specific Changes and Fixes"
.IP "\(bu" 4
Linux previously had problems related to sockaddrlen when using
\&\fIaccept()\fR, \fIrevcfrom()\fR (in Perl: \fIrecv()\fR), \fIgetpeername()\fR, and \fIgetsockname()\fR.
.IP "\(bu" 4
Previously DYNIX/ptx had problems in its Configure probe for non-blocking I/O.
.IP "\(bu" 4
Windows
.RS 4
.IP "\(bu" 8
Borland \*(C+ v5.5 is now a supported compiler that can build Perl.
However, the generated binaries continue to be incompatible with those
generated by the other supported compilers (\s-1GCC\s0 and Visual \*(C+).
.IP "\(bu" 8
\&\fIWin32::GetCwd()\fR correctly returns C:\e instead of C: when at the drive root.
Other bugs in \fIchdir()\fR and \fICwd::cwd()\fR have also been fixed.
.IP "\(bu" 8
Duping socket handles with open(F, \*(L">&MYSOCK\*(R") now works under Windows 9x.
.IP "\(bu" 8
\&\s-1HTML\s0 files will be installed in c:\eperl\ehtml instead of c:\eperl\elib\epod\ehtml
.IP "\(bu" 8
The makefiles now provide a single switch to bulk-enable all the features
enabled in ActiveState ActivePerl (a popular binary distribution).
.RE
.RS 4
.RE
.SH "New or Changed Diagnostics"
.IX Header "New or Changed Diagnostics"
Two new debugging options have been added: if you have compiled your
Perl with debugging, you can use the \-DT and \-DR options to trace
tokenising and to add reference counts to displaying variables,
respectively.
.IP "\(bu" 4
If an attempt to use a (non\-blessed) reference as an array index
is made, a warning is given.
.IP "\(bu" 4
\&\f(CW\*(C`push @a;\*(C'\fR and \f(CW\*(C`unshift @a;\*(C'\fR (with no values to push or unshift)
now give a warning.  This may be a problem for generated and evaled
code.
.SH "Changed Internals"
.IX Header "Changed Internals"
.IP "\(bu" 4
Some new APIs: \fIptr_table_clear()\fR, \fIptr_table_free()\fR, \fIsv_setref_uv()\fR.
For the full list of the available APIs see perlapi.
.IP "\(bu" 4
dTHR and djSP have been obsoleted; the former removed (because it's
a no\-op) and the latter replaced with dSP.
.IP "\(bu" 4
Perl now uses system malloc instead of Perl malloc on all 64\-bit
platforms, and even in some not\-always\-64\-bit platforms like \s-1AIX\s0,
\&\s-1IRIX\s0, and Solaris.  This change breaks backward compatibility but
Perl's malloc has problems with large address spaces and also the
speed of vendors' malloc is generally better in large address space
machines (Perl's malloc is mostly tuned for space).
.SH "New Tests"
.IX Header "New Tests"
Many new tests have been added.  The most notable is probably the
lib/1_compile: it is very notable because running it takes quite a
long time \*(-- it test compiles all the Perl modules in the distribution.
Please be patient.
.SH "Known Problems"
.IX Header "Known Problems"
Note that unlike other sections in this document (which describe
changes since 5.7.0) this section is cumulative containing known
problems for all the 5.7 releases.
.Sh "\s-1AIX\s0 vac 5.0.0.0 May Produce Buggy Code For Perl"
.IX Subsection "AIX vac 5.0.0.0 May Produce Buggy Code For Perl"
The \s-1AIX\s0 C compiler vac version 5.0.0.0 may produce buggy code,
resulting in few random tests failing, but when the failing tests
are run by hand, they succeed.  We suggest upgrading to at least
vac version 5.0.1.0, that has been known to compile Perl correctly.
\&\*(L"lslpp \-L|grep vac.C\*(R" will tell you the vac version.
.Sh "lib/ftmp\-security tests warn 'system possibly insecure'"
.IX Subsection "lib/ftmp-security tests warn 'system possibly insecure'"
Don't panic.  Read \s-1INSTALL\s0 'make test' section instead.
.Sh "lib/io_multihomed Fails In LP64\-Configured HP-UX"
.IX Subsection "lib/io_multihomed Fails In LP64-Configured HP-UX"
The lib/io_multihomed test may hang in HP-UX if Perl has been
configured to be 64\-bit. Because other 64\-bit platforms do not hang in
this test, HP-UX is suspect. All other tests pass in 64\-bit \s-1HP\-UX\s0. The
test attempts to create and connect to \*(L"multihomed\*(R" sockets (sockets
which have multiple \s-1IP\s0 addresses).
.Sh "Test lib/posix Subtest 9 Fails In LP64\-Configured HP-UX"
.IX Subsection "Test lib/posix Subtest 9 Fails In LP64-Configured HP-UX"
If perl is configured with \-Duse64bitall, the successful result of the
subtest 10 of lib/posix may arrive before the successful result of the
subtest 9, which confuses the test harness so much that it thinks the
subtest 9 failed.
.Sh "lib/b test 19"
.IX Subsection "lib/b test 19"
The test fails on various platforms (\s-1PA64\s0 and \s-1IA64\s0 are known), but the
exact cause is still being investigated.
.Sh "Linux With Sfio Fails op/misc Test 48"
.IX Subsection "Linux With Sfio Fails op/misc Test 48"
No known fix.
.Sh "sigaction test 13 in \s-1VMS\s0"
.IX Subsection "sigaction test 13 in VMS"
The test is known to fail; whether it's because of \s-1VMS\s0 of because
of faulty test is not known.
.Sh "sprintf tests 129 and 130"
.IX Subsection "sprintf tests 129 and 130"
The op/sprintf tests 129 and 130 are known to fail on some platforms.
Examples include any platform using sfio, and Compaq/Tandem's NonStop\-UX.
The failing platforms do not comply with the \s-1ANSI\s0 C Standard, line
19ff on page 134 of \s-1ANSI\s0 X3.159 1989 to be exact.  (They produce
something else than \*(L"1\*(R" and \*(L"\-1\*(R" when formatting 0.6 and \-0.6 using
the printf format \*(L"%.0f\*(R", most often they produce \*(L"0\*(R" and \*(L"\-0\*(R".)
.Sh "Failure of Thread tests"
.IX Subsection "Failure of Thread tests"
The subtests 19 and 20 of lib/thr5005.t test are known to fail due to
fundamental problems in the 5.005 threading implementation. These are
not new failures\*(--Perl 5.005_0x has the same bugs, but didn't have
these tests. (Note that support for 5.005\-style threading remains
experimental.)
.Sh "Localising a Tied Variable Leaks Memory"
.IX Subsection "Localising a Tied Variable Leaks Memory"
.Vb 2
\&    use Tie::Hash;
\&    tie my %tie_hash => 'Tie::StdHash';
.Ve
.PP
.Vb 1
\&    ...
.Ve
.PP
.Vb 1
\&    local($tie_hash{Foo}) = 1; # leaks
.Ve
.PP
Code like the above is known to leak memory every time the \fIlocal()\fR
is executed.
.Sh "Self-tying of Arrays and Hashes Is Forbidden"
.IX Subsection "Self-tying of Arrays and Hashes Is Forbidden"
Self-tying of arrays and hashes is broken in rather deep and
hard-to-fix ways.  As a stop-gap measure to avoid people from getting
frustrated at the mysterious results (core dumps, most often) it is
for now forbidden (you will get a fatal error even from an attempt).
.Sh "Building Extensions Can Fail Because Of Largefiles"
.IX Subsection "Building Extensions Can Fail Because Of Largefiles"
Some extensions like mod_perl are known to have issues with
`largefiles', a change brought by Perl 5.6.0 in which file offsets
default to 64 bits wide, where supported.  Modules may fail to compile
at all or compile and work incorrectly.  Currently there is no good
solution for the problem, but Configure now provides appropriate
non-largefile ccflags, ldflags, libswanted, and libs in the \f(CW%Config\fR
hash (e.g., \f(CW$Config\fR{ccflags_nolargefiles}) so the extensions that are
having problems can try configuring themselves without the
largefileness.  This is admittedly not a clean solution, and the
solution may not even work at all.  One potential failure is whether
one can (or, if one can, whether it's a good idea) link together at
all binaries with different ideas about file offsets, all this is
platform\-dependent.
.Sh "The Compiler Suite Is Still Experimental"
.IX Subsection "The Compiler Suite Is Still Experimental"
The compiler suite is slowly getting better but is nowhere near
working order yet.
.SH "Reporting Bugs"
.IX Header "Reporting Bugs"
If you find what you think is a bug, you might check the articles
recently posted to the comp.lang.perl.misc newsgroup and the perl
bug database at http://bugs.perl.org/  There may also be
information at http://www.perl.com/perl/ , the Perl Home Page.
.PP
If you believe you have an unreported bug, please run the \fBperlbug\fR
program included with your release.  Be sure to trim your bug down
to a tiny but sufficient test case.  Your bug report, along with the
output of \f(CW\*(C`perl \-V\*(C'\fR, will be sent off to [email protected] to be
analysed by the Perl porting team.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
The \fIChanges\fR file for exhaustive details on what changed.
.PP
The \fI\s-1INSTALL\s0\fR file for how to build Perl.
.PP
The \fI\s-1README\s0\fR file for general stuff.
.PP
The \fIArtistic\fR and \fICopying\fR files for copyright information.
.SH "HISTORY"
.IX Header "HISTORY"
Written by Jarkko Hietaniemi <\[email protected]\fR>, with many contributions
from The Perl Porters and Perl Users submitting feedback and patches.
.PP
Send omissions or corrections to <\[email protected]\fR>.

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].