Mention the dynamicness of Socket in VMS in another spot.
[p5sagit/p5-mst-13.2.git] / pod / perldelta.pod
CommitLineData
d4432bb5 1=head1 NAME
cc0fca54 2
f39f21d8 3perldelta - what is new for perl v5.8.0
cc0fca54 4
5=head1 DESCRIPTION
6
ebc20e9a 7This document describes differences between the 5.6.0 release and
8the 5.8.0 release.
f39f21d8 9
44da0e71 10Many of the bug fixes in 5.8.0 were already seen in the 5.6.1
11maintenance release since the two releases were kept closely
ebc20e9a 12coordinated (while 5.8.0 was still called 5.7.something).
13
14Changes that were integrated into the 5.6.1 release are marked C<[561]>.
b98cfe2c 15In some cases the said bug/feature may have been further fixed/enhanced
16after 5.6.1.
ebc20e9a 17
18You can see the list of changes in the 5.6.1 (from 5.6.0) by reading
19L<perl561delta>.
44da0e71 20
4f8e5944 21If you are upgrading from Perl 5.005_03, you might also want
22to read L<perl56delta>.
23
44da0e71 24=head1 Highlights In 5.8.0
76663d67 25
26=over 4
27
28=item *
29
30Better Unicode support
31
32=item *
33
34New Thread Implementation
35
36=item *
37
38Many New Modules
39
40=item *
41
42Better Numeric Accuracy
43
44=item *
45
46Safe Signals
47
48=item *
49
50More Extensive Regression Testing
51
52=back
53
f39f21d8 54=head1 Incompatible Changes
55
6cc60dfb 56=head2 Binary Incompatibility
57
764bd7e0 58B<Perl 5.8 is not binary compatible with earlier releases of Perl.>
59
60B<You have to recompile your XS modules.>
61
62(Pure Perl modules should continue to work.)
63
c5af7db2 64The major reason for the discontinuity is the new IO architecture
8cbf54fa 65called PerlIO. PerlIO is the default configuration because without
66it many new features of Perl 5.8 cannot be used. In other words:
67you just have to recompile your modules containing XS code, sorry
68about that.
6cc60dfb 69
365d6a78 70In future releases of Perl, non-PerlIO aware XS modules may become
6cc60dfb 71completely unsupported. This shouldn't be too difficult for module
72authors, however: PerlIO has been designed as a drop-in replacement
73(at the source code level) for the stdio interface.
74
764bd7e0 75Depending on your platform, there are also other reasons why
b98cfe2c 76we decided to break binary compatibility, please read on.
764bd7e0 77
77c8cf41 78=head2 64-bit platforms and malloc
79
057b7f2b 80If your pointers are 64 bits wide, the Perl malloc is no longer being
c2e23569 81used because it does not work well with 8-byte pointers. Also,
61947107 82usually the system mallocs on such platforms are much better optimized
c2e23569 83for such large memory models than the Perl malloc. Some memory-hungry
84Perl applications like the PDL don't work well with Perl's malloc.
e6dc8c81 85Finally, other applications than Perl (such as mod_perl) tend to prefer
c2e23569 86the system malloc. Such platforms include Alpha and 64-bit HPPA,
87MIPS, PPC, and Sparc.
77c8cf41 88
89=head2 AIX Dynaloading
90
91The AIX dynaloading now uses in AIX releases 4.3 and newer the native
92dlopen interface of AIX instead of the old emulated interface. This
93change will probably break backward compatibility with compiled
94modules. The change was made to make Perl more compliant with other
efc3b6b5 95applications like mod_perl which are using the AIX native interface.
77c8cf41 96
95f0a2f1 97=head2 Attributes for C<my> variables now handled at run-time.
98
99The C<my EXPR : ATTRS> syntax now applies variable attributes at
100run-time. (Subroutine and C<our> variables still get attributes applied
101at compile-time.) See L<attributes> for additional details. In particular,
102however, this allows variable attributes to be useful for C<tie> interfaces,
c4f1ce08 103which was a deficiency of earlier releases. Note that the new semantics
104doesn't work with the Attribute::Handlers module (as of version 0.76).
95f0a2f1 105
77c8cf41 106=head2 Socket Extension Dynamic in VMS
107
108The Socket extension is now dynamically loaded instead of being
109statically built in. This may or may not be a problem with ancient
110TCP/IP stacks of VMS: we do not know since we weren't able to test
111Perl in such configurations.
112
00bb525a 113=head2 IEEE-format Floating Point Default on OpenVMS Alpha
114
115Perl now uses IEEE format (T_FLOAT) as the default internal floating
116point format on OpenVMS Alpha, potentially breaking binary compatibility
117with external libraries or existing data. G_FLOAT is still available as
118a configuration option. The default on VAX (D_FLOAT) has not changed.
119
eb0cc9e3 120=head2 New Unicode Properties
121
122Unicode I<scripts> are now supported. Scripts are similar to (and superior
123to) Unicode I<blocks>. The difference between scripts and blocks is that
124scripts are the glyphs used by a language or a group of languages, while
125the blocks are more artificial groupings of (mostly) 256 characters based
126on the Unicode numbering.
127
128In general, scripts are more inclusive, but not universally so. For
129example, while the script C<Latin> includes all the Latin characters and
130their various diacritic-adorned versions, it does not include the various
131punctuation or digits (since they are not solely C<Latin>).
132
133A number of other properties are now supported, including C<\p{L&}>,
e6a6fae8 134C<\p{Any}> C<\p{Assigned}>, C<\p{Unassigned}>, C<\p{Blank}> [561] and
135C<\p{SpacePerl}> [561] (along with their C<\P{...}> versions, of course).
eb0cc9e3 136See L<perlunicode> for details, and more additions.
137
138The C<In> or C<Is> prefix to names used with the C<\p{...}> and C<\P{...}>
139are now almost always optional. The only exception is that a C<In> prefix
140is required to signify a Unicode block when a block name conflicts with a
141script name. For example, C<\p{Tibetan}> refers to the script, while
142C<\p{InTibetan}> refers to the block. When there is no name conflict, you
143can omit the C<In> from the block name (e.g. C<\p{BraillePatterns}>), but
144to be safe, it's probably best to always use the C<In>).
77c8cf41 145
c2e23569 146=head2 REF(...) Instead Of SCALAR(...)
77c8cf41 147
057b7f2b 148A reference to a reference now stringifies as "REF(0x81485ec)" instead
c2e23569 149of "SCALAR(0x81485ec)" in order to be more consistent with the return
150value of ref().
77c8cf41 151
79f69e33 152=head2 pack/unpack D/F recycled
153
66023b77 154The undocumented pack/unpack template letters D/F have been recycled
79f69e33 155for better use: now they stand for long double (if supported by the
156platform) and NV (Perl internal floating point type). (They used
6123004a 157to be aliases for d/f, but you never knew that.)
79f69e33 158
c2e23569 159=head2 Deprecations
77c8cf41 160
61947107 161=over 4
77c8cf41 162
61947107 163=item *
f39f21d8 164
61947107 165The semantics of bless(REF, REF) were unclear and until someone proves
166it to make some sense, it is forbidden.
f39f21d8 167
168=item *
169
c2e23569 170The obsolete chat2 library that should never have been allowed
171to escape the laboratory has been decommissioned.
f39f21d8 172
173=item *
174
58175c9b 175The builtin dump() function has probably outlived most of its
176usefulness. The core-dumping functionality will remain in future
177available as an explicit call to C<CORE::dump()>, but in future
178releases the behaviour of an unqualified C<dump()> call may change.
179
180=item *
181
61947107 182The very dusty examples in the eg/ directory have been removed.
183Suggestions for new shiny examples welcome but the main issue is that
184the examples need to be documented, tested and (most importantly)
185maintained.
f39f21d8 186
187=item *
188
c2e23569 189The (bogus) escape sequences \8 and \9 now give an optional warning
190("Unrecognized escape passed through"). There is no need to \-escape
191any C<\w> character.
f39f21d8 192
193=item *
194
c2e23569 195The list of filenames from glob() (or <...>) is now by default sorted
44da0e71 196alphabetically to be csh-compliant (which is what happened before
197in most UNIX platforms). (bsd_glob() does still sort platform
e6a6fae8 198natively, ASCII or EBCDIC, unless GLOB_ALPHASORT is specified.) [561]
f39f21d8 199
200=item *
201
44da0e71 202Spurious syntax errors generated in certain situations, when glob()
e6a6fae8 203caused File::Glob to be loaded for the first time, have been fixed. [561]
44da0e71 204
205=item *
206
c2e23569 207Although "you shouldn't do that", it was possible to write code that
208depends on Perl's hashed key order (Data::Dumper does this). The new
209algorithm "One-at-a-Time" produces a different hashed key order.
210More details are in L</"Performance Enhancements">.
f39f21d8 211
212=item *
213
61947107 214lstat(FILEHANDLE) now gives a warning because the operation makes no sense.
215In future releases this may become a fatal error.
f39f21d8 216
217=item *
218
057b7f2b 219The C<package;> syntax (C<package> without an argument) has been
c2e23569 220deprecated. Its semantics were never that clear and its
221implementation even less so. If you have used that feature to
222disallow all but fully qualified variables, C<use strict;> instead.
61947107 223
224=item *
225
c2e23569 226The unimplemented POSIX regex features [[.cc.]] and [[=c=]] are still
227recognised but now cause fatal errors. The previous behaviour of
228ignoring them by default and warning if requested was unacceptable
229since it, in a way, falsely promised that the features could be used.
61947107 230
231=item *
232
c2e23569 233The current user-visible implementation of pseudo-hashes (the weird
234use of the first array element) is deprecated starting from Perl 5.8.0
235and will be removed in Perl 5.10.0, and the feature will be
236implemented differently. Not only is the current interface rather
237ugly, but the current implementation slows down normal array and hash
238use quite noticeably. The C<fields> pragma interface will remain
a6d3fe4f 239available. The I<restricted hashes> interface is expected to
240be the replacement interface (see L<Hash::Util>).
61947107 241
242=item *
243
aecce728 244The syntaxes C<< @a->[...] >> and C<< %h->{...} >> have now been deprecated.
61947107 245
246=item *
247
e6dc8c81 248After years of trying, suidperl is considered to be too complex to
c2e23569 249ever be considered truly secure. The suidperl functionality is likely
250to be removed in a future release.
251
252=item *
253
6ba475fe 254The 5.005 threads model (module C<Thread>) is deprecated and expected
255to be removed in Perl 5.10. Multithreaded code should be migrated to
4c18bbd3 256the new ithreads model (see L<threads>, L<threads::shared> and
257L<perlthrtut>).
6ba475fe 258
259=item *
260
c2e23569 261The long deprecated uppercase aliases for the string comparison
262operators (EQ, NE, LT, LE, GE, GT) have now been removed.
263
264=item *
265
266The tr///C and tr///U features have been removed and will not return;
267the interface was a mistake. Sorry about that. For similar
e6a6fae8 268functionality, see pack('U0', ...) and pack('C0', ...). [561]
f39f21d8 269
420cdfc1 270=item *
271
272Earlier Perls treated "sub foo (@bar)" as equivalent to "sub foo (@)".
8cbf54fa 273The prototypes are now checked better at compile-time for invalid
274syntax. An optional warning is generated ("Illegal character in
275prototype...") but this may be upgraded to a fatal error in a future
276release.
420cdfc1 277
fd5a896a 278=item *
279
280The existing behaviour when localising tied arrays and hashes is wrong,
281and will be changed in a future release, so do not rely on the existing
282behaviour. See L<"Localising Tied Arrays and Hashes Is Broken">.
283
f39f21d8 284=back
285
61947107 286=head1 Core Enhancements
287
77c8cf41 288=head2 PerlIO is Now The Default
f39f21d8 289
290=over 4
291
292=item *
293
77c8cf41 294IO is now by default done via PerlIO rather than system's "stdio".
295PerlIO allows "layers" to be "pushed" onto a file handle to alter the
296handle's behaviour. Layers can be specified at open time via 3-arg
297form of open:
f39f21d8 298
77c8cf41 299 open($fh,'>:crlf :utf8', $path) || ...
f39f21d8 300
77c8cf41 301or on already opened handles via extended C<binmode>:
f39f21d8 302
77c8cf41 303 binmode($fh,':encoding(iso-8859-7)');
f39f21d8 304
77c8cf41 305The built-in layers are: unix (low level read/write), stdio (as in
306previous Perls), perlio (re-implementation of stdio buffering in a
307portable manner), crlf (does CRLF <=> "\n" translation as on Win32,
308but available on any platform). A mmap layer may be available if
309platform supports it (mostly UNIXes).
f39f21d8 310
77c8cf41 311Layers to be applied by default may be specified via the 'open' pragma.
312
313See L</"Installation and Configuration Improvements"> for the effects
314of PerlIO on your architecture name.
f39f21d8 315
316=item *
317
77c8cf41 318File handles can be marked as accepting Perl's internal encoding of Unicode
319(UTF-8 or UTF-EBCDIC depending on platform) by a pseudo layer ":utf8" :
f39f21d8 320
77c8cf41 321 open($fh,">:utf8","Uni.txt");
f39f21d8 322
77c8cf41 323Note for EBCDIC users: the pseudo layer ":utf8" is erroneously named
324for you since it's not UTF-8 what you will be getting but instead
325UTF-EBCDIC. See L<perlunicode>, L<utf8>, and
326http://www.unicode.org/unicode/reports/tr16/ for more information.
327In future releases this naming may change.
f39f21d8 328
329=item *
330
77c8cf41 331File handles can translate character encodings from/to Perl's internal
332Unicode form on read/write via the ":encoding()" layer.
f39f21d8 333
334=item *
335
77c8cf41 336File handles can be opened to "in memory" files held in Perl scalars via:
337
338 open($fh,'>', \$variable) || ...
f39f21d8 339
340=item *
341
77c8cf41 342Anonymous temporary files are available without need to
343'use FileHandle' or other module via
f39f21d8 344
77c8cf41 345 open($fh,"+>", undef) || ...
f39f21d8 346
77c8cf41 347That is a literal undef, not an undefined value.
f39f21d8 348
349=item *
350
77c8cf41 351The list form of C<open> is now implemented for pipes (at least on UNIX):
f39f21d8 352
77c8cf41 353 open($fh,"-|", 'cat', '/etc/motd')
f39f21d8 354
77c8cf41 355creates a pipe, and runs the equivalent of exec('cat', '/etc/motd') in
356the child process.
f39f21d8 357
b310b053 358=item *
359
360If your locale environment variables (LANGUAGE, LC_ALL, LC_CTYPE, LANG)
361contain the strings 'UTF-8' or 'UTF8' (case-insensitive matching),
362the default encoding of your STDIN, STDOUT, and STDERR, and of
363B<any subsequent file open>, is UTF-8.
364
e1f170bd 365=back
f39f21d8 366
02e156f1 367=head2 Restricted Hashes
368
369A restricted hash is restricted to a certain set of keys, no keys
370outside the set can be added. Also individual keys can be restricted
371so that the key cannot be deleted and the value cannot be changed.
372No new syntax is involved: the Hash::Util module is the interface.
373
3e33716f 374=head2 Safe Signals
f39f21d8 375
e1f170bd 376Perl used to be fragile in that signals arriving at inopportune moments
377could corrupt Perl's internal state. Now Perl postpones handling of
3e33716f 378signals until it's safe (between opcodes).
379
56e5bb57 380This change may have surprising side effects because signals no longer
3e33716f 381interrupt Perl instantly. Perl will now first finish whatever it was
382doing, like finishing an internal operation (like sort()) or an
383external operation (like an I/O operation), and only then look at any
384arrived signals (and before starting the next operation). No more corrupt
385internal state since the current operation is always finished first,
6123004a 386but the signal may take more time to get heard. Note that breaking
387out from potentially blocking operations should still work, though.
f39f21d8 388
e1f170bd 389=head2 Unicode Overhaul
f39f21d8 390
e1f170bd 391Unicode in general should be now much more usable than in Perl 5.6.0
392(or even in 5.6.1). Unicode can be used in hash keys, Unicode in
393regular expressions should work now, Unicode in tr/// should work now,
b310b053 394Unicode in I/O should work now. See L<perluniintro> for introduction
395and L<perlunicode> for details.
f39f21d8 396
e1f170bd 397=over 4
f39f21d8 398
399=item *
400
e1f170bd 401The Unicode Character Database coming with Perl has been upgraded
822ebcc8 402to Unicode 3.2.0. For more information, see http://www.unicode.org/ .
ebc20e9a 403
f39f21d8 404
405=item *
406
77c8cf41 407For developers interested in enhancing Perl's Unicode capabilities:
408almost all the UCD files are included with the Perl distribution in
8cbf54fa 409the F<lib/unicore> subdirectory. The most notable omission, for space
77c8cf41 410considerations, is the Unihan database.
f39f21d8 411
412=item *
413
eb0cc9e3 414The properties \p{Blank} and \p{SpacePerl} have been added. "Blank" is like
415C isblank(), that is, it contains only "horizontal whitespace" (the space
416character is, the newline isn't), and the "SpacePerl" is the Unicode
417equivalent of C<\s> (\p{Space} isn't, since that includes the vertical
418tabulator character, whereas C<\s> doesn't.)
419
420See "New Unicode Properties" earlier in this document for additional
421information on changes with Unicode properties.
f39f21d8 422
423=back
424
77c8cf41 425=head2 Understanding of Numbers
426
427In general a lot of fixing has happened in the area of Perl's
428understanding of numbers, both integer and floating point. Since in
429many systems the standard number parsing functions like C<strtoul()>
430and C<atof()> seem to have bugs, Perl tries to work around their
431deficiencies. This results hopefully in more accurate numbers.
f39f21d8 432
e1f170bd 433Perl now tries internally to use integer values in numeric conversions
434and basic arithmetics (+ - * /) if the arguments are integers, and
435tries also to keep the results stored internally as integers.
057b7f2b 436This change leads to often slightly faster and always less lossy
e1f170bd 437arithmetics. (Previously Perl always preferred floating point numbers
438in its math.)
439
b98cfe2c 440=head2 Arrays now always interpolate into double-quoted strings [561]
441
442In double-quoted strings, arrays now interpolate, no matter what. The
443behavior in earlier versions of perl 5 was that arrays would interpolate
444into strings if the array had been mentioned before the string was
445compiled, and otherwise Perl would raise a fatal compile-time error.
446In versions 5.000 through 5.003, the error was
447
448 Literal @example now requires backslash
449
450In versions 5.004_01 through 5.6.0, the error was
451
452 In string, @example now must be written as \@example
453
454The idea here was to get people into the habit of writing
455C<"fred\@example.com"> when they wanted a literal C<@> sign, just as
456they have always written C<"Give me back my \$5"> when they wanted a
457literal C<$> sign.
458
459Starting with 5.6.1, when Perl now sees an C<@> sign in a
460double-quoted string, it I<always> attempts to interpolate an array,
461regardless of whether or not the array has been used or declared
462already. The fatal error has been downgraded to an optional warning:
463
464 Possible unintended interpolation of @example in string
465
466This warns you that C<"fred@example.com"> is going to turn into
467C<fred.com> if you don't backslash the C<@>.
468See http://www.plover.com/~mjd/perl/at-error.html for more details
469about the history here.
470
58175c9b 471=head2 Miscellaneous Changes
e1f170bd 472
f39f21d8 473=over 4
474
475=item *
476
e1f170bd 477AUTOLOAD is now lvaluable, meaning that you can add the :lvalue attribute
478to AUTOLOAD subroutines and you can assign to the AUTOLOAD return value.
479
480=item *
481
ee8706e3 482The $Config{byteorder} (and corresponding BYTEORDER in config.h) was
483previously wrong in platforms if sizeof(long) was 4, but sizeof(IV)
484was 8. The byteorder was only sizeof(long) bytes long (1234 or 4321),
485but now it is correctly sizeof(IV) bytes long, (12345678 or 87654321).
486(This problem didn't affect Windows platforms.)
487
488Also, $Config{byteorder} is now computed dynamically--this is more
489robust with "fat binaries" where an executable image contains binaries
490for more than one binary platform, and when cross-compiling.
491
492=item *
493
61947107 494C<perl -d:Module=arg,arg,arg> now works (previously one couldn't pass
495in multiple arguments.)
f39f21d8 496
497=item *
498
58175c9b 499The builtin dump() now gives an optional warning
66023b77 500C<dump() better written as CORE::dump()>,
b98cfe2c 501meaning that by default C<dump(...)> is resolved as the builtin
58175c9b 502dump() which dumps core and aborts, not as (possibly) user-defined
503C<sub dump>. To call the latter, qualify the call as C<&dump(...)>.
504(The whole dump() feature is to considered deprecated, and possibly
505removed/changed in future releases.)
506
507=item *
508
c2d0fb59 509chomp() and chop() are now overridable. Note, however, that their
510prototype (as given by C<prototype("CORE::chomp")> is undefined,
511because it cannot be expressed and therefore one cannot really write
58175c9b 512replacements to override these builtins.
513
514=item *
515
61947107 516END blocks are now run even if you exit/die in a BEGIN block.
b98cfe2c 517Internally, the execution of END blocks is now controlled by
61947107 518PL_exit_flags & PERL_EXIT_DESTRUCT_END. This enables the new
519behaviour for Perl embedders. This will default in 5.10. See
520L<perlembed>.
f39f21d8 521
522=item *
523
e1f170bd 524Formats now support zero-padded decimal fields.
f39f21d8 525
526=item *
527
e6a6fae8 528Lvalue subroutines can now return C<undef> in list context. However,
ebc20e9a 529the lvalue subroutine feature still remains experimental.
f39f21d8 530
531=item *
532
58175c9b 533A lost warning "Can't declare ... dereference in my" has been
534restored (Perl had it earlier but it became lost in later releases.)
535
536=item *
537
61947107 538A new special regular expression variable has been introduced:
539C<$^N>, which contains the most-recently closed group (submatch).
f39f21d8 540
541=item *
542
e6a6fae8 543C<no Module;> does not produce an error even if Module does not have an
544unimport() method. This parallels the behavior of C<use> vis-a-vis
545C<import>. [561]
f39f21d8 546
547=item *
548
61947107 549The numerical comparison operators return C<undef> if either operand
550is a NaN. Previously the behaviour was unspecified.
f39f21d8 551
552=item *
553
e1f170bd 554The following builtin functions are now overridable: each(), keys(),
e6a6fae8 555pop(), push(), shift(), splice(), unshift(). [561]
e1f170bd 556
557=item *
558
443f6d01 559C<pack() / unpack()> can now group template letters with C<()> and then
a7bac030 560apply repetition/count modifiers on the groups.
561
562=item *
563
564C<pack() / unpack()> can now process the Perl internal numeric types:
565IVs, UVs, NVs-- and also long doubles, if supported by the platform.
79f69e33 566The template letters are C<j>, C<J>, C<F>, and C<D>.
a7bac030 567
568=item *
569
61947107 570C<pack('U0a*', ...)> can now be used to force a string to UTF8.
f39f21d8 571
572=item *
573
e6a6fae8 574my __PACKAGE__ $obj now works. [561]
f39f21d8 575
576=item *
577
2ab27a20 578POSIX::sleep() now returns the number of I<unslept> seconds
2bad225e 579(as the POSIX standard says), as opposed to CORE::sleep() which
2ab27a20 580returns the number of slept seconds.
581
582=item *
583
e1f170bd 584The printf() and sprintf() now support parameter reordering using the
585C<%\d+\$> and C<*\d+\$> syntaxes. For example
586
587 print "%2\$s %1\$s\n", "foo", "bar";
588
da6838c8 589will print "bar foo\n". This feature helps in writing
590internationalised software, and in general when the order
591of the parameters can vary.
f39f21d8 592
593=item *
594
b98cfe2c 595The (\&) prototype now works properly. [561]
61947107 596
597=item *
598
e1f170bd 599prototype(\[$@%&]) is now available to implicitly create references
600(useful for example if you want to emulate the tie() interface).
61947107 601
602=item *
603
58175c9b 604A new command-line option, C<-t> is available. It is the
b0c3fc92 605little brother of C<-T>: instead of dying on taint violations,
58175c9b 606lexical warnings are given. B<This is only meant as a temporary
607debugging aid while securing the code of old legacy applications.
608This is not a substitute for -T.>
609
610=item *
611
4956848f 612In other taint news, the C<exec LIST> and C<system LIST> have now been
613considered too risky (think C<exec @ARGV>: it can start any program
614with any arguments), and now the said forms cause a warning.
615You should carefully launder the arguments to guarantee their
616validity. In future releases of Perl the forms will become fatal
617errors so consider starting laundering now.
618
619=item *
620
159ad915 621Tied hash interfaces are now required to have the EXISTS and DELETE
622methods (either own or inherited).
0b2c215a 623
624=item *
625
58175c9b 626If tr/// is just counting characters, it doesn't attempt to
627modify its target.
628
629=item *
630
44da0e71 631untie() will now call an UNTIE() hook if it exists. See L<perltie>
e6a6fae8 632for details. [561]
61947107 633
634=item *
635
636L<utime> now supports C<utime undef, undef, @files> to change the
637file timestamps to the current time.
638
639=item *
640
e1f170bd 641The rules for allowing underscores (underbars) in numeric constants
642have been relaxed and simplified: now you can have an underscore
643simply B<between digits>.
f39f21d8 644
ef985a5e 645=item *
646
647Rather than relying on C's argv[0] (which may not contain a full pathname)
648where possible $^X is now set by asking the operating system.
649(eg by reading F</proc/self/exe> on Linux, F</proc/curproc/file> on FreeBSD)
650
608dbdb1 651=item *
652
653A new variable, C<${^TAINT}>, indicates whether taint mode is enabled.
654
655=item *
656
657You can now override the readline() builtin, and this overrides also
658the <FILEHANDLE> angle bracket operator.
659
660=item *
661
662The command-line options -s and -F are now recognized on the shebang
663(#!) line.
664
4ac733c9 665=item *
666
667Use of the C</c> match modifier without an accompanying C</g> modifier
668elicits a new warning: C<Use of /c modifier is meaningless without /g>.
f34840d8 669
b98cfe2c 670Use of C</c> in substitutions, even with C</g>, elicits
671C<Use of /c modifier is meaningless in s///>.
f34840d8 672
476a4411 673Use of C</g> with C<split> elicits C<Use of /g modifier is meaningless
f34840d8 674in split>.
4ac733c9 675
f39f21d8 676=back
677
77c8cf41 678=head1 Modules and Pragmata
f39f21d8 679
1e13d81f 680=head2 New Modules and Pragmata
f39f21d8 681
682=over 4
683
684=item *
685
0e9b9e0c 686C<Attribute::Handlers> allows a class to define attribute handlers.
687
688 package MyPack;
689 use Attribute::Handlers;
690 sub Wolf :ATTR(SCALAR) { print "howl!\n" }
691
692 # later, in some package using or inheriting from MyPack...
693
694 my MyPack $Fluffy : Wolf; # the attribute handler Wolf will be called
695
696Both variables and routines can have attribute handlers. Handlers can
697be specific to type (SCALAR, ARRAY, HASH, or CODE), or specific to the
698exact compilation phase (BEGIN, CHECK, INIT, or END).
e0378d7f 699See L<Attribute::Handlers>.
0e9b9e0c 700
701=item *
702
e6dc8c81 703C<B::Concise>, by Stephen McCamant, is a new compiler backend for
704walking the Perl syntax tree, printing concise info about ops.
ebc20e9a 705The output is highly customisable. See L<B::Concise>.
f39f21d8 706
707=item *
708
e6dc8c81 709The new bignum, bigint, and bigrat pragmas, by Tels, implement
710transparent bignum support (using the Math::BigInt, Math::BigFloat,
711and Math::BigRat backends).
381874f1 712
713=item *
714
e6dc8c81 715C<Class::ISA>, by Sean Burke, is a module for reporting the search
716path for a class's ISA tree. See L<Class::ISA>.
f39f21d8 717
718=item *
719
e6dc8c81 720C<Cwd> now has a split personality: if possible, an XS extension is
61947107 721used, (this will hopefully be faster, more secure, and more robust)
722but if not possible, the familiar Perl implementation is used.
f39f21d8 723
724=item *
725
e6dc8c81 726C<Devel::PPPort>, originally by Kenneth Albanowski and now
e1f170bd 727maintained by Paul Marquess, has been added. It is primarily used
66023b77 728by C<h2xs> to enhance portability of XS modules between different
e0378d7f 729versions of Perl. See L<Devel::PPPort>.
1e13d81f 730
731=item *
732
61947107 733C<Digest>, frontend module for calculating digests (checksums), from
734Gisle Aas, has been added. See L<Digest>.
f39f21d8 735
736=item *
737
61947107 738C<Digest::MD5> for calculating MD5 digests (checksums) as defined in
739RFC 1321, from Gisle Aas, has been added. See L<Digest::MD5>.
f39f21d8 740
741 use Digest::MD5 'md5_hex';
742
743 $digest = md5_hex("Thirsty Camel");
744
745 print $digest, "\n"; # 01d19d9d2045e005c3f1b80e8b164de1
746
61947107 747NOTE: the C<MD5> backward compatibility module is deliberately not
e1f170bd 748included since its further use is discouraged.
f39f21d8 749
f39f21d8 750=item *
751
e6dc8c81 752C<Encode>, originally by Nick Ing-Simmons and now maintained by Dan
f14caa53 753Kogai, provides a mechanism to translate between different character
754encodings. Support for Unicode, ISO-8859-1, and ASCII are compiled in
755to the module. Several other encodings (like the rest of the
756ISO-8859, CP*/Win*, Mac, KOI8-R, three variants EBCDIC, Chinese,
757Japanese, and Korean encodings) are included and can be loaded at
758runtime. (For space considerations, the largest Chinese encodings
759have been separated into their own CPAN module, Encode::HanExtra,
760which Encode will use if available). See L<Encode>.
f39f21d8 761
762Any encoding supported by Encode module is also available to the
763":encoding()" layer if PerlIO is used.
764
61947107 765=item *
766
a6d3fe4f 767C<Hash::Util> is the interface to the new I<restricted hashes>
02e156f1 768feature. (Implemented by Jeffrey Friedl, Nick Ing-Simmons, and
e0378d7f 769Michael Schwern.) See L<Hash::Util>.
a6d3fe4f 770
771=item *
772
e6dc8c81 773C<I18N::Langinfo> can be used to query locale information.
61947107 774See L<I18N::Langinfo>.
f39f21d8 775
776=item *
777
e6dc8c81 778C<I18N::LangTags>, by Sean Burke, has functions for dealing with
779RFC3066-style language tags. See L<I18N::LangTags>.
61947107 780
781=item *
782
e6dc8c81 783C<ExtUtils::Constant>, by Nicholas Clark, is a new tool for extension
784writers for generating XS code to import C header constants.
61947107 785See L<ExtUtils::Constant>.
786
787=item *
788
e6dc8c81 789C<Filter::Simple>, by Damian Conway, is an easy-to-use frontend to
790Filter::Util::Call. See L<Filter::Simple>.
f39f21d8 791
792 # in MyFilter.pm:
793
794 package MyFilter;
795
796 use Filter::Simple sub {
797 while (my ($from, $to) = splice @_, 0, 2) {
798 s/$from/$to/g;
799 }
800 };
801
802 1;
803
804 # in user's code:
805
806 use MyFilter qr/red/ => 'green';
807
808 print "red\n"; # this code is filtered, will print "green\n"
809 print "bored\n"; # this code is filtered, will print "bogreen\n"
810
811 no MyFilter;
812
813 print "red\n"; # this code is not filtered, will print "red\n"
814
61947107 815=item *
816
e6a6fae8 817C<File::Temp>, by Tim Jenness, allows one to create temporary files
818and directories in an easy, portable, and secure way. See
ebc20e9a 819L<File::Temp>.
61947107 820
821=item *
822
e6dc8c81 823C<Filter::Util::Call>, by Paul Marquess, provides you with the
824framework to write I<source filters> in Perl. For most uses, the
61947107 825frontend Filter::Simple is to be preferred. See L<Filter::Util::Call>.
826
827=item *
828
e6dc8c81 829C<if>, by Ilya Zakharevich, is a new pragma for conditional inclusion
830of modules.
79f69e33 831
832=item *
833
e6dc8c81 834L<libnet>, by Graham Barr, is a collection of perl5 modules related
835to network programming. See L<Net::FTP>, L<Net::NNTP>, L<Net::Ping>
836(not part of libnet, but related), L<Net::POP3>, L<Net::SMTP>,
837and L<Net::Time>.
61947107 838
e6dc8c81 839Perl installation leaves libnet unconfigured; use F<libnetcfg>
840to configure it.
f39f21d8 841
842=item *
843
e6dc8c81 844C<List::Util>, by Graham Barr, is a selection of general-utility
845list subroutines, such as sum(), min(), first(), and shuffle().
846See L<List::Util>.
f39f21d8 847
848=item *
849
f14caa53 850C<Locale::Constants>, C<Locale::Country>, C<Locale::Currency>
e6dc8c81 851C<Locale::Language>, and L<Locale::Script>, by Neil Bowers, have
f14caa53 852been added. They provide the codes for various locale standards, such
9d81ddc1 853as "fr" for France, "usd" for US Dollar, and "ja" for Japanese.
f39f21d8 854
855 use Locale::Country;
856
857 $country = code2country('jp'); # $country gets 'Japan'
858 $code = country2code('Norway'); # $code gets 'no'
859
860See L<Locale::Constants>, L<Locale::Country>, L<Locale::Currency>,
61947107 861and L<Locale::Language>.
862
863=item *
864
e6dc8c81 865C<Locale::Maketext>, by Sean Burke, is a localization framework. See
61947107 866L<Locale::Maketext>, and L<Locale::Maketext::TPJ13>. The latter is an
867article about software localization, originally published in The Perl
e6dc8c81 868Journal #13, and republished here with kind permission.
61947107 869
870=item *
871
f14caa53 872C<Math::BigRat> for big rational numbers, to accompany Math::BigInt and
e0378d7f 873Math::BigFloat, from Tels. See L<Math::BigRat>.
381874f1 874
875=item *
876
61947107 877C<Memoize> can make your functions faster by trading space for time,
878from Mark-Jason Dominus. See L<Memoize>.
f39f21d8 879
880=item *
881
e6dc8c81 882C<MIME::Base64>, by Gisle Aas, allows you to encode data in base64,
61947107 883as defined in RFC 2045 - I<MIME (Multipurpose Internet Mail
884Extensions)>.
f39f21d8 885
886 use MIME::Base64;
887
888 $encoded = encode_base64('Aladdin:open sesame');
889 $decoded = decode_base64($encoded);
890
891 print $encoded, "\n"; # "QWxhZGRpbjpvcGVuIHNlc2FtZQ=="
892
61947107 893See L<MIME::Base64>.
f39f21d8 894
895=item *
896
e6dc8c81 897C<MIME::QuotedPrint>, by Gisle Aas, allows you to encode data
898in quoted-printable encoding, as defined in RFC 2045 - I<MIME
899(Multipurpose Internet Mail Extensions)>.
f39f21d8 900
901 use MIME::QuotedPrint;
902
903 $encoded = encode_qp("Smiley in Unicode: \x{263a}");
904 $decoded = decode_qp($encoded);
905
906 print $encoded, "\n"; # "Smiley in Unicode: =263A"
907
908MIME::QuotedPrint has been enhanced to provide the basic methods
909necessary to use it with PerlIO::Via as in :
910
911 use MIME::QuotedPrint;
057b7f2b 912 open($fh,">Via(MIME::QuotedPrint)",$path);
f39f21d8 913
61947107 914See L<MIME::QuotedPrint>.
f39f21d8 915
916=item *
917
e6dc8c81 918C<NEXT>, by Damian Conway, is a pseudo-class for method redispatch.
61947107 919See L<NEXT>.
f39f21d8 920
921=item *
922
1e13d81f 923C<open> is a new pragma for setting the default I/O disciplines
924for open().
925
926=item *
927
e6dc8c81 928C<PerlIO::Scalar>, by Nick Ing-Simmons, provides the implementation
929of IO to "in memory" Perl scalars as discussed above. It also serves
930as an example of a loadable PerlIO layer. Other future possibilities
931include PerlIO::Array and PerlIO::Code. See L<PerlIO::Scalar>.
61947107 932
933=item *
934
e6dc8c81 935C<PerlIO::Via>, by Nick Ing-Simmons, acts as a PerlIO layer and wraps
936PerlIO layer functionality provided by a class (typically implemented
937in perl code).
f39f21d8 938
939 use MIME::QuotedPrint;
057b7f2b 940 open($fh,">Via(MIME::QuotedPrint)",$path);
f39f21d8 941
942This will automatically convert everything output to C<$fh>
61947107 943to Quoted-Printable. See L<PerlIO::Via>.
f39f21d8 944
945=item *
946
1e13d81f 947C<Pod::ParseLink>, by Russ Allbery, has been added,
95f0a2f1 948to parse LZ<><> links in pods as described in the new
1e13d81f 949perlpodspec.
950
951=item *
952
61947107 953C<Pod::Text::Overstrike>, by Joe Smith, has been added.
f39f21d8 954It converts POD data to formatted overstrike text.
ebc20e9a 955See L<Pod::Text::Overstrike>.
f39f21d8 956
957=item *
958
61947107 959C<Scalar::Util> is a selection of general-utility scalar subroutines,
e6dc8c81 960such as blessed(), reftype(), and tainted(). See L<Scalar::Util>.
61947107 961
962=item *
963
1e13d81f 964C<sort> is a new pragma for controlling the behaviour of sort().
965
966=item *
967
61947107 968C<Storable> gives persistence to Perl data structures by allowing the
969storage and retrieval of Perl data to and from files in a fast and
e27159c9 970compact binary format. Because in effect Storable does serialisation
971of Perl data structues, with it you can also clone deep, hierarchical
1108aaa7 972datastructures. Storable was originally created by Raphael Manfredi,
973but it is now maintained by Abhijit Menon-Sen. Storable has been
e27159c9 974enhanced to understand the two new hash features, Unicode keys and
975restricted hashes. See L<Storable>.
61947107 976
977=item *
978
e6dc8c81 979C<Switch>, by Damian Conway, has been added. Just by saying
f39f21d8 980
981 use Switch;
982
983you have C<switch> and C<case> available in Perl.
984
985 use Switch;
986
987 switch ($val) {
988
989 case 1 { print "number 1" }
990 case "a" { print "string a" }
991 case [1..10,42] { print "number in list" }
992 case (@array) { print "number in list" }
993 case /\w+/ { print "pattern" }
994 case qr/\w+/ { print "pattern" }
995 case (%hash) { print "entry in hash" }
996 case (\%hash) { print "entry in hash" }
997 case (\&sub) { print "arg to subroutine" }
998 else { print "previous case not true" }
999 }
1000
61947107 1001See L<Switch>.
1002
1003=item *
1004
e6dc8c81 1005C<Test::More>, by Michael Schwern, is yet another framework for writing
1006test scripts, more extensive than Test::Simple. See L<Test::More>.
61947107 1007
1008=item *
1009
e6dc8c81 1010C<Test::Simple>, by Michael Schwern, has basic utilities for writing
1011tests. See L<Test::Simple>.
77c8cf41 1012
1013=item *
1014
e6dc8c81 1015C<Text::Balanced>, by Damian Conway, has been added, for extracting
1016delimited text sequences from strings.
77c8cf41 1017
1018 use Text::Balanced 'extract_delimited';
1019
1020 ($a, $b) = extract_delimited("'never say never', he never said", "'", '');
1021
1022$a will be "'never say never'", $b will be ', he never said'.
1023
e6dc8c81 1024In addition to extract_delimited(), there are also extract_bracketed(),
77c8cf41 1025extract_quotelike(), extract_codeblock(), extract_variable(),
1026extract_tagged(), extract_multiple(), gen_delimited_pat(), and
e6dc8c81 1027gen_extract_tagged(). With these, you can implement rather advanced
61947107 1028parsing algorithms. See L<Text::Balanced>.
77c8cf41 1029
1030=item *
1031
e6dc8c81 1032C<threads>, by Arthur Bergman, is an interface to interpreter threads.
61947107 1033Interpreter threads (ithreads) is the new thread model introduced in
c2e23569 1034Perl 5.6 but only available as an internal interface for extension
4c18bbd3 1035writers (and for Win32 Perl for C<fork()> emulation). See L<threads>,
1036L<threads::shared>, and L<perlthrtut>.
77c8cf41 1037
1038=item *
1039
e6dc8c81 1040C<threads::shared>, by Arthur Bergman, allows data sharing for
1041interpreter threads. In the ithreads model any data sharing between
61947107 1042threads must be explicit, as opposed to the old 5.005 thread model
1043where data sharing was implicit. See L<threads::shared>.
77c8cf41 1044
1045=item *
1046
1f089b22 1047C<Tie::File>, by Mark-Jason Dominus, associates a Perl array with the
e6dc8c81 1048lines of a file. See L<Tie::File>.
b3b08c80 1049
1050=item *
1051
e6dc8c81 1052C<Tie::Memoize>, by Ilya Zakharevich, provides on-demand loaded hashes.
1053See L<Tie::Memoize>.
79f69e33 1054
1055=item *
1056
61947107 1057C<Tie::RefHash::Nestable>, by Edward Avis, allows storing hash
ba370e9b 1058references (unlike the standard Tie::RefHash) The module is contained
e6dc8c81 1059within Tie::RefHash. See L<Tie::RefHash>.
77c8cf41 1060
1061=item *
1062
e6dc8c81 1063C<Time::HiRes>, by Douglas E. Wegscheid, provides high resolution
1064timing (ualarm, usleep, and gettimeofday). See L<Time::HiRes>.
77c8cf41 1065
1066=item *
1067
61947107 1068C<Unicode::UCD> offers a querying interface to the Unicode Character
1069Database. See L<Unicode::UCD>.
77c8cf41 1070
1071=item *
1072
e6dc8c81 1073C<Unicode::Collate>, by SADAHIRO Tomoyuki, implements the UCA
1074(Unicode Collation Algorithm) for sorting Unicode strings.
1075See L<Unicode::Collate>.
77c8cf41 1076
1077=item *
1078
e6dc8c81 1079C<Unicode::Normalize>, by SADAHIRO Tomoyuki, implements the various
1080Unicode normalization forms. See L<Unicode::Normalize>.
77c8cf41 1081
1082=item *
1083
e6dc8c81 1084C<XS::Typemap>, by Tim Jenness, is a test extension that exercises
1085XS typemaps. Nothing gets installed, but the code is worth studying
1086for extension writers.
77c8cf41 1087
1088=back
1089
1090=head2 Updated And Improved Modules and Pragmata
1091
1092=over 4
1093
1094=item *
1095
61947107 1096The following independently supported modules have been updated to the
1097newest versions from CPAN: CGI, CPAN, DB_File, File::Spec, File::Temp,
1098Getopt::Long, Math::BigFloat, Math::BigInt, the podlators bundle
ebc20e9a 1099(Pod::Man, Pod::Text), Pod::LaTeX, Pod::Parser, Storable,
61947107 1100Term::ANSIColor, Test, Text-Tabs+Wrap.
77c8cf41 1101
1102=item *
1103
e6dc8c81 1104attributes::reftype() now works on tied arguments.
77c8cf41 1105
1106=item *
1107
057b7f2b 1108AutoLoader can now be disabled with C<no AutoLoader;>.
77c8cf41 1109
1110=item *
1111
443f6d01 1112B::Deparse has been significantly enhanced by Robin Houston. It can
1113now deparse almost all of the standard test suite (so that the tests
3c1bc199 1114still succeed). There is a make target "test.deparse" for trying this
1115out.
77c8cf41 1116
1117=item *
1118
443f6d01 1119Carp now has better interface documentation, and the @CARP_NOT
e367fc03 1120interface has been added to get optional control over where errors
3c1bc199 1121are reported independently of @ISA, by Ben Tilly.
e367fc03 1122
1123=item *
1124
1e13d81f 1125Class::Struct can now define the classes in compile time.
77c8cf41 1126
1127=item *
1128
1e13d81f 1129Class::Struct now assigns the array/hash element if the accessor
1130is called with an array/hash element as the B<sole> argument.
77c8cf41 1131
1132=item *
1133
797ec949 1134The return value of Cwd::fastcwd() is now tainted.
1135
1136=item *
1137
e6dc8c81 1138Data::Dumper now has an option to sort hashes.
77c8cf41 1139
1140=item *
1141
e6dc8c81 1142Data::Dumper now has an option to dump code references
1e13d81f 1143using B::Deparse.
77c8cf41 1144
1145=item *
1146
44da0e71 1147DB_File now supports newer Berkeley DB versions, among
1148other improvements.
1149
1150=item *
1151
797ec949 1152Devel::Peek now has an interface for the Perl memory statistics
1153(this works only if you are using perl's malloc, and if you have
1154compiled with debugging).
1155
1156=item *
1157
1e13d81f 1158The English module can now be used without the infamous performance
1159hit by saying
77c8cf41 1160
66023b77 1161 use English '-no_match_vars';
77c8cf41 1162
e6dc8c81 1163(Assuming, of course, that you don't need the troublesome variables
1e13d81f 1164C<$`>, C<$&>, or C<$'>.) Also, introduced C<@LAST_MATCH_START> and
1165C<@LAST_MATCH_END> English aliases for C<@-> and C<@+>.
77c8cf41 1166
1167=item *
1168
797ec949 1169ExtUtils::MakeMaker now uses File::Spec internally, which hopefully
e6dc8c81 1170leads to better portability.
797ec949 1171
1172=item *
1173
b98cfe2c 1174Fcntl, Socket, and Sys::Syslog have been rewritten by Nicholas Clark
3c1bc199 1175to use the new-style constant dispatch section (see L<ExtUtils::Constant>).
1e13d81f 1176This means that they will be more robust and hopefully faster.
77c8cf41 1177
1178=item *
1179
e6a6fae8 1180File::Find now chdir()s correctly when chasing symbolic links. [561]
44da0e71 1181
1182=item *
1183
1e13d81f 1184File::Find now has pre- and post-processing callbacks. It also
1185correctly changes directories when chasing symbolic links. Callbacks
1186(naughtily) exiting with "next;" instead of "return;" now work.
61947107 1187
1188=item *
1189
1e13d81f 1190File::Find is now (again) reentrant. It also has been made
1191more portable.
77c8cf41 1192
61947107 1193=item *
1194
608dbdb1 1195The warnings issued by File::Find now belong to their own category.
1196You can enable/disable them with C<use/no warnings 'File::Find';>.
1197
1198=item *
1199
b98cfe2c 1200File::Glob::glob() has been renamed to File::Glob::bsd_glob()
1201because the name clashes with the builtin glob(). The older
1202name is still available for compatibility, but is deprecated. [561]
61947107 1203
1204=item *
1205
1206File::Glob now supports C<GLOB_LIMIT> constant to limit the size of
1207the returned list of filenames.
77c8cf41 1208
1209=item *
1210
1e13d81f 1211IPC::Open3 now allows the use of numeric file descriptors.
1212
1213=item *
1214
e6dc8c81 1215IO::Socket now has an atmark() method, which returns true if the socket
77c8cf41 1216is positioned at the out-of-band mark. The method is also exportable
1217as a sockatmark() function.
1218
1219=item *
1220
b98cfe2c 1221IO::Socket::INET failed to open the specified port if the service name
1222was not known. It now correctly uses the supplied port number as is. [561]
1223
1224=item *
1225
e6dc8c81 1226IO::Socket::INET has support for the ReusePort option (if your
1227platform supports it). The Reuse option now has an alias, ReuseAddr.
1228For clarity, you may want to prefer ReuseAddr.
77c8cf41 1229
1230=item *
1231
e6dc8c81 1232IO::Socket::INET now supports a value of zero for C<LocalPort>
1233(usually meaning that the operating system will make one up.)
77c8cf41 1234
1235=item *
1236
e6dc8c81 1237'use lib' now works identically to @INC. Removing directories
1e13d81f 1238with 'no lib' now works.
1239
1240=item *
1241
3c1bc199 1242Math::BigFloat and Math::BigInt have undergone a full rewrite by Tels.
1243They are now magnitudes faster, and they support various bignum
1244libraries such as GMP and PARI as their backends.
f39f21d8 1245
1246=item *
1247
44da0e71 1248Math::Complex handles inf, NaN etc., better.
1249
1250=item *
1251
3c1bc199 1252Net::Ping has been considerably enhanced by Rob Brown: multihoming is
1253now supported, Win32 functionality is better, there is now time
1254measuring functionality (optionally high-resolution using
1255Time::HiRes), and there is now "external" protocol which uses
1256Net::Ping::External module which runs your external ping utility and
1257parses the output. A version of Net::Ping::External is available in
1258CPAN.
b929be1d 1259
1260Note that some of the Net::Ping tests are disabled when running
1261under the Perl distribution since one cannot assume one or more
1262of the following: enabled echo port at localhost, full Internet
1263connectivity, or sympathetic firewalls. You can set the environment
1264variable PERL_TEST_Net_Ping to "1" (one) before running the Perl test
1265suite to enable all the Net::Ping tests.
f39f21d8 1266
77c8cf41 1267=item *
f39f21d8 1268
da6838c8 1269POSIX::sigaction() is now much more flexible and robust.
61947107 1270You can now install coderef handlers, 'DEFAULT', and 'IGNORE'
1271handlers, installing new handlers was not atomic.
f39f21d8 1272
1273=item *
1274
e6dc8c81 1275In Safe, C<%INC> is now localised in a Safe compartment so that
76663d67 1276use/require work.
1277
1278=item *
1279
44da0e71 1280In SDBM_File on dosish platforms, some keys went missing because of
1281lack of support for files with "holes". A workaround for the problem
1282has been added.
1283
1284=item *
1285
da6838c8 1286In Search::Dict one can now have a pre-processing hook for the
76663d67 1287lines being searched.
1e13d81f 1288
1289=item *
1290
1291The Shell module now has an OO interface.
1292
1293=item *
1294
903fdac2 1295In Sys::Syslog there is now a failover mechanism that will go
1296through alternative connection mechanisms until the message
1297is successfully logged.
1298
1299=item *
1300
61947107 1301The Test module has been significantly enhanced.
f39f21d8 1302
1303=item *
1304
1cfd00ad 1305Time::Local::timelocal() does not handle fractional seconds anymore.
1306The rationale is that neither does localtime(), and timelocal() and
1307localtime() are supposed to be inverses of each other.
1308
1309=item *
1310
da6838c8 1311The vars pragma now supports declaring fully qualified variables.
77c8cf41 1312(Something that C<our()> does not and will not support.)
f39f21d8 1313
888aee59 1314=item *
1315
58175c9b 1316The C<utf8::> name space (as in the pragma) provides various
61947107 1317Perl-callable functions to provide low level access to Perl's
1318internal Unicode representation. At the moment only length()
1319has been implemented.
888aee59 1320
f39f21d8 1321=back
1322
77c8cf41 1323=head1 Utility Changes
f39f21d8 1324
1325=over 4
1326
1327=item *
1328
61947107 1329Emacs perl mode (emacs/cperl-mode.el) has been updated to version
77c8cf41 13304.31.
f39f21d8 1331
1332=item *
1333
61947107 1334F<emacs/e2ctags.pl> is now much faster.
f39f21d8 1335
1336=item *
1337
54ba6336 1338C<enc2xs> is a tool for people adding their own encodings to the
1339Encode module.
1340
1341=item *
1342
1e13d81f 1343C<h2ph> now supports C trigraphs.
1344
1345=item *
1346
1347C<h2xs> now produces a template README.
f39f21d8 1348
77c8cf41 1349=item *
1350
e6dc8c81 1351C<h2xs> now uses C<Devel::PPPort> for better portability between
1e13d81f 1352different versions of Perl.
f39f21d8 1353
1354=item *
1355
e6dc8c81 1356C<h2xs> uses the new L<ExtUtils::Constant|ExtUtils::Constant> module
1357which will affect newly created extensions that define constants.
1358Since the new code is more correct (if you have two constants where the
1359first one is a prefix of the second one, the first constant B<never>
1360got defined), less lossy (it uses integers for integer constant,
1361as opposed to the old code that used floating point numbers even for
1362integer constants), and slightly faster, you might want to consider
1363regenerating your extension code (the new scheme makes regenerating
1364easy). L<h2xs> now also supports C trigraphs.
f39f21d8 1365
1366=item *
1367
e6dc8c81 1368C<libnetcfg> has been added to configure libnet.
f39f21d8 1369
1370=item *
1371
1e13d81f 1372C<perlbug> is now much more robust. It also sends the bug report to
61947107 1373perl.org, not perl.com.
f39f21d8 1374
1375=item *
1376
1e13d81f 1377C<perlcc> has been rewritten and its user interface (that is,
61947107 1378command line) is much more like that of the UNIX C compiler, cc.
44da0e71 1379(The perlbc tools has been removed. Use C<perlcc -B> instead.)
8cbf54fa 1380B<Note that perlcc is still considered very experimental and
e6a6fae8 1381unsupported.> [561]
f39f21d8 1382
1383=item *
1384
aecce728 1385C<perlivp> is a new Installation Verification Procedure utility
1386for running any time after installing Perl.
f39f21d8 1387
1388=item *
1389
54ba6336 1390C<piconv> is an implementation of the character conversion utility
1391C<iconv>, demonstrating the new Encode module.
1392
1393=item *
1394
1e13d81f 1395C<pod2html> now allows specifying a cache directory.
f39f21d8 1396
1397=item *
1398
bbed45f6 1399C<pod2html> now produces XHTML 1.0.
1400
1401=item *
1402
9b856ef5 1403C<pod2html> now understands POD written using different line endings
bbed45f6 1404(PC-like CRLF versus UNIX-like LF versus MacClassic-like CR).
1405
1406=item *
1407
1e13d81f 1408C<s2p> has been completely rewritten in Perl. (It is in fact a full
1409implementation of sed in Perl: you can use the sed functionality by
1410using the C<psed> utility.)
61947107 1411
1412=item *
1413
e6a6fae8 1414C<xsubpp> now understands POD documentation embedded in the *.xs
1415files. [561]
f39f21d8 1416
1417=item *
1418
e6dc8c81 1419C<xsubpp> now supports the OUT keyword.
f39f21d8 1420
1421=back
1422
77c8cf41 1423=head1 New Documentation
f39f21d8 1424
1425=over 4
1426
1427=item *
1428
77c8cf41 1429perl56delta details the changes between the 5.005 release and the
14305.6.0 release.
f39f21d8 1431
1432=item *
1433
61947107 1434perlclib documents the internal replacements for standard C library
1435functions. (Interesting only for extension writers and Perl core
ebc20e9a 1436hackers.)
61947107 1437
1438=item *
1439
ebc20e9a 1440perldebtut is a Perl debugging tutorial.
f39f21d8 1441
77c8cf41 1442=item *
f39f21d8 1443
e6a6fae8 1444perlebcdic contains considerations for running Perl on EBCDIC
ebc20e9a 1445platforms.
f39f21d8 1446
77c8cf41 1447=item *
1448
888aee59 1449perlintro is a gentle introduction to Perl.
1450
1451=item *
1452
61947107 1453perliol documents the internals of PerlIO with layers.
1454
1455=item *
1456
888aee59 1457perlmodstyle is a style guide for writing modules.
1458
1459=item *
1460
ebc20e9a 1461perlnewmod tells about writing and submitting a new module.
f39f21d8 1462
1463=item *
1464
34babc16 1465perlpacktut is a pack() tutorial.
1466
1467=item *
1468
888aee59 1469perlpod has been rewritten to be clearer and to record the best
1470practices gathered over the years.
1471
1472=item *
1473
057b7f2b 1474perlpodspec is a more formal specification of the pod format,
888aee59 1475mainly of interest for writers of pod applications, not to
1476people writing in pod.
1477
1478=item *
1479
ebc20e9a 1480perlretut is a regular expression tutorial.
f39f21d8 1481
1482=item *
1483
77c8cf41 1484perlrequick is a regular expressions quick-start guide.
e6a6fae8 1485Yes, much quicker than perlretut. [561]
f39f21d8 1486
77c8cf41 1487=item *
f39f21d8 1488
61947107 1489perltodo has been updated.
1490
1491=item *
1492
888aee59 1493perltootc has been renamed as perltooc (to not to conflict
e6dc8c81 1494with perltoot in filesystems restricted to "8.3" names).
888aee59 1495
1496=item *
1497
58175c9b 1498perluniintro is an introduction to using Unicode in Perl.
1499(perlunicode is more of a detailed reference and background
1500information)
888aee59 1501
1502=item *
1503
77c8cf41 1504perlutil explains the command line utilities packaged with the Perl
ebc20e9a 1505distribution.
77c8cf41 1506
1507=back
f39f21d8 1508
61947107 1509The following platform-specific documents are available before
1510the installation as README.I<platform>, and after the installation
1511as perlI<platform>:
f39f21d8 1512
61947107 1513 perlaix perlamiga perlapollo perlbeos perlbs2000
1514 perlce perlcygwin perldgux perldos perlepoc perlhpux
1515 perlhurd perlmachten perlmacos perlmint perlmpeix
1516 perlnetware perlos2 perlos390 perlplan9 perlqnx perlsolaris
1517 perltru64 perluts perlvmesa perlvms perlvos perlwin32
77c8cf41 1518
31be200d 1519Eastern Asian Perl users are now welcomed in their own languages:
1520README.jp (Japanese), README.ko (Korean), README.cn (simplified
1521Chinese) and README.tw (traditional Chinese), which are written in
1522normal pod but encoded in EUC-JP, EUC-KR, EUC-CN and Big5. These
1523will get installed as
1524
1525 perljp perlko perlcn perltw
1526
77c8cf41 1527=over 4
1528
1529=item *
1530
61947107 1531The documentation for the POSIX-BC platform is called "BS2000", to avoid
1532confusion with the Perl POSIX module.
77c8cf41 1533
1534=item *
1535
6cd7d6d6 1536The documentation for the WinCE platform is called perlce (README.ce
1537in the source code kit), to avoid confusion with the perlwin32
1538documentation on 8.3-restricted filesystems.
77c8cf41 1539
1540=back
1541
1542=head1 Performance Enhancements
1543
1544=over 4
1545
1546=item *
1547
44da0e71 1548map() could get pathologically slow when the result list it generates
1549is larger than the source list. The performance has been improved for
e6a6fae8 1550common scenarios. [561]
77c8cf41 1551
1552=item *
1553
b98cfe2c 1554sort() is also fully reentrant, in the sense that the sort function
1555can itself call sort(). This did not work reliably in previous
1556releases. [561]
1557
1558=item *
1559
e1f170bd 1560sort() has been changed to use primarily mergesort internally as
1561opposed to the earlier quicksort. For very small lists this may
1562result in slightly slower sorting times, but in general the speedup
1563should be at least 20%. Additional bonuses are that the worst case
1564behaviour of sort() is now better (in computer science terms it now
1565runs in time O(N log N), as opposed to quicksort's Theta(N**2)
1566worst-case run time behaviour), and that sort() is now stable
1567(meaning that elements with identical keys will stay ordered as they
1568were before the sort). See the C<sort> pragma for information.
77c8cf41 1569
05e25c75 1570The story in more detail: suppose you want to serve yourself a little
1571slice of Pi.
1572
1573 @digits = ( 3,1,4,1,5,9 );
1574
1575A numerical sort of the digits will yield (1,1,3,4,5,9), as expected.
1576Which C<1> comes first is hard to know, since one C<1> looks pretty
1577much like any other. You can regard this as totally trivial,
1578or somewhat profound. However, if you just want to sort the even
1579digits ahead of the odd ones, then what will
1580
1581 sort { ($a % 2) <=> ($b % 2) } @digits;
1582
1583yield? The only even digit, C<4>, will come first. But how about
1584the odd numbers, which all compare equal? With the quicksort algorithm
1585used to implement Perl 5.6 and earlier, the order of ties is left up
1586to the sort. So, as you add more and more digits of Pi, the order
1587in which the sorted even and odd digits appear will change.
1588and, for sufficiently large slices of Pi, the quicksort algorithm
1589in Perl 5.8 won't return the same results even if reinvoked with the
1590same input. The justification for this rests with quicksort's
1591worst case behavior. If you run
1592
1593 sort { $a <=> $b } ( 1 .. $N , 1 .. $N );
1594
1595(something you might approximate if you wanted to merge two sorted
1596arrays using sort), doubling $N doesn't just double the quicksort time,
1597it I<quadruples> it. Quicksort has a worst case run time that can
1598grow like N**2, so-called I<quadratic> behaviour, and it can happen
1599on patterns that may well arise in normal use. You won't notice this
1600for small arrays, but you I<will> notice it with larger arrays,
1601and you may not live long enough for the sort to complete on arrays
1602of a million elements. So the 5.8 quicksort scrambles large arrays
1603before sorting them, as a statistical defence against quadratic behaviour.
1604But that means if you sort the same large array twice, ties may be
1605broken in different ways.
1606
1607Because of the unpredictability of tie-breaking order, and the quadratic
1608worst-case behaviour, quicksort was I<almost> replaced completely with
1609a stable mergesort. I<Stable> means that ties are broken to preserve
1610the original order of appearance in the input array. So
1611
1612 sort { ($a % 2) <=> ($b % 2) } (3,1,4,1,5,9);
1613
1614will yield (4,3,1,1,5,9), guaranteed. The even and odd numbers
1615appear in the output in the same order they appeared in the input.
e6dc8c81 1616Mergesort has worst case O(N log N) behaviour, the best value
05e25c75 1617attainable. And, ironically, this mergesort does particularly
1618well where quicksort goes quadratic: mergesort sorts (1..$N, 1..$N)
1619in O(N) time. But quicksort was rescued at the last moment because
1620it is faster than mergesort on certain inputs and platforms.
1621For example, if you really I<don't> care about the order of even
1622and odd digits, quicksort will run in O(N) time; it's very good
1623at sorting many repetitions of a small number of distinct elements.
1624The quicksort divide and conquer strategy works well on platforms
1625with relatively small, very fast, caches. Eventually, the problem gets
1626whittled down to one that fits in the cache, from which point it
1627benefits from the increased memory speed.
1628
1629Quicksort was rescued by implementing a sort pragma to control aspects
1630of the sort. The B<stable> subpragma forces stable behaviour,
1631regardless of algorithm. The B<_quicksort> and B<_mergesort>
1632subpragmas are heavy-handed ways to select the underlying implementation.
1633The leading C<_> is a reminder that these subpragmas may not survive
1634beyond 5.8. More appropriate mechanisms for selecting the implementation
1635exist, but they wouldn't have arrived in time to save quicksort.
1636
77c8cf41 1637=item *
1638
1639Hashes now use Bob Jenkins "One-at-a-Time" hashing key algorithm
f224927c 1640( http://burtleburtle.net/bob/hash/doobs.html ). This algorithm is
77c8cf41 1641reasonably fast while producing a much better spread of values than
1642the old hashing algorithm (originally by Chris Torek, later tweaked by
1643Ilya Zakharevich). Hash values output from the algorithm on a hash of
1644all 3-char printable ASCII keys comes much closer to passing the
1645DIEHARD random number generation tests. According to perlbench, this
1646change has not affected the overall speed of Perl.
1647
1648=item *
1649
1650unshift() should now be noticeably faster.
1651
1652=back
1653
1654=head1 Installation and Configuration Improvements
1655
1656=head2 Generic Improvements
1657
1658=over 4
1659
1660=item *
1661
1662INSTALL now explains how you can configure Perl to use 64-bit
1663integers even on non-64-bit platforms.
1664
1665=item *
1666
1667Policy.sh policy change: if you are reusing a Policy.sh file
1668(see INSTALL) and you use Configure -Dprefix=/foo/bar and in the old
1669Policy $prefix eq $siteprefix and $prefix eq $vendorprefix, all of
1670them will now be changed to the new prefix, /foo/bar. (Previously
1671only $prefix changed.) If you do not like this new behaviour,
1672specify prefix, siteprefix, and vendorprefix explicitly.
1673
1674=item *
1675
1676A new optional location for Perl libraries, otherlibdirs, is available.
1677It can be used for example for vendor add-ons without disturbing Perl's
1678own library directories.
1679
1680=item *
1681
e6dc8c81 1682In many platforms, the vendor-supplied 'cc' is too stripped-down to
77c8cf41 1683build Perl (basically, 'cc' doesn't do ANSI C). If this seems
1684to be the case and 'cc' does not seem to be the GNU C compiler
1685'gcc', an automatic attempt is made to find and use 'gcc' instead.
1686
1687=item *
1688
1689gcc needs to closely track the operating system release to avoid
1690build problems. If Configure finds that gcc was built for a different
1691operating system release than is running, it now gives a clearly visible
1692warning that there may be trouble ahead.
1693
1694=item *
1695
11d33b1d 1696Since Perl 5.8 is not binary-compatible with previous releases
1697of Perl, Configure no longer suggests including the 5.005
1698modules in @INC.
77c8cf41 1699
1700=item *
1701
b98cfe2c 1702Configure C<-S> can now run non-interactively. [561]
77c8cf41 1703
1704=item *
1705
44da0e71 1706Configure support for pdp11-style memory models has been removed due
e6a6fae8 1707to obsolescence. [561]
44da0e71 1708
1709=item *
1710
77c8cf41 1711configure.gnu now works with options with whitespace in them.
f39f21d8 1712
77c8cf41 1713=item *
f39f21d8 1714
77c8cf41 1715installperl now outputs everything to STDERR.
f39f21d8 1716
77c8cf41 1717=item *
1718
f39f21d8 1719Because PerlIO is now the default on most platforms, "-perlio" doesn't
1720get appended to the $Config{archname} (also known as $^O) anymore.
1721Instead, if you explicitly choose not to use perlio (Configure command
1722line option -Uuseperlio), you will get "-stdio" appended.
1723
1724=item *
1725
1726Another change related to the architecture name is that "-64all"
1727(-Duse64bitall, or "maximally 64-bit") is appended only if your
1728pointers are 64 bits wide. (To be exact, the use64bitall is ignored.)
1729
1730=item *
1731
e6dc8c81 1732In AFS installations, one can configure the root of the AFS to be
77c8cf41 1733somewhere else than the default F</afs> by using the Configure
1734parameter C<-Dafsroot=/some/where/else>.
1735
1736=item *
1737
e6dc8c81 1738APPLLIB_EXP, a lesser-known configuration-time definition, has been
61947107 1739documented. It can be used to prepend site-specific directories
e6dc8c81 1740to Perl's default search path (@INC); see INSTALL for information.
61947107 1741
1742=item *
1743
77c8cf41 1744The version of Berkeley DB used when the Perl (and, presumably, the
1745DB_File extension) was built is now available as
1746C<@Config{qw(db_version_major db_version_minor db_version_patch)}>
1747from Perl and as C<DB_VERSION_MAJOR_CFG DB_VERSION_MINOR_CFG
1748DB_VERSION_PATCH_CFG> from C.
1749
1750=item *
1751
61947107 1752Building Berkeley DB3 for compatibility modes for DB, NDBM, and ODBM
1753has been documented in INSTALL.
77c8cf41 1754
1755=item *
1756
61947107 1757If you have CPAN access (either network or a local copy such as a
1758CD-ROM) you can during specify extra modules to Configure to build and
1759install with Perl using the -Dextras=... option. See INSTALL for
1760more details.
f39f21d8 1761
61947107 1762=item *
f39f21d8 1763
e6dc8c81 1764In addition to config.over, a new override file, config.arch, is
1765available. This file is supposed to be used by hints file writers
1766for architecture-wide changes (as opposed to config.over which is
1767for site-wide changes).
f39f21d8 1768
1769=item *
1770
e6dc8c81 1771If your file system supports symbolic links, you can build Perl outside
e1f170bd 1772of the source directory by
1773
1774 mkdir /tmp/perl/build/directory
1775 cd /tmp/perl/build/directory
1776 sh /path/to/perl/source/Configure -Dmksymlinks ...
1777
1778This will create in /tmp/perl/build/directory a tree of symbolic links
1779pointing to files in /path/to/perl/source. The original files are left
e6dc8c81 1780unaffected. After Configure has finished, you can just say
e1f170bd 1781
1782 make all test
1783
1784and Perl will be built and tested, all in /tmp/perl/build/directory.
e6a6fae8 1785[561]
e1f170bd 1786
1787=item *
1788
e6dc8c81 1789For Perl developers, several new make targets for profiling
1790and debugging have been added; see L<perlhack>.
61947107 1791
1792=over 8
f39f21d8 1793
1794=item *
1795
61947107 1796Use of the F<gprof> tool to profile Perl has been documented in
1797L<perlhack>. There is a make target called "perl.gprof" for
1798generating a gprofiled Perl executable.
f39f21d8 1799
1800=item *
1801
61947107 1802If you have GCC 3, there is a make target called "perl.gcov" for
1803creating a gcoved Perl executable for coverage analysis. See
1804L<perlhack>.
f39f21d8 1805
1806=item *
1807
61947107 1808If you are on IRIX or Tru64 platforms, new profiling/debugging options
e6dc8c81 1809have been added; see L<perlhack> for more information about pixie and
61947107 1810Third Degree.
1811
1812=back
f39f21d8 1813
1814=item *
1815
61947107 1816Guidelines of how to construct minimal Perl installations have
1817been added to INSTALL.
f39f21d8 1818
1819=item *
1820
61947107 1821The Thread extension is now not built at all under ithreads
1822(C<Configure -Duseithreads>) because it wouldn't work anyway (the
1823Thread extension requires being Configured with C<-Duse5005threads>).
f39f21d8 1824
61947107 1825But note that the Thread.pm interface is now shared by both
1826thread models.
f39f21d8 1827
d1eb8299 1828=item *
1829
1830The Gconvert macro ($Config{d_Gconvert}) used by perl for stringifying
1831floating-point numbers is now more picky about using sprintf %.*g
1832rules for the conversion. Some platforms that used to use gcvt may
1833now resort to the slower sprintf.
1834
11d33b1d 1835=item *
1836
1837The obsolete method of making a special (e.g., debugging) flavor
1838of perl by saying
1839
1840 make LIBPERL=libperld.a
1841
1842has been removed. Use -DDEBUGGING instead.
1843
61947107 1844=back
f39f21d8 1845
61947107 1846=head2 New Or Improved Platforms
f39f21d8 1847
61947107 1848For the list of platforms known to support Perl,
1849see L<perlport/"Supported Platforms">.
1850
1851=over 4
f39f21d8 1852
1853=item *
1854
61947107 1855AIX dynamic loading should be now better supported.
f39f21d8 1856
f39f21d8 1857=item *
1858
77c8cf41 1859AIX should now work better with gcc, threads, and 64-bitness. Also the
1860long doubles support in AIX should be better now. See L<perlaix>.
f39f21d8 1861
1862=item *
1863
f224927c 1864AtheOS ( http://www.atheos.cx/ ) is a new platform.
f39f21d8 1865
77c8cf41 1866=item *
f39f21d8 1867
58175c9b 1868BeOS has been reclaimed.
1869
1870=item *
1871
e6dc8c81 1872The DG/UX platform now supports 5.005-style threads.
1873See L<perldgux>.
f39f21d8 1874
1875=item *
1876
e6dc8c81 1877The DYNIX/ptx platform (a.k.a. dynixptx) is supported at or near
1878osvers 4.5.2.
f39f21d8 1879
1880=item *
1881
e6dc8c81 1882EBCDIC platforms (z/OS (also known as OS/390), POSIX-BC, and VM/ESA)
61947107 1883have been regained. Many test suite tests still fail and the
1884co-existence of Unicode and EBCDIC isn't quite settled, but the
1885situation is much better than with Perl 5.6. See L<perlos390>,
1886L<perlbs2000> (for POSIX-BC), and L<perlvmesa> for more information.
f39f21d8 1887
1888=item *
1889
61947107 1890Building perl with -Duseithreads or -Duse5005threads now works under
1891HP-UX 10.20 (previously it only worked under 10.30 or later). You will
e6a6fae8 1892need a thread library package installed. See README.hpux. [561]
f39f21d8 1893
77c8cf41 1894=item *
f39f21d8 1895
b98cfe2c 1896Mac OS Classic is now supported in the mainstream source package
1897(MacPerl has of course been available since perl 5.004 but now the
1898source code bases of standard Perl and MacPerl have been synchronised)
1899[561]
f39f21d8 1900
77c8cf41 1901=item *
f39f21d8 1902
8939ba94 1903Mac OS X (or Darwin) should now be able to build Perl even on HFS+
e6dc8c81 1904filesystems. (The case-insensitivity used to confuse the Perl build
1905process.)
f39f21d8 1906
888aee59 1907=item *
1908
e6a6fae8 1909NCR MP-RAS is now supported. [561]
888aee59 1910
1911=item *
1912
58175c9b 1913All the NetBSD specific patches (except for the installation
1914specific ones) have been merged back to the main distribution.
1915
1916=item *
1917
61947107 1918NetWare from Novell is now supported. See L<perlnetware>.
888aee59 1919
1920=item *
1921
e6a6fae8 1922NonStop-UX is now supported. [561]
888aee59 1923
1924=item *
1925
44da0e71 1926NEC SUPER-UX is now supported.
1927
1928=item *
1929
58175c9b 1930All the OpenBSD specific patches (except for the installation
1931specific ones) have been merged back to the main distribution.
1932
1933=item *
1934
1935Perl has been tested with the GNU pth userlevel thread package
b98cfe2c 1936( http://www.gnu.org/software/pth/pth.html ). All thread tests
1937of Perl now work, but not without adding some yield()s to the tests,
1938so while pth (and other userlevel thread implementations) can be
1939considered to be "working" with Perl ithreads, keep in mind the
1940possible non-preemptability of the underlying thread implementation.
58175c9b 1941
1942=item *
1943
11d33b1d 1944Stratus VOS is now supported using Perl's native build method
1945(Configure). This is the recommended method to build Perl on
1946VOS. The older methods, which build miniperl, are still
ebc20e9a 1947available. See L<perlvos>.
11d33b1d 1948
1949=item *
1950
e6a6fae8 1951The Amdahl UTS UNIX mainframe platform is now supported. [561]
888aee59 1952
1953=item *
1954
61947107 1955WinCE is now supported. See L<perlce>.
1956
1957=item *
1958
e6dc8c81 1959z/OS (formerly known as OS/390, formerly known as MVS OE) now has
61947107 1960support for dynamic loading. This is not selected by default,
e6a6fae8 1961however, you must specify -Dusedl in the arguments of Configure. [561]
888aee59 1962
f39f21d8 1963=back
1964
1965=head1 Selected Bug Fixes
1966
e1f170bd 1967Numerous memory leaks and uninitialized memory accesses have been
e6dc8c81 1968hunted down. Most importantly, anonymous subs used to leak quite
e6a6fae8 1969a bit. [561]
ba370e9b 1970
f39f21d8 1971=over 4
1972
1973=item *
1974
e1f170bd 1975The autouse pragma didn't work for Multi::Part::Function::Names.
f39f21d8 1976
1977=item *
1978
44da0e71 1979caller() could cause core dumps in certain situations. Carp was sometimes
0fc9dec4 1980affected by this problem. In particular, caller() now returns a
1981subroutine name of C<(unknown)> for subroutines that have been removed
ebc20e9a 1982from the symbol table.
44da0e71 1983
1984=item *
1985
e1f170bd 1986chop(@list) in list context returned the characters chopped in
e6a6fae8 1987reverse order. This has been reversed to be in the right order. [561]
f39f21d8 1988
1989=item *
1990
e1f170bd 1991Configure no longer includes the DBM libraries (dbm, gdbm, db, ndbm)
1992when building the Perl binary. The only exception to this is SunOS 4.x,
e6a6fae8 1993which needs them. [561]
f39f21d8 1994
1995=item *
1996
e1f170bd 1997The behaviour of non-decimal but numeric string constants such as
1998"0x23" was platform-dependent: in some platforms that was seen as 35,
1999in some as 0, in some as a floating point number (don't ask). This
e6dc8c81 2000was caused by Perl's using the operating system libraries in a situation
e1f170bd 2001where the result of the string to number conversion is undefined: now
2002Perl consistently handles such strings as zero in numeric contexts.
f39f21d8 2003
2004=item *
2005
e1f170bd 2006The order of DESTROYs has been made more predictable.
f39f21d8 2007
2008=item *
2009
e1f170bd 2010Several debugger fixes: exit code now reflects the script exit code,
2011condition C<"0"> now treated correctly, the C<d> command now checks
e6dc8c81 2012line number, C<$.> no longer gets corrupted, and all debugger output
e6a6fae8 2013now goes correctly to the socket if RemotePort is set. [561]
44da0e71 2014
2015=item *
2016
b98cfe2c 2017Perl 5.6.0 could emit spurious warnings about redefinition of
2018dl_error() when statically building extensions into perl.
2019This has been corrected. [561]
f39f21d8 2020
2021=item *
2022
e1f170bd 2023L<dprofpp> -R didn't work.
f39f21d8 2024
2025=item *
2026
e1f170bd 2027C<*foo{FORMAT}> now works.
5746cacd 2028
44da0e71 2029=item *
2030
2031Infinity is now recognized as a number.
f39f21d8 2032
2033=item *
2034
e1f170bd 2035UNIVERSAL::isa no longer caches methods incorrectly. (This broke
e6a6fae8 2036the Tk extension with 5.6.0.) [561]
f39f21d8 2037
2038=item *
2039
e1f170bd 2040Lexicals I: lexicals outside an eval "" weren't resolved
2041correctly inside a subroutine definition inside the eval "" if they
2042were not already referenced in the top level of the eval""ed code.
f39f21d8 2043
2044=item *
2045
e1f170bd 2046Lexicals II: lexicals leaked at file scope into subroutines that
2047were declared before the lexicals.
f39f21d8 2048
2049=item *
2050
44da0e71 2051Lexical warnings now propagating correctly between scopes
ebc20e9a 2052and into C<eval "...">.
44da0e71 2053
2054=item *
2055
2056C<use warnings qw(FATAL all)> did not work as intended. This has been
e6a6fae8 2057corrected. [561]
44da0e71 2058
2059=item *
2060
2061warnings::enabled() now reports the state of $^W correctly if the caller
e6a6fae8 2062isn't using lexical warnings. [561]
f39f21d8 2063
2064=item *
2065
e6a6fae8 2066Line renumbering with eval and C<#line> now works. [561]
f39f21d8 2067
2068=item *
2069
e1f170bd 2070Fixed numerous memory leaks, especially in eval "".
f39f21d8 2071
2072=item *
2073
e6dc8c81 2074Localised tied variables no longer leak memory
0b2c215a 2075
2076 use Tie::Hash;
2077 tie my %tied_hash => 'Tie::StdHash';
2078
2079 ...
2080
e6dc8c81 2081 # Used to leak memory every time local() was called;
2082 # in a loop, this added up.
0b2c215a 2083 local($tied_hash{Foo}) = 1;
2084
2085=item *
2086
e6dc8c81 2087Localised hash elements (and %ENV) are correctly unlocalised to not
2088exist, if they didn't before they were localised.
0b2c215a 2089
2090
2091 use Tie::Hash;
2092 tie my %tied_hash => 'Tie::StdHash';
2093
2094 ...
2095
2096 # Nothing has set the FOO element so far
2097
2098 { local $tied_hash{FOO} = 'Bar' }
818c4caa 2099
fd5a896a 2100 # This used to print, but not now.
2101 print "exists!\n" if exists $tied_hash{FOO};
0b2c215a 2102
2103As a side effect of this fix, tied hash interfaces B<must> define
159ad915 2104the EXISTS and DELETE methods.
0b2c215a 2105
2106=item *
2107
e1f170bd 2108mkdir() now ignores trailing slashes in the directory name,
2109as mandated by POSIX.
f39f21d8 2110
2111=item *
2112
e1f170bd 2113Some versions of glibc have a broken modfl(). This affects builds
2114with C<-Duselongdouble>. This version of Perl detects this brokenness
2115and has a workaround for it. The glibc release 2.2.2 is known to have
2116fixed the modfl() bug.
f39f21d8 2117
2118=item *
2119
e1f170bd 2120Modulus of unsigned numbers now works (4063328477 % 65535 used to
e6a6fae8 2121return 27406, instead of 27047). [561]
f39f21d8 2122
2123=item *
2124
e1f170bd 2125Some "not a number" warnings introduced in 5.6.0 eliminated to be
e6a6fae8 2126more compatible with 5.005. Infinity is now recognised as a number. [561]
f39f21d8 2127
77c8cf41 2128=item *
f39f21d8 2129
44da0e71 2130Numeric conversions did not recognize changes in the string value
e6a6fae8 2131properly in certain circumstances. [561]
44da0e71 2132
2133=item *
2134
e6dc8c81 2135Attributes (such as :shared) didn't work with our().
f39f21d8 2136
2137=item *
2138
b98cfe2c 2139our() variables will not cause bogus "Variable will not stay shared"
2140warnings. [561]
f39f21d8 2141
2142=item *
2143
44da0e71 2144"our" variables of the same name declared in two sibling blocks
2145resulted in bogus warnings about "redeclaration" of the variables.
e6a6fae8 2146The problem has been corrected. [561]
44da0e71 2147
2148=item *
2149
e1f170bd 2150pack "Z" now correctly terminates the string with "\0".
f39f21d8 2151
2152=item *
2153
e1f170bd 2154Fix password routines which in some shadow password platforms
2155(e.g. HP-UX) caused getpwent() to return every other entry.
f39f21d8 2156
77c8cf41 2157=item *
f39f21d8 2158
e1f170bd 2159The PERL5OPT environment variable (for passing command line arguments
e6a6fae8 2160to Perl) didn't work for more than a single group of options. [561]
f39f21d8 2161
77c8cf41 2162=item *
f39f21d8 2163
e1f170bd 2164PERL5OPT with embedded spaces didn't work.
f39f21d8 2165
77c8cf41 2166=item *
f39f21d8 2167
e1f170bd 2168printf() no longer resets the numeric locale to "C".
f39f21d8 2169
77c8cf41 2170=item *
f39f21d8 2171
e6dc8c81 2172C<qw(a\\b)> now parses correctly as C<'a\\b'>: that is, as three
e6a6fae8 2173characters, not four. [561]
44da0e71 2174
2175=item *
2176
2177pos() did not return the correct value within s///ge in earlier
e6a6fae8 2178versions. This is now handled correctly. [561]
f39f21d8 2179
77c8cf41 2180=item *
f39f21d8 2181
e1f170bd 2182Printing quads (64-bit integers) with printf/sprintf now works
2183without the q L ll prefixes (assuming you are on a quad-capable platform).
f39f21d8 2184
77c8cf41 2185=item *
f39f21d8 2186
ebc20e9a 2187Regular expressions on references and overloaded scalars now work.
f39f21d8 2188
ba370e9b 2189=item *
2190
e1f170bd 2191Right-hand side magic (GMAGIC) could in many cases such as string
2192concatenation be invoked too many times.
ba370e9b 2193
2194=item *
2195
e1f170bd 2196scalar() now forces scalar context even when used in void context.
ba370e9b 2197
2198=item *
2199
e1f170bd 2200SOCKS support is now much more robust.
ba370e9b 2201
2202=item *
2203
e1f170bd 2204sort() arguments are now compiled in the right wantarray context
2205(they were accidentally using the context of the sort() itself).
44da0e71 2206The comparison block is now run in scalar context, and the arguments
e6a6fae8 2207to be sorted are always provided list context. [561]
ba370e9b 2208
2209=item *
2210
e1f170bd 2211Changed the POSIX character class C<[[:space:]]> to include the (very
c2e23569 2212rarely used) vertical tab character. Added a new POSIX-ish character
2213class C<[[:blank:]]> which stands for horizontal whitespace
2214(currently, the space and the tab).
ba370e9b 2215
2216=item *
2217
2218The tainting behaviour of sprintf() has been rationalized. It does
2219not taint the result of floating point formats anymore, making the
e6a6fae8 2220behaviour consistent with that of string interpolation. [561]
ba370e9b 2221
2222=item *
2223
44da0e71 2224Some cases of inconsistent taint propagation (such as within hash
2225values) have been fixed.
2226
2227=item *
2228
2229The RE engine found in Perl 5.6.0 accidentally pessimised certain kinds
e6a6fae8 2230of simple pattern matches. These are now handled better. [561]
44da0e71 2231
2232=item *
2233
2234Regular expression debug output (whether through C<use re 'debug'>
e6a6fae8 2235or via C<-Dr>) now looks better. [561]
44da0e71 2236
2237=item *
2238
2239Multi-line matches like C<"a\nxb\n" =~ /(?!\A)x/m> were flawed. The
e6a6fae8 2240bug has been fixed. [561]
44da0e71 2241
2242=item *
2243
2244Use of $& could trigger a core dump under some situations. This
e6a6fae8 2245is now avoided. [561]
44da0e71 2246
2247=item *
2248
c2e23569 2249The regular expression captured submatches ($1, $2, ...) are now
2250more consistently unset if the match fails, instead of leaving false
e6a6fae8 2251data lying around in them. [561]
c2e23569 2252
2253=item *
2254
e6dc8c81 2255readline() on files opened in "slurp" mode could return an extra
2256"" (blank line) at the end in certain situations. This has been
e6a6fae8 2257corrected. [561]
44da0e71 2258
2259=item *
2260
2261Autovivification of symbolic references of special variables described
2262in L<perlvar> (as in C<${$num}>) was accidentally disabled. This works
e6a6fae8 2263again now. [561]
44da0e71 2264
2265=item *
2266
da6838c8 2267Sys::Syslog ignored the C<LOG_AUTH> constant.
ba370e9b 2268
2269=item *
2270
e1f170bd 2271All but the first argument of the IO syswrite() method are now optional.
ba370e9b 2272
2273=item *
2274
e1f170bd 2275$AUTOLOAD, sort(), lock(), and spawning subprocesses
2276in multiple threads simultaneously are now thread-safe.
ba370e9b 2277
2278=item *
2279
e6dc8c81 2280Tie::Array's SPLICE method was broken.
ba370e9b 2281
2282=item *
2283
e6dc8c81 2284Allow a read-only string on the left-hand side of a non-modifying tr///.
ba370e9b 2285
2286=item *
2287
ed788108 2288If C<STDERR> is tied, warnings caused by C<warn> and C<die> now
2289correctly pass to it.
2290
2291=item *
2292
e1f170bd 2293Several Unicode fixes.
ba370e9b 2294
2295=over 8
2296
2297=item *
2298
e6dc8c81 2299BOMs (byte order marks) at the beginning of Perl files
e1f170bd 2300(scripts, modules) should now be transparently skipped.
e6dc8c81 2301UTF-16 and UCS-2 encoded Perl files should now be read correctly.
ba370e9b 2302
2303=item *
2304
26f08e12 2305The character tables have been updated to Unicode 3.2.0.
ba370e9b 2306
2307=item *
2308
e1f170bd 2309Comparing with utf8 data does not magically upgrade non-utf8 data
58175c9b 2310into utf8. (This was a problem for example if you were mixing data
2311from I/O and Unicode data: your output might have got magically encoded
2312as UTF-8.)
2313
2314=item *
2315
e6dc8c81 2316Generating illegal Unicode code points such as U+FFFE, or the UTF-16
58175c9b 2317surrogates, now also generates an optional warning.
ba370e9b 2318
2319=item *
2320
e1f170bd 2321C<IsAlnum>, C<IsAlpha>, and C<IsWord> now match titlecase.
f39f21d8 2322
77c8cf41 2323=item *
f39f21d8 2324
e1f170bd 2325Concatenation with the C<.> operator or via variable interpolation,
2326C<eq>, C<substr>, C<reverse>, C<quotemeta>, the C<x> operator,
2327substitution with C<s///>, single-quoted UTF8, should now work.
f39f21d8 2328
77c8cf41 2329=item *
f39f21d8 2330
e1f170bd 2331The C<tr///> operator now works. Note that the C<tr///CU>
2332functionality has been removed (but see pack('U0', ...)).
f39f21d8 2333
77c8cf41 2334=item *
f39f21d8 2335
e1f170bd 2336C<eval "v200"> now works.
f39f21d8 2337
77c8cf41 2338=item *
f39f21d8 2339
44da0e71 2340Perl 5.6.0 parsed m/\x{ab}/ incorrectly, leading to spurious warnings.
e6a6fae8 2341This has been corrected. [561]
44da0e71 2342
2343=item *
2344
e6dc8c81 2345Zero entries were missing from the Unicode classes such as C<IsDigit>.
f39f21d8 2346
e1f170bd 2347=back
f39f21d8 2348
44da0e71 2349=item *
2350
2351Large unsigned numbers (those above 2**31) could sometimes lose their
e6a6fae8 2352unsignedness, causing bogus results in arithmetic operations. [561]
44da0e71 2353
e6dc8c81 2354=item *
2355
2356The Perl parser has been stress tested using both random input and
2357Markov chain input and the few found crashes and lockups have been
2358fixed.
2359
77c8cf41 2360=back
f39f21d8 2361
77c8cf41 2362=head2 Platform Specific Changes and Fixes
f39f21d8 2363
2364=over 4
2365
2366=item *
2367
77c8cf41 2368BSDI 4.*
f39f21d8 2369
77c8cf41 2370Perl now works on post-4.0 BSD/OSes.
f39f21d8 2371
2372=item *
2373
77c8cf41 2374All BSDs
f39f21d8 2375
057b7f2b 2376Setting C<$0> now works (as much as possible; see L<perlvar> for details).
f39f21d8 2377
2378=item *
2379
77c8cf41 2380Cygwin
f39f21d8 2381
439f2f5c 2382Numerous updates; currently synchronised with Cygwin 1.3.10.
f39f21d8 2383
2384=item *
2385
e1f170bd 2386Previously DYNIX/ptx had problems in its Configure probe for non-blocking I/O.
2387
2388=item *
2389
77c8cf41 2390EPOC
f39f21d8 2391
ebc20e9a 2392EPOC now better supported. See README.epoc. [561]
f39f21d8 2393
2394=item *
2395
77c8cf41 2396FreeBSD 3.*
f39f21d8 2397
77c8cf41 2398Perl now works on post-3.0 FreeBSDs.
f39f21d8 2399
2400=item *
2401
77c8cf41 2402HP-UX
2403
8cbf54fa 2404README.hpux updated; C<Configure -Duse64bitall> now works;
2405now uses HP-UX malloc instead of Perl malloc.
f39f21d8 2406
2407=item *
2408
77c8cf41 2409IRIX
f39f21d8 2410
77c8cf41 2411Numerous compilation flag and hint enhancements; accidental mixing
2412of 32-bit and 64-bit libraries (a doomed attempt) made much harder.
f39f21d8 2413
77c8cf41 2414=item *
f39f21d8 2415
77c8cf41 2416Linux
f39f21d8 2417
e1f170bd 2418=over 8
2419
2420=item *
2421
e6a6fae8 2422Long doubles should now work (see INSTALL). [561]
f39f21d8 2423
2424=item *
2425
e1f170bd 2426Linux previously had problems related to sockaddrlen when using
e6dc8c81 2427accept(), recvfrom() (in Perl: recv()), getpeername(), and
2428getsockname().
e1f170bd 2429
2430=back
2431
2432=item *
2433
8939ba94 2434Mac OS Classic
f39f21d8 2435
8939ba94 2436Compilation of the standard Perl distribution in Mac OS Classic should
2437now work if you have the Metrowerks development environment and the
2438missing Mac-specific toolkit bits. Contact the macperl mailing list
2439for details.
f39f21d8 2440
2441=item *
2442
77c8cf41 2443MPE/iX
f39f21d8 2444
e6a6fae8 2445MPE/iX update after Perl 5.6.0. See README.mpeix. [561]
f39f21d8 2446
2447=item *
2448
27cc4b77 2449NetBSD/threads: try installing the GNU pth (should be in the
2450packages collection, or http://www.gnu.org/software/pth/),
b98cfe2c 2451and Configure with -Duseithreads.
27cc4b77 2452
2453=item *
2454
77c8cf41 2455NetBSD/sparc
f39f21d8 2456
77c8cf41 2457Perl now works on NetBSD/sparc.
f39f21d8 2458
2459=item *
2460
77c8cf41 2461OS/2
f39f21d8 2462
e6a6fae8 2463Now works with usethreads (see INSTALL). [561]
f39f21d8 2464
2465=item *
2466
77c8cf41 2467Solaris
f39f21d8 2468
77c8cf41 246964-bitness using the Sun Workshop compiler now works.
f39f21d8 2470
2471=item *
2472
11d33b1d 2473Stratus VOS
2474
2475The native build method requires at least VOS Release 14.5.0
2476and GNU C++/GNU Tools 2.0.1 or later. The Perl pack function
2477now maps overflowed values to +infinity and underflowed values
2478to -infinity.
2479
2480=item *
2481
77c8cf41 2482Tru64 (aka Digital UNIX, aka DEC OSF/1)
f39f21d8 2483
77c8cf41 2484The operating system version letter now recorded in $Config{osvers}.
2485Allow compiling with gcc (previously explicitly forbidden). Compiling
2486with gcc still not recommended because buggy code results, even with
2487gcc 2.95.2.
f39f21d8 2488
2489=item *
2490
77c8cf41 2491Unicos
2492
2493Fixed various alignment problems that lead into core dumps either
2494during build or later; no longer dies on math errors at runtime;
b98cfe2c 2495now using full quad integers (64 bits), previously was using
77c8cf41 2496only 46 bit integers for speed.
f39f21d8 2497
2498=item *
2499
77c8cf41 2500VMS
2501
2502chdir() now works better despite a CRT bug; now works with MULTIPLICITY
2503(see INSTALL); now works with Perl's malloc.
f39f21d8 2504
00bb525a 2505The tainting of C<%ENV> elements via C<keys> or C<values> was previously
2506unimplemented. It now works as documented.
2507
2508The C<waitpid> emulation has been improved. The worst bug (now fixed)
2509was that a pid of -1 would cause a wildcard search of all processes on
b98cfe2c 2510the system.
00bb525a 2511
2512POSIX-style signals are now emulated much better on VMS versions prior
2513to 7.0.
2514
c566dd67 2515The Socket extension is now dynamically loaded instead of being
2516statically built in.
2517
00bb525a 2518The C<system> function and backticks operator have improved
e6a6fae8 2519functionality and better error handling. [561]
00bb525a 2520
161720b2 2521File access tests now use current process privileges rather than the
2522user's default privileges, which could sometimes result in a mismatch
2523between reported access and actual access.
2524
b98cfe2c 2525There is a new C<kill> implementation based on C<sys$sigprc> that allows
2d9f3838 2526older VMS systems (pre-7.0) to use C<kill> to send signals rather than
2527simply force exit. This implementation also allows later systems to
2528call C<kill> from within a signal handler.
2529
2530Iterative logical name translations are now limited to 10 iterations in
2531imitation of SHOW LOGICAL and other OpenVMS facilities.
2532
f39f21d8 2533=item *
2534
77c8cf41 2535Windows
f39f21d8 2536
77c8cf41 2537=over 8
f39f21d8 2538
2539=item *
2540
e6a6fae8 2541accept() no longer leaks memory. [561]
f39f21d8 2542
2543=item *
2544
e1f170bd 2545Borland C++ v5.5 is now a supported compiler that can build Perl.
2546However, the generated binaries continue to be incompatible with those
e6a6fae8 2547generated by the other supported compilers (GCC and Visual C++). [561]
e1f170bd 2548
2549=item *
2550
77c8cf41 2551Better chdir() return value for a non-existent directory.
f39f21d8 2552
77c8cf41 2553=item *
f39f21d8 2554
e6a6fae8 2555Duping socket handles with open(F, ">&MYSOCK") now works under Windows
25569x. [561]
e1f170bd 2557
2558=item *
2559
e6a6fae8 2560New %ENV entries now propagate to subprocesses. [561]
f39f21d8 2561
2562=item *
2563
44da0e71 2564Current directory entries in %ENV are now correctly propagated to child
e6a6fae8 2565processes. [561]
44da0e71 2566
2567=item *
2568
77c8cf41 2569$ENV{LIB} now used to search for libs under Visual C.
2570
2571=item *
2572
44da0e71 2573fork() emulation has been improved in various ways, but still continues
ebc20e9a 2574to be experimental. See L<perlfork> for known bugs and caveats.
e1f170bd 2575
2576=item *
2577
77c8cf41 2578A failed (pseudo)fork now returns undef and sets errno to EAGAIN.
f39f21d8 2579
2580=item *
2581
44da0e71 2582Win32::GetCwd() correctly returns C:\ instead of C: when at the drive root.
e6a6fae8 2583Other bugs in chdir() and Cwd::cwd() have also been fixed. [561]
44da0e71 2584
2585=item *
2586
e1f170bd 2587HTML files will be installed in c:\perl\html instead of c:\perl\lib\pod\html
2588
2589=item *
2590
e6a6fae8 2591The makefiles now provide a single switch to bulk-enable all the
2592features enabled in ActiveState ActivePerl (a popular Win32 binary
2593distribution). [561]
e1f170bd 2594
2595=item *
2596
77c8cf41 2597Allow REG_EXPAND_SZ keys in the registry.
f39f21d8 2598
2599=item *
2600
e6a6fae8 2601Can now send() from all threads, not just the first one. [561]
f39f21d8 2602
2603=item *
2604
b98cfe2c 2605ExtUtils::MakeMaker now uses $ENV{LIB} to search for libraries.
2606
2607=item *
2608
77c8cf41 2609Fake signal handling reenabled, bugs and all.
f39f21d8 2610
2611=item *
2612
44da0e71 2613%SIG has been enabled under USE_ITHREADS, but its use is completely
e6a6fae8 2614unsupported under all configurations. [561]
44da0e71 2615
2616=item *
2617
77c8cf41 2618Less stack reserved per thread so that more threads can run
2619concurrently. (Still 16M per thread.)
f39f21d8 2620
2621=item *
2622
8cbf54fa 2623C<< File::Spec->tmpdir() >> now prefers C:/temp over /tmp
77c8cf41 2624(works better when perl is running as service).
f39f21d8 2625
2626=item *
2627
e6a6fae8 2628Better UNC path handling under ithreads. [561]
f39f21d8 2629
2630=item *
2631
e6dc8c81 2632wait(), waitpid(), and backticks now return the correct exit status
e6a6fae8 2633under Windows 9x. [561]
f39f21d8 2634
2635=item *
2636
b98cfe2c 2637Non-blocking waits for child processes (or pseudo-processes) are
2638supported via C<waitpid($pid, &POSIX::WNOHANG)>.
2639
2640=item *
2641
fa1a788e 2642Win64 compilation is now supported.
2643
2644=item *
2645
e6a6fae8 2646winsock handle leak fixed. [561]
f39f21d8 2647
2648=back
2649
77c8cf41 2650=back
f39f21d8 2651
77c8cf41 2652=head1 New or Changed Diagnostics
f39f21d8 2653
ba370e9b 2654=over 4
2655
2656=item *
2657
12bcd1a6 2658The lexical warnings category "deprecated" is no longer a sub-category
2659of the "syntax" category. It is now a top-level category in its own
2660right.
2661
2662=item *
2663
77c8cf41 2664All regular expression compilation error messages are now hopefully
2665easier to understand both because the error message now comes before
2666the failed regex and because the point of failure is now clearly
ba370e9b 2667marked by a C<E<lt>-- HERE> marker.
2668
2669=item *
f39f21d8 2670
77c8cf41 2671The various "opened only for", "on closed", "never opened" warnings
2672drop the C<main::> prefix for filehandles in the C<main> package,
b98cfe2c 2673for example C<STDIN> instead of C<main::STDIN>.
f39f21d8 2674
ba370e9b 2675=item *
2676
77c8cf41 2677The "Unrecognized escape" warning has been extended to include C<\8>,
2678C<\9>, and C<\_>. There is no need to escape any of the C<\w> characters.
f39f21d8 2679
ba370e9b 2680=item *
f39f21d8 2681
77c8cf41 2682Two new debugging options have been added: if you have compiled your
e6a6fae8 2683Perl with debugging, you can use the -DT [561] and -DR options to trace
77c8cf41 2684tokenising and to add reference counts to displaying variables,
2685respectively.
f39f21d8 2686
2687=item *
2688
2bcb0b45 2689The debugger (perl5db.pl) has been modified to present a more
2690consistent commands interface, via (CommandSet=580). perl5db.t was
2691also added to test the changes, and as a placeholder for further tests.
492652be 2692
2bcb0b45 2693See L<perldebug>.
492652be 2694
2695=item *
2696
9000bd02 2697The debugger has a new C<dumpDepth> option to control the maximum
2698depth to which nested structures are dumped. The C<x> command has
2699been extended so that C<x N EXPR> dumps out the value of I<EXPR> to a
2700depth of at most I<N> levels.
2701
2702=item *
2703
2bcb0b45 2704The debugger can now show lexical variables if you have the CPAN
2705module PadWalker installed.
2706
2707=item *
2708
77c8cf41 2709If an attempt to use a (non-blessed) reference as an array index
2710is made, a warning is given.
f39f21d8 2711
2712=item *
2713
77c8cf41 2714C<push @a;> and C<unshift @a;> (with no values to push or unshift)
6e6372ba 2715now give a warning. This may be a problem for generated and evaled
77c8cf41 2716code.
f39f21d8 2717
ba370e9b 2718=item *
2719
2720If you try to L<perlfunc/pack> a number less than 0 or larger than 255
2721using the C<"C"> format you will get an optional warning. Similarly
2722for the C<"c"> format and a number less than -128 or more than 127.
2723
2724=item *
2725
2726Certain regex modifiers such as C<(?o)> make sense only if applied to
0d4213c3 2727the entire regex. You will get an optional warning if you try to do
b98cfe2c 2728otherwise.
ba370e9b 2729
2730=item *
2731
0d4213c3 2732Using arrays or hashes as references (e.g. C<< %foo->{bar} >>
c2e23569 2733has been deprecated for a while. Now you will get an optional warning.
ba370e9b 2734
608dbdb1 2735=item *
2736
2737Using C<sort> in scalar context now issues an optional warning.
2738This didn't do anything useful, as the sort was not performed.
2739
f39f21d8 2740=back
2741
77c8cf41 2742=head1 Changed Internals
f39f21d8 2743
2744=over 4
2745
2746=item *
2747
77c8cf41 2748perlapi.pod (a companion to perlguts) now attempts to document the
2749internal API.
f39f21d8 2750
2751=item *
2752
77c8cf41 2753You can now build a really minimal perl called microperl.
2754Building microperl does not require even running Configure;
2755C<make -f Makefile.micro> should be enough. Beware: microperl makes
2756many assumptions, some of which may be too bold; the resulting
2757executable may crash or otherwise misbehave in wondrous ways.
2758For careful hackers only.
f39f21d8 2759
2760=item *
2761
c2e23569 2762Added rsignal(), whichsig(), do_join(), op_clear, op_null,
2763ptr_table_clear(), ptr_table_free(), sv_setref_uv(), and several UTF-8
2764interfaces to the publicised API. For the full list of the available
2765APIs see L<perlapi>.
f39f21d8 2766
2767=item *
2768
77c8cf41 2769Made possible to propagate customised exceptions via croak()ing.
f39f21d8 2770
77c8cf41 2771=item *
f39f21d8 2772
95f0a2f1 2773Now xsubs can have attributes just like subs. (Well, at least the
2774built-in attributes.)
f39f21d8 2775
2776=item *
2777
77c8cf41 2778dTHR and djSP have been obsoleted; the former removed (because it's
2779a no-op) and the latter replaced with dSP.
f39f21d8 2780
2781=item *
2782
61947107 2783PERL_OBJECT has been completely removed.
2784
2785=item *
2786
ba370e9b 2787The MAGIC constants (e.g. C<'P'>) have been macrofied
2788(e.g. C<PERL_MAGIC_TIED>) for better source code readability
2789and maintainability.
2790
2791=item *
2792
2793The regex compiler now maintains a structure that identifies nodes in
2794the compiled bytecode with the corresponding syntactic features of the
2795original regex expression. The information is attached to the new
2796C<offsets> member of the C<struct regexp>. See L<perldebguts> for more
2797complete information.
2798
2799=item *
2800
2801The C code has been made much more C<gcc -Wall> clean. Some warning
2802messages still remain in some platforms, so if you are compiling with
2803gcc you may see some warnings about dubious practices. The warnings
2804are being worked on.
2805
2806=item *
2807
2808F<perly.c>, F<sv.c>, and F<sv.h> have now been extensively commented.
2809
2810=item *
2811
61947107 2812Documentation on how to use the Perl source repository has been added
2813to F<Porting/repository.pod>.
f39f21d8 2814
888aee59 2815=item *
2816
c2e23569 2817There are now several profiling make targets.
888aee59 2818
77c8cf41 2819=back
f39f21d8 2820
e6a6fae8 2821=head1 Security Vulnerability Closed [561]
f39f21d8 2822
77c8cf41 2823(This change was already made in 5.7.0 but bears repeating here.)
f39f21d8 2824
77c8cf41 2825A potential security vulnerability in the optional suidperl component
2826of Perl was identified in August 2000. suidperl is neither built nor
2827installed by default. As of November 2001 the only known vulnerable
2828platform is Linux, most likely all Linux distributions. CERT and
2829various vendors and distributors have been alerted about the vulnerability.
2830See http://www.cpan.org/src/5.0/sperl-2000-08-05/sperl-2000-08-05.txt
2831for more information.
f39f21d8 2832
77c8cf41 2833The problem was caused by Perl trying to report a suspected security
2834exploit attempt using an external program, /bin/mail. On Linux
2835platforms the /bin/mail program had an undocumented feature which
2836when combined with suidperl gave access to a root shell, resulting in
2837a serious compromise instead of reporting the exploit attempt. If you
2838don't have /bin/mail, or if you have 'safe setuid scripts', or if
2839suidperl is not installed, you are safe.
f39f21d8 2840
77c8cf41 2841The exploit attempt reporting feature has been completely removed from
2842Perl 5.8.0 (and the maintenance release 5.6.1, and it was removed also
2843from all the Perl 5.7 releases), so that particular vulnerability
2844isn't there anymore. However, further security vulnerabilities are,
ba370e9b 2845unfortunately, always possible. The suidperl functionality is most
2846probably going to be removed in Perl 5.10. In any case, suidperl
2847should only be used by security experts who know exactly what they are
2848doing and why they are using suidperl instead of some other solution
1577cd80 2849such as sudo ( see http://www.courtesan.com/sudo/ ).
77c8cf41 2850
ebc20e9a 2851=head1 New Tests
77c8cf41 2852
5fb8b090 2853Several new tests have been added, especially for the F<lib> and F<ext>
2854subsections. There are now about 65 000 individual tests (spread over
2855about 700 test scripts), in the regression suite (5.6.1 has about
285611700 tests, in 258 test scripts) Many of the new tests are of course
2857introduced by the new modules, but still in general Perl is now more
2858thoroughly tested.
76663d67 2859
2860Because of the large number of tests, running the regression suite
2861will take considerably longer time than it used to: expect the suite
e6dc8c81 2862to take up to 4-5 times longer to run than in perl 5.6. On a really
d1eb8299 2863fast machine you can hope to finish the suite in about 6-8 minutes
76663d67 2864(wallclock time).
77c8cf41 2865
2866The tests are now reported in a different order than in earlier Perls.
2867(This happens because the test scripts from under t/lib have been moved
2868to be closer to the library/extension they are testing.)
2869
f39f21d8 2870=head1 Known Problems
2871
f39f21d8 2872=head2 AIX
2873
2874=over 4
2875
2876=item *
2877
ee81c259 2878If using the AIX native make command, instead of just "make" issue
2879"make all". In some setups the former has been known to spuriously
2880also try to run "make install". Alternatively, you may want to use
2881GNU make.
2882
2883=item *
2884
e6dc8c81 2885In AIX 4.2, Perl extensions that use C++ functions that use statics
f39f21d8 2886may have problems in that the statics are not getting initialized.
e6dc8c81 2887In newer AIX releases, this has been solved by linking Perl with
f39f21d8 2888the libC_r library, but unfortunately in AIX 4.2 the said library
2889has an obscure bug where the various functions related to time
2890(such as time() and gettimeofday()) return broken values, and
e6dc8c81 2891therefore in AIX 4.2 Perl is not linked against libC_r.
f39f21d8 2892
2893=item *
2894
2895vac 5.0.0.0 May Produce Buggy Code For Perl
2896
2897The AIX C compiler vac version 5.0.0.0 may produce buggy code,
e6dc8c81 2898resulting in a few random tests failing when run as part of "make
2899test", but when the failing tests are run by hand, they succeed.
2900We suggest upgrading to at least vac version 5.0.1.0, that has been
2901known to compile Perl correctly. "lslpp -L|grep vac.C" will tell
2902you the vac version. See README.aix.
f39f21d8 2903
0ea5284e 2904=item *
2905
2906If building threaded Perl, you may get compilation warning from pp_sys.c:
2907
2908 "pp_sys.c", line 4651.39: 1506-280 (W) Function argument assignment between types "unsigned char*" and "const void*" is not allowed.
2909
2910This is harmless; it is caused by the getnetbyaddr() and getnetbyaddr_r()
2911having slightly different types for their first argument.
2912
f39f21d8 2913=back
2914
8de75127 2915=head2 Alpha systems with old gccs fail several tests
2916
2917If you see op/pack, op/pat, op/regexp, or ext/Storable tests failing
2918in a Linux/alpha or *BSD/Alpha, it's probably time to upgrade your gcc.
2919gccs prior to 2.95.3 are definitely not good enough, and gcc 3.1 may
27940aee 2920be even better. (RedHat Linux/alpha with gcc 3.1 reported no problems,
2921as did Linux 2.4.18 with gcc 2.95.4.) (In Tru64, it is preferable to
2922use the bundled C compiler.)
8de75127 2923
d4432bb5 2924=head2 AmigaOS
2925
ebc20e9a 2926Perl 5.8.0 doesn't build in AmigaOS. It broke at some point during
2927the ithreads work and we could not find Amiga experts to unbreak the
2928problems. Perl 5.6.1 still works for AmigaOS (as does the the 5.7.2
2929development release).
d4432bb5 2930
8c1bea16 2931=head2 BeOS
2932
2933The following tests fail on 5.8.0 Perl in BeOS Personal 5.03:
2934
2935 t/op/lfs............................FAILED at test 17
2936 t/op/magic..........................FAILED at test 24
8c1bea16 2937 ext/POSIX/t/sigaction...............FAILED at test 13
2938 ext/POSIX/t/waitpid.................FAILED at test 1
8c1bea16 2939
2940See L<perlbeos> (README.beos) for more details.
2941
d4432bb5 2942=head2 Cygwin "unable to remap"
2943
2944For example when building the Tk extension for Cygwin,
2945you may get an error message saying "unable to remap".
2946This is known problem with Cygwin, and a workaround is
2947detailed in here: http://sources.redhat.com/ml/cygwin/2001-12/msg00894.html
2948
bdcfa4c7 2949=head2 ext/threads/t/libc
2950
2951If this test fails, it indicates that your libc (C library) is not
2952threadsafe. This particular test stress tests the localtime() call to
2953find out whether it is threadsafe. See L<perlthrtut> for more information.
2954
9ffc0d0c 2955=head2 FreeBSD Failing locale Test 117 For ISO8859-15 Locales
2956
2957The ISO8859-15 locales may fail the locale test 117 in FreeBSD.
2958This is caused by the characters \xFF (y with diaeresis) and \xBE
2959(Y with diaeresis) not behaving correctly when being matched
2960case-insensitively.
2961
ac639f8f 2962=head2 IRIX fails ext/List/Util/t/shuffle.t
2963
2964IRIX with MIPSpro 7.3.1.3m compiler may fail the said List::Util test
2965by dumping core. This seems to be a compiler error since if compiled
2966with gcc no core dump ensues, and no failures on the said test on any
2967other platform.
2968
be61827f 2969=head2 Modifying $_ Inside for(..)
2970
2971 for (1..5) { $_++ }
2972
2973works without complaint. It shouldn't. (You should be able to
2974modify only lvalue elements inside the loops.) You can see the
2975correct behaviour by replacing the 1..5 with 1, 2, 3, 4, 5.
2976
696235b6 2977=head2 mod_perl 1.26 Doesn't Build With Threaded Perl
2978
2979Use mod_perl 1.27 or higher.
a08f42e9 2980
f39f21d8 2981=head2 lib/ftmp-security tests warn 'system possibly insecure'
2982
e6dc8c81 2983Don't panic. Read the 'make test' section of INSTALL instead.
f39f21d8 2984
be61827f 2985=head2 HP-UX lib/posix Subtest 9 Fails When LP64-Configured
f39f21d8 2986
2987If perl is configured with -Duse64bitall, the successful result of the
2988subtest 10 of lib/posix may arrive before the successful result of the
2989subtest 9, which confuses the test harness so much that it thinks the
2990subtest 9 failed.
2991
a95a6141 2992=head2 Linux with glibc 2.2.5 fails t/op/int subtest #6 with -Duse64bitint
2993
2994This is a known bug in the glibc 2.2.5 with long long integers.
2995( http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=65612 )
2996
f39f21d8 2997=head2 Linux With Sfio Fails op/misc Test 48
2998
2999No known fix.
3000
83943eac 3001=head2 libwww-perl (LWP) fails base/date #51
3002
3003Use libwww-perl 5.65 or later.
3004
a0aae13b 3005=head2 Mac OS X
3006
6aaad45d 3007Please remember to set your environment variable LC_ALL to "C"
3008(setenv LC_ALL C) before running "make test" to avoid a lot of
3009warnings about the broken locales of Mac OS X.
3010
6b9b4622 3011The following tests are known to fail in Mac OS X 10.1.5 because of
577cd409 3012buggy (old) implementations of Berkeley DB included in Mac OS X:
a0aae13b 3013
3014 Failed Test Stat Wstat Total Fail Failed List of Failed
3015 -------------------------------------------------------------------------
3016 ../ext/DB_File/t/db-btree.t 0 11 ?? ?? % ??
3017 ../ext/DB_File/t/db-recno.t 149 3 2.01% 61 63 65
a0aae13b 3018
3f1f789b 3019If you are building on a UFS partition, you will also probably see
f5dcdc4e 3020t/op/stat.t subtest #9 fail. This is caused by Darwin's UFS not
3021supporting inode change time.
3f1f789b 3022
7830a95b 3023Also the ext/POSIX/t/posix.t subtest #10 fails but it is skipped for
3024now because the failure is Apple's fault, not Perl's (blocked signals
3025are lost).
3026
e6dc8c81 3027If you Configure with ithreads, ext/threads/t/libc.t will fail. Again,
3028this is not Perl's fault-- the libc of Mac OS X is not threadsafe
3029(in this particular test, the localtime() call is found to be
3030threadunsafe.)
7830a95b 3031
7fc79a86 3032=head2 op/sprintf tests 91, 129, and 130
f39f21d8 3033
7fc79a86 3034The op/sprintf tests 91, 129, and 130 are known to fail on some platforms.
3035Examples include any platform using sfio, and Compaq/Tandem's NonStop-UX.
f39f21d8 3036
e6dc8c81 3037Test 91 is known to fail on QNX6 (nto), because C<sprintf '%e',0>
7fc79a86 3038incorrectly produces C<0.000000e+0> instead of C<0.000000e+00>.
f39f21d8 3039
e6dc8c81 3040For tests 129 and 130, the failing platforms do not comply with
3041the ANSI C Standard: lines 19ff on page 134 of ANSI X3.159 1989, to
7fc79a86 3042be exact. (They produce something other than "1" and "-1" when
e6dc8c81 3043formatting 0.6 and -0.6 using the printf format "%.0f"; most often,
7fc79a86 3044they produce "0" and "-0".)
f39f21d8 3045
0646842f 3046=head2 Solaris 2.5
3047
3048In case you are still using Solaris 2.5 (aka SunOS 5.5), you may
3049experience failures (the test core dumping) in lib/locale.t.
3050The suggested cure is to upgrade your Solaris.
3051
36f070cb 3052=head2 SUPER-UX (NEC SX)
3053
3054The following tests are known to fail on SUPER-UX:
3055
3056 op/64bitint...........................FAILED tests 29-30, 32-33, 35-36
3057 op/arith..............................FAILED tests 128-130
3058 op/pack...............................FAILED tests 25-5625
3059 op/pow................................
3060 op/taint..............................# msgsnd failed
3061 ../ext/IO/lib/IO/t/io_poll............FAILED tests 3-4
3062 ../ext/IPC/SysV/ipcsysv...............FAILED tests 2, 5-6
3063 ../ext/IPC/SysV/t/msg.................FAILED tests 2, 4-6
3064 ../ext/Socket/socketpair..............FAILED tests 12
3065 ../lib/IPC/SysV.......................FAILED tests 2, 5-6
3066 ../lib/warnings.......................FAILED tests 115-116, 118-119
3067
3068The op/pack failure ("Cannot compress negative numbers at op/pack.t line 126")
3069is serious but as of yet unsolved. It points at some problems with the
3070signedness handling of the C compiler, as do the 64bitint, arith, and pow
3071failures. Most of the rest point at problems with SysV IPC.
11d33b1d 3072
8cbf54fa 3073=head2 Term::ReadKey not working on Win32
19d05054 3074
3075Use Term::ReadKey 2.20 or later.
3076
7fc79a86 3077=head2 Failure of Thread (5.005-style) tests
f39f21d8 3078
6ba475fe 3079B<Note that support for 5.005-style threading is deprecated,
e6dc8c81 3080experimental and practically unsupported. In 5.10, it is expected
6ba475fe 3081to be removed.>
f39f21d8 3082
3083The following tests are known to fail due to fundamental problems in
3084the 5.005 threading implementation. These are not new failures--Perl
30855.005_0x has the same bugs, but didn't have these tests.
3086
c210e87b 3087 ../ext/B/t/xref.t 255 65280 14 12 85.71% 3-14
6123004a 3088 ../ext/List/Util/t/first.t 255 65280 7 4 57.14% 2 5-7
3089 ../lib/English.t 2 512 54 2 3.70% 2-3
c210e87b 3090 ../lib/ExtUtils/t/basic.t 1 256 17 1 5.88% 14
3091 ../lib/FileCache.t 5 1 20.00% 5
6123004a 3092 ../lib/Filter/Simple/t/data.t 6 3 50.00% 1-3
c210e87b 3093 ../lib/Filter/Simple/t/filter_onl 9 3 33.33% 1-2 5
3094 ../lib/Tie/File/t/31_autodefer.t 255 65280 65 32 49.23% 34-65
6123004a 3095 ../lib/autouse.t 10 1 10.00% 4
3096 op/flip.t 15 1 6.67% 15
fedd8cf1 3097
e6dc8c81 3098These failures are unlikely to get fixed as 5.005-style threads
9972c7af 3099are considered fundamentally broken. (Basically what happens is that
3100competing threads can corrupt shared global state.)
f39f21d8 3101
577cd409 3102=head2 Timing problems
3103
3104The following tests may fail intermittently because of timing
3105problems, for example if the system is heavily loaded.
3106
3107 t/op/alarm.t
3108 ext/Time/HiRes/HiRes.t
3109 lib/Benchmark.t
3110 lib/Memoize/t/expmod_t.t
3111 lib/Memoize/t/speed.t
3112
3113In case of failure please try running them manually, for example
3114
3115 ./perl -Ilib ext/Time/HiRes/HiRes.t
3116
f39f21d8 3117=head2 UNICOS
3118
d334a774 3119 ../lib/Math/Trig.t 26 1 3.85% 25
3120 ../lib/warnings.t 470 1 0.21% 429
f39f21d8 3121
8939dedc 3122The Trig.t failure is caused by the slighly differing (from IEEE)
3123floating point implementation of UNICOS. The warnings.t failure is
e6dc8c81 3124also related: the test assumes a certain floating point output format;
8939dedc 3125this assumption fails in UNICOS.
9972c7af 3126
cb3f5972 3127=head2 UNICOS/mk
3128
3d7e8424 3129=over 4
3130
3131=item *
3132
e6dc8c81 3133During Configure, the test
cb3f5972 3134
3135 Guessing which symbols your C compiler and preprocessor define...
3136
3137will probably fail with error messages like
3138
3139 CC-20 cc: ERROR File = try.c, Line = 3
3140 The identifier "bad" is undefined.
3141
3142 bad switch yylook 79bad switch yylook 79bad switch yylook 79bad switch yylook 79#ifdef A29K
3143 ^
3144
3145 CC-65 cc: ERROR File = try.c, Line = 3
3146 A semicolon is expected at this point.
3147
e6dc8c81 3148This is caused by a bug in the awk utility of UNICOS/mk. You can ignore
cb3f5972 3149the error, but it does cause a slight problem: you cannot fully
3150benefit from the h2ph utility (see L<h2ph>) that can be used to
3151convert C headers to Perl libraries, mainly used to be able to access
3152from Perl the constants defined using C preprocessor, cpp. Because of
e6dc8c81 3153the above error, parts of the converted headers will be invisible.
cb3f5972 3154Luckily, these days the need for h2ph is rare.
3155
3d7e8424 3156=item *
3157
e6dc8c81 3158If building Perl with interpreter threads (ithreads), the
3d7e8424 3159getgrent(), getgrnam(), and getgrgid() functions cannot return the
3160list of the group members due to a bug in the multithreaded support of
e6dc8c81 3161UNICOS/mk. What this means is that in list context the functions will
3d7e8424 3162return only three values, not four.
3163
3164=back
3165
f39f21d8 3166=head2 UTS
3167
e6dc8c81 3168There are a few known test failures, see L<perluts> (README.uts).
f39f21d8 3169
b98cfe2c 3170=head2 VOS (Stratus)
3171
3172When Perl is built using the native build process on VOS Release
317314.5.0 and GNU C++/GNU Tools 2.0.1, all attempted tests either
3174pass or result in TODO (ignored) failures.
3175
f39f21d8 3176=head2 VMS
3177
161720b2 3178There should be no reported test failures with a default configuration,
3179though there are a number of tests marked TODO that point to areas
3180needing further debugging and/or porting work.
7207e29d 3181
f39f21d8 3182=head2 Win32
3183
e6dc8c81 3184In multi-CPU boxes, there are some problems with the I/O buffering:
cd34865e 3185some output may appear twice.
f39f21d8 3186
d34c32a4 3187=head2 XML::Parser not working
3188
3189Use XML::Parser 2.31 or later.
3190
7fc79a86 3191=head2 z/OS (OS/390)
3192
3193z/OS has rather many test failures but the situation is actually
e6dc8c81 3194better than it was in 5.6.0; it's just that so many new modules and
7fc79a86 3195tests have been added.
3196
dad95037 3197 Failed Test Stat Wstat Total Fail Failed List of Failed
c151f1b7 3198 ---------------------------------------------------------------------------
3199 ../ext/Data/Dumper/t/dumper.t 357 8 2.24% 311 314 325 327
84fad863 3200 331 333 337 339
7fc79a86 3201 ../ext/IO/lib/IO/t/io_unix.t 5 4 80.00% 2-5
e363f566 3202 ../ext/Storable/t/downgrade.t 12 3072 169 12 7.10% 14-15 46-47 78-79
60d6f83c 3203 110-111 150 161
84fad863 3204 ../lib/ExtUtils/t/Constant.t 121 30976 48 48 100.00% 1-48
7fc79a86 3205 ../lib/ExtUtils/t/Embed.t 9 9 100.00% 1-9
e363f566 3206 op/pat.t 910 7 0.77% 665 776 785 832-
3207 834 845
7fc79a86 3208 op/sprintf.t 224 3 1.34% 98 100 136
3209 op/tr.t 97 5 5.15% 63 71-74
dcdcee7d 3210 uni/fold.t 780 6 0.77% 61 169 196 661
3211 710-711
7fc79a86 3212
e6dc8c81 3213The failures in dumper.t and downgrade.t are problems in the tests,
3214those in io_unix and sprintf are problems in the USS (UDP sockets
3215and printf formats). The pat, tr, and fold failures are genuine Perl
3216problems caused by EBCDIC (and in the pat and fold cases, combining
3217that with Unicode). The Constant and Embed are probably problems
3218in the tests (since they test Perl's ability to build extensions,
3219and that seems to be working reasonably well.)
9972c7af 3220
aecce728 3221=head2 Localising Tied Arrays and Hashes Is Broken
3222
3223 local %tied_array;
3224
8602d933 3225doesn't work as one would expect: the old value is restored
3226incorrectly. This will be changed in a future release, but we don't
e6dc8c81 3227know yet what the new semantics will exactly be. In any case, the
8602d933 3228change will break existing code that relies on the current
3229(ill-defined) semantics, so just avoid doing this in general.
aecce728 3230
9903068f 3231=head2 Self-tying Problems
f39f21d8 3232
3233Self-tying of arrays and hashes is broken in rather deep and
3234hard-to-fix ways. As a stop-gap measure to avoid people from getting
e6dc8c81 3235frustrated at the mysterious results (core dumps, most often), it is
3236forbidden for now (you will get a fatal error even from an attempt).
f39f21d8 3237
bd301675 3238A change to self-tying of globs has caused them to be recursively
3239referenced (see: L<perlobj/"Two-Phased Garbage Collection">). You
3240will now need an explicit untie to destroy a self-tied glob. This
3241behaviour may be fixed at a later date.
9903068f 3242
bd301675 3243Self-tying of scalars and IO thingies works.
9903068f 3244
f39f21d8 3245=head2 Building Extensions Can Fail Because Of Largefiles
3246
3247Some extensions like mod_perl are known to have issues with
3248`largefiles', a change brought by Perl 5.6.0 in which file offsets
3249default to 64 bits wide, where supported. Modules may fail to compile
e6dc8c81 3250at all, or they may compile and work incorrectly. Currently, there
3251is no good solution for the problem, but Configure now provides
3252appropriate non-largefile ccflags, ldflags, libswanted, and libs
3253in the %Config hash (e.g., $Config{ccflags_nolargefiles}) so the
3254extensions that are having problems can try configuring themselves
3255without the largefileness. This is admittedly not a clean solution,
3256and the solution may not even work at all. One potential failure is
3257whether one can (or, if one can, whether it's a good idea to) link
3258together at all binaries with different ideas about file offsets;
3259all this is platform-dependent.
f39f21d8 3260
aecce728 3261=head2 Unicode Support on EBCDIC Still Spotty
3262
3263Though mostly working, Unicode support still has problem spots on
3264EBCDIC platforms. One such known spot are the C<\p{}> and C<\P{}>
3265regular expression constructs for code points less than 256: the
c5af7db2 3266C<pP> are testing for Unicode code points, not knowing about EBCDIC.
aecce728 3267
c5af7db2 3268=head2 The Compiler Suite Is Still Very Experimental
f39f21d8 3269
44da0e71 3270The compiler suite is slowly getting better but it continues to be
3271highly experimental. Use in production environments is discouraged.
f39f21d8 3272
c4f1ce08 3273=head2 The Long Double Support Is Still Experimental
f39f21d8 3274
3275The ability to configure Perl's numbers to use "long doubles",
3276floating point numbers of hopefully better accuracy, is still
3277experimental. The implementations of long doubles are not yet
3278widespread and the existing implementations are not quite mature
3279or standardised, therefore trying to support them is a rare
3280and moving target. The gain of more precision may also be offset
3281by slowdown in computations (more bits to move around, and the
3282operations are more likely to be executed by less optimised
3283libraries).
33a87e58 3284
c4f1ce08 3285=head2 Seen In Perl 5.7 But Gone Now
3286
c4f1ce08 3287C<Time::Piece> (previously known as C<Time::Object>) was removed
3288because it was felt that it didn't have enough value in it to be a
3289core module. It is still a useful module, though, and is available
3290from the CPAN.
3291
ebc20e9a 3292Perl 5.8 unfortunately does not build anymore on AmigaOS; this broke
3293accidentally at some point. Since there are not that many Amiga
3294developers available, we could not get this fixed and tested in time
3295for 5.8.0. Perl 5.6.1 still works for AmigaOS (as does the the 5.7.2
3296development release).
c5af7db2 3297
cc0fca54 3298=head1 Reporting Bugs
3299
d4ad863d 3300If you find what you think is a bug, you might check the articles
3301recently posted to the comp.lang.perl.misc newsgroup and the perl
e6dc8c81 3302bug database at http://bugs.perl.org/ . There may also be
f224927c 3303information at http://www.perl.com/ , the Perl Home Page.
cc0fca54 3304
3305If you believe you have an unreported bug, please run the B<perlbug>
3306program included with your release. Be sure to trim your bug down
3307to a tiny but sufficient test case. Your bug report, along with the
d4ad863d 3308output of C<perl -V>, will be sent off to perlbug@perl.org to be
cc0fca54 3309analysed by the Perl porting team.
3310
3311=head1 SEE ALSO
3312
3313The F<Changes> file for exhaustive details on what changed.
3314
3315The F<INSTALL> file for how to build Perl.
3316
3317The F<README> file for general stuff.
3318
3319The F<Artistic> and F<Copying> files for copyright information.
3320
3321=head1 HISTORY
3322
d468ca04 3323Written by Jarkko Hietaniemi <F<jhi@iki.fi>>.
cc0fca54 3324
3325=cut