This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
doc nits
[perl5.git] / pod / perl571delta.pod
CommitLineData
d468ca04
JH
1=head1 NAME
2
3perl571delta - what's new for perl v5.7.1
4
5=head1 DESCRIPTION
6
7This document describes differences between the 5.7.0 release and the
85.7.1 release.
9
10(To view the differences between the 5.6.0 release and the 5.7.0
43d4bbc8 11release, see L<perl570delta>.)
d468ca04 12
6a9b4349
JH
13=head1 Security Vulnerability Closed
14
15(This change was already made in 5.7.0 but bears repeating here.)
16
17A potential security vulnerability in the optional suidperl component
18of Perl was identified in August 2000. suidperl is neither built nor
19installed by default. As of April 2001 the only known vulnerable
20platform is Linux, most likely all Linux distributions. CERT and
21various vendors and distributors have been alerted about the vulnerability.
22See http://www.cpan.org/src/5.0/sperl-2000-08-05/sperl-2000-08-05.txt
23for more information.
24
25The problem was caused by Perl trying to report a suspected security
26exploit attempt using an external program, /bin/mail. On Linux
27platforms the /bin/mail program had an undocumented feature which
28when combined with suidperl gave access to a root shell, resulting in
29a serious compromise instead of reporting the exploit attempt. If you
30don't have /bin/mail, or if you have 'safe setuid scripts', or if
31suidperl is not installed, you are safe.
32
33The exploit attempt reporting feature has been completely removed from
34all the Perl 5.7 releases (and will be gone also from the maintenance
35release 5.6.1), so that particular vulnerability isn't there anymore.
36However, further security vulnerabilities are, unfortunately, always
37possible. The suidperl code is being reviewed and if deemed too risky
38to continue to be supported, it may be completely removed from future
39releases. In any case, suidperl should only be used by security
40experts who know exactly what they are doing and why they are using
1577cd80
JH
41suidperl instead of some other solution such as sudo
42( see http://www.courtesan.com/sudo/ ).
6a9b4349 43
d468ca04
JH
44=head1 Incompatible Changes
45
46=over 4
47
48=item *
49
50Although "you shouldn't do that", it was possible to write code that
51depends on Perl's hashed key order (Data::Dumper does this). The new
52algorithm "One-at-a-Time" produces a different hashed key order.
6a9b4349
JH
53More details are in L</"Performance Enhancements">.
54
55=item *
56
57The list of filenames from glob() (or <...>) is now by default sorted
58alphabetically to be csh-compliant. (bsd_glob() does still sort platform
59natively, ASCII or EBCDIC, unless GLOB_ALPHASORT is specified.)
d468ca04
JH
60
61=back
62
63=head1 Core Enhancements
64
f1a1024e 65=head2 AUTOLOAD Is Now Lvaluable
d468ca04 66
66917b5b
JH
67AUTOLOAD is now lvaluable, meaning that you can add the :lvalue attribute
68to AUTOLOAD subroutines and you can assign to the AUTOLOAD return value.
65db4721 69
43d4bbc8
JH
70=head2 PerlIO is Now The Default
71
72=over 4
73
65db4721
JH
74=item *
75
76IO is now by default done via PerlIO rather than system's "stdio".
77PerlIO allows "layers" to be "pushed" onto a file handle to alter the
78handle's behaviour. Layers can be specified at open time via 3-arg
79form of open:
80
81 open($fh,'>:crlf :utf8', $path) || ...
82
83or on already opened handles via extended C<binmode>:
84
85 binmode($fh,':encoding(iso-8859-7)');
86
87The built-in layers are: unix (low level read/write), stdio (as in
88previous Perls), perlio (re-implementation of stdio buffering in a
89portable manner), crlf (does CRLF <=> "\n" translation as on Win32,
90but available on any platform). A mmap layer may be available if
91platform supports it (mostly UNIXes).
92
93Layers to be applied by default may be specified via the 'open' pragma.
94
6a9b4349
JH
95See L</"Installation and Configuration Improvements"> for the effects
96of PerlIO on your architecture name.
97
65db4721
JH
98=item *
99
100File handles can be marked as accepting Perl's internal encoding of Unicode
e49a87d3 101(UTF-8 or UTF-EBCDIC depending on platform) by a pseudo layer ":utf8" :
65db4721
JH
102
103 open($fh,">:utf8","Uni.txt");
104
7221edc9
JH
105Note for EBCDIC users: the pseudo layer ":utf8" is erroneously named
106for you since it's not UTF-8 what you will be getting but instead
107UTF-EBCDIC. See L<perlunicode>, L<utf8>, and
108http://www.unicode.org/unicode/reports/tr16/ for more information.
109In future releases this naming may change.
66917b5b 110
65db4721
JH
111=item *
112
113File handles can translate character encodings from/to Perl's internal
114Unicode form on read/write via the ":encoding()" layer.
115
116=item *
117
118File handles can be opened to "in memory" files held in Perl scalars via:
119
120 open($fh,'>', \$variable) || ...
121
122=item *
123
6a9b4349
JH
124Anonymous temporary files are available without need to
125'use FileHandle' or other module via
126
127 open($fh,"+>", undef) || ...
128
129That is a literal undef, not an undefined value.
d468ca04
JH
130
131=item *
65db4721
JH
132
133The list form of C<open> is now implemented for pipes (at least on UNIX):
134
135 open($fh,"-|", 'cat', '/etc/motd')
136
137creates a pipe, and runs the equivalent of exec('cat', '/etc/motd') in
138the child process.
139
140=item *
6a9b4349 141
31d2fa6a 142The following builtin functions are now overridable: chop(), chomp(),
66917b5b 143each(), keys(), pop(), push(), shift(), splice(), unshift().
6a9b4349
JH
144
145=item *
146
147Formats now support zero-padded decimal fields.
148
149=item *
150
151Perl now tries internally to use integer values in numeric conversions
152and basic arithmetics (+ - * /) if the arguments are integers, and
153tries also to keep the results stored internally as integers.
154This change leads into often slightly faster and always less lossy
3a2c142b
MG
155arithmetics. (Previously Perl always preferred floating point numbers
156in its math.)
6a9b4349
JH
157
158=item *
3b131e01 159
66917b5b
JH
160The printf() and sprintf() now support parameter reordering using the
161C<%\d+\$> and C<*\d+\$> syntaxes. For example
162
163 print "%2\$s %1\$s\n", "foo", "bar";
164
165will print "bar foo\n"; This feature helps in writing
166internationalised software.
d468ca04 167
6a9b4349
JH
168=item *
169
170Unicode in general should be now much more usable. Unicode can be
171used in hash keys, Unicode in regular expressions should work now,
172Unicode in tr/// should work now (though tr/// seems to be a
173particularly tricky to get right, so you have been warned)
174
175=item *
176
177The Unicode Character Database coming with Perl has been upgraded
1577cd80 178to Unicode 3.1. For more information, see http://www.unicode.org/ ,
66917b5b
JH
179and http://www.unicode.org/unicode/reports/tr27/
180
31d2fa6a 181For developers interested in enhancing Perl's Unicode capabilities:
66917b5b
JH
182almost all the UCD files are included with the Perl distribution in
183the lib/unicode subdirectory. The most notable omission, for space
184considerations, is the Unihan database.
6a9b4349
JH
185
186=item *
187
188The Unicode character classes \p{Blank} and \p{SpacePerl} have been
189added. "Blank" is like C isblank(), that is, it contains only
190"horizontal whitespace" (the space character is, the newline isn't),
191and the "SpacePerl" is the Unicode equivalent of C<\s> (\p{Space}
192isn't, since that includes the vertical tabulator character, whereas
193C<\s> doesn't.)
194
195=back
196
43d4bbc8
JH
197=head2 Signals Are Now Safe
198
199Perl used to be fragile in that signals arriving at inopportune moments
200could corrupt Perl's internal state.
201
3b131e01 202=head1 Modules and Pragmata
6a9b4349
JH
203
204=head2 New Modules
205
206=over 4
207
208=item *
209
7221edc9 210B::Concise, by Stephen McCamant, is a new compiler backend for
31d2fa6a
JH
211walking the Perl syntax tree, printing concise info about ops.
212The output is highly customisable.
213
214See L<B::Concise> for more information.
6a9b4349
JH
215
216=item *
217
7221edc9
JH
218Class::ISA, by Sean Burke, for reporting the search path for a
219class's ISA tree, has been added.
6a9b4349 220
31d2fa6a
JH
221See L<Class::ISA> for more information.
222
6a9b4349
JH
223=item *
224
225Cwd has now a split personality: if possible, an extension is used,
226(this will hopefully be both faster and more secure and robust) but
227if not possible, the familiar Perl library implementation is used.
228
229=item *
230
8b40ef3a 231Digest, a frontend module for calculating digests (checksums),
6a9b4349
JH
232from Gisle Aas, has been added.
233
31d2fa6a
JH
234See L<Digest> for more information.
235
6a9b4349
JH
236=item *
237
7221edc9 238Digest::MD5 for calculating MD5 digests (checksums), by Gisle Aas,
6a9b4349
JH
239has been added.
240
3b131e01
JH
241 use Digest::MD5 'md5_hex';
242
243 $digest = md5_hex("Thirsty Camel");
244
245 print $digest, "\n"; # 01d19d9d2045e005c3f1b80e8b164de1
246
3a2c142b 247NOTE: the MD5 backward compatibility module is deliberately not
6a9b4349
JH
248included since its use is discouraged.
249
31d2fa6a
JH
250See L<Digest::MD5> for more information.
251
6a9b4349
JH
252=item *
253
7221edc9 254Encode, by Nick Ing-Simmons, provides a mechanism to translate
31d2fa6a
JH
255between different character encodings. Support for Unicode,
256ISO-8859-*, ASCII, CP*, KOI8-R, and three variants of EBCDIC are
257compiled in to the module. Several other encodings (like Japanese,
258Chinese, and MacIntosh encodings) are included and will be loaded at
259runtime.
6a9b4349
JH
260
261Any encoding supported by Encode module is also available to the
262":encoding()" layer if PerlIO is used.
263
31d2fa6a
JH
264See L<Encode> for more information.
265
6a9b4349
JH
266=item *
267
8b40ef3a 268Filter::Simple is an easy-to-use frontend to Filter::Util::Call,
6a9b4349
JH
269from Damian Conway.
270
3b131e01
JH
271 # in MyFilter.pm:
272
273 package MyFilter;
274
275 use Filter::Simple sub {
276 while (my ($from, $to) = splice @_, 0, 2) {
277 s/$from/$to/g;
278 }
279 };
280
281 1;
282
283 # in user's code:
284
285 use MyFilter qr/red/ => 'green';
286
287 print "red\n"; # this code is filtered, will print "green\n"
288 print "bored\n"; # this code is filtered, will print "bogreen\n"
289
290 no MyFilter;
291
292 print "red\n"; # this code is not filtered, will print "red\n"
293
31d2fa6a
JH
294See L<Filter::Simple> for more information.
295
6a9b4349
JH
296=item *
297
7221edc9 298Filter::Util::Call, by Paul Marquess, provides you with the
6a9b4349 299framework to write I<Source Filters> in Perl. For most uses
8b40ef3a 300the frontend Filter::Simple is to be preferred.
31d2fa6a 301See L<Filter::Util::Call> for more information.
6a9b4349
JH
302
303=item *
304
305Locale::Constants, Locale::Country, Locale::Currency, and Locale::Language,
306from Neil Bowers, have been added. They provide the codes for various
307locale standards, such as "fr" for France, "usd" for US Dollar, and
308"jp" for Japanese.
309
3b131e01 310 use Locale::Country;
31d2fa6a 311
3b131e01
JH
312 $country = code2country('jp'); # $country gets 'Japan'
313 $code = country2code('Norway'); # $code gets 'no'
314
31d2fa6a
JH
315See L<Locale::Constants>, L<Locale::Country>, L<Locale::Currency>,
316and L<Locale::Language> for more information.
317
6a9b4349
JH
318=item *
319
7221edc9 320MIME::Base64, by Gisle Aas, allows you to encode data in base64.
6a9b4349 321
3b131e01
JH
322 use MIME::Base64;
323
324 $encoded = encode_base64('Aladdin:open sesame');
325 $decoded = decode_base64($encoded);
326
327 print $encoded, "\n"; # "QWxhZGRpbjpvcGVuIHNlc2FtZQ=="
328
31d2fa6a
JH
329See L<MIME::Base64> for more information.
330
6a9b4349
JH
331=item *
332
7221edc9 333MIME::QuotedPrint, by Gisle Aas, allows you to encode data in
6a9b4349
JH
334quoted-printable encoding.
335
3b131e01
JH
336 use MIME::QuotedPrint;
337
338 $encoded = encode_qp("Smiley in Unicode: \x{263a}");
339 $decoded = decode_qp($encoded);
340
341 print $encoded, "\n"; # "Smiley in Unicode: =263A"
342
6a9b4349
JH
343MIME::QuotedPrint has been enhanced to provide the basic methods
344necessary to use it with PerlIO::Via as in :
345
3b131e01
JH
346 use MIME::QuotedPrint;
347 open($fh,">Via(MIME::QuotedPrint)",$path)
6a9b4349 348
31d2fa6a
JH
349See L<MIME::QuotedPrint> for more information.
350
6a9b4349
JH
351=item *
352
7221edc9 353PerlIO::Scalar, by Nick Ing-Simmons, provides the implementation of
31d2fa6a
JH
354IO to "in memory" Perl scalars as discussed above. It also serves as
355an example of a loadable layer. Other future possibilities include
356PerlIO::Array and PerlIO::Code. See L<PerlIO::Scalar> for more
357information.
6a9b4349
JH
358
359=item *
360
7221edc9 361PerlIO::Via, by Nick Ing-Simmons, acts as a PerlIO layer and wraps
31d2fa6a
JH
362PerlIO layer functionality provided by a class (typically implemented
363in perl code).
6a9b4349 364
3b131e01
JH
365 use MIME::QuotedPrint;
366 open($fh,">Via(MIME::QuotedPrint)",$path)
367
368This will automatically convert everything output to C<$fh>
31d2fa6a 369to Quoted-Printable. See L<PerlIO::Via> for more information.
3b131e01 370
6a9b4349
JH
371=item *
372
7221edc9 373Pod::Text::Overstrike, by Joe Smith, has been added.
6a9b4349 374It converts POD data to formatted overstrike text.
31d2fa6a 375See L<Pod::Text::Overstrike> for more information.
6a9b4349
JH
376
377=item *
378
66917b5b 379Switch from Damian Conway has been added. Just by saying
6a9b4349 380
66917b5b 381 use Switch;
6a9b4349 382
66917b5b 383you have C<switch> and C<case> available in Perl.
6a9b4349 384
3b131e01
JH
385 use Switch;
386
387 switch ($val) {
388
389 case 1 { print "number 1" }
390 case "a" { print "string a" }
391 case [1..10,42] { print "number in list" }
392 case (@array) { print "number in list" }
393 case /\w+/ { print "pattern" }
394 case qr/\w+/ { print "pattern" }
395 case (%hash) { print "entry in hash" }
396 case (\%hash) { print "entry in hash" }
397 case (\&sub) { print "arg to subroutine" }
398 else { print "previous case not true" }
399 }
400
31d2fa6a
JH
401See L<Switch> for more information.
402
6a9b4349
JH
403=item *
404
405Text::Balanced from Damian Conway has been added, for
406extracting delimited text sequences from strings.
407
3b131e01 408 use Text::Balanced 'extract_delimited';
31d2fa6a 409
3b131e01
JH
410 ($a, $b) = extract_delimited("'never say never', he never said", "'", '');
411
7221edc9 412$a will be "'never say never'", $b will be ', he never said'.
3b131e01
JH
413
414In addition to extract_delimited() there are also extract_bracketed(),
415extract_quotelike(), extract_codeblock(), extract_variable(),
416extract_tagged(), extract_multiple(), gen_delimited_pat(), and
7221edc9
JH
417gen_extract_tagged(). With these you can implement rather advanced
418parsing algorithms. See L<Text::Balanced> for more information.
3b131e01 419
6a9b4349
JH
420=item *
421
7221edc9 422Tie::RefHash::Nestable, by Edward Avis, allows storing hash references
210b36aa 423(unlike the standard Tie::RefHash) The module is contained within
31d2fa6a 424Tie::RefHash.
6a9b4349
JH
425
426=item *
427
7221edc9
JH
428XS::Typemap, by Tim Jenness, is a test extension that exercises XS
429typemaps. Nothing gets installed but for extension writers the code
430is worth studying.
6a9b4349
JH
431
432=back
433
434=head2 Updated And Improved Modules and Pragmata
435
436=over 4
437
438=item *
439
3b131e01 440B::Deparse should be now more robust. It still far from providing a full
31d2fa6a 441round trip for any random piece of Perl code, though, and is under active
3b131e01 442development: expect more robustness in 5.7.2.
6a9b4349
JH
443
444=item *
445
3b131e01 446Class::Struct can now define the classes in compile time.
6a9b4349
JH
447
448=item *
449
31d2fa6a
JH
450Math::BigFloat has undergone much fixing, and in addition the fmod()
451function now supports modulus operations.
3b131e01 452
1577cd80
JH
453( The fixed Math::BigFloat module is also available in CPAN for those
454who can't upgrade their Perl: http://www.cpan.org/authors/id/J/JP/JPEACOCK/ )
6a9b4349
JH
455
456=item *
457
458Devel::Peek now has an interface for the Perl memory statistics
459(this works only if you are using perl's malloc, and if you have
460compiled with debugging).
461
462=item *
463
464IO::Socket has now atmark() method, which returns true if the socket
465is positioned at the out-of-band mark. The method is also exportable
466as a sockatmark() function.
467
3b131e01 468=item *
6a9b4349
JH
469
470IO::Socket::INET has support for ReusePort option (if your platform
3b131e01
JH
471supports it). The Reuse option now has an alias, ReuseAddr. For clarity
472you may want to prefer ReuseAddr.
6a9b4349
JH
473
474=item *
475
3b131e01
JH
476Net::Ping has been enhanced. There is now "external" protocol which
477uses Net::Ping::External module which runs external ping(1) and parses
478the output. An alpha version of Net::Ping::External is available in
479CPAN and in 5.7.2 the Net::Ping::External may be integrated to Perl.
6a9b4349
JH
480
481=item *
482
483The C<open> pragma allows layers other than ":raw" and ":crlf" when
484using PerlIO.
485
486=item *
487
488POSIX::sigaction() is now much more flexible and robust.
3b131e01
JH
489You can now install coderef handlers, 'DEFAULT', and 'IGNORE'
490handlers, installing new handlers was not atomic.
6a9b4349
JH
491
492=item *
493
494The Test module has been significantly enhanced. Its use is
495greatly recommended for module writers.
496
497=item *
498
499The utf8:: name space (as in the pragma) provides various
500Perl-callable functions to provide low level access to Perl's
501internal Unicode representation. At the moment only length()
502has been implemented.
503
d468ca04
JH
504=back
505
66917b5b 506The following modules have been upgraded from the versions at CPAN:
7221edc9 507CPAN, CGI, DB_File, File::Temp, Getopt::Long, Pod::Man, Pod::Text,
3b131e01 508Storable, Text-Tabs+Wrap.
6a9b4349 509
d468ca04
JH
510=head1 Performance Enhancements
511
512=over 4
513
514=item *
515
516Hashes now use Bob Jenkins "One-at-a-Time" hashing key algorithm
f224927c 517( http://burtleburtle.net/bob/hash/doobs.html ). This algorithm is
7221edc9
JH
518reasonably fast while producing a much better spread of values than
519the old hashing algorithm (originally by Chris Torek, later tweaked by
520Ilya Zakharevich). Hash values output from the algorithm on a hash of
521all 3-char printable ASCII keys comes much closer to passing the
522DIEHARD random number generation tests. According to perlbench, this
523change has not affected the overall speed of Perl.
d468ca04 524
6a9b4349
JH
525=item *
526
527unshift() should now be noticeably faster.
528
d468ca04
JH
529=back
530
6a9b4349
JH
531=head1 Utility Changes
532
533=over 4
534
535=item *
536
537h2xs now produces template README.
538
539=item *
540
541s2p has been completely rewritten in Perl. (It is in fact a full
542implementation of sed in Perl.)
543
544=item *
545
546xsubpp now supports OUT keyword.
547
548=back
549
550=head1 New Documentation
551
552=head2 perlclib
553
554Internal replacements for standard C library functions.
66917b5b 555(Interesting only for extension writers and Perl core hackers.)
6a9b4349
JH
556
557=head2 perliol
558
559Internals of PerlIO with layers.
560
561=head2 README.aix
562
563Documentation on compiling Perl on AIX has been added. AIX has
e49a87d3 564several different C compilers and getting the right patch level
6a9b4349
JH
565is essential. On install README.aix will be installed as L<perlaix>.
566
567=head2 README.bs2000
568
e49a87d3 569Documentation on compiling Perl on the POSIX-BC platform (an EBCDIC
6a9b4349
JH
570mainframe environment) has been added.
571
572This was formerly known as README.posix-bc but the name was considered
573to be too confusing (it has nothing to do with the POSIX module or the
574POSIX standard). On install README.bs2000 will be installed as L<perlbs2000>.
575
576=head2 README.macos
577
578In perl 5.7.1 (and in the 5.6.1) the MacPerl sources have been
8b40ef3a 579synchronised with the standard Perl sources. To compile MacPerl
6a9b4349
JH
580some additional steps are required, and this file documents those
581steps. On install README.macos will be installed as L<perlmacos>.
582
583=head2 README.mpeix
584
585The README.mpeix has been podified, which means that this information
586about compiling and using Perl on the MPE/iX miniframe platform will
66917b5b 587be installed as L<perlmpeix>.
6a9b4349
JH
588
589=head2 README.solaris
590
591README.solaris has been created and Solaris wisdom from elsewhere
592in the Perl documentation has been collected there. On install
593README.solaris will be installed as L<perlsolaris>.
594
595=head2 README.vos
596
597The README.vos has been podified, which means that this information
66917b5b
JH
598about compiling and using Perl on the Stratus VOS miniframe platform
599will be installed as L<perlvos>.
6a9b4349
JH
600
601=head2 Porting/repository.pod
602
603Documentation on how to use the Perl source repository has been added.
604
d468ca04
JH
605=head1 Installation and Configuration Improvements
606
66917b5b
JH
607=over 4
608
609=item *
610
6a9b4349
JH
611Because PerlIO is now the default on most platforms, "-perlio" doesn't
612get appended to the $Config{archname} (also known as $^O) anymore.
613Instead, if you explicitly choose not to use perlio (Configure command
614line option -Uuseperlio), you will get "-stdio" appended.
615
66917b5b
JH
616=item *
617
6a9b4349 618Another change related to the architecture name is that "-64all"
3b131e01
JH
619(-Duse64bitall, or "maximally 64-bit") is appended only if your
620pointers are 64 bits wide. (To be exact, the use64bitall is ignored.)
6a9b4349 621
66917b5b
JH
622=item *
623
6a9b4349
JH
624APPLLIB_EXP, a less-know configuration-time definition, has been
625documented. It can be used to prepend site-specific directories
626to Perl's default search path (@INC), see INSTALL for information.
627
66917b5b
JH
628=item *
629
6a9b4349
JH
630Building Berkeley DB3 for compatibility modes for DB, NDBM, and ODBM
631has been documented in INSTALL.
632
66917b5b
JH
633=item *
634
6a9b4349 635If you are on IRIX or Tru64 platforms, new profiling/debugging options
3b131e01 636have been added, see L<perlhack> for more information about pixie and
6a9b4349
JH
637Third Degree.
638
66917b5b
JH
639=back
640
6a9b4349
JH
641=head2 New Or Improved Platforms
642
66917b5b
JH
643For the list of platforms known to support Perl,
644see L<perlport/"Supported Platforms">.
645
6a9b4349
JH
646=over 4
647
648=item *
649
650AIX dynamic loading should be now better supported.
651
652=item *
653
66917b5b
JH
654After a long pause, AmigaOS has been verified to be happy with Perl.
655
656=item *
657
658EBCDIC platforms (z/OS, also known as OS/390, POSIX-BC, and VM/ESA)
659have been regained. Many test suite tests still fail and the
660co-existence of Unicode and EBCDIC isn't quite settled, but the
661situation is much better than with Perl 5.6. See L<perlos390>,
662L<perlbs2000> (for POSIX-BC), and L<perlvmesa> for more information.
663
664=item *
665
7221edc9
JH
666Building perl with -Duseithreads or -Duse5005threads now works under
667HP-UX 10.20 (previously it only worked under 10.30 or later). You will
668need a thread library package installed. See README.hpux.
6a9b4349
JH
669
670=item *
671
8939ba94 672Mac OS Classic (MacPerl has of course been available since
6a9b4349 673perl 5.004 but now the source code bases of standard Perl
8b40ef3a 674and MacPerl have been synchronised)
6a9b4349
JH
675
676=item *
677
31d2fa6a 678NCR MP-RAS is now supported.
6a9b4349
JH
679
680=item *
681
31d2fa6a 682NonStop-UX is now supported.
6a9b4349
JH
683
684=item *
685
31d2fa6a 686Amdahl UTS is now supported.
6a9b4349
JH
687
688=item *
689
690z/OS (formerly known as OS/390, formerly known as MVS OE) has now
691support for dynamic loading. This is not selected by default,
692however, you must specify -Dusedl in the arguments of Configure.
693
694=back
695
696=head2 Generic Improvements
697
d468ca04
JH
698=over 4
699
700=item *
701
702Configure no longer includes the DBM libraries (dbm, gdbm, db, ndbm)
6a9b4349 703when building the Perl binary. The only exception to this is SunOS 4.x,
d468ca04
JH
704which needs them.
705
6a9b4349
JH
706=item *
707
8b40ef3a
JH
708Some new Configure symbols, useful for extension writers:
709
710=over 8
711
712=item d_cmsghdr
713
714For struct cmsghdr.
715
716=item d_fcntl_can_lock
717
718Whether fcntl() can be used for file locking.
719
720=item d_fsync
721
722=item d_getitimer
723
724=item d_getpagsz
725
726For getpagesize(), though you should prefer POSIX::sysconf(_SC_PAGE_SIZE))
727
728=item d_msghdr_s
729
730For struct msghdr.
731
732=item need_va_copy
733
734Whether one needs to use Perl_va_copy() to copy varargs.
735
736=item d_readv
737
738=item d_recvmsg
739
740=item d_sendmsg
741
742=item sig_size
743
744The number of elements in an array needed to hold all the available signals.
745
746=item d_sockatmark
747
748=item d_strtoq
749
750=item d_u32align
751
752Whether one needs to access character data aligned by U32 sized pointers.
753
754=item d_ualarm
755
756=item d_usleep
757
758=back
6a9b4349
JH
759
760=item *
761
762Removed Configure symbols: the PDP-11 memory model settings: huge,
763large, medium, models.
764
765=item *
766
767SOCKS support is now much more robust.
768
769=item *
770
771If your file system supports symbolic links you can build Perl outside
772of the source directory by
3b131e01 773
6a9b4349
JH
774 mkdir /tmp/perl/build/directory
775 cd /tmp/perl/build/directory
776 sh /path/to/perl/source/Configure -Dmksymlinks ...
777
778This will create in /tmp/perl/build/directory a tree of symbolic links
779pointing to files in /path/to/perl/source. The original files are left
780unaffected. After Configure has finished you can just say
781
782 make all test
783
784and Perl will be built and tested, all in /tmp/perl/build/directory.
785
d468ca04
JH
786=back
787
788=head1 Selected Bug Fixes
789
7221edc9 790Numerous memory leaks and uninitialized memory accesses have been hunted down.
31d2fa6a 791Most importantly anonymous subs used to leak quite a bit.
6a9b4349 792
d468ca04
JH
793=over 4
794
795=item *
796
7221edc9
JH
797chop(@list) in list context returned the characters chopped in
798reverse order. This has been reversed to be in the right order.
31d2fa6a
JH
799
800=item *
801
3a2c142b 802The order of DESTROYs has been made more predictable.
6a9b4349
JH
803
804=item *
805
806mkdir() now ignores trailing slashes in the directory name,
807as mandated by POSIX.
808
809=item *
810
66917b5b
JH
811Attributes (like :shared) didn't work with our().
812
813=item *
814
815The PERL5OPT environment variable (for passing command line arguments
816to Perl) didn't work for more than a single group of options.
6a9b4349
JH
817
818=item *
819
31d2fa6a
JH
820The tainting behaviour of sprintf() has been rationalized. It does
821not taint the result of floating point formats anymore, making the
822behaviour consistent with that of string interpolation.
823
824=item *
825
6a9b4349
JH
826All but the first argument of the IO syswrite() method are now optional.
827
828=item *
829
830Tie::ARRAY SPLICE method was broken.
831
832=item *
833
d468ca04
JH
834vec() now tries to work with characters <= 255 when possible, but it leaves
835higher character values in place. In that case, if vec() was used to modify
836the string, it is no longer considered to be utf8-encoded.
837
838=back
839
6a9b4349 840=head2 Platform Specific Changes and Fixes
65db4721
JH
841
842=over 4
843
844=item *
845
6a9b4349
JH
846Linux previously had problems related to sockaddrlen when using
847accept(), revcfrom() (in Perl: recv()), getpeername(), and getsockname().
65db4721
JH
848
849=item *
850
66917b5b 851Previously DYNIX/ptx had problems in its Configure probe for non-blocking I/O.
65db4721 852
31d2fa6a
JH
853=item *
854
855Windows
856
857=over 8
858
859=item *
860
861Borland C++ v5.5 is now a supported compiler that can build Perl.
862However, the generated binaries continue to be incompatible with those
863generated by the other supported compilers (GCC and Visual C++).
864
865=item *
866
867Win32::GetCwd() correctly returns C:\ instead of C: when at the drive root.
868Other bugs in chdir() and Cwd::cwd() have also been fixed.
869
870=item *
871
872Duping socket handles with open(F, ">&MYSOCK") now works under Windows 9x.
873
874=item *
875
7221edc9
JH
876HTML files will be installed in c:\perl\html instead of c:\perl\lib\pod\html
877
878=item *
879
31d2fa6a
JH
880The makefiles now provide a single switch to bulk-enable all the features
881enabled in ActiveState ActivePerl (a popular binary distribution).
882
883=back
884
6a9b4349 885=back
65db4721 886
6a9b4349 887=head1 New or Changed Diagnostics
65db4721 888
6a9b4349
JH
889Two new debugging options have been added: if you have compiled your
890Perl with debugging, you can use the -DT and -DR options to trace
8b40ef3a 891tokenising and to add reference counts to displaying variables,
6a9b4349 892respectively.
65db4721 893
6a9b4349 894=over 4
65db4721
JH
895
896=item *
897
7221edc9 898If an attempt to use a (non-blessed) reference as an array index
6a9b4349 899is made, a warning is given.
65db4721 900
6a9b4349
JH
901=item *
902
903C<push @a;> and C<unshift @a;> (with no values to push or unshift)
904now give a warning. This may be a problem for generated and evaled
905code.
65db4721
JH
906
907=back
908
6a9b4349 909=head1 Changed Internals
65db4721
JH
910
911=over 4
912
913=item *
914
66917b5b
JH
915Some new APIs: ptr_table_clear(), ptr_table_free(), sv_setref_uv().
916For the full list of the available APIs see L<perlapi>.
65db4721
JH
917
918=item *
919
66917b5b
JH
920dTHR and djSP have been obsoleted; the former removed (because it's
921a no-op) and the latter replaced with dSP.
6a9b4349
JH
922
923=item *
924
3a2c142b 925Perl now uses system malloc instead of Perl malloc on all 64-bit
31d2fa6a
JH
926platforms, and even in some not-always-64-bit platforms like AIX,
927IRIX, and Solaris. This change breaks backward compatibility but
928Perl's malloc has problems with large address spaces and also the
929speed of vendors' malloc is generally better in large address space
930machines (Perl's malloc is mostly tuned for space).
65db4721
JH
931
932=back
933
b1085720
JH
934=head1 New Tests
935
936Many new tests have been added. The most notable is probably the
937lib/1_compile: it is very notable because running it takes quite a
938long time -- it test compiles all the Perl modules in the distribution.
939Please be patient.
940
d468ca04
JH
941=head1 Known Problems
942
7221edc9
JH
943Note that unlike other sections in this document (which describe
944changes since 5.7.0) this section is cumulative containing known
945problems for all the 5.7 releases.
31d2fa6a 946
7221edc9 947=head2 AIX vac 5.0.0.0 May Produce Buggy Code For Perl
6a9b4349 948
7221edc9
JH
949The AIX C compiler vac version 5.0.0.0 may produce buggy code,
950resulting in few random tests failing, but when the failing tests
951are run by hand, they succeed. We suggest upgrading to at least
952vac version 5.0.1.0, that has been known to compile Perl correctly.
953"lslpp -L|grep vac.C" will tell you the vac version.
6a9b4349 954
7221edc9 955=head2 lib/ftmp-security tests warn 'system possibly insecure'
6a9b4349 956
7221edc9 957Don't panic. Read INSTALL 'make test' section instead.
6a9b4349 958
7221edc9 959=head2 lib/io_multihomed Fails In LP64-Configured HP-UX
6a9b4349 960
7221edc9
JH
961The lib/io_multihomed test may hang in HP-UX if Perl has been
962configured to be 64-bit. Because other 64-bit platforms do not hang in
963this test, HP-UX is suspect. All other tests pass in 64-bit HP-UX. The
964test attempts to create and connect to "multihomed" sockets (sockets
965which have multiple IP addresses).
6a9b4349 966
7221edc9
JH
967=head2 Test lib/posix Subtest 9 Fails In LP64-Configured HP-UX
968
969If perl is configured with -Duse64bitall, the successful result of the
970subtest 10 of lib/posix may arrive before the successful result of the
971subtest 9, which confuses the test harness so much that it thinks the
972subtest 9 failed.
973
974=head2 lib/b test 19
975
3a2c142b 976The test fails on various platforms (PA64 and IA64 are known), but the
7221edc9
JH
977exact cause is still being investigated.
978
979=head2 Linux With Sfio Fails op/misc Test 48
980
981No known fix.
6a9b4349
JH
982
983=head2 sigaction test 13 in VMS
984
3a2c142b
MG
985The test is known to fail; whether it's because of VMS of because
986of faulty test is not known.
6a9b4349 987
d468ca04
JH
988=head2 sprintf tests 129 and 130
989
3a2c142b 990The op/sprintf tests 129 and 130 are known to fail on some platforms.
7221edc9 991Examples include any platform using sfio, and Compaq/Tandem's NonStop-UX.
d468ca04
JH
992The failing platforms do not comply with the ANSI C Standard, line
99319ff on page 134 of ANSI X3.159 1989 to be exact. (They produce
994something else than "1" and "-1" when formatting 0.6 and -0.6 using
995the printf format "%.0f", most often they produce "0" and "-0".)
996
7221edc9
JH
997=head2 Failure of Thread tests
998
999The subtests 19 and 20 of lib/thr5005.t test are known to fail due to
1000fundamental problems in the 5.005 threading implementation. These are
1001not new failures--Perl 5.005_0x has the same bugs, but didn't have
1002these tests. (Note that support for 5.005-style threading remains
1003experimental.)
1004
1005=head2 Localising a Tied Variable Leaks Memory
1006
1007 use Tie::Hash;
1008 tie my %tie_hash => 'Tie::StdHash';
1009
1010 ...
1011
1012 local($tie_hash{Foo}) = 1; # leaks
1013
1014Code like the above is known to leak memory every time the local()
1015is executed.
1016
6a9b4349
JH
1017=head2 Self-tying of Arrays and Hashes Is Forbidden
1018
1019Self-tying of arrays and hashes is broken in rather deep and
1020hard-to-fix ways. As a stop-gap measure to avoid people from getting
1021frustrated at the mysterious results (core dumps, most often) it is
1022for now forbidden (you will get a fatal error even from an attempt).
1023
7221edc9
JH
1024=head2 Building Extensions Can Fail Because Of Largefiles
1025
1026Some extensions like mod_perl are known to have issues with
1027`largefiles', a change brought by Perl 5.6.0 in which file offsets
1028default to 64 bits wide, where supported. Modules may fail to compile
1029at all or compile and work incorrectly. Currently there is no good
1030solution for the problem, but Configure now provides appropriate
1031non-largefile ccflags, ldflags, libswanted, and libs in the %Config
1032hash (e.g., $Config{ccflags_nolargefiles}) so the extensions that are
1033having problems can try configuring themselves without the
1034largefileness. This is admittedly not a clean solution, and the
1035solution may not even work at all. One potential failure is whether
1036one can (or, if one can, whether it's a good idea) link together at
1037all binaries with different ideas about file offsets, all this is
1038platform-dependent.
1039
1040=head2 The Compiler Suite Is Still Experimental
1041
1042The compiler suite is slowly getting better but is nowhere near
1043working order yet.
1044
d468ca04
JH
1045=head1 Reporting Bugs
1046
1047If you find what you think is a bug, you might check the articles
1048recently posted to the comp.lang.perl.misc newsgroup and the perl
f224927c
JH
1049bug database at http://bugs.perl.org/ There may also be
1050information at http://www.perl.com/perl/ , the Perl Home Page.
d468ca04
JH
1051
1052If you believe you have an unreported bug, please run the B<perlbug>
1053program included with your release. Be sure to trim your bug down
1054to a tiny but sufficient test case. Your bug report, along with the
1055output of C<perl -V>, will be sent off to perlbug@perl.org to be
8b40ef3a 1056analysed by the Perl porting team.
d468ca04
JH
1057
1058=head1 SEE ALSO
1059
1060The F<Changes> file for exhaustive details on what changed.
1061
1062The F<INSTALL> file for how to build Perl.
1063
1064The F<README> file for general stuff.
1065
1066The F<Artistic> and F<Copying> files for copyright information.
1067
1068=head1 HISTORY
1069
1070Written by Jarkko Hietaniemi <F<jhi@iki.fi>>, with many contributions
1071from The Perl Porters and Perl Users submitting feedback and patches.
1072
1073Send omissions or corrections to <F<perlbug@perl.org>>.
1074
1075=cut