This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Re: [ID 20011117.127] Not OK: perl v5.7.2 +DEVEL13048 on i686-linux 2.4.15-pre6
[perl5.git] / pod / perldelta.pod
CommitLineData
888aee59 1M=head1 NAME
cc0fca54 2
f39f21d8 3perldelta - what is new for perl v5.8.0
cc0fca54
GS
4
5=head1 DESCRIPTION
6
f39f21d8
JH
7This document describes differences between the 5.6.0 release and the
85.8.0 release.
9
f39f21d8
JH
10=head1 Incompatible Changes
11
77c8cf41
JH
12=head2 64-bit platforms and malloc
13
14If your pointers are 64 bits wide, the Perl malloc is no more being
15used because it simply does not work with 8-byte pointers. Also,
61947107
JH
16usually the system mallocs on such platforms are much better optimized
17for such large memory models than the Perl malloc. Such platforms
18include 64-bit Alpha, MIPS, HPPA, PPC, and Sparc.
77c8cf41
JH
19
20=head2 AIX Dynaloading
21
22The AIX dynaloading now uses in AIX releases 4.3 and newer the native
23dlopen interface of AIX instead of the old emulated interface. This
24change will probably break backward compatibility with compiled
25modules. The change was made to make Perl more compliant with other
26applications like modperl which are using the AIX native interface.
27
28=head2 Socket Extension Dynamic in VMS
29
30The Socket extension is now dynamically loaded instead of being
31statically built in. This may or may not be a problem with ancient
32TCP/IP stacks of VMS: we do not know since we weren't able to test
33Perl in such configurations.
34
35=head2 Different Definition of the Unicode Character Classes \p{In...}
36
37As suggested by the Unicode consortium, the Unicode character classes
38now prefer I<scripts> as opposed to I<blocks> (as defined by Unicode);
39in Perl, when the C<\p{In....}> and the C<\p{In....}> regular expression
40constructs are used. This has changed the definition of some of those
41character classes.
42
43The difference between scripts and blocks is that scripts are the
44glyphs used by a language or a group of languages, while the blocks
45are more artificial groupings of 256 characters based on the Unicode
46numbering.
47
48In general this change results in more inclusive Unicode character
49classes, but changes to the other direction also do take place:
50for example while the script C<Latin> includes all the Latin
51characters and their various diacritic-adorned versions, it
52does not include the various punctuation or digits (since they
53are not solely C<Latin>).
54
55Changes in the character class semantics may have happened if a script
56and a block happen to have the same name, for example C<Hebrew>.
57In such cases the script wins and C<\p{InHebrew}> now means the script
58definition of Hebrew. The block definition in still available,
59though, by appending C<Block> to the name: C<\p{InHebrewBlock}> means
60what C<\p{InHebrew}> meant in perl 5.6.0. For the full list
61of affected character classes, see L<perlunicode/Blocks>.
62
61947107
JH
63=head2 Perl Parser Stress Tested
64
65The Perl parser has been stress tested using both random input and
66Markov chain input and the few found crashes and lockups have been
67fixed.
68
77c8cf41
JH
69=head2 Deprecations
70
71The current user-visible implementation of pseudo-hashes (the weird
72use of the first array element) is deprecated starting from Perl 5.8.0
73and will be removed in Perl 5.10.0, and the feature will be
74implemented differently. Not only is the current interface rather
75ugly, but the current implementation slows down normal array and hash
76use quite noticeably. The C<fields> pragma interface will remain
77available.
78
79The syntaxes C<@a->[...]> and C<@h->{...}> have now been deprecated.
80
61947107
JH
81After years of trying the suidperl is considered to be too complex to
82ever be considered truly secure. The suidperl functionality is likely
83to be removed in a future release.
77c8cf41
JH
84
85The C<package;> syntax (C<package> without an argument has been
86deprecated. Its semantics were never that clear and its
87implementation even less so. If you have used that feature to
88disallow all but fully qualified variables, C<use strict;> instead.
89
61947107 90=over 4
77c8cf41 91
61947107 92=item *
f39f21d8 93
61947107
JH
94The semantics of bless(REF, REF) were unclear and until someone proves
95it to make some sense, it is forbidden.
f39f21d8
JH
96
97=item *
98
61947107
JH
99A reference to a reference now stringify as "REF(0x81485ec)" instead
100of "SCALAR(0x81485ec)" in order to be more consistent with the return
101value of ref().
f39f21d8
JH
102
103=item *
104
61947107
JH
105The very dusty examples in the eg/ directory have been removed.
106Suggestions for new shiny examples welcome but the main issue is that
107the examples need to be documented, tested and (most importantly)
108maintained.
f39f21d8
JH
109
110=item *
111
61947107
JH
112The obsolete chat2 library that should never have been allowed
113to escape the laboratory has been decommissioned.
f39f21d8
JH
114
115=item *
116
61947107
JH
117The unimplemented POSIX regex features [[.cc.]] and [[=c=]] are still
118recognised but now cause fatal errors. The previous behaviour of
119ignoring them by default and warning if requested was unacceptable
120since it, in a way, falsely promised that the features could be used.
f39f21d8
JH
121
122=item *
123
61947107
JH
124The (bogus) escape sequences \8 and \9 now give an optional warning
125("Unrecognized escape passed through"). There is no need to \-escape
126any C<\w> character.
f39f21d8
JH
127
128=item *
129
61947107
JH
130lstat(FILEHANDLE) now gives a warning because the operation makes no sense.
131In future releases this may become a fatal error.
f39f21d8
JH
132
133=item *
134
61947107
JH
135The long deprecated uppercase aliases for the string comparison
136operators (EQ, NE, LT, LE, GE, GT) have now been removed.
137
138=item *
139
140The regular expression captured submatches ($1, $2, ...) are now
141more consistently unset if the match fails, instead of leaving false
142data lying around in them.
143
144=item *
145
146The tr///C and tr///U features have been removed and will not return;
147the interface was a mistake. Sorry about that. For similar
148functionality, see pack('U0', ...) and pack('C0', ...).
149
150=item *
151
152Although "you shouldn't do that", it was possible to write code that
153depends on Perl's hashed key order (Data::Dumper does this). The new
154algorithm "One-at-a-Time" produces a different hashed key order.
155More details are in L</"Performance Enhancements">.
156
157=item *
158
159The list of filenames from glob() (or <...>) is now by default sorted
160alphabetically to be csh-compliant. (bsd_glob() does still sort platform
161natively, ASCII or EBCDIC, unless GLOB_ALPHASORT is specified.)
f39f21d8
JH
162
163=back
164
61947107
JH
165=head1 Core Enhancements
166
77c8cf41 167=head2 AUTOLOAD Is Now Lvaluable
f39f21d8 168
77c8cf41
JH
169AUTOLOAD is now lvaluable, meaning that you can add the :lvalue attribute
170to AUTOLOAD subroutines and you can assign to the AUTOLOAD return value.
171
172=head2 PerlIO is Now The Default
f39f21d8
JH
173
174=over 4
175
176=item *
177
77c8cf41
JH
178IO is now by default done via PerlIO rather than system's "stdio".
179PerlIO allows "layers" to be "pushed" onto a file handle to alter the
180handle's behaviour. Layers can be specified at open time via 3-arg
181form of open:
f39f21d8 182
77c8cf41 183 open($fh,'>:crlf :utf8', $path) || ...
f39f21d8 184
77c8cf41 185or on already opened handles via extended C<binmode>:
f39f21d8 186
77c8cf41 187 binmode($fh,':encoding(iso-8859-7)');
f39f21d8 188
77c8cf41
JH
189The built-in layers are: unix (low level read/write), stdio (as in
190previous Perls), perlio (re-implementation of stdio buffering in a
191portable manner), crlf (does CRLF <=> "\n" translation as on Win32,
192but available on any platform). A mmap layer may be available if
193platform supports it (mostly UNIXes).
f39f21d8 194
77c8cf41
JH
195Layers to be applied by default may be specified via the 'open' pragma.
196
197See L</"Installation and Configuration Improvements"> for the effects
198of PerlIO on your architecture name.
f39f21d8
JH
199
200=item *
201
77c8cf41
JH
202File handles can be marked as accepting Perl's internal encoding of Unicode
203(UTF-8 or UTF-EBCDIC depending on platform) by a pseudo layer ":utf8" :
f39f21d8 204
77c8cf41 205 open($fh,">:utf8","Uni.txt");
f39f21d8 206
77c8cf41
JH
207Note for EBCDIC users: the pseudo layer ":utf8" is erroneously named
208for you since it's not UTF-8 what you will be getting but instead
209UTF-EBCDIC. See L<perlunicode>, L<utf8>, and
210http://www.unicode.org/unicode/reports/tr16/ for more information.
211In future releases this naming may change.
f39f21d8
JH
212
213=item *
214
77c8cf41
JH
215File handles can translate character encodings from/to Perl's internal
216Unicode form on read/write via the ":encoding()" layer.
f39f21d8
JH
217
218=item *
219
77c8cf41
JH
220File handles can be opened to "in memory" files held in Perl scalars via:
221
222 open($fh,'>', \$variable) || ...
f39f21d8
JH
223
224=item *
225
77c8cf41
JH
226Anonymous temporary files are available without need to
227'use FileHandle' or other module via
f39f21d8 228
77c8cf41 229 open($fh,"+>", undef) || ...
f39f21d8 230
77c8cf41 231That is a literal undef, not an undefined value.
f39f21d8
JH
232
233=item *
234
77c8cf41 235The list form of C<open> is now implemented for pipes (at least on UNIX):
f39f21d8 236
77c8cf41 237 open($fh,"-|", 'cat', '/etc/motd')
f39f21d8 238
77c8cf41
JH
239creates a pipe, and runs the equivalent of exec('cat', '/etc/motd') in
240the child process.
f39f21d8
JH
241
242=item *
243
77c8cf41
JH
244The following builtin functions are now overridable: chop(), chomp(),
245each(), keys(), pop(), push(), shift(), splice(), unshift().
f39f21d8
JH
246
247=item *
248
77c8cf41 249Formats now support zero-padded decimal fields.
f39f21d8
JH
250
251=item *
252
77c8cf41
JH
253Perl now tries internally to use integer values in numeric conversions
254and basic arithmetics (+ - * /) if the arguments are integers, and
255tries also to keep the results stored internally as integers.
256This change leads into often slightly faster and always less lossy
257arithmetics. (Previously Perl always preferred floating point numbers
258in its math.)
f39f21d8
JH
259
260=item *
261
77c8cf41
JH
262The printf() and sprintf() now support parameter reordering using the
263C<%\d+\$> and C<*\d+\$> syntaxes. For example
f39f21d8 264
77c8cf41 265 print "%2\$s %1\$s\n", "foo", "bar";
f39f21d8 266
77c8cf41
JH
267will print "bar foo\n"; This feature helps in writing
268internationalised software.
f39f21d8
JH
269
270=item *
271
77c8cf41
JH
272Unicode in general should be now much more usable. Unicode can be
273used in hash keys, Unicode in regular expressions should work now,
274Unicode in tr/// should work now (though tr/// seems to be a
275particularly tricky to get right, so you have been warned)
f39f21d8
JH
276
277=item *
278
77c8cf41
JH
279The Unicode Character Database coming with Perl has been upgraded
280to Unicode 3.1. For more information, see http://www.unicode.org/,
281and http://www.unicode.org/unicode/reports/tr27/
f39f21d8 282
77c8cf41
JH
283For developers interested in enhancing Perl's Unicode capabilities:
284almost all the UCD files are included with the Perl distribution in
285the lib/unicode subdirectory. The most notable omission, for space
286considerations, is the Unihan database.
f39f21d8
JH
287
288=item *
289
77c8cf41
JH
290The Unicode character classes \p{Blank} and \p{SpacePerl} have been
291added. "Blank" is like C isblank(), that is, it contains only
292"horizontal whitespace" (the space character is, the newline isn't),
293and the "SpacePerl" is the Unicode equivalent of C<\s> (\p{Space}
294isn't, since that includes the vertical tabulator character, whereas
295C<\s> doesn't.)
f39f21d8
JH
296
297=back
298
77c8cf41
JH
299=head2 Signals Are Now Safe
300
301Perl used to be fragile in that signals arriving at inopportune moments
302could corrupt Perl's internal state.
303
304=head2 Understanding of Numbers
305
306In general a lot of fixing has happened in the area of Perl's
307understanding of numbers, both integer and floating point. Since in
308many systems the standard number parsing functions like C<strtoul()>
309and C<atof()> seem to have bugs, Perl tries to work around their
310deficiencies. This results hopefully in more accurate numbers.
f39f21d8
JH
311
312=over 4
313
314=item *
315
61947107
JH
316C<perl -d:Module=arg,arg,arg> now works (previously one couldn't pass
317in multiple arguments.)
f39f21d8
JH
318
319=item *
320
61947107
JH
321END blocks are now run even if you exit/die in a BEGIN block.
322Internally, the execution of END blocks is now controlled by
323PL_exit_flags & PERL_EXIT_DESTRUCT_END. This enables the new
324behaviour for Perl embedders. This will default in 5.10. See
325L<perlembed>.
f39f21d8
JH
326
327=item *
328
77c8cf41
JH
329Lexicals I: lexicals outside an eval "" weren't resolved
330correctly inside a subroutine definition inside the eval "" if they
331were not already referenced in the top level of the eval""ed code.
f39f21d8
JH
332
333=item *
334
77c8cf41
JH
335Lexicals II: lexicals leaked at file scope into subroutines that
336were declared before the lexicals.
f39f21d8
JH
337
338=item *
339
77c8cf41 340Lvalue subroutines can now return C<undef> in list context.
f39f21d8
JH
341
342=item *
343
61947107
JH
344A new special regular expression variable has been introduced:
345C<$^N>, which contains the most-recently closed group (submatch).
f39f21d8
JH
346
347=item *
348
61947107 349C<no Module;> now works even if there is no "sub unimport" in the Module.
f39f21d8
JH
350
351=item *
352
61947107
JH
353The numerical comparison operators return C<undef> if either operand
354is a NaN. Previously the behaviour was unspecified.
f39f21d8
JH
355
356=item *
357
61947107 358C<pack('U0a*', ...)> can now be used to force a string to UTF8.
f39f21d8
JH
359
360=item *
361
61947107 362my __PACKAGE__ $obj now works.
f39f21d8
JH
363
364=item *
365
61947107 366prototype(\&) is now available.
f39f21d8
JH
367
368=item *
369
61947107
JH
370Right-hand side magic (GMAGIC) could in many cases such as string
371concatenation be invoked too many times.
372
373=item *
374
375The rules for allowing underscores (underbars) in numeric constants
376have been relaxed and simplified: now you can have an underscore
377simply B<between digits>.
378
379=item *
380
381An UNTIE method is now available.
382
383=item *
384
385L<utime> now supports C<utime undef, undef, @files> to change the
386file timestamps to the current time.
387
388=item *
389
390C<eval "v200"> now works.
f39f21d8
JH
391
392=back
393
77c8cf41 394=head1 Modules and Pragmata
f39f21d8 395
77c8cf41 396=head2 New Modules
f39f21d8
JH
397
398=over 4
399
400=item *
401
61947107 402C<Attribute::Handlers> allows a class to define attribute handlers.
f39f21d8 403
61947107
JH
404 package MyPack;
405 use Attribute::Handlers;
406 sub Wolf :ATTR(SCALAR) { print "howl!\n" }
f39f21d8 407
61947107 408 # later, in some package using or inheriting from MyPack...
f39f21d8 409
61947107
JH
410 my MyPack $Fluffy : Wolf; # the attribute handler Wolf will be called
411
412Both variables and routines can have attribute handlers. Handlers can
413be specific to type (SCALAR, ARRAY, HASH, or CODE), or specific to the
414exact compilation phase (BEGIN, CHECK, INIT, or END).
f39f21d8 415
61947107 416=item *
f39f21d8 417
61947107
JH
418B<B::Concise> is a new compiler backend for walking the Perl syntax
419tree, printing concise info about ops, from Stephen McCamant. The
420output is highly customisable. See L<B::Concise>.
f39f21d8
JH
421
422=item *
423
61947107
JH
424C<Class::ISA> for reporting the search path for a class's ISA tree,
425by Sean Burke, has been added. See L<Class::ISA>.
f39f21d8
JH
426
427=item *
428
61947107
JH
429C<Cwd> has now a split personality: if possible, an XS extension is
430used, (this will hopefully be faster, more secure, and more robust)
431but if not possible, the familiar Perl implementation is used.
f39f21d8
JH
432
433=item *
434
61947107
JH
435C<Digest>, frontend module for calculating digests (checksums), from
436Gisle Aas, has been added. See L<Digest>.
f39f21d8
JH
437
438=item *
439
61947107
JH
440C<Digest::MD5> for calculating MD5 digests (checksums) as defined in
441RFC 1321, from Gisle Aas, has been added. See L<Digest::MD5>.
f39f21d8
JH
442
443 use Digest::MD5 'md5_hex';
444
445 $digest = md5_hex("Thirsty Camel");
446
447 print $digest, "\n"; # 01d19d9d2045e005c3f1b80e8b164de1
448
61947107 449NOTE: the C<MD5> backward compatibility module is deliberately not
f39f21d8
JH
450included since its use is discouraged.
451
f39f21d8
JH
452=item *
453
61947107 454C<Encode>, by Nick Ing-Simmons, provides a mechanism to translate
f39f21d8
JH
455between different character encodings. Support for Unicode,
456ISO-8859-*, ASCII, CP*, KOI8-R, and three variants of EBCDIC are
457compiled in to the module. Several other encodings (like Japanese,
458Chinese, and MacIntosh encodings) are included and will be loaded at
61947107 459runtime. See L<Encode>.
f39f21d8
JH
460
461Any encoding supported by Encode module is also available to the
462":encoding()" layer if PerlIO is used.
463
61947107
JH
464=item *
465
466C<I18N::Langinfo> can be use to query locale information.
467See L<I18N::Langinfo>.
f39f21d8
JH
468
469=item *
470
61947107
JH
471C<I18N::LangTags> has functions for dealing with RFC3066-style
472language tags, by Sean Burke. See <I18N::LangTags>.
473
474=item *
475
476C<ExtUtils::Constant> is a new tool for extension writers for
477generating XS code to import C header constants, by Nicholas Clark.
478See L<ExtUtils::Constant>.
479
480=item *
481
482C<Filter::Simple> is an easy-to-use frontend to Filter::Util::Call,
483from Damian Conway. See L<Filter::Simple>.
f39f21d8
JH
484
485 # in MyFilter.pm:
486
487 package MyFilter;
488
489 use Filter::Simple sub {
490 while (my ($from, $to) = splice @_, 0, 2) {
491 s/$from/$to/g;
492 }
493 };
494
495 1;
496
497 # in user's code:
498
499 use MyFilter qr/red/ => 'green';
500
501 print "red\n"; # this code is filtered, will print "green\n"
502 print "bored\n"; # this code is filtered, will print "bogreen\n"
503
504 no MyFilter;
505
506 print "red\n"; # this code is not filtered, will print "red\n"
507
61947107
JH
508=item *
509
510C<File::Temp> allows one to create temporary files and directories in
511an easy, portable, and secure way, by Tim Jenness. See L<File::Temp>.
512
513=item *
514
515C<Filter::Util::Call> provides you with the framework to write
516I<Source Filters> in Perl, from Paul Marquess. For most uses the
517frontend Filter::Simple is to be preferred. See L<Filter::Util::Call>.
518
519=item *
520
521L<libnet> is a collection of perl5 modules related to network
522programming, from Graham Barr. See L<Net::FTP>, L<Net::NNTP>,
523L<Net::Ping>, L<Net::POP3>, L<Net::SMTP>, and L<Net::Time>.
524
525Perl installation leaves libnet unconfigured, use F<libnetcfg> to configure.
f39f21d8
JH
526
527=item *
528
61947107
JH
529C<List::Util> is a selection of general-utility list subroutines, like
530sum(), min(), first(), and shuffle(), by Graham barr. See L<List::Util>.
f39f21d8
JH
531
532=item *
533
61947107
JH
534C<Locale::Constants>, C<Locale::Country>, C<Locale::Currency>, and
535C<Locale::Language>, from Neil Bowers, have been added. They provide the
536codes for various locale standards, such as "fr" for France, "usd" for
537US Dollar, and "jp" for Japanese.
f39f21d8
JH
538
539 use Locale::Country;
540
541 $country = code2country('jp'); # $country gets 'Japan'
542 $code = country2code('Norway'); # $code gets 'no'
543
544See L<Locale::Constants>, L<Locale::Country>, L<Locale::Currency>,
61947107
JH
545and L<Locale::Language>.
546
547=item *
548
549C<Locale::Maketext> is localization framework from Sean Burke. See
550L<Locale::Maketext>, and L<Locale::Maketext::TPJ13>. The latter is an
551article about software localization, originally published in The Perl
552Journal #13, republished here with kind permission.
553
554=item *
555
556C<Memoize> can make your functions faster by trading space for time,
557from Mark-Jason Dominus. See L<Memoize>.
f39f21d8
JH
558
559=item *
560
61947107
JH
561C<MIME::Base64> allows you to encode data in base64, from Gisle Aas,
562as defined in RFC 2045 - I<MIME (Multipurpose Internet Mail
563Extensions)>.
f39f21d8
JH
564
565 use MIME::Base64;
566
567 $encoded = encode_base64('Aladdin:open sesame');
568 $decoded = decode_base64($encoded);
569
570 print $encoded, "\n"; # "QWxhZGRpbjpvcGVuIHNlc2FtZQ=="
571
61947107 572See L<MIME::Base64>.
f39f21d8
JH
573
574=item *
575
61947107
JH
576C<MIME::QuotedPrint> allows you to encode data in quoted-printable
577encoding, as defined in RFC 2045 - I<MIME (Multipurpose Internet Mail
578Extensions)>, from Gisle Aas.
f39f21d8
JH
579
580 use MIME::QuotedPrint;
581
582 $encoded = encode_qp("Smiley in Unicode: \x{263a}");
583 $decoded = decode_qp($encoded);
584
585 print $encoded, "\n"; # "Smiley in Unicode: =263A"
586
587MIME::QuotedPrint has been enhanced to provide the basic methods
588necessary to use it with PerlIO::Via as in :
589
590 use MIME::QuotedPrint;
591 open($fh,">Via(MIME::QuotedPrint)",$path)
592
61947107 593See L<MIME::QuotedPrint>.
f39f21d8
JH
594
595=item *
596
61947107
JH
597C<NEXT> is pseudo-class for method redispatch, from Damian Conway.
598See L<NEXT>.
f39f21d8
JH
599
600=item *
601
61947107
JH
602C<PerlIO::Scalar> provides the implementation of IO to "in memory"
603Perl scalars as discussed above, from Nick Ing-Simmons. It also
604serves as an example of a loadable PerlIO layer. Other future
605possibilities include PerlIO::Array and PerlIO::Code.
606See L<PerlIO::Scalar>.
607
608=item *
609
610C<PerlIO::Via> acts as a PerlIO layer and wraps PerlIO layer
611functionality provided by a class (typically implemented in perl
612code), from Nick Ing-Simmons.
f39f21d8
JH
613
614 use MIME::QuotedPrint;
615 open($fh,">Via(MIME::QuotedPrint)",$path)
616
617This will automatically convert everything output to C<$fh>
61947107 618to Quoted-Printable. See L<PerlIO::Via>.
f39f21d8
JH
619
620=item *
621
61947107 622C<Pod::Text::Overstrike>, by Joe Smith, has been added.
f39f21d8 623It converts POD data to formatted overstrike text.
61947107 624See L<Pod::Text::Overstrike>.
f39f21d8
JH
625
626=item *
627
61947107
JH
628C<Scalar::Util> is a selection of general-utility scalar subroutines,
629like blessed(), reftype(), and tainted(). See L<Scalar::Util>.
630
631=item *
632
633C<Storable> gives persistence to Perl data structures by allowing the
634storage and retrieval of Perl data to and from files in a fast and
635compact binary format, from Raphael Manfredi. See L<Storable>.
636
637=item *
638
639C<Switch>, from Damian Conway, has been added. Just by saying
f39f21d8
JH
640
641 use Switch;
642
643you have C<switch> and C<case> available in Perl.
644
645 use Switch;
646
647 switch ($val) {
648
649 case 1 { print "number 1" }
650 case "a" { print "string a" }
651 case [1..10,42] { print "number in list" }
652 case (@array) { print "number in list" }
653 case /\w+/ { print "pattern" }
654 case qr/\w+/ { print "pattern" }
655 case (%hash) { print "entry in hash" }
656 case (\%hash) { print "entry in hash" }
657 case (\&sub) { print "arg to subroutine" }
658 else { print "previous case not true" }
659 }
660
61947107
JH
661See L<Switch>.
662
663=item *
664
665C<Test::More> is yet another framework for writing test scripts,
666more extensive than Test::Simple, by Michael Schwern. See L<Test::More>.
667
668=item *
669
670C<Test::Simple> has the- basic utilities for writing tests, by Michael
671Schwern. See L<Test::Simple>.
77c8cf41
JH
672
673=item *
674
61947107
JH
675C<Text::Balanced> has been added, for extracting delimited text
676sequences from strings, from Damian Conway.
77c8cf41
JH
677
678 use Text::Balanced 'extract_delimited';
679
680 ($a, $b) = extract_delimited("'never say never', he never said", "'", '');
681
682$a will be "'never say never'", $b will be ', he never said'.
683
684In addition to extract_delimited() there are also extract_bracketed(),
685extract_quotelike(), extract_codeblock(), extract_variable(),
686extract_tagged(), extract_multiple(), gen_delimited_pat(), and
687gen_extract_tagged(). With these you can implement rather advanced
61947107 688parsing algorithms. See L<Text::Balanced>.
77c8cf41
JH
689
690=item *
691
61947107
JH
692C<threads> is an interface interpreter threads, by Arthur Bergman.
693Interpreter threads (ithreads) is the new thread model introduced in
694Perl 5.6 but then available only as an internal interface for
695extension writers. See L<threads>.
77c8cf41
JH
696
697=item *
698
61947107
JH
699C<threads::shared> allows data sharing for interpreter threads, from
700Arthur Bergman. In the ithreads model any data sharing between
701threads must be explicit, as opposed to the old 5.005 thread model
702where data sharing was implicit. See L<threads::shared>.
77c8cf41
JH
703
704=item *
705
61947107
JH
706C<Tie::RefHash::Nestable>, by Edward Avis, allows storing hash
707references (unlike the standard Tie::RefHash) The module is contained
708within Tie::RefHash, see L<Tie::RefHash).
77c8cf41
JH
709
710=item *
711
61947107
JH
712C<Time::HiRes> provides high resolution timing (ualarm, usleep,
713and gettimeofday), from Douglas E. Wegscheid. See L<Time::HiRes>.
77c8cf41
JH
714
715=item *
716
61947107
JH
717C<Unicode::UCD> offers a querying interface to the Unicode Character
718Database. See L<Unicode::UCD>.
77c8cf41
JH
719
720=item *
721
61947107
JH
722C<Unicode::Collate> implements the UCA (Unicode Collation Algorithm)
723for sorting Unicode strings, by SADAHIRO Tomoyuki. See L<Unicode::Collate>.
77c8cf41
JH
724
725=item *
726
61947107
JH
727C<Unicode::Normalize> implements the various Unicode normalization
728forms, by SADAHIRO Tomoyuki. See L<Unicode::Normalize>.
77c8cf41
JH
729
730=item *
731
61947107
JH
732C<XS::Typemap>, by Tim Jenness, is a test extension that exercises XS
733typemaps. Nothing gets installed but for extension writers the code
734is worth studying.
77c8cf41
JH
735
736=back
737
738=head2 Updated And Improved Modules and Pragmata
739
740=over 4
741
742=item *
743
61947107
JH
744The following independently supported modules have been updated to the
745newest versions from CPAN: CGI, CPAN, DB_File, File::Spec, File::Temp,
746Getopt::Long, Math::BigFloat, Math::BigInt, the podlators bundle
747(Pod::Man, Pod::Text), Pod::LaTeX, Pod::Parser, Storable,
748Term::ANSIColor, Test, Text-Tabs+Wrap.
77c8cf41
JH
749
750=item *
751
61947107 752The attributes::reftype() now works on tied arguments.
77c8cf41
JH
753
754=item *
755
61947107 756AutoLoader can now be disabled with C<no AutoLoader;>,
77c8cf41
JH
757
758=item *
759
61947107 760Data::Dumper has now an option to sort hashes.
77c8cf41
JH
761
762=item *
763
764The English module can now be used without the infamous performance
765hit by saying
766
767 use English '-no_performance_hit';
768
769(Assuming, of course, that one doesn't need the troublesome variables
770C<$`>, C<$&>, or C<$'>.) Also, introduced C<@LAST_MATCH_START> and
771C<@LAST_MATCH_END> English aliases for C<@-> and C<@+>.
772
773=item *
774
775File::Find now has pre- and post-processing callbacks. It also
776correctly changes directories when chasing symbolic links. Callbacks
777(naughtily) exiting with "next;" instead of "return;" now work.
778
779=item *
780
781File::Glob::glob() renamed to File::Glob::bsd_glob() to avoid
782prototype mismatch with CORE::glob().
783
784=item *
785
786IPC::Open3 now allows the use of numeric file descriptors.
787
788=item *
789
790use lib now works identically to @INC. Removing directories
791with 'no lib' now works.
792
793=item *
794
795C<%INC> now localised in a Safe compartment so that use/require work.
796
797=item *
798
799The Shell module now has an OO interface.
800
801=item *
802
61947107
JH
803B::Deparse has been significantly enhanced. It now can deparse almost
804all of the standard test suite (so that the tests still succeed).
805There is a make target "test.deparse" for trying this out.
77c8cf41
JH
806
807=item *
808
809Class::Struct can now define the classes in compile time.
810
811=item *
812
61947107
JH
813Class::Struct now assigns the array/hash element if the accessor
814is called with an array/hash element as the B<sole> argument.
815
816=item *
817
818Fcntl, Socket, and Sys::Syslog have been rewritten to use the
819new-style constant dispatch section (see L<ExtUtils::Constant>).
77c8cf41 820
61947107
JH
821=item *
822
823File::Find is now (again) reentrant. It also has been made
824more portable.
825
826=item *
827
828File::Glob now supports C<GLOB_LIMIT> constant to limit the size of
829the returned list of filenames.
77c8cf41
JH
830
831=item *
832
833Devel::Peek now has an interface for the Perl memory statistics
834(this works only if you are using perl's malloc, and if you have
835compiled with debugging).
836
837=item *
838
839IO::Socket has now atmark() method, which returns true if the socket
840is positioned at the out-of-band mark. The method is also exportable
841as a sockatmark() function.
842
843=item *
844
845IO::Socket::INET has support for ReusePort option (if your platform
846supports it). The Reuse option now has an alias, ReuseAddr. For clarity
847you may want to prefer ReuseAddr.
848
849=item *
850
61947107
JH
851IO::Socket::INET now supports C<LocalPort> of zero (usually meaning
852that the operating system will make one up.)
77c8cf41
JH
853
854=item *
855
61947107
JH
856Math::BigFloat and Math::BigInt have undergone much fixing,
857they are now magnitudes faster, and they support various
858bignum libraries such as GMP and PARI as their backends.
f39f21d8
JH
859
860=item *
861
61947107
JH
862Net::Ping has been enhanced. There is now "external" protocol which
863uses Net::Ping::External module which runs external ping(1) and parses
864the output. An alpha version of Net::Ping::External is available in
865CPAN and in 5.7.2 the Net::Ping::External may be integrated to Perl.
f39f21d8 866
77c8cf41 867=item *
f39f21d8 868
61947107
JH
869The C<open> pragma allows layers other than ":raw" and ":crlf" when
870using PerlIO.
f39f21d8 871
77c8cf41 872=item *
f39f21d8 873
61947107
JH
874POSIX::sigaction() is now much more flexible and robust.
875You can now install coderef handlers, 'DEFAULT', and 'IGNORE'
876handlers, installing new handlers was not atomic.
f39f21d8
JH
877
878=item *
879
61947107 880The Test module has been significantly enhanced.
f39f21d8
JH
881
882=item *
883
61947107 884The C<vars> pragma now supports declaring fully qualified variables.
77c8cf41 885(Something that C<our()> does not and will not support.)
f39f21d8 886
888aee59
JH
887=item *
888
61947107
JH
889The utf8:: name space (as in the pragma) provides various
890Perl-callable functions to provide low level access to Perl's
891internal Unicode representation. At the moment only length()
892has been implemented.
888aee59 893
f39f21d8
JH
894=back
895
77c8cf41 896=head1 Utility Changes
f39f21d8
JH
897
898=over 4
899
900=item *
901
61947107 902Emacs perl mode (emacs/cperl-mode.el) has been updated to version
77c8cf41 9034.31.
f39f21d8
JH
904
905=item *
906
61947107 907F<emacs/e2ctags.pl> is now much faster.
f39f21d8
JH
908
909=item *
910
61947107 911h2xs now produces a template README.
f39f21d8 912
77c8cf41
JH
913=item *
914
61947107 915L<h2ph> now supports C trigraphs.
f39f21d8
JH
916
917=item *
918
61947107
JH
919L<h2xs> uses the new L<ExtUtils::Constant> module which will affect
920newly created extensions that define constants. Since the new code is
921more correct (if you have two constants where the first one is a
922prefix of the second one, the first constant B<never> gets defined),
923less lossy (it uses integers for integer constant, as opposed to the
924old code that used floating point numbers even for integer constants),
925and slightly faster, you might want to consider regenerating your
926extension code (the new scheme makes regenerating easy).
927L<h2xs> now also supports C trigraphs.
f39f21d8
JH
928
929=item *
930
61947107 931L<libnetcfg> has been added to configure the libnet.
f39f21d8
JH
932
933=item *
934
61947107
JH
935perlbug is now much more robust. It also sends the bug report to
936perl.org, not perl.com.
f39f21d8
JH
937
938=item *
939
61947107
JH
940perlcc has been rewritten and its user interface (that is,
941command line) is much more like that of the UNIX C compiler, cc.
f39f21d8
JH
942
943=item *
944
61947107
JH
945perlivp is a new utility for doing Installation Verification
946Procedure after installing Perl.
f39f21d8
JH
947
948=item *
949
61947107 950pod2html now allows specifying a cache directory.
f39f21d8
JH
951
952=item *
953
61947107
JH
954s2p has been completely rewritten in Perl. (It is in fact a full
955implementation of sed in Perl.)
956
957=item *
958
959xsubpp now understands POD documentation embedded in the *.xs files.
f39f21d8
JH
960
961=item *
962
61947107 963xsubpp now supports OUT keyword.
f39f21d8
JH
964
965=back
966
77c8cf41 967=head1 New Documentation
f39f21d8
JH
968
969=over 4
970
971=item *
972
77c8cf41
JH
973perl56delta details the changes between the 5.005 release and the
9745.6.0 release.
f39f21d8
JH
975
976=item *
977
61947107
JH
978perlclib documents the internal replacements for standard C library
979functions. (Interesting only for extension writers and Perl core
980hackers.)
981
982=item *
983
77c8cf41 984perldebtut is a Perl debugging tutorial.
f39f21d8 985
77c8cf41 986=item *
f39f21d8 987
77c8cf41
JH
988perlebcdic contains considerations for running Perl on EBCDIC platforms.
989Note that unfortunately EBCDIC platforms that used to supported back in
990Perl 5.005 are still unsupported by Perl 5.7.0; the plan, however, is to
991bring them back to the fold.
f39f21d8 992
77c8cf41
JH
993=item *
994
888aee59
JH
995perlintro is a gentle introduction to Perl.
996
997=item *
998
61947107
JH
999perliol documents the internals of PerlIO with layers.
1000
1001=item *
1002
888aee59
JH
1003perlmodstyle is a style guide for writing modules.
1004
1005=item *
1006
77c8cf41 1007perlnewmod tells about writing and submitting a new module.
f39f21d8
JH
1008
1009=item *
1010
888aee59
JH
1011perlpod has been rewritten to be clearer and to record the best
1012practices gathered over the years.
1013
1014=item *
1015
1016perlpodstyle is a more formal specification of the pod format,
1017mainly of interest for writers of pod applications, not to
1018people writing in pod.
1019
1020=item *
1021
77c8cf41
JH
1022perlposix-bc explains using Perl on the POSIX-BC platform
1023(an EBCDIC mainframe platform).
f39f21d8
JH
1024
1025=item *
1026
77c8cf41 1027perlretut is a regular expression tutorial.
f39f21d8
JH
1028
1029=item *
1030
77c8cf41
JH
1031perlrequick is a regular expressions quick-start guide.
1032Yes, much quicker than perlretut.
f39f21d8 1033
77c8cf41 1034=item *
f39f21d8 1035
61947107
JH
1036perltodo has been updated.
1037
1038=item *
1039
888aee59 1040perltootc has been renamed as perltooc (to not to conflict
61947107 1041with perltoot in filesystems restricted to "8.3" names)
888aee59
JH
1042
1043=item *
1044
1045perluniintro is an introduction to using Unicode in Perl
1046(perlunicode is more of a reference)
1047
1048=item *
1049
77c8cf41
JH
1050perlutil explains the command line utilities packaged with the Perl
1051distribution.
1052
1053=back
f39f21d8 1054
61947107
JH
1055The following platform-specific documents are available before
1056the installation as README.I<platform>, and after the installation
1057as perlI<platform>:
f39f21d8 1058
61947107
JH
1059 perlaix perlamiga perlapollo perlbeos perlbs2000
1060 perlce perlcygwin perldgux perldos perlepoc perlhpux
1061 perlhurd perlmachten perlmacos perlmint perlmpeix
1062 perlnetware perlos2 perlos390 perlplan9 perlqnx perlsolaris
1063 perltru64 perluts perlvmesa perlvms perlvos perlwin32
77c8cf41
JH
1064
1065=over 4
1066
1067=item *
1068
61947107
JH
1069The documentation for the POSIX-BC platform is called "BS2000", to avoid
1070confusion with the Perl POSIX module.
77c8cf41
JH
1071
1072=item *
1073
61947107
JH
1074The documentation for the WinCE platform is called "CE", to avoid
1075confusion with the perlwin32 documentation on 8.3-restricted filesystems.
77c8cf41
JH
1076
1077=back
1078
1079=head1 Performance Enhancements
1080
1081=over 4
1082
1083=item *
1084
1085map() that changes the size of the list should now work faster.
1086
1087=item *
1088
1089sort() has been changed to use mergesort internally as opposed to the
1090earlier quicksort. For very small lists this may result in slightly
1091slower sorting times, but in general the speedup should be at least
109220%. Additional bonuses are that the worst case behaviour of sort()
1093is now better (in computer science terms it now runs in time O(N log N),
1094as opposed to quicksort's Theta(N**2) worst-case run time behaviour),
1095and that sort() is now stable (meaning that elements with identical
1096keys will stay ordered as they were before the sort).
1097
1098=item *
1099
1100Hashes now use Bob Jenkins "One-at-a-Time" hashing key algorithm
1101(http://burtleburtle.net/bob/hash/doobs.html). This algorithm is
1102reasonably fast while producing a much better spread of values than
1103the old hashing algorithm (originally by Chris Torek, later tweaked by
1104Ilya Zakharevich). Hash values output from the algorithm on a hash of
1105all 3-char printable ASCII keys comes much closer to passing the
1106DIEHARD random number generation tests. According to perlbench, this
1107change has not affected the overall speed of Perl.
1108
1109=item *
1110
1111unshift() should now be noticeably faster.
1112
1113=back
1114
1115=head1 Installation and Configuration Improvements
1116
1117=head2 Generic Improvements
1118
1119=over 4
1120
1121=item *
1122
1123INSTALL now explains how you can configure Perl to use 64-bit
1124integers even on non-64-bit platforms.
1125
1126=item *
1127
1128Policy.sh policy change: if you are reusing a Policy.sh file
1129(see INSTALL) and you use Configure -Dprefix=/foo/bar and in the old
1130Policy $prefix eq $siteprefix and $prefix eq $vendorprefix, all of
1131them will now be changed to the new prefix, /foo/bar. (Previously
1132only $prefix changed.) If you do not like this new behaviour,
1133specify prefix, siteprefix, and vendorprefix explicitly.
1134
1135=item *
1136
1137A new optional location for Perl libraries, otherlibdirs, is available.
1138It can be used for example for vendor add-ons without disturbing Perl's
1139own library directories.
1140
1141=item *
1142
1143In many platforms the vendor-supplied 'cc' is too stripped-down to
1144build Perl (basically, 'cc' doesn't do ANSI C). If this seems
1145to be the case and 'cc' does not seem to be the GNU C compiler
1146'gcc', an automatic attempt is made to find and use 'gcc' instead.
1147
1148=item *
1149
1150gcc needs to closely track the operating system release to avoid
1151build problems. If Configure finds that gcc was built for a different
1152operating system release than is running, it now gives a clearly visible
1153warning that there may be trouble ahead.
1154
1155=item *
1156
1157If binary compatibility with the 5.005 release is not wanted, Configure
1158no longer suggests including the 5.005 modules in @INC.
1159
1160=item *
1161
1162Configure C<-S> can now run non-interactively.
1163
1164=item *
1165
1166configure.gnu now works with options with whitespace in them.
f39f21d8 1167
77c8cf41 1168=item *
f39f21d8 1169
77c8cf41 1170installperl now outputs everything to STDERR.
f39f21d8 1171
77c8cf41
JH
1172=item *
1173
1174$Config{byteorder} is now computed dynamically (this is more robust
1175with "fat binaries" where an executable image contains binaries for
1176more than one binary platform.)
f39f21d8
JH
1177
1178=item *
1179
1180Because PerlIO is now the default on most platforms, "-perlio" doesn't
1181get appended to the $Config{archname} (also known as $^O) anymore.
1182Instead, if you explicitly choose not to use perlio (Configure command
1183line option -Uuseperlio), you will get "-stdio" appended.
1184
1185=item *
1186
1187Another change related to the architecture name is that "-64all"
1188(-Duse64bitall, or "maximally 64-bit") is appended only if your
1189pointers are 64 bits wide. (To be exact, the use64bitall is ignored.)
1190
1191=item *
1192
77c8cf41
JH
1193In AFS installations one can configure the root of the AFS to be
1194somewhere else than the default F</afs> by using the Configure
1195parameter C<-Dafsroot=/some/where/else>.
1196
1197=item *
1198
61947107
JH
1199APPLLIB_EXP, a less-know configuration-time definition, has been
1200documented. It can be used to prepend site-specific directories
1201to Perl's default search path (@INC), see INSTALL for information.
1202
1203=item *
1204
77c8cf41
JH
1205The version of Berkeley DB used when the Perl (and, presumably, the
1206DB_File extension) was built is now available as
1207C<@Config{qw(db_version_major db_version_minor db_version_patch)}>
1208from Perl and as C<DB_VERSION_MAJOR_CFG DB_VERSION_MINOR_CFG
1209DB_VERSION_PATCH_CFG> from C.
1210
1211=item *
1212
61947107
JH
1213Building Berkeley DB3 for compatibility modes for DB, NDBM, and ODBM
1214has been documented in INSTALL.
77c8cf41
JH
1215
1216=item *
1217
61947107
JH
1218If you have CPAN access (either network or a local copy such as a
1219CD-ROM) you can during specify extra modules to Configure to build and
1220install with Perl using the -Dextras=... option. See INSTALL for
1221more details.
f39f21d8 1222
61947107 1223=item *
f39f21d8 1224
61947107
JH
1225In addition to config.over a new override file, config.arch, is
1226available. That is supposed to be used by hints file writers for
1227architecture-wide changes (as opposed to config.over which is for
1228site-wide changes).
f39f21d8
JH
1229
1230=item *
1231
61947107
JH
1232For Perl developers several new make targets for profiling
1233and debugging have been added, see L<perlhack>.
1234
1235=over 8
f39f21d8
JH
1236
1237=item *
1238
61947107
JH
1239Use of the F<gprof> tool to profile Perl has been documented in
1240L<perlhack>. There is a make target called "perl.gprof" for
1241generating a gprofiled Perl executable.
f39f21d8
JH
1242
1243=item *
1244
61947107
JH
1245If you have GCC 3, there is a make target called "perl.gcov" for
1246creating a gcoved Perl executable for coverage analysis. See
1247L<perlhack>.
f39f21d8
JH
1248
1249=item *
1250
61947107
JH
1251If you are on IRIX or Tru64 platforms, new profiling/debugging options
1252have been added, see L<perlhack> for more information about pixie and
1253Third Degree.
1254
1255=back
f39f21d8
JH
1256
1257=item *
1258
61947107
JH
1259Guidelines of how to construct minimal Perl installations have
1260been added to INSTALL.
f39f21d8
JH
1261
1262=item *
1263
61947107
JH
1264The Thread extension is now not built at all under ithreads
1265(C<Configure -Duseithreads>) because it wouldn't work anyway (the
1266Thread extension requires being Configured with C<-Duse5005threads>).
f39f21d8 1267
61947107
JH
1268But note that the Thread.pm interface is now shared by both
1269thread models.
f39f21d8 1270
61947107 1271=back
f39f21d8 1272
61947107 1273=head2 New Or Improved Platforms
f39f21d8 1274
61947107
JH
1275For the list of platforms known to support Perl,
1276see L<perlport/"Supported Platforms">.
1277
1278=over 4
f39f21d8
JH
1279
1280=item *
1281
61947107 1282AIX dynamic loading should be now better supported.
f39f21d8 1283
f39f21d8
JH
1284=item *
1285
77c8cf41
JH
1286AIX should now work better with gcc, threads, and 64-bitness. Also the
1287long doubles support in AIX should be better now. See L<perlaix>.
f39f21d8
JH
1288
1289=item *
1290
61947107
JH
1291After a long pause, AmigaOS has been verified to be happy with Perl.
1292
1293=item *
1294
77c8cf41 1295AtheOS (http://www.atheos.cx/) is a new platform.
f39f21d8 1296
77c8cf41 1297=item *
f39f21d8 1298
77c8cf41 1299DG/UX platform now supports the 5.005-style threads. See L<perldgux>.
f39f21d8
JH
1300
1301=item *
1302
77c8cf41 1303DYNIX/ptx platform (a.k.a. dynixptx) is supported at or near osvers 4.5.2.
f39f21d8
JH
1304
1305=item *
1306
61947107
JH
1307EBCDIC platforms (z/OS, also known as OS/390, POSIX-BC, and VM/ESA)
1308have been regained. Many test suite tests still fail and the
1309co-existence of Unicode and EBCDIC isn't quite settled, but the
1310situation is much better than with Perl 5.6. See L<perlos390>,
1311L<perlbs2000> (for POSIX-BC), and L<perlvmesa> for more information.
f39f21d8
JH
1312
1313=item *
1314
61947107
JH
1315Building perl with -Duseithreads or -Duse5005threads now works under
1316HP-UX 10.20 (previously it only worked under 10.30 or later). You will
1317need a thread library package installed. See README.hpux.
f39f21d8 1318
77c8cf41 1319=item *
f39f21d8 1320
61947107
JH
1321MacOS Classic (MacPerl has of course been available since
1322perl 5.004 but now the source code bases of standard Perl
1323and MacPerl have been synchronised)
f39f21d8 1324
77c8cf41 1325=item *
f39f21d8 1326
61947107
JH
1327MacOS X (or Darwin) should now be able to build Perl even on HFS+
1328filesystems. (The case-insensitivity confused the Perl build process.)
f39f21d8 1329
888aee59
JH
1330=item *
1331
61947107 1332NCR MP-RAS is now supported.
888aee59
JH
1333
1334=item *
1335
61947107 1336NetWare from Novell is now supported. See L<perlnetware>.
888aee59
JH
1337
1338=item *
1339
61947107 1340NonStop-UX is now supported.
888aee59
JH
1341
1342=item *
1343
61947107 1344Amdahl UTS UNIX mainframe platform is now supported.
888aee59
JH
1345
1346=item *
1347
61947107
JH
1348WinCE is now supported. See L<perlce>.
1349
1350=item *
1351
1352z/OS (formerly known as OS/390, formerly known as MVS OE) has now
1353support for dynamic loading. This is not selected by default,
1354however, you must specify -Dusedl in the arguments of Configure.
888aee59 1355
f39f21d8
JH
1356=back
1357
1358=head1 Selected Bug Fixes
1359
f39f21d8
JH
1360=over 4
1361
1362=item *
1363
77c8cf41
JH
1364Several debugger fixes: exit code now reflects the script exit code,
1365condition C<"0"> now treated correctly, the C<d> command now checks
1366line number, the C<$.> no longer gets corrupted, all debugger output now
1367goes correctly to the socket if RemotePort is set.
f39f21d8
JH
1368
1369=item *
1370
77c8cf41 1371C<*foo{FORMAT}> now works.
f39f21d8
JH
1372
1373=item *
1374
77c8cf41 1375Lexical warnings now propagating correctly between scopes.
f39f21d8
JH
1376
1377=item *
1378
77c8cf41 1379Line renumbering with eval and C<#line> now works.
f39f21d8
JH
1380
1381=item *
1382
77c8cf41 1383Fixed numerous memory leaks, especially in eval "".
f39f21d8
JH
1384
1385=item *
1386
77c8cf41
JH
1387Modulus of unsigned numbers now works (4063328477 % 65535 used to
1388return 27406, instead of 27047).
f39f21d8
JH
1389
1390=item *
1391
77c8cf41
JH
1392Some "not a number" warnings introduced in 5.6.0 eliminated to be
1393more compatible with 5.005. Infinity is now recognised as a number.
f39f21d8
JH
1394
1395=item *
1396
77c8cf41 1397our() variables will not cause "will not stay shared" warnings.
f39f21d8
JH
1398
1399=item *
1400
77c8cf41 1401pack "Z" now correctly terminates the string with "\0".
f39f21d8
JH
1402
1403=item *
1404
77c8cf41
JH
1405Fix password routines which in some shadow password platforms
1406(e.g. HP-UX) caused getpwent() to return every other entry.
f39f21d8
JH
1407
1408=item *
1409
77c8cf41 1410printf() no longer resets the numeric locale to "C".
f39f21d8
JH
1411
1412=item *
1413
77c8cf41 1414C<q(a\\b)> now parses correctly as C<'a\\b'>.
f39f21d8
JH
1415
1416=item *
1417
77c8cf41
JH
1418Printing quads (64-bit integers) with printf/sprintf now works
1419without the q L ll prefixes (assuming you are on a quad-capable platform).
f39f21d8
JH
1420
1421=item *
1422
77c8cf41 1423Regular expressions on references and overloaded scalars now work.
f39f21d8
JH
1424
1425=item *
1426
77c8cf41 1427scalar() now forces scalar context even when used in void context.
f39f21d8
JH
1428
1429=item *
1430
77c8cf41
JH
1431sort() arguments are now compiled in the right wantarray context
1432(they were accidentally using the context of the sort() itself).
f39f21d8
JH
1433
1434=item *
1435
77c8cf41
JH
1436Changed the POSIX character class C<[[:space:]]> to include the (very
1437rare) vertical tab character. Added a new POSIX-ish character class
1438C<[[:blank:]]> which stands for horizontal whitespace (currently,
1439the space and the tab).
f39f21d8
JH
1440
1441=item *
1442
77c8cf41
JH
1443$AUTOLOAD, sort(), lock(), and spawning subprocesses
1444in multiple threads simultaneously are now thread-safe.
f39f21d8
JH
1445
1446=item *
1447
77c8cf41 1448Allow read-only string on left hand side of non-modifying tr///.
f39f21d8 1449
77c8cf41 1450=item *
f39f21d8 1451
77c8cf41 1452Several Unicode fixes (but still not perfect).
f39f21d8 1453
77c8cf41 1454=over 8
f39f21d8
JH
1455
1456=item *
1457
77c8cf41
JH
1458BOMs (byte order marks) in the beginning of Perl files
1459(scripts, modules) should now be transparently skipped.
1460UTF-16 (UCS-2) encoded Perl files should now be read correctly.
f39f21d8
JH
1461
1462=item *
1463
77c8cf41 1464The character tables have been updated to Unicode 3.0.1.
f39f21d8
JH
1465
1466=item *
1467
77c8cf41
JH
1468chr() for values greater than 127 now create utf8 when under use
1469utf8.
f39f21d8 1470
77c8cf41 1471=item *
f39f21d8 1472
77c8cf41
JH
1473Comparing with utf8 data does not magically upgrade non-utf8 data into
1474utf8.
f39f21d8 1475
77c8cf41 1476=item *
f39f21d8 1477
77c8cf41 1478C<IsAlnum>, C<IsAlpha>, and C<IsWord> now match titlecase.
f39f21d8 1479
77c8cf41 1480=item *
f39f21d8 1481
77c8cf41
JH
1482Concatenation with the C<.> operator or via variable interpolation,
1483C<eq>, C<substr>, C<reverse>, C<quotemeta>, the C<x> operator,
1484substitution with C<s///>, single-quoted UTF8, should now work--in
1485theory.
f39f21d8 1486
77c8cf41 1487=item *
f39f21d8 1488
77c8cf41
JH
1489The C<tr///> operator now works I<slightly> better but is still rather
1490broken. Note that the C<tr///CU> functionality has been removed (but
1491see pack('U0', ...)).
f39f21d8 1492
77c8cf41 1493=item *
f39f21d8 1494
77c8cf41 1495vec() now refuses to deal with characters >255.
f39f21d8 1496
77c8cf41 1497=item *
f39f21d8 1498
77c8cf41 1499Zero entries were missing from the Unicode classes like C<IsDigit>.
f39f21d8 1500
77c8cf41 1501=back
f39f21d8 1502
77c8cf41 1503=item *
f39f21d8 1504
77c8cf41
JH
1505UNIVERSAL::isa no longer caches methods incorrectly. (This broke
1506the Tk extension with 5.6.0.)
f39f21d8 1507
77c8cf41 1508=item *
f39f21d8 1509
77c8cf41
JH
1510Configure no longer includes the DBM libraries (dbm, gdbm, db, ndbm)
1511when building the Perl binary. The only exception to this is SunOS 4.x,
1512which needs them.
f39f21d8 1513
77c8cf41 1514=item *
f39f21d8 1515
77c8cf41 1516SOCKS support is now much more robust.
f39f21d8 1517
77c8cf41 1518=item *
f39f21d8 1519
77c8cf41
JH
1520If your file system supports symbolic links you can build Perl outside
1521of the source directory by
f39f21d8 1522
77c8cf41
JH
1523 mkdir /tmp/perl/build/directory
1524 cd /tmp/perl/build/directory
1525 sh /path/to/perl/source/Configure -Dmksymlinks ...
f39f21d8 1526
77c8cf41
JH
1527This will create in /tmp/perl/build/directory a tree of symbolic links
1528pointing to files in /path/to/perl/source. The original files are left
1529unaffected. After Configure has finished you can just say
f39f21d8 1530
77c8cf41 1531 make all test
f39f21d8 1532
77c8cf41 1533and Perl will be built and tested, all in /tmp/perl/build/directory.
f39f21d8 1534
77c8cf41 1535=back
f39f21d8 1536
77c8cf41 1537=head2 Platform Specific Changes and Fixes
f39f21d8
JH
1538
1539=over 4
1540
1541=item *
1542
77c8cf41 1543BSDI 4.*
f39f21d8 1544
77c8cf41 1545Perl now works on post-4.0 BSD/OSes.
f39f21d8
JH
1546
1547=item *
1548
77c8cf41 1549All BSDs
f39f21d8 1550
77c8cf41 1551Setting C<$0> now works (as much as possible; see perlvar for details).
f39f21d8
JH
1552
1553=item *
1554
77c8cf41 1555Cygwin
f39f21d8 1556
77c8cf41 1557Numerous updates; currently synchronised with Cygwin 1.1.4.
f39f21d8
JH
1558
1559=item *
1560
77c8cf41 1561EPOC
f39f21d8 1562
77c8cf41 1563EPOC update after Perl 5.6.0. See README.epoc.
f39f21d8
JH
1564
1565=item *
1566
77c8cf41 1567FreeBSD 3.*
f39f21d8 1568
77c8cf41 1569Perl now works on post-3.0 FreeBSDs.
f39f21d8
JH
1570
1571=item *
1572
77c8cf41
JH
1573HP-UX
1574
1575README.hpux updated; C<Configure -Duse64bitall> now almost works.
f39f21d8
JH
1576
1577=item *
1578
77c8cf41 1579IRIX
f39f21d8 1580
77c8cf41
JH
1581Numerous compilation flag and hint enhancements; accidental mixing
1582of 32-bit and 64-bit libraries (a doomed attempt) made much harder.
f39f21d8 1583
77c8cf41 1584=item *
f39f21d8 1585
77c8cf41 1586Linux
f39f21d8 1587
77c8cf41 1588Long doubles should now work (see INSTALL).
f39f21d8
JH
1589
1590=item *
1591
77c8cf41 1592MacOS Classic
f39f21d8 1593
77c8cf41
JH
1594Compilation of the standard Perl distribution in MacOS Classic should
1595now work if you have the Metrowerks development environment and
1596the missing Mac-specific toolkit bits. Contact the macperl mailing
1597list for details.
f39f21d8
JH
1598
1599=item *
1600
77c8cf41 1601MPE/iX
f39f21d8 1602
77c8cf41 1603MPE/iX update after Perl 5.6.0. See README.mpeix.
f39f21d8
JH
1604
1605=item *
1606
77c8cf41 1607NetBSD/sparc
f39f21d8 1608
77c8cf41 1609Perl now works on NetBSD/sparc.
f39f21d8
JH
1610
1611=item *
1612
77c8cf41 1613OS/2
f39f21d8 1614
77c8cf41 1615Now works with usethreads (see INSTALL).
f39f21d8
JH
1616
1617=item *
1618
77c8cf41 1619Solaris
f39f21d8 1620
77c8cf41 162164-bitness using the Sun Workshop compiler now works.
f39f21d8
JH
1622
1623=item *
1624
77c8cf41 1625Tru64 (aka Digital UNIX, aka DEC OSF/1)
f39f21d8 1626
77c8cf41
JH
1627The operating system version letter now recorded in $Config{osvers}.
1628Allow compiling with gcc (previously explicitly forbidden). Compiling
1629with gcc still not recommended because buggy code results, even with
1630gcc 2.95.2.
f39f21d8
JH
1631
1632=item *
1633
77c8cf41
JH
1634Unicos
1635
1636Fixed various alignment problems that lead into core dumps either
1637during build or later; no longer dies on math errors at runtime;
1638now using full quad integers (64 bits), previously was using
1639only 46 bit integers for speed.
f39f21d8
JH
1640
1641=item *
1642
77c8cf41
JH
1643VMS
1644
1645chdir() now works better despite a CRT bug; now works with MULTIPLICITY
1646(see INSTALL); now works with Perl's malloc.
f39f21d8
JH
1647
1648=item *
1649
77c8cf41 1650Windows
f39f21d8 1651
77c8cf41 1652=over 8
f39f21d8
JH
1653
1654=item *
1655
77c8cf41 1656accept() no longer leaks memory.
f39f21d8
JH
1657
1658=item *
1659
77c8cf41 1660Better chdir() return value for a non-existent directory.
f39f21d8 1661
77c8cf41 1662=item *
f39f21d8 1663
77c8cf41 1664New %ENV entries now propagate to subprocesses.
f39f21d8
JH
1665
1666=item *
1667
77c8cf41
JH
1668$ENV{LIB} now used to search for libs under Visual C.
1669
1670=item *
1671
1672A failed (pseudo)fork now returns undef and sets errno to EAGAIN.
f39f21d8
JH
1673
1674=item *
1675
77c8cf41 1676Allow REG_EXPAND_SZ keys in the registry.
f39f21d8
JH
1677
1678=item *
1679
77c8cf41 1680Can now send() from all threads, not just the first one.
f39f21d8
JH
1681
1682=item *
1683
77c8cf41 1684Fake signal handling reenabled, bugs and all.
f39f21d8
JH
1685
1686=item *
1687
77c8cf41
JH
1688Less stack reserved per thread so that more threads can run
1689concurrently. (Still 16M per thread.)
f39f21d8
JH
1690
1691=item *
1692
77c8cf41
JH
1693C<File::Spec->tmpdir()> now prefers C:/temp over /tmp
1694(works better when perl is running as service).
f39f21d8
JH
1695
1696=item *
1697
77c8cf41 1698Better UNC path handling under ithreads.
f39f21d8
JH
1699
1700=item *
1701
77c8cf41 1702wait() and waitpid() now work much better.
f39f21d8
JH
1703
1704=item *
1705
77c8cf41 1706winsock handle leak fixed.
f39f21d8
JH
1707
1708=back
1709
77c8cf41 1710=back
f39f21d8 1711
77c8cf41 1712=head1 New or Changed Diagnostics
f39f21d8 1713
77c8cf41
JH
1714All regular expression compilation error messages are now hopefully
1715easier to understand both because the error message now comes before
1716the failed regex and because the point of failure is now clearly
1717marked.
f39f21d8 1718
77c8cf41
JH
1719The various "opened only for", "on closed", "never opened" warnings
1720drop the C<main::> prefix for filehandles in the C<main> package,
1721for example C<STDIN> instead of <main::STDIN>.
f39f21d8 1722
77c8cf41
JH
1723The "Unrecognized escape" warning has been extended to include C<\8>,
1724C<\9>, and C<\_>. There is no need to escape any of the C<\w> characters.
f39f21d8 1725
77c8cf41 1726=over 4
f39f21d8 1727
77c8cf41
JH
1728Two new debugging options have been added: if you have compiled your
1729Perl with debugging, you can use the -DT and -DR options to trace
1730tokenising and to add reference counts to displaying variables,
1731respectively.
f39f21d8
JH
1732
1733=item *
1734
77c8cf41
JH
1735If an attempt to use a (non-blessed) reference as an array index
1736is made, a warning is given.
f39f21d8
JH
1737
1738=item *
1739
77c8cf41
JH
1740C<push @a;> and C<unshift @a;> (with no values to push or unshift)
1741now give a warning. This may be a problem for generated and evaled
1742code.
f39f21d8
JH
1743
1744=back
1745
77c8cf41 1746=head1 Changed Internals
f39f21d8
JH
1747
1748=over 4
1749
1750=item *
1751
77c8cf41
JH
1752perlapi.pod (a companion to perlguts) now attempts to document the
1753internal API.
f39f21d8
JH
1754
1755=item *
1756
77c8cf41
JH
1757You can now build a really minimal perl called microperl.
1758Building microperl does not require even running Configure;
1759C<make -f Makefile.micro> should be enough. Beware: microperl makes
1760many assumptions, some of which may be too bold; the resulting
1761executable may crash or otherwise misbehave in wondrous ways.
1762For careful hackers only.
f39f21d8
JH
1763
1764=item *
1765
77c8cf41 1766Added rsignal(), whichsig(), do_join() to the publicised API.
f39f21d8
JH
1767
1768=item *
1769
77c8cf41 1770Made possible to propagate customised exceptions via croak()ing.
f39f21d8 1771
77c8cf41 1772=item *
f39f21d8 1773
77c8cf41 1774Added is_utf8_char(), is_utf8_string(), bytes_to_utf8(), and utf8_to_bytes().
f39f21d8 1775
77c8cf41 1776=item *
f39f21d8 1777
77c8cf41 1778Now xsubs can have attributes just like subs.
f39f21d8
JH
1779
1780=item *
1781
77c8cf41
JH
1782Some new APIs: ptr_table_clear(), ptr_table_free(), sv_setref_uv().
1783For the full list of the available APIs see L<perlapi>.
f39f21d8
JH
1784
1785=item *
1786
77c8cf41
JH
1787dTHR and djSP have been obsoleted; the former removed (because it's
1788a no-op) and the latter replaced with dSP.
f39f21d8
JH
1789
1790=item *
1791
61947107
JH
1792PERL_OBJECT has been completely removed.
1793
1794=item *
1795
1796Documentation on how to use the Perl source repository has been added
1797to F<Porting/repository.pod>.
f39f21d8 1798
888aee59
JH
1799=item *
1800
61947107
JH
1801There are now several profiling make targets
1802
1803=item *
1804
1805The C<op_clear> and C<op_null> are now exported.
888aee59 1806
77c8cf41 1807=back
f39f21d8 1808
77c8cf41 1809=head1 Security Vulnerability Closed
f39f21d8 1810
77c8cf41 1811(This change was already made in 5.7.0 but bears repeating here.)
f39f21d8 1812
77c8cf41
JH
1813A potential security vulnerability in the optional suidperl component
1814of Perl was identified in August 2000. suidperl is neither built nor
1815installed by default. As of November 2001 the only known vulnerable
1816platform is Linux, most likely all Linux distributions. CERT and
1817various vendors and distributors have been alerted about the vulnerability.
1818See http://www.cpan.org/src/5.0/sperl-2000-08-05/sperl-2000-08-05.txt
1819for more information.
f39f21d8 1820
77c8cf41
JH
1821The problem was caused by Perl trying to report a suspected security
1822exploit attempt using an external program, /bin/mail. On Linux
1823platforms the /bin/mail program had an undocumented feature which
1824when combined with suidperl gave access to a root shell, resulting in
1825a serious compromise instead of reporting the exploit attempt. If you
1826don't have /bin/mail, or if you have 'safe setuid scripts', or if
1827suidperl is not installed, you are safe.
f39f21d8 1828
77c8cf41
JH
1829The exploit attempt reporting feature has been completely removed from
1830Perl 5.8.0 (and the maintenance release 5.6.1, and it was removed also
1831from all the Perl 5.7 releases), so that particular vulnerability
1832isn't there anymore. However, further security vulnerabilities are,
1833unfortunately, always possible. The suidperl code is being reviewed
1834and if deemed too risky to continue to be supported, it may be
1835completely removed from future releases. In any case, suidperl should
1836only be used by security experts who know exactly what they are doing
1837and why they are using suidperl instead of some other solution such as
1838sudo (see http://www.courtesan.com/sudo/).
f39f21d8 1839
77c8cf41 1840=head1 Selected Bug Fixes
f39f21d8 1841
77c8cf41
JH
1842Numerous memory leaks and uninitialized memory accesses have been hunted down.
1843Most importantly anonymous subs used to leak quite a bit.
1844
1845=over 4
f39f21d8
JH
1846
1847=item *
1848
77c8cf41
JH
1849chop(@list) in list context returned the characters chopped in
1850reverse order. This has been reversed to be in the right order.
f39f21d8 1851
77c8cf41 1852=item *
f39f21d8 1853
77c8cf41 1854The order of DESTROYs has been made more predictable.
f39f21d8 1855
77c8cf41
JH
1856=item *
1857
1858mkdir() now ignores trailing slashes in the directory name,
1859as mandated by POSIX.
f39f21d8
JH
1860
1861=item *
1862
77c8cf41 1863Attributes (like :shared) didn't work with our().
f39f21d8
JH
1864
1865=item *
1866
77c8cf41
JH
1867The PERL5OPT environment variable (for passing command line arguments
1868to Perl) didn't work for more than a single group of options.
f39f21d8
JH
1869
1870=item *
1871
77c8cf41
JH
1872The tainting behaviour of sprintf() has been rationalized. It does
1873not taint the result of floating point formats anymore, making the
1874behaviour consistent with that of string interpolation.
f39f21d8
JH
1875
1876=item *
1877
77c8cf41 1878All but the first argument of the IO syswrite() method are now optional.
f39f21d8 1879
77c8cf41 1880=item *
f39f21d8 1881
77c8cf41
JH
1882Tie::ARRAY SPLICE method was broken.
1883
1884=item *
f39f21d8 1885
77c8cf41
JH
1886vec() now tries to work with characters <= 255 when possible, but it leaves
1887higher character values in place. In that case, if vec() was used to modify
1888the string, it is no longer considered to be utf8-encoded.
f39f21d8
JH
1889
1890=item *
1891
1892The autouse pragma didn't work for Multi::Part::Function::Names.
1893
1894=item *
1895
1896The behaviour of non-decimal but numeric string constants such as
1897"0x23" was platform-dependent: in some platforms that was seen as 35,
1898in some as 0, in some as a floating point number (don't ask). This
1899was caused by Perl using the operating system libraries in a situation
1900where the result of the string to number conversion is undefined: now
1901Perl consistently handles such strings as zero in numeric contexts.
1902
1903=item *
1904
1905L<dprofpp> -R didn't work.
1906
1907=item *
1908
1909PERL5OPT with embedded spaces didn't work.
1910
1911=item *
1912
1913L<Sys::Syslog> ignored the C<LOG_AUTH> constant.
1914
f39f21d8
JH
1915=item *
1916
1917Some versions of glibc have a broken modfl(). This affects builds
1918with C<-Duselongdouble>. This version of Perl detects this brokenness
1919and has a workaround for it. The glibc release 2.2.2 is known to have
1920fixed the modfl() bug.
1921
77c8cf41
JH
1922=item *
1923
1924Linux previously had problems related to sockaddrlen when using
1925accept(), revcfrom() (in Perl: recv()), getpeername(), and getsockname().
1926
1927=item *
1928
1929Previously DYNIX/ptx had problems in its Configure probe for non-blocking I/O.
1930
1931=item *
1932
1933Windows
1934
1935=over 8
1936
1937=item *
1938
1939Borland C++ v5.5 is now a supported compiler that can build Perl.
1940However, the generated binaries continue to be incompatible with those
1941generated by the other supported compilers (GCC and Visual C++).
1942
1943=item *
1944
1945Win32::GetCwd() correctly returns C:\ instead of C: when at the drive root.
1946Other bugs in chdir() and Cwd::cwd() have also been fixed.
1947
1948=item *
1949
1950Duping socket handles with open(F, ">&MYSOCK") now works under Windows 9x.
1951
1952=item *
1953
1954HTML files will be installed in c:\perl\html instead of c:\perl\lib\pod\html
1955
1956=item *
1957
1958The makefiles now provide a single switch to bulk-enable all the features
1959enabled in ActiveState ActivePerl (a popular binary distribution).
1960
1961=back
1962
1963=head1 New Tests
1964
1965Several new tests have been added, especially for the F<lib> subsection.
1966
1967The tests are now reported in a different order than in earlier Perls.
1968(This happens because the test scripts from under t/lib have been moved
1969to be closer to the library/extension they are testing.)
1970
f39f21d8
JH
1971=head1 New or Changed Diagnostics
1972
1973=over 4
1974
1975=item *
1976
1977In the regular expression diagnostics the C<E<lt>E<lt> HERE> marker
1978introduced in 5.7.0 has been changed to be C<E<lt>-- HERE> since too
1979many people found the C<E<lt>E<lt>> to be too similar to here-document
1980starters.
1981
1982=item *
1983
1984If you try to L<perlfunc/pack> a number less than 0 or larger than 255
1985using the C<"C"> format you will get an optional warning. Similarly
1986for the C<"c"> format and a number less than -128 or more than 127.
1987
1988=item *
1989
1990Certain regex modifiers such as C<(?o)> make sense only if applied to
1991the entire regex. You will an optional warning if you try to do otherwise.
1992
1993=item *
1994
1995Using arrays or hashes as references (e.g. C<%foo->{bar}> has been
1996deprecated for a while. Now you will get an optional warning.
1997
1998=back
1999
2000=head1 Source Code Enhancements
2001
2002=head2 MAGIC constants
2003
2004The MAGIC constants (e.g. C<'P'>) have been macrofied
2005(e.g. C<PERL_MAGIC_TIED>) for better source code readability
2006and maintainability.
2007
2008=head2 Better commented code
2009
2010F<perly.c>, F<sv.c>, and F<sv.h> have now been extensively commented.
2011
2012=head2 Regex pre-/post-compilation items matched up
2013
2014The regex compiler now maintains a structure that identifies nodes in
2015the compiled bytecode with the corresponding syntactic features of the
2016original regex expression. The information is attached to the new
2017C<offsets> member of the C<struct regexp>. See L<perldebguts> for more
2018complete information.
2019
2020=head2 gcc -Wall
2021
2022The C code has been made much more C<gcc -Wall> clean. Some warning
2023messages still remain, though, so if you are compiling with gcc you
2024will see some warnings about dubious practices. The warnings are
2025being worked on.
2026
f39f21d8
JH
2027=head1 Known Problems
2028
2029Note that unlike other sections in this document (which describe
2030changes since 5.7.0) this section is cumulative containing known
2031problems for all the 5.7 releases.
2032
2033=head2 AIX
2034
2035=over 4
2036
2037=item *
2038
2039In AIX 4.2 Perl extensions that use C++ functions that use statics
2040may have problems in that the statics are not getting initialized.
2041In newer AIX releases this has been solved by linking Perl with
2042the libC_r library, but unfortunately in AIX 4.2 the said library
2043has an obscure bug where the various functions related to time
2044(such as time() and gettimeofday()) return broken values, and
2045therefore in AIX 4.2 Perl is not linked against the libC_r.
2046
2047=item *
2048
2049vac 5.0.0.0 May Produce Buggy Code For Perl
2050
2051The AIX C compiler vac version 5.0.0.0 may produce buggy code,
2052resulting in few random tests failing, but when the failing tests
2053are run by hand, they succeed. We suggest upgrading to at least
2054vac version 5.0.1.0, that has been known to compile Perl correctly.
2055"lslpp -L|grep vac.C" will tell you the vac version.
2056
2057=back
2058
2059=head2 Amiga Perl Invoking Mystery
2060
2061One cannot call Perl using the C<volume:> syntax, that is, C<perl -v>
2062works, but for example C<bin:perl -v> doesn't. The exact reason is
2063known but the current suspect is the F<ixemul> library.
2064
2065=head2 lib/ftmp-security tests warn 'system possibly insecure'
2066
2067Don't panic. Read INSTALL 'make test' section instead.
2068
2069=head2 Cygwin intermittent failures of lib/Memoize/t/expire_file 11 and 12
2070
2071The subtests 11 and 12 sometimes fail and sometimes work.
2072
2073=head2 HP-UX lib/io_multihomed Fails When LP64-Configured
2074
2075The lib/io_multihomed test may hang in HP-UX if Perl has been
2076configured to be 64-bit. Because other 64-bit platforms do not hang in
2077this test, HP-UX is suspect. All other tests pass in 64-bit HP-UX. The
2078test attempts to create and connect to "multihomed" sockets (sockets
2079which have multiple IP addresses).
2080
2081=head2 HP-UX lib/posix Subtest 9 Fails When LP64-Configured
2082
2083If perl is configured with -Duse64bitall, the successful result of the
2084subtest 10 of lib/posix may arrive before the successful result of the
2085subtest 9, which confuses the test harness so much that it thinks the
2086subtest 9 failed.
2087
2088=head2 Linux With Sfio Fails op/misc Test 48
2089
2090No known fix.
2091
2092=head2 OS/390
2093
2094OS/390 has rather many test failures but the situation is actually
2095better than it was in 5.6.0, it's just that so many new modules and
2096tests have been added.
2097
2098 Failed Test Stat Wstat Total Fail Failed List of Failed
2099 -----------------------------------------------------------------------------
2100 ../ext/B/Deparse.t 14 1 7.14% 14
2101 ../ext/B/Showlex.t 1 1 100.00% 1
2102 ../ext/Encode/Encode/Tcl.t 610 13 2.13% 592 594 596 598
2103 600 602 604-610
2104 ../ext/IO/lib/IO/t/io_unix.t 113 28928 5 3 60.00% 3-5
2105 ../ext/POSIX/POSIX.t 29 1 3.45% 14
2106 ../ext/Storable/t/lock.t 255 65280 5 3 60.00% 3-5
2107 ../lib/locale.t 129 33024 117 19 16.24% 99-117
2108 ../lib/warnings.t 434 1 0.23% 75
2109 ../lib/ExtUtils.t 27 1 3.70% 25
2110 ../lib/Math/BigInt/t/bigintpm.t 1190 1 0.08% 1145
2111 ../lib/Unicode/UCD.t 81 48 59.26% 1-16 49-64 66-81
2112 ../lib/User/pwent.t 9 1 11.11% 4
2113 op/pat.t 660 6 0.91% 242-243 424-425
2114 626-627
2115 op/split.t 0 9 ?? ?? % ??
2116 op/taint.t 174 3 1.72% 156 162 168
2117 op/tr.t 70 3 4.29% 50 58-59
2118 Failed 16/422 test scripts, 96.21% okay. 105/23251 subtests failed, 99.55% okay.
2119
2120=head2 op/sprintf tests 129 and 130
2121
2122The op/sprintf tests 129 and 130 are known to fail on some platforms.
2123Examples include any platform using sfio, and Compaq/Tandem's NonStop-UX.
2124The failing platforms do not comply with the ANSI C Standard, line
212519ff on page 134 of ANSI X3.159 1989 to be exact. (They produce
2126something other than "1" and "-1" when formatting 0.6 and -0.6 using
2127the printf format "%.0f", most often they produce "0" and "-0".)
2128
2129=head2 Failure of Thread tests
2130
2131B<Note that support for 5.005-style threading remains experimental.>
2132
2133The following tests are known to fail due to fundamental problems in
2134the 5.005 threading implementation. These are not new failures--Perl
21355.005_0x has the same bugs, but didn't have these tests.
2136
2137 lib/autouse.t 4
2138 t/lib/thr5005.t 19-20
2139
2140=head2 UNICOS
2141
2142=over 4
2143
2144=item *
2145
2146ext/POSIX/sigaction subtests 6 and 13 may fail.
2147
2148=item *
2149
2150lib/ExtUtils may spuriously claim that subtest 28 failed,
2151which is interesting since the test only has 27 tests.
2152
2153=item *
2154
2155Numerous numerical test failures
2156
2157 op/numconvert 209,210,217,218
2158 op/override 7
2159 ext/Time/HiRes/HiRes 9
2160 lib/Math/BigInt/t/bigintpm 1145
2161 lib/Math/Trig 25
2162
2163These tests fail because of yet unresolved floating point inaccuracies.
2164
2165=back
2166
2167=head2 UTS
2168
2169There are a few known test failures, see L<perluts>.
2170
2171=head2 VMS
2172
2173Rather many tests are failing in VMS but that actually more tests
2174succeed in VMS than they used to, it's just that there are many,
2175many more tests than there used to be.
2176
2177Here are the known failures from some compiler/platform combinations.
2178
2179DEC C V5.3-006 on OpenVMS VAX V6.2
2180
2181 [-.ext.list.util.t]tainted..............FAILED on test 3
2182 [-.ext.posix]sigaction..................FAILED on test 7
2183 [-.ext.time.hires]hires.................FAILED on test 14
2184 [-.lib.file.find]taint..................FAILED on test 17
2185 [-.lib.math.bigint.t]bigintpm...........FAILED on test 1183
2186 [-.lib.test.simple.t]exit...............FAILED on test 1
2187 [.lib]vmsish............................FAILED on test 13
2188 [.op]sprintf............................FAILED on test 12
2189 Failed 8/399 tests, 91.23% okay.
2190
2191DEC C V6.0-001 on OpenVMS Alpha V7.2-1 and
2192Compaq C V6.2-008 on OpenVMS Alpha V7.1
2193
2194 [-.ext.list.util.t]tainted..............FAILED on test 3
2195 [-.lib.file.find]taint..................FAILED on test 17
2196 [-.lib.test.simple.t]exit...............FAILED on test 1
2197 [.lib]vmsish............................FAILED on test 13
2198 Failed 4/399 tests, 92.48% okay.
2199
2200Compaq C V6.4-005 on OpenVMS Alpha 7.2.1
2201
2202 [-.ext.b]showlex........................FAILED on test 1
2203 [-.ext.list.util.t]tainted..............FAILED on test 3
2204 [-.lib.file.find]taint..................FAILED on test 17
2205 [-.lib.test.simple.t]exit...............FAILED on test 1
2206 [.lib]vmsish............................FAILED on test 13
2207 [.op]misc...............................FAILED on test 49
2208 Failed 6/401 tests, 92.77% okay.
2209
2210=head2 Win32
2211
2212In multi-CPU boxes there are some problems with the I/O buffering:
2213some output may appear twice.
2214
2215=head2 Localising a Tied Variable Leaks Memory
2216
2217 use Tie::Hash;
2218 tie my %tie_hash => 'Tie::StdHash';
2219
2220 ...
2221
2222 local($tie_hash{Foo}) = 1; # leaks
2223
2224Code like the above is known to leak memory every time the local()
2225is executed.
2226
2227=head2 Self-tying of Arrays and Hashes Is Forbidden
2228
2229Self-tying of arrays and hashes is broken in rather deep and
2230hard-to-fix ways. As a stop-gap measure to avoid people from getting
2231frustrated at the mysterious results (core dumps, most often) it is
2232for now forbidden (you will get a fatal error even from an attempt).
2233
2234=head2 Variable Attributes are not Currently Usable for Tieing
2235
2236This limitation will hopefully be fixed in future. (Subroutine
2237attributes work fine for tieing, see L<Attribute::Handlers>).
2238
2239=head2 Building Extensions Can Fail Because Of Largefiles
2240
2241Some extensions like mod_perl are known to have issues with
2242`largefiles', a change brought by Perl 5.6.0 in which file offsets
2243default to 64 bits wide, where supported. Modules may fail to compile
2244at all or compile and work incorrectly. Currently there is no good
2245solution for the problem, but Configure now provides appropriate
2246non-largefile ccflags, ldflags, libswanted, and libs in the %Config
2247hash (e.g., $Config{ccflags_nolargefiles}) so the extensions that are
2248having problems can try configuring themselves without the
2249largefileness. This is admittedly not a clean solution, and the
2250solution may not even work at all. One potential failure is whether
2251one can (or, if one can, whether it's a good idea) link together at
2252all binaries with different ideas about file offsets, all this is
2253platform-dependent.
2254
2255=head2 The Compiler Suite Is Still Experimental
2256
2257The compiler suite is slowly getting better but is nowhere near
2258working order yet.
2259
2260=head2 The Long Double Support is Still Experimental
2261
2262The ability to configure Perl's numbers to use "long doubles",
2263floating point numbers of hopefully better accuracy, is still
2264experimental. The implementations of long doubles are not yet
2265widespread and the existing implementations are not quite mature
2266or standardised, therefore trying to support them is a rare
2267and moving target. The gain of more precision may also be offset
2268by slowdown in computations (more bits to move around, and the
2269operations are more likely to be executed by less optimised
2270libraries).
33a87e58 2271
cc0fca54
GS
2272=head1 Reporting Bugs
2273
d4ad863d
JH
2274If you find what you think is a bug, you might check the articles
2275recently posted to the comp.lang.perl.misc newsgroup and the perl
2276bug database at http://bugs.perl.org. There may also be
2277information at http://www.perl.com/perl/, the Perl Home Page.
cc0fca54
GS
2278
2279If you believe you have an unreported bug, please run the B<perlbug>
2280program included with your release. Be sure to trim your bug down
2281to a tiny but sufficient test case. Your bug report, along with the
d4ad863d 2282output of C<perl -V>, will be sent off to perlbug@perl.org to be
cc0fca54
GS
2283analysed by the Perl porting team.
2284
2285=head1 SEE ALSO
2286
2287The F<Changes> file for exhaustive details on what changed.
2288
2289The F<INSTALL> file for how to build Perl.
2290
2291The F<README> file for general stuff.
2292
2293The F<Artistic> and F<Copying> files for copyright information.
2294
2295=head1 HISTORY
2296
d468ca04 2297Written by Jarkko Hietaniemi <F<jhi@iki.fi>>.
cc0fca54
GS
2298
2299=cut