3 perl571delta - what's new for perl v5.7.1
7 This document describes differences between the 5.7.0 release and the
10 (To view the differences between the 5.6.0 release and the 5.7.0
11 release, see L<perl570delta>).
13 =head1 Incompatible Changes
19 Although "you shouldn't do that", it was possible to write code that
20 depends on Perl's hashed key order (Data::Dumper does this). The new
21 algorithm "One-at-a-Time" produces a different hashed key order.
22 More details are in L<perldelta/Performance Enhancements>.
26 =head1 Core Enhancements
32 Anonymous temporary files are available without need to
33 'use FileHandle' or other module via
35 open($fh,"+>", undef) || ...
39 IO is now by default done via PerlIO rather than system's "stdio".
40 PerlIO allows "layers" to be "pushed" onto a file handle to alter the
41 handle's behaviour. Layers can be specified at open time via 3-arg
44 open($fh,'>:crlf :utf8', $path) || ...
46 or on already opened handles via extended C<binmode>:
48 binmode($fh,':encoding(iso-8859-7)');
50 The built-in layers are: unix (low level read/write), stdio (as in
51 previous Perls), perlio (re-implementation of stdio buffering in a
52 portable manner), crlf (does CRLF <=> "\n" translation as on Win32,
53 but available on any platform). A mmap layer may be available if
54 platform supports it (mostly UNIXes).
56 Layers to be applied by default may be specified via the 'open' pragma.
60 File handles can be marked as accepting Perl's internal encoding of Unicode
61 (UTF-8 or UTF-EBCDIC depending on platfrom) by a pseudo layer ":utf8" :
63 open($fh,">:utf8","Uni.txt");
67 File handles can translate character encodings from/to Perl's internal
68 Unicode form on read/write via the ":encoding()" layer.
72 File handles can be opened to "in memory" files held in Perl scalars via:
74 open($fh,'>', \$variable) || ...
78 Formats now support zero-padded decimal fields.
82 The list form of C<open> is now implemented for pipes (at least on UNIX):
84 open($fh,"-|", 'cat', '/etc/motd')
86 creates a pipe, and runs the equivalent of exec('cat', '/etc/motd') in
91 The printf and sprintf now support parameter reordering using the
92 C<%\d+\$> and C<*\d+\$> syntaxes.
96 =head1 Performance Enhancements
102 Hashes now use Bob Jenkins "One-at-a-Time" hashing key algorithm
103 (http://burtleburtle.net/bob/hash/doobs.html).
104 This algorithm is reasonably fast while producing a much better spread
105 of values. Hash values output from the algorithm on a hash of all
106 3-char printable ASCII keys comes much closer to passing the DIEHARD
107 random number generation tests. According to perlbench, this change
108 has not affected the overall speed of Perl.
112 =head1 Installation and Configuration Improvements
118 Configure no longer includes the DBM libraries (dbm, gdbm, db, ndbm)
119 when building the Perl binary. The only exception to this is SunOS 4.x,
124 =head1 Selected Bug Fixes
130 vec() now tries to work with characters <= 255 when possible, but it leaves
131 higher character values in place. In that case, if vec() was used to modify
132 the string, it is no longer considered to be utf8-encoded.
136 =head1 Core Enhancements
144 Encode provides a mechanism to translate between different character
145 encodings. Support for Unicode, ISO-8859-*, ASCII, CP*, KOI8-R, and
146 three variants of EBCDIC are compiled in to the module. Several other
147 encodings (like Japanese, Chinese, and MacIntosh encodings) are
148 included and will be loaded at runtime.
152 Any encoding supported by Encode module is also available to the
153 ":encoding()" layer if PerlIO is used.
157 PerlIO::Scalar provides the IO to "in memory" perl scalars discussed
158 above. It also serves as an example of a loadable layer.
162 PerlIO::Via acts as a PerlIO layer and wraps PerlIO layer
163 functionality provided by a class (typically implemented in
168 MIME::QuotedPrint has been enhanced to provide the basic methods
169 necessary to use it with PerlIO::Via as in :
171 use MIME::QuotedPrint;
172 open($fh,">Via(MIME::QuotedPrint)",$path)
176 =head2 Updated And Improved Modules and Pragmata
182 The C<open> pragma allows layers other than ":raw" and ":crlf" when
187 The utf8:: name space (as in the pragma) provides various
188 Perl-callable functions to provide low level access to Perl's
189 internal Unicode representation.
193 =head1 Known Problems
195 =head2 sprintf tests 129 and 130
197 The op/sprintf tests 129 and 130 are known to fail in some platforms.
198 Examples include any platform using sfio, and Tandem's NonStop-UX.
199 The failing platforms do not comply with the ANSI C Standard, line
200 19ff on page 134 of ANSI X3.159 1989 to be exact. (They produce
201 something else than "1" and "-1" when formatting 0.6 and -0.6 using
202 the printf format "%.0f", most often they produce "0" and "-0".)
204 =head1 Reporting Bugs
206 If you find what you think is a bug, you might check the articles
207 recently posted to the comp.lang.perl.misc newsgroup and the perl
208 bug database at http://bugs.perl.org. There may also be
209 information at http://www.perl.com/perl/, the Perl Home Page.
211 If you believe you have an unreported bug, please run the B<perlbug>
212 program included with your release. Be sure to trim your bug down
213 to a tiny but sufficient test case. Your bug report, along with the
214 output of C<perl -V>, will be sent off to perlbug@perl.org to be
215 analysed by the Perl porting team.
219 The F<Changes> file for exhaustive details on what changed.
221 The F<INSTALL> file for how to build Perl.
223 The F<README> file for general stuff.
225 The F<Artistic> and F<Copying> files for copyright information.
229 Written by Jarkko Hietaniemi <F<jhi@iki.fi>>, with many contributions
230 from The Perl Porters and Perl Users submitting feedback and patches.
232 Send omissions or corrections to <F<perlbug@perl.org>>.