1PERL58DELTA(1)         Perl Programmers Reference Guide         PERL58DELTA(1)
2
3
4

NAME

6       perl58delta - what is new for perl v5.8.0
7

DESCRIPTION

9       This document describes differences between the 5.6.0 release and the
10       5.8.0 release.
11
12       Many of the bug fixes in 5.8.0 were already seen in the 5.6.1 mainte‐
13       nance release since the two releases were kept closely coordinated
14       (while 5.8.0 was still called 5.7.something).
15
16       Changes that were integrated into the 5.6.1 release are marked "[561]".
17       Many of these changes have been further developed since 5.6.1 was
18       released, those are marked "[561+]".
19
20       You can see the list of changes in the 5.6.1 release (both from the
21       5.005_03 release and the 5.6.0 release) by reading perl561delta.
22

Highlights In 5.8.0

24       ·   Better Unicode support
25
26       ·   New IO Implementation
27
28       ·   New Thread Implementation
29
30       ·   Better Numeric Accuracy
31
32       ·   Safe Signals
33
34       ·   Many New Modules
35
36       ·   More Extensive Regression Testing
37

Incompatible Changes

39       Binary Incompatibility
40
41       Perl 5.8 is not binary compatible with earlier releases of Perl.
42
43       You have to recompile your XS modules.
44
45       (Pure Perl modules should continue to work.)
46
47       The major reason for the discontinuity is the new IO architecture
48       called PerlIO.  PerlIO is the default configuration because without it
49       many new features of Perl 5.8 cannot be used.  In other words: you just
50       have to recompile your modules containing XS code, sorry about that.
51
52       In future releases of Perl, non-PerlIO aware XS modules may become com‐
53       pletely unsupported.  This shouldn't be too difficult for module
54       authors, however: PerlIO has been designed as a drop-in replacement (at
55       the source code level) for the stdio interface.
56
57       Depending on your platform, there are also other reasons why we decided
58       to break binary compatibility, please read on.
59
60       64-bit platforms and malloc
61
62       If your pointers are 64 bits wide, the Perl malloc is no longer being
63       used because it does not work well with 8-byte pointers.  Also, usually
64       the system mallocs on such platforms are much better optimized for such
65       large memory models than the Perl malloc.  Some memory-hungry Perl
66       applications like the PDL don't work well with Perl's malloc.  Finally,
67       other applications than Perl (such as mod_perl) tend to prefer the sys‐
68       tem malloc.  Such platforms include Alpha and 64-bit HPPA, MIPS, PPC,
69       and Sparc.
70
71       AIX Dynaloading
72
73       The AIX dynaloading now uses in AIX releases 4.3 and newer the native
74       dlopen interface of AIX instead of the old emulated interface.  This
75       change will probably break backward compatibility with compiled mod‐
76       ules.  The change was made to make Perl more compliant with other
77       applications like mod_perl which are using the AIX native interface.
78
79       Attributes for "my" variables now handled at run-time
80
81       The "my EXPR : ATTRS" syntax now applies variable attributes at
82       run-time.  (Subroutine and "our" variables still get attributes applied
83       at compile-time.)  See attributes for additional details.  In particu‐
84       lar, however, this allows variable attributes to be useful for "tie"
85       interfaces, which was a deficiency of earlier releases.  Note that the
86       new semantics doesn't work with the Attribute::Handlers module (as of
87       version 0.76).
88
89       Socket Extension Dynamic in VMS
90
91       The Socket extension is now dynamically loaded instead of being stati‐
92       cally built in.  This may or may not be a problem with ancient TCP/IP
93       stacks of VMS: we do not know since we weren't able to test Perl in
94       such configurations.
95
96       IEEE-format Floating Point Default on OpenVMS Alpha
97
98       Perl now uses IEEE format (T_FLOAT) as the default internal floating
99       point format on OpenVMS Alpha, potentially breaking binary compatibil‐
100       ity with external libraries or existing data.  G_FLOAT is still avail‐
101       able as a configuration option.  The default on VAX (D_FLOAT) has not
102       changed.
103
104       New Unicode Semantics (no more "use utf8", almost)
105
106       Previously in Perl 5.6 to use Unicode one would say "use utf8" and then
107       the operations (like string concatenation) were Unicode-aware in that
108       lexical scope.
109
110       This was found to be an inconvenient interface, and in Perl 5.8 the
111       Unicode model has completely changed: now the "Unicodeness" is bound to
112       the data itself, and for most of the time "use utf8" is not needed at
113       all.  The only remaining use of "use utf8" is when the Perl script
114       itself has been written in the UTF-8 encoding of Unicode.  (UTF-8 has
115       not been made the default since there are many Perl scripts out there
116       that are using various national eight-bit character sets, which would
117       be illegal in UTF-8.)
118
119       See perluniintro for the explanation of the current model, and utf8 for
120       the current use of the utf8 pragma.
121
122       New Unicode Properties
123
124       Unicode scripts are now supported. Scripts are similar to (and superior
125       to) Unicode blocks. The difference between scripts and blocks is that
126       scripts are the glyphs used by a language or a group of languages,
127       while the blocks are more artificial groupings of (mostly) 256 charac‐
128       ters based on the Unicode numbering.
129
130       In general, scripts are more inclusive, but not universally so. For
131       example, while the script "Latin" includes all the Latin characters and
132       their various diacritic-adorned versions, it does not include the vari‐
133       ous punctuation or digits (since they are not solely "Latin").
134
135       A number of other properties are now supported, including "\p{L&}",
136       "\p{Any}" "\p{Assigned}", "\p{Unassigned}", "\p{Blank}" [561] and
137       "\p{SpacePerl}" [561] (along with their "\P{...}" versions, of course).
138       See perlunicode for details, and more additions.
139
140       The "In" or "Is" prefix to names used with the "\p{...}" and "\P{...}"
141       are now almost always optional. The only exception is that a "In" pre‐
142       fix is required to signify a Unicode block when a block name conflicts
143       with a script name. For example, "\p{Tibetan}" refers to the script,
144       while "\p{InTibetan}" refers to the block. When there is no name con‐
145       flict, you can omit the "In" from the block name (e.g. "\p{BraillePat‐
146       terns}"), but to be safe, it's probably best to always use the "In").
147
148       REF(...) Instead Of SCALAR(...)
149
150       A reference to a reference now stringifies as "REF(0x81485ec)" instead
151       of "SCALAR(0x81485ec)" in order to be more consistent with the return
152       value of ref().
153
154       pack/unpack D/F recycled
155
156       The undocumented pack/unpack template letters D/F have been recycled
157       for better use: now they stand for long double (if supported by the
158       platform) and NV (Perl internal floating point type).  (They used to be
159       aliases for d/f, but you never knew that.)
160
161       glob() now returns filenames in alphabetical order
162
163       The list of filenames from glob() (or <...>) is now by default sorted
164       alphabetically to be csh-compliant (which is what happened before in
165       most UNIX platforms).  (bsd_glob() does still sort platform natively,
166       ASCII or EBCDIC, unless GLOB_ALPHASORT is specified.) [561]
167
168       Deprecations
169
170       ·   The semantics of bless(REF, REF) were unclear and until someone
171           proves it to make some sense, it is forbidden.
172
173       ·   The obsolete chat2 library that should never have been allowed to
174           escape the laboratory has been decommissioned.
175
176       ·   Using chdir("") or chdir(undef) instead of explicit chdir() is
177           doubtful.  A failure (think chdir(some_function()) can lead into
178           unintended chdir() to the home directory, therefore this behaviour
179           is deprecated.
180
181       ·   The builtin dump() function has probably outlived most of its use‐
182           fulness.  The core-dumping functionality will remain in future
183           available as an explicit call to "CORE::dump()", but in future
184           releases the behaviour of an unqualified "dump()" call may change.
185
186       ·   The very dusty examples in the eg/ directory have been removed.
187           Suggestions for new shiny examples welcome but the main issue is
188           that the examples need to be documented, tested and (most impor‐
189           tantly) maintained.
190
191       ·   The (bogus) escape sequences \8 and \9 now give an optional warning
192           ("Unrecognized escape passed through").  There is no need to
193           \-escape any "\w" character.
194
195       ·   The *glob{FILEHANDLE} is deprecated, use *glob{IO} instead.
196
197       ·   The "package;" syntax ("package" without an argument) has been dep‐
198           recated.  Its semantics were never that clear and its implementa‐
199           tion even less so.  If you have used that feature to disallow all
200           but fully qualified variables, "use strict;" instead.
201
202       ·   The unimplemented POSIX regex features [[.cc.]] and [[=c=]] are
203           still recognised but now cause fatal errors.  The previous behav‐
204           iour of ignoring them by default and warning if requested was unac‐
205           ceptable since it, in a way, falsely promised that the features
206           could be used.
207
208       ·   In future releases, non-PerlIO aware XS modules may become com‐
209           pletely unsupported.  Since PerlIO is a drop-in replacement for
210           stdio at the source code level, this shouldn't be that drastic a
211           change.
212
213       ·   Previous versions of perl and some readings of some sections of
214           Camel III implied that the ":raw" "discipline" was the inverse of
215           ":crlf".  Turning off "clrfness" is no longer enough to make a
216           stream truly binary. So the PerlIO ":raw" layer (or "discipline",
217           to use the Camel book's older terminology) is now formally defined
218           as being equivalent to binmode(FH) - which is in turn defined as
219           doing whatever is necessary to pass each byte as-is without any
220           translation.  In particular binmode(FH) - and hence ":raw" - will
221           now turn off both CRLF and UTF-8 translation and remove other lay‐
222           ers (e.g. :encoding()) which would modify byte stream.
223
224       ·   The current user-visible implementation of pseudo-hashes (the weird
225           use of the first array element) is deprecated starting from Perl
226           5.8.0 and will be removed in Perl 5.10.0, and the feature will be
227           implemented differently.  Not only is the current interface rather
228           ugly, but the current implementation slows down normal array and
229           hash use quite noticeably. The "fields" pragma interface will
230           remain available.  The restricted hashes interface is expected to
231           be the replacement interface (see Hash::Util).  If your existing
232           programs depends on the underlying implementation, consider using
233           Class::PseudoHash from CPAN.
234
235       ·   The syntaxes "@a->[...]" and  "%h->{...}" have now been deprecated.
236
237       ·   After years of trying, suidperl is considered to be too complex to
238           ever be considered truly secure.  The suidperl functionality is
239           likely to be removed in a future release.
240
241       ·   The 5.005 threads model (module "Thread") is deprecated and
242           expected to be removed in Perl 5.10.  Multithreaded code should be
243           migrated to the new ithreads model (see threads, threads::shared
244           and perlthrtut).
245
246       ·   The long deprecated uppercase aliases for the string comparison
247           operators (EQ, NE, LT, LE, GE, GT) have now been removed.
248
249       ·   The tr///C and tr///U features have been removed and will not
250           return; the interface was a mistake.  Sorry about that.  For simi‐
251           lar functionality, see pack('U0', ...) and pack('C0', ...). [561]
252
253       ·   Earlier Perls treated "sub foo (@bar)" as equivalent to "sub foo
254           (@)".  The prototypes are now checked better at compile-time for
255           invalid syntax.  An optional warning is generated ("Illegal charac‐
256           ter in prototype...")  but this may be upgraded to a fatal error in
257           a future release.
258
259       ·   The "exec LIST" and "system LIST" operations now produce warnings
260           on tainted data and in some future release they will produce fatal
261           errors.
262
263       ·   The existing behaviour when localising tied arrays and hashes is
264           wrong, and will be changed in a future release, so do not rely on
265           the existing behaviour. See "Localising Tied Arrays and Hashes Is
266           Broken".
267

Core Enhancements

269       Unicode Overhaul
270
271       Unicode in general should be now much more usable than in Perl 5.6.0
272       (or even in 5.6.1).  Unicode can be used in hash keys, Unicode in regu‐
273       lar expressions should work now, Unicode in tr/// should work now, Uni‐
274       code in I/O should work now.  See perluniintro for introduction and
275       perlunicode for details.
276
277       ·   The Unicode Character Database coming with Perl has been upgraded
278           to Unicode 3.2.0.  For more information, see http://www.uni
279           code.org/ .  [561+] (5.6.1 has UCD 3.0.1.)
280
281       ·   For developers interested in enhancing Perl's Unicode capabilities:
282           almost all the UCD files are included with the Perl distribution in
283           the lib/unicore subdirectory.  The most notable omission, for space
284           considerations, is the Unihan database.
285
286       ·   The properties \p{Blank} and \p{SpacePerl} have been added. "Blank"
287           is like C isblank(), that is, it contains only "horizontal white‐
288           space" (the space character is, the newline isn't), and the
289           "SpacePerl" is the Unicode equivalent of "\s" (\p{Space} isn't,
290           since that includes the vertical tabulator character, whereas "\s"
291           doesn't.)
292
293           See "New Unicode Properties" earlier in this document for addi‐
294           tional information on changes with Unicode properties.
295
296       PerlIO is Now The Default
297
298       ·   IO is now by default done via PerlIO rather than system's "stdio".
299           PerlIO allows "layers" to be "pushed" onto a file handle to alter
300           the handle's behaviour.  Layers can be specified at open time via
301           3-arg form of open:
302
303              open($fh,'>:crlf :utf8', $path) ⎪⎪ ...
304
305           or on already opened handles via extended "binmode":
306
307              binmode($fh,':encoding(iso-8859-7)');
308
309           The built-in layers are: unix (low level read/write), stdio (as in
310           previous Perls), perlio (re-implementation of stdio buffering in a
311           portable manner), crlf (does CRLF <=> "\n" translation as on Win32,
312           but available on any platform).  A mmap layer may be available if
313           platform supports it (mostly UNIXes).
314
315           Layers to be applied by default may be specified via the 'open'
316           pragma.
317
318           See "Installation and Configuration Improvements" for the effects
319           of PerlIO on your architecture name.
320
321       ·   If your platform supports fork(), you can use the list form of
322           "open" for pipes.  For example:
323
324               open KID_PS, "-⎪", "ps", "aux" or die $!;
325
326           forks the ps(1) command (without spawning a shell, as there are
327           more than three arguments to open()), and reads its standard output
328           via the "KID_PS" filehandle.  See perlipc.
329
330       ·   File handles can be marked as accepting Perl's internal encoding of
331           Unicode (UTF-8 or UTF-EBCDIC depending on platform) by a pseudo
332           layer ":utf8" :
333
334              open($fh,">:utf8","Uni.txt");
335
336           Note for EBCDIC users: the pseudo layer ":utf8" is erroneously
337           named for you since it's not UTF-8 what you will be getting but
338           instead UTF-EBCDIC.  See perlunicode, utf8, and http://www.uni
339           code.org/unicode/reports/tr16/ for more information.  In future
340           releases this naming may change.  See perluniintro for more infor‐
341           mation about UTF-8.
342
343       ·   If your environment variables (LC_ALL, LC_CTYPE, LANG) look like
344           you want to use UTF-8 (any of the variables match "/utf-?8/i"),
345           your STDIN, STDOUT, STDERR handles and the default open layer (see
346           open) are marked as UTF-8.  (This feature, like other new features
347           that combine Unicode and I/O, work only if you are using PerlIO,
348           but that's the default.)
349
350           Note that after this Perl really does assume that everything is
351           UTF-8: for example if some input handle is not, Perl will probably
352           very soon complain about the input data like this "Malformed UTF-8
353           ..." since any old eight-bit data is not legal UTF-8.
354
355           Note for code authors: if you want to enable your users to use
356           UTF-8 as their default encoding  but in your code still have eight-
357           bit I/O streams (such as images or zip files), you need to explic‐
358           itly open() or binmode() with ":bytes" (see "open" in perlfunc and
359           "binmode" in perlfunc), or you can just use "binmode(FH)" (nice for
360           pre-5.8.0 backward compatibility).
361
362       ·   File handles can translate character encodings from/to Perl's
363           internal Unicode form on read/write via the ":encoding()" layer.
364
365       ·   File handles can be opened to "in memory" files held in Perl
366           scalars via:
367
368              open($fh,'>', \$variable) ⎪⎪ ...
369
370       ·   Anonymous temporary files are available without need to 'use File‐
371           Handle' or other module via
372
373              open($fh,"+>", undef) ⎪⎪ ...
374
375           That is a literal undef, not an undefined value.
376
377       ithreads
378
379       The new interpreter threads ("ithreads" for short) implementation of
380       multithreading, by Arthur Bergman, replaces the old "5.005 threads"
381       implementation.  In the ithreads model any data sharing between threads
382       must be explicit, as opposed to the model where data sharing was
383       implicit.  See threads and threads::shared, and perlthrtut.
384
385       As a part of the ithreads implementation Perl will also use any neces‐
386       sary and detectable reentrant libc interfaces.
387
388       Restricted Hashes
389
390       A restricted hash is restricted to a certain set of keys, no keys out‐
391       side the set can be added.  Also individual keys can be restricted so
392       that the key cannot be deleted and the value cannot be changed.  No new
393       syntax is involved: the Hash::Util module is the interface.
394
395       Safe Signals
396
397       Perl used to be fragile in that signals arriving at inopportune moments
398       could corrupt Perl's internal state.  Now Perl postpones handling of
399       signals until it's safe (between opcodes).
400
401       This change may have surprising side effects because signals no longer
402       interrupt Perl instantly.  Perl will now first finish whatever it was
403       doing, like finishing an internal operation (like sort()) or an exter‐
404       nal operation (like an I/O operation), and only then look at any
405       arrived signals (and before starting the next operation).  No more cor‐
406       rupt internal state since the current operation is always finished
407       first, but the signal may take more time to get heard.  Note that
408       breaking out from potentially blocking operations should still work,
409       though.
410
411       Understanding of Numbers
412
413       In general a lot of fixing has happened in the area of Perl's under‐
414       standing of numbers, both integer and floating point.  Since in many
415       systems the standard number parsing functions like "strtoul()" and
416       "atof()" seem to have bugs, Perl tries to work around their deficien‐
417       cies.  This results hopefully in more accurate numbers.
418
419       Perl now tries internally to use integer values in numeric conversions
420       and basic arithmetics (+ - * /) if the arguments are integers, and
421       tries also to keep the results stored internally as integers.  This
422       change leads to often slightly faster and always less lossy arith‐
423       metics. (Previously Perl always preferred floating point numbers in its
424       math.)
425
426       Arrays now always interpolate into double-quoted strings [561]
427
428       In double-quoted strings, arrays now interpolate, no matter what.  The
429       behavior in earlier versions of perl 5 was that arrays would interpo‐
430       late into strings if the array had been mentioned before the string was
431       compiled, and otherwise Perl would raise a fatal compile-time error.
432       In versions 5.000 through 5.003, the error was
433
434               Literal @example now requires backslash
435
436       In versions 5.004_01 through 5.6.0, the error was
437
438               In string, @example now must be written as \@example
439
440       The idea here was to get people into the habit of writing "fred\@exam‐
441       ple.com" when they wanted a literal "@" sign, just as they have always
442       written "Give me back my \$5" when they wanted a literal "$" sign.
443
444       Starting with 5.6.1, when Perl now sees an "@" sign in a double-quoted
445       string, it always attempts to interpolate an array, regardless of
446       whether or not the array has been used or declared already.  The fatal
447       error has been downgraded to an optional warning:
448
449               Possible unintended interpolation of @example in string
450
451       This warns you that "fred@example.com" is going to turn into "fred.com"
452       if you don't backslash the "@".  See
453       http://www.plover.com/~mjd/perl/at-error.html for more details about
454       the history here.
455
456       Miscellaneous Changes
457
458       ·   AUTOLOAD is now lvaluable, meaning that you can add the :lvalue
459           attribute to AUTOLOAD subroutines and you can assign to the
460           AUTOLOAD return value.
461
462       ·   The $Config{byteorder} (and corresponding BYTEORDER in config.h)
463           was previously wrong in platforms if sizeof(long) was 4, but
464           sizeof(IV) was 8.  The byteorder was only sizeof(long) bytes long
465           (1234 or 4321), but now it is correctly sizeof(IV) bytes long,
466           (12345678 or 87654321).  (This problem didn't affect Windows plat‐
467           forms.)
468
469           Also, $Config{byteorder} is now computed dynamically--this is more
470           robust with "fat binaries" where an executable image contains bina‐
471           ries for more than one binary platform, and when cross-compiling.
472
473       ·   "perl -d:Module=arg,arg,arg" now works (previously one couldn't
474           pass in multiple arguments.)
475
476       ·   "do" followed by a bareword now ensures that this bareword isn't a
477           keyword (to avoid a bug where "do q(foo.pl)" tried to call a sub‐
478           routine called "q").  This means that for example instead of "do
479           format()" you must write "do &format()".
480
481       ·   The builtin dump() now gives an optional warning "dump() better
482           written as CORE::dump()", meaning that by default "dump(...)" is
483           resolved as the builtin dump() which dumps core and aborts, not as
484           (possibly) user-defined "sub dump".  To call the latter, qualify
485           the call as "&dump(...)".  (The whole dump() feature is to consid‐
486           ered deprecated, and possibly removed/changed in future releases.)
487
488       ·   chomp() and chop() are now overridable.  Note, however, that their
489           prototype (as given by "prototype("CORE::chomp")" is undefined,
490           because it cannot be expressed and therefore one cannot really
491           write replacements to override these builtins.
492
493       ·   END blocks are now run even if you exit/die in a BEGIN block.
494           Internally, the execution of END blocks is now controlled by
495           PL_exit_flags & PERL_EXIT_DESTRUCT_END. This enables the new behav‐
496           iour for Perl embedders. This will default in 5.10. See perlembed.
497
498       ·   Formats now support zero-padded decimal fields.
499
500       ·   Although "you shouldn't do that", it was possible to write code
501           that depends on Perl's hashed key order (Data::Dumper does this).
502           The new algorithm "One-at-a-Time" produces a different hashed key
503           order.  More details are in "Performance Enhancements".
504
505       ·   lstat(FILEHANDLE) now gives a warning because the operation makes
506           no sense.  In future releases this may become a fatal error.
507
508       ·   Spurious syntax errors generated in certain situations, when glob()
509           caused File::Glob to be loaded for the first time, have been fixed.
510           [561]
511
512       ·   Lvalue subroutines can now return "undef" in list context.  How‐
513           ever, the lvalue subroutine feature still remains experimental.
514           [561+]
515
516       ·   A lost warning "Can't declare ... dereference in my" has been
517           restored (Perl had it earlier but it became lost in later
518           releases.)
519
520       ·   A new special regular expression variable has been introduced: $^N,
521           which contains the most-recently closed group (submatch).
522
523       ·   "no Module;" does not produce an error even if Module does not have
524           an unimport() method.  This parallels the behavior of "use" vis-a-
525           vis "import". [561]
526
527       ·   The numerical comparison operators return "undef" if either operand
528           is a NaN.  Previously the behaviour was unspecified.
529
530       ·   "our" can now have an experimental optional attribute "unique" that
531           affects how global variables are shared among multiple inter‐
532           preters, see "our" in perlfunc.
533
534       ·   The following builtin functions are now overridable: each(),
535           keys(), pop(), push(), shift(), splice(), unshift(). [561]
536
537       ·   "pack() / unpack()" can now group template letters with "()" and
538           then apply repetition/count modifiers on the groups.
539
540       ·   "pack() / unpack()" can now process the Perl internal numeric
541           types: IVs, UVs, NVs-- and also long doubles, if supported by the
542           platform.  The template letters are "j", "J", "F", and "D".
543
544       ·   "pack('U0a*', ...)" can now be used to force a string to UTF-8.
545
546       ·   my __PACKAGE__ $obj now works. [561]
547
548       ·   POSIX::sleep() now returns the number of unslept seconds (as the
549           POSIX standard says), as opposed to CORE::sleep() which returns the
550           number of slept seconds.
551
552       ·   printf() and sprintf() now support parameter reordering using the
553           "%\d+\$" and "*\d+\$" syntaxes.  For example
554
555               printf "%2\$s %1\$s\n", "foo", "bar";
556
557           will print "bar foo\n".  This feature helps in writing internation‐
558           alised software, and in general when the order of the parameters
559           can vary.
560
561       ·   The (\&) prototype now works properly. [561]
562
563       ·   prototype(\[$@%&]) is now available to implicitly create references
564           (useful for example if you want to emulate the tie() interface).
565
566       ·   A new command-line option, "-t" is available.  It is the little
567           brother of "-T": instead of dying on taint violations, lexical
568           warnings are given.  This is only meant as a temporary debugging
569           aid while securing the code of old legacy applications.  This is
570           not a substitute for -T.
571
572       ·   In other taint news, the "exec LIST" and "system LIST" have now
573           been considered too risky (think "exec @ARGV": it can start any
574           program with any arguments), and now the said forms cause a warning
575           under lexical warnings.  You should carefully launder the arguments
576           to guarantee their validity.  In future releases of Perl the forms
577           will become fatal errors so consider starting laundering now.
578
579       ·   Tied hash interfaces are now required to have the EXISTS and DELETE
580           methods (either own or inherited).
581
582       ·   If tr/// is just counting characters, it doesn't attempt to modify
583           its target.
584
585       ·   untie() will now call an UNTIE() hook if it exists.  See perltie
586           for details. [561]
587
588       ·   utime now supports "utime undef, undef, @files" to change the file
589           timestamps to the current time.
590
591       ·   The rules for allowing underscores (underbars) in numeric constants
592           have been relaxed and simplified: now you can have an underscore
593           simply between digits.
594
595       ·   Rather than relying on C's argv[0] (which may not contain a full
596           pathname) where possible $^X is now set by asking the operating
597           system.  (eg by reading /proc/self/exe on Linux, /proc/curproc/file
598           on FreeBSD)
599
600       ·   A new variable, "${^TAINT}", indicates whether taint mode is
601           enabled.
602
603       ·   You can now override the readline() builtin, and this overrides
604           also the <FILEHANDLE> angle bracket operator.
605
606       ·   The command-line options -s and -F are now recognized on the she‐
607           bang (#!) line.
608
609       ·   Use of the "/c" match modifier without an accompanying "/g" modi‐
610           fier elicits a new warning: "Use of /c modifier is meaningless
611           without /g".
612
613           Use of "/c" in substitutions, even with "/g", elicits "Use of /c
614           modifier is meaningless in s///".
615
616           Use of "/g" with "split" elicits "Use of /g modifier is meaningless
617           in split".
618
619       ·   Support for the "CLONE" special subroutine had been added.  With
620           ithreads, when a new thread is created, all Perl data is cloned,
621           however non-Perl data cannot be cloned automatically.  In "CLONE"
622           you can do whatever you need to do, like for example handle the
623           cloning of non-Perl data, if necessary.  "CLONE" will be executed
624           once for every package that has it defined or inherited.  It will
625           be called in the context of the new thread, so all modifications
626           are made in the new area.
627
628           See perlmod
629

Modules and Pragmata

631       New Modules and Pragmata
632
633       ·   "Attribute::Handlers", originally by Damian Conway and now main‐
634           tained by Arthur Bergman, allows a class to define attribute han‐
635           dlers.
636
637               package MyPack;
638               use Attribute::Handlers;
639               sub Wolf :ATTR(SCALAR) { print "howl!\n" }
640
641               # later, in some package using or inheriting from MyPack...
642
643               my MyPack $Fluffy : Wolf; # the attribute handler Wolf will be called
644
645           Both variables and routines can have attribute handlers.  Handlers
646           can be specific to type (SCALAR, ARRAY, HASH, or CODE), or specific
647           to the exact compilation phase (BEGIN, CHECK, INIT, or END).  See
648           Attribute::Handlers.
649
650       ·   "B::Concise", by Stephen McCamant, is a new compiler backend for
651           walking the Perl syntax tree, printing concise info about ops.  The
652           output is highly customisable.  See B::Concise. [561+]
653
654       ·   The new bignum, bigint, and bigrat pragmas, by Tels, implement
655           transparent bignum support (using the Math::BigInt, Math::BigFloat,
656           and Math::BigRat backends).
657
658       ·   "Class::ISA", by Sean Burke, is a module for reporting the search
659           path for a class's ISA tree.  See Class::ISA.
660
661       ·   "Cwd" now has a split personality: if possible, an XS extension is
662           used, (this will hopefully be faster, more secure, and more robust)
663           but if not possible, the familiar Perl implementation is used.
664
665       ·   "Devel::PPPort", originally by Kenneth Albanowski and now main‐
666           tained by Paul Marquess, has been added.  It is primarily used by
667           "h2xs" to enhance portability of XS modules between different ver‐
668           sions of Perl.  See Devel::PPPort.
669
670       ·   "Digest", frontend module for calculating digests (checksums), from
671           Gisle Aas, has been added.  See Digest.
672
673       ·   "Digest::MD5" for calculating MD5 digests (checksums) as defined in
674           RFC 1321, from Gisle Aas, has been added.  See Digest::MD5.
675
676               use Digest::MD5 'md5_hex';
677
678               $digest = md5_hex("Thirsty Camel");
679
680               print $digest, "\n"; # 01d19d9d2045e005c3f1b80e8b164de1
681
682           NOTE: the "MD5" backward compatibility module is deliberately not
683           included since its further use is discouraged.
684
685           See also PerlIO::via::QuotedPrint.
686
687       ·   "Encode", originally by Nick Ing-Simmons and now maintained by Dan
688           Kogai, provides a mechanism to translate between different charac‐
689           ter encodings.  Support for Unicode, ISO-8859-1, and ASCII are com‐
690           piled in to the module.  Several other encodings (like the rest of
691           the ISO-8859, CP*/Win*, Mac, KOI8-R, three variants EBCDIC, Chi‐
692           nese, Japanese, and Korean encodings) are included and can be
693           loaded at runtime.  (For space considerations, the largest Chinese
694           encodings have been separated into their own CPAN module,
695           Encode::HanExtra, which Encode will use if available).  See Encode.
696
697           Any encoding supported by Encode module is also available to the
698           ":encoding()" layer if PerlIO is used.
699
700       ·   "Hash::Util" is the interface to the new restricted hashes feature.
701           (Implemented by Jeffrey Friedl, Nick Ing-Simmons, and Michael Schw‐
702           ern.)  See Hash::Util.
703
704       ·   "I18N::Langinfo" can be used to query locale information.  See
705           I18N::Langinfo.
706
707       ·   "I18N::LangTags", by Sean Burke, has functions for dealing with
708           RFC3066-style language tags.  See I18N::LangTags.
709
710       ·   "ExtUtils::Constant", by Nicholas Clark, is a new tool for exten‐
711           sion writers for generating XS code to import C header constants.
712           See ExtUtils::Constant.
713
714       ·   "Filter::Simple", by Damian Conway, is an easy-to-use frontend to
715           Filter::Util::Call.  See Filter::Simple.
716
717               # in MyFilter.pm:
718
719               package MyFilter;
720
721               use Filter::Simple sub {
722                   while (my ($from, $to) = splice @_, 0, 2) {
723                           s/$from/$to/g;
724                   }
725               };
726
727               1;
728
729               # in user's code:
730
731               use MyFilter qr/red/ => 'green';
732
733               print "red\n";   # this code is filtered, will print "green\n"
734               print "bored\n"; # this code is filtered, will print "bogreen\n"
735
736               no MyFilter;
737
738               print "red\n";   # this code is not filtered, will print "red\n"
739
740       ·   "File::Temp", by Tim Jenness, allows one to create temporary files
741           and directories in an easy, portable, and secure way.  See
742           File::Temp.  [561+]
743
744       ·   "Filter::Util::Call", by Paul Marquess, provides you with the
745           framework to write source filters in Perl.  For most uses, the
746           frontend Filter::Simple is to be preferred.  See Fil‐
747           ter::Util::Call.
748
749       ·   "if", by Ilya Zakharevich, is a new pragma for conditional inclu‐
750           sion of modules.
751
752       ·   libnet, by Graham Barr, is a collection of perl5 modules related to
753           network programming.  See Net::FTP, Net::NNTP, Net::Ping (not part
754           of libnet, but related), Net::POP3, Net::SMTP, and Net::Time.
755
756           Perl installation leaves libnet unconfigured; use libnetcfg to con‐
757           figure it.
758
759       ·   "List::Util", by Graham Barr, is a selection of general-utility
760           list subroutines, such as sum(), min(), first(), and shuffle().
761           See List::Util.
762
763       ·   "Locale::Constants", "Locale::Country", "Locale::Currency"
764           "Locale::Language", and Locale::Script, by Neil Bowers, have been
765           added.  They provide the codes for various locale standards, such
766           as "fr" for France, "usd" for US Dollar, and "ja" for Japanese.
767
768               use Locale::Country;
769
770               $country = code2country('jp');               # $country gets 'Japan'
771               $code    = country2code('Norway');           # $code gets 'no'
772
773           See Locale::Constants, Locale::Country, Locale::Currency, and
774           Locale::Language.
775
776       ·   "Locale::Maketext", by Sean Burke, is a localization framework.
777           See Locale::Maketext, and Locale::Maketext::TPJ13.  The latter is
778           an article about software localization, originally published in The
779           Perl Journal #13, and republished here with kind permission.
780
781       ·   "Math::BigRat" for big rational numbers, to accompany Math::BigInt
782           and Math::BigFloat, from Tels.  See Math::BigRat.
783
784       ·   "Memoize" can make your functions faster by trading space for time,
785           from Mark-Jason Dominus.  See Memoize.
786
787       ·   "MIME::Base64", by Gisle Aas, allows you to encode data in base64,
788           as defined in RFC 2045 - MIME (Multipurpose Internet Mail Exten‐
789           sions).
790
791               use MIME::Base64;
792
793               $encoded = encode_base64('Aladdin:open sesame');
794               $decoded = decode_base64($encoded);
795
796               print $encoded, "\n"; # "QWxhZGRpbjpvcGVuIHNlc2FtZQ=="
797
798           See MIME::Base64.
799
800       ·   "MIME::QuotedPrint", by Gisle Aas, allows you to encode data in
801           quoted-printable encoding, as defined in RFC 2045 - MIME (Multipur‐
802           pose Internet Mail Extensions).
803
804               use MIME::QuotedPrint;
805
806               $encoded = encode_qp("\xDE\xAD\xBE\xEF");
807               $decoded = decode_qp($encoded);
808
809               print $encoded, "\n"; # "=DE=AD=BE=EF\n"
810               print $decoded, "\n"; # "\xDE\xAD\xBE\xEF\n"
811
812           See also PerlIO::via::QuotedPrint.
813
814       ·   "NEXT", by Damian Conway, is a pseudo-class for method redispatch.
815           See NEXT.
816
817       ·   "open" is a new pragma for setting the default I/O layers for
818           open().
819
820       ·   "PerlIO::scalar", by Nick Ing-Simmons, provides the implementation
821           of IO to "in memory" Perl scalars as discussed above.  It also
822           serves as an example of a loadable PerlIO layer.  Other future pos‐
823           sibilities include PerlIO::Array and PerlIO::Code.  See Per‐
824           lIO::scalar.
825
826       ·   "PerlIO::via", by Nick Ing-Simmons, acts as a PerlIO layer and
827           wraps PerlIO layer functionality provided by a class (typically
828           implemented in Perl code).
829
830       ·   "PerlIO::via::QuotedPrint", by Elizabeth Mattijsen, is an example
831           of a "PerlIO::via" class:
832
833               use PerlIO::via::QuotedPrint;
834               open($fh,">:via(QuotedPrint)",$path);
835
836           This will automatically convert everything output to $fh to
837           Quoted-Printable.  See PerlIO::via and PerlIO::via::QuotedPrint.
838
839       ·   "Pod::ParseLink", by Russ Allbery, has been added, to parse L<>
840           links in pods as described in the new perlpodspec.
841
842       ·   "Pod::Text::Overstrike", by Joe Smith, has been added.  It converts
843           POD data to formatted overstrike text.  See Pod::Text::Overstrike.
844           [561+]
845
846       ·   "Scalar::Util" is a selection of general-utility scalar subrou‐
847           tines, such as blessed(), reftype(), and tainted().  See
848           Scalar::Util.
849
850       ·   "sort" is a new pragma for controlling the behaviour of sort().
851
852       ·   "Storable" gives persistence to Perl data structures by allowing
853           the storage and retrieval of Perl data to and from files in a fast
854           and compact binary format.  Because in effect Storable does serial‐
855           isation of Perl data structures, with it you can also clone deep,
856           hierarchical datastructures.  Storable was originally created by
857           Raphael Manfredi, but it is now maintained by Abhijit Menon-Sen.
858           Storable has been enhanced to understand the two new hash features,
859           Unicode keys and restricted hashes.  See Storable.
860
861       ·   "Switch", by Damian Conway, has been added.  Just by saying
862
863               use Switch;
864
865           you have "switch" and "case" available in Perl.
866
867               use Switch;
868
869               switch ($val) {
870
871                           case 1          { print "number 1" }
872                           case "a"        { print "string a" }
873                           case [1..10,42] { print "number in list" }
874                           case (@array)   { print "number in list" }
875                           case /\w+/      { print "pattern" }
876                           case qr/\w+/    { print "pattern" }
877                           case (%hash)    { print "entry in hash" }
878                           case (\%hash)   { print "entry in hash" }
879                           case (\&sub)    { print "arg to subroutine" }
880                           else            { print "previous case not true" }
881               }
882
883           See Switch.
884
885       ·   "Test::More", by Michael Schwern, is yet another framework for
886           writing test scripts, more extensive than Test::Simple.  See
887           Test::More.
888
889       ·   "Test::Simple", by Michael Schwern, has basic utilities for writing
890           tests.   See Test::Simple.
891
892       ·   "Text::Balanced", by Damian Conway, has been added, for extracting
893           delimited text sequences from strings.
894
895               use Text::Balanced 'extract_delimited';
896
897               ($a, $b) = extract_delimited("'never say never', he never said", "'", '');
898
899           $a will be "'never say never'", $b will be ', he never said'.
900
901           In addition to extract_delimited(), there are also extract_brack‐
902           eted(), extract_quotelike(), extract_codeblock(), extract_vari‐
903           able(), extract_tagged(), extract_multiple(), gen_delimited_pat(),
904           and gen_extract_tagged().  With these, you can implement rather
905           advanced parsing algorithms.  See Text::Balanced.
906
907       ·   "threads", by Arthur Bergman, is an interface to interpreter
908           threads.  Interpreter threads (ithreads) is the new thread model
909           introduced in Perl 5.6 but only available as an internal interface
910           for extension writers (and for Win32 Perl for "fork()" emulation).
911           See threads, threads::shared, and perlthrtut.
912
913       ·   "threads::shared", by Arthur Bergman, allows data sharing for
914           interpreter threads.  See threads::shared.
915
916       ·   "Tie::File", by Mark-Jason Dominus, associates a Perl array with
917           the lines of a file.  See Tie::File.
918
919       ·   "Tie::Memoize", by Ilya Zakharevich, provides on-demand loaded
920           hashes.  See Tie::Memoize.
921
922       ·   "Tie::RefHash::Nestable", by Edward Avis, allows storing hash ref‐
923           erences (unlike the standard Tie::RefHash)  The module is contained
924           within Tie::RefHash.  See Tie::RefHash.
925
926       ·   "Time::HiRes", by Douglas E. Wegscheid, provides high resolution
927           timing (ualarm, usleep, and gettimeofday).  See Time::HiRes.
928
929       ·   "Unicode::UCD" offers a querying interface to the Unicode Character
930           Database.  See Unicode::UCD.
931
932       ·   "Unicode::Collate", by SADAHIRO Tomoyuki, implements the UCA (Uni‐
933           code Collation Algorithm) for sorting Unicode strings.  See Uni‐
934           code::Collate.
935
936       ·   "Unicode::Normalize", by SADAHIRO Tomoyuki, implements the various
937           Unicode normalization forms.  See Unicode::Normalize.
938
939       ·   "XS::APItest", by Tim Jenness, is a test extension that exercises
940           XS APIs.  Currently only "printf()" is tested: how to output vari‐
941           ous basic data types from XS.
942
943       ·   "XS::Typemap", by Tim Jenness, is a test extension that exercises
944           XS typemaps.  Nothing gets installed, but the code is worth study‐
945           ing for extension writers.
946
947       Updated And Improved Modules and Pragmata
948
949       ·   The following independently supported modules have been updated to
950           the newest versions from CPAN: CGI, CPAN, DB_File, File::Spec,
951           File::Temp, Getopt::Long, Math::BigFloat, Math::BigInt, the podla‐
952           tors bundle (Pod::Man, Pod::Text), Pod::LaTeX [561+], Pod::Parser,
953           Storable, Term::ANSIColor, Test, Text-Tabs+Wrap.
954
955       ·   attributes::reftype() now works on tied arguments.
956
957       ·   AutoLoader can now be disabled with "no AutoLoader;".
958
959       ·   B::Deparse has been significantly enhanced by Robin Houston.  It
960           can now deparse almost all of the standard test suite (so that the
961           tests still succeed).  There is a make target "test.deparse" for
962           trying this out.
963
964       ·   Carp now has better interface documentation, and the @CARP_NOT
965           interface has been added to get optional control over where errors
966           are reported independently of @ISA, by Ben Tilly.
967
968       ·   Class::Struct can now define the classes in compile time.
969
970       ·   Class::Struct now assigns the array/hash element if the accessor is
971           called with an array/hash element as the sole argument.
972
973       ·   The return value of Cwd::fastcwd() is now tainted.
974
975       ·   Data::Dumper now has an option to sort hashes.
976
977       ·   Data::Dumper now has an option to dump code references using
978           B::Deparse.
979
980       ·   DB_File now supports newer Berkeley DB versions, among other
981           improvements.
982
983       ·   Devel::Peek now has an interface for the Perl memory statistics
984           (this works only if you are using perl's malloc, and if you have
985           compiled with debugging).
986
987       ·   The English module can now be used without the infamous performance
988           hit by saying
989
990                   use English '-no_match_vars';
991
992           (Assuming, of course, that you don't need the troublesome variables
993           $`, $&, or $'.)  Also, introduced @LAST_MATCH_START and
994           @LAST_MATCH_END English aliases for "@-" and "@+".
995
996       ·   ExtUtils::MakeMaker has been significantly cleaned up and fixed.
997           The enhanced version has also been backported to earlier releases
998           of Perl and submitted to CPAN so that the earlier releases can
999           enjoy the fixes.
1000
1001       ·   The arguments of WriteMakefile() in Makefile.PL are now checked for
1002           sanity much more carefully than before.  This may cause new warn‐
1003           ings when modules are being installed.  See ExtUtils::MakeMaker for
1004           more details.
1005
1006       ·   ExtUtils::MakeMaker now uses File::Spec internally, which hopefully
1007           leads to better portability.
1008
1009       ·   Fcntl, Socket, and Sys::Syslog have been rewritten by Nicholas
1010           Clark to use the new-style constant dispatch section (see ExtU‐
1011           tils::Constant).  This means that they will be more robust and
1012           hopefully faster.
1013
1014       ·   File::Find now chdir()s correctly when chasing symbolic links.
1015           [561]
1016
1017       ·   File::Find now has pre- and post-processing callbacks.  It also
1018           correctly changes directories when chasing symbolic links.  Call‐
1019           backs (naughtily) exiting with "next;" instead of "return;" now
1020           work.
1021
1022       ·   File::Find is now (again) reentrant.  It also has been made more
1023           portable.
1024
1025       ·   The warnings issued by File::Find now belong to their own category.
1026           You can enable/disable them with "use/no warnings 'File::Find';".
1027
1028       ·   File::Glob::glob() has been renamed to File::Glob::bsd_glob()
1029           because the name clashes with the builtin glob().  The older name
1030           is still available for compatibility, but is deprecated. [561]
1031
1032       ·   File::Glob now supports "GLOB_LIMIT" constant to limit the size of
1033           the returned list of filenames.
1034
1035       ·   IPC::Open3 now allows the use of numeric file descriptors.
1036
1037       ·   IO::Socket now has an atmark() method, which returns true if the
1038           socket is positioned at the out-of-band mark.  The method is also
1039           exportable as a sockatmark() function.
1040
1041       ·   IO::Socket::INET failed to open the specified port if the service
1042           name was not known.  It now correctly uses the supplied port number
1043           as is. [561]
1044
1045       ·   IO::Socket::INET has support for the ReusePort option (if your
1046           platform supports it).  The Reuse option now has an alias, Reuse‐
1047           Addr.  For clarity, you may want to prefer ReuseAddr.
1048
1049       ·   IO::Socket::INET now supports a value of zero for "LocalPort" (usu‐
1050           ally meaning that the operating system will make one up.)
1051
1052       ·   'use lib' now works identically to @INC.  Removing directories with
1053           'no lib' now works.
1054
1055       ·   Math::BigFloat and Math::BigInt have undergone a full rewrite by
1056           Tels.  They are now magnitudes faster, and they support various
1057           bignum libraries such as GMP and PARI as their backends.
1058
1059       ·   Math::Complex handles inf, NaN etc., better.
1060
1061       ·   Net::Ping has been considerably enhanced by Rob Brown: multihoming
1062           is now supported, Win32 functionality is better, there is now time
1063           measuring functionality (optionally high-resolution using
1064           Time::HiRes), and there is now "external" protocol which uses
1065           Net::Ping::External module which runs your external ping utility
1066           and parses the output.  A version of Net::Ping::External is avail‐
1067           able in CPAN.
1068
1069           Note that some of the Net::Ping tests are disabled when running
1070           under the Perl distribution since one cannot assume one or more of
1071           the following: enabled echo port at localhost, full Internet con‐
1072           nectivity, or sympathetic firewalls.  You can set the environment
1073           variable PERL_TEST_Net_Ping to "1" (one) before running the Perl
1074           test suite to enable all the Net::Ping tests.
1075
1076       ·   POSIX::sigaction() is now much more flexible and robust.  You can
1077           now install coderef handlers, 'DEFAULT', and 'IGNORE' handlers,
1078           installing new handlers was not atomic.
1079
1080       ·   In Safe, %INC is now localised in a Safe compartment so that
1081           use/require work.
1082
1083       ·   In SDBM_File on dosish platforms, some keys went missing because of
1084           lack of support for files with "holes".  A workaround for the prob‐
1085           lem has been added.
1086
1087       ·   In Search::Dict one can now have a pre-processing hook for the
1088           lines being searched.
1089
1090       ·   The Shell module now has an OO interface.
1091
1092       ·   In Sys::Syslog there is now a failover mechanism that will go
1093           through alternative connection mechanisms until the message is suc‐
1094           cessfully logged.
1095
1096       ·   The Test module has been significantly enhanced.
1097
1098       ·   Time::Local::timelocal() does not handle fractional seconds any‐
1099           more.  The rationale is that neither does localtime(), and timelo‐
1100           cal() and localtime() are supposed to be inverses of each other.
1101
1102       ·   The vars pragma now supports declaring fully qualified variables.
1103           (Something that "our()" does not and will not support.)
1104
1105       ·   The "utf8::" name space (as in the pragma) provides various Perl-
1106           callable functions to provide low level access to Perl's internal
1107           Unicode representation.  At the moment only length() has been
1108           implemented.
1109

Utility Changes

1111       ·   Emacs perl mode (emacs/cperl-mode.el) has been updated to version
1112           4.31.
1113
1114       ·   emacs/e2ctags.pl is now much faster.
1115
1116       ·   "enc2xs" is a tool for people adding their own encodings to the
1117           Encode module.
1118
1119       ·   "h2ph" now supports C trigraphs.
1120
1121       ·   "h2xs" now produces a template README.
1122
1123       ·   "h2xs" now uses "Devel::PPPort" for better portability between dif‐
1124           ferent versions of Perl.
1125
1126       ·   "h2xs" uses the new ExtUtils::Constant module which will affect
1127           newly created extensions that define constants.  Since the new code
1128           is more correct (if you have two constants where the first one is a
1129           prefix of the second one, the first constant never got defined),
1130           less lossy (it uses integers for integer constant, as opposed to
1131           the old code that used floating point numbers even for integer con‐
1132           stants), and slightly faster, you might want to consider regenerat‐
1133           ing your extension code (the new scheme makes regenerating easy).
1134           h2xs now also supports C trigraphs.
1135
1136       ·   "libnetcfg" has been added to configure libnet.
1137
1138       ·   "perlbug" is now much more robust.  It also sends the bug report to
1139           perl.org, not perl.com.
1140
1141       ·   "perlcc" has been rewritten and its user interface (that is, com‐
1142           mand line) is much more like that of the UNIX C compiler, cc.  (The
1143           perlbc tools has been removed.  Use "perlcc -B" instead.)  Note
1144           that perlcc is still considered very experimental and unsupported.
1145           [561]
1146
1147       ·   "perlivp" is a new Installation Verification Procedure utility for
1148           running any time after installing Perl.
1149
1150       ·   "piconv" is an implementation of the character conversion utility
1151           "iconv", demonstrating the new Encode module.
1152
1153       ·   "pod2html" now allows specifying a cache directory.
1154
1155       ·   "pod2html" now produces XHTML 1.0.
1156
1157       ·   "pod2html" now understands POD written using different line endings
1158           (PC-like CRLF versus UNIX-like LF versus MacClassic-like CR).
1159
1160       ·   "s2p" has been completely rewritten in Perl.  (It is in fact a full
1161           implementation of sed in Perl: you can use the sed functionality by
1162           using the "psed" utility.)
1163
1164       ·   "xsubpp" now understands POD documentation embedded in the *.xs
1165           files. [561]
1166
1167       ·   "xsubpp" now supports the OUT keyword.
1168

New Documentation

1170       ·   perl56delta details the changes between the 5.005 release and the
1171           5.6.0 release.
1172
1173       ·   perlclib documents the internal replacements for standard C library
1174           functions.  (Interesting only for extension writers and Perl core
1175           hackers.) [561+]
1176
1177       ·   perldebtut is a Perl debugging tutorial. [561+]
1178
1179       ·   perlebcdic contains considerations for running Perl on EBCDIC plat‐
1180           forms. [561+]
1181
1182       ·   perlintro is a gentle introduction to Perl.
1183
1184       ·   perliol documents the internals of PerlIO with layers.
1185
1186       ·   perlmodstyle is a style guide for writing modules.
1187
1188       ·   perlnewmod tells about writing and submitting a new module. [561+]
1189
1190       ·   perlpacktut is a pack() tutorial.
1191
1192       ·   perlpod has been rewritten to be clearer and to record the best
1193           practices gathered over the years.
1194
1195       ·   perlpodspec is a more formal specification of the pod format,
1196           mainly of interest for writers of pod applications, not to people
1197           writing in pod.
1198
1199       ·   perlretut is a regular expression tutorial. [561+]
1200
1201       ·   perlrequick is a regular expressions quick-start guide.  Yes, much
1202           quicker than perlretut. [561]
1203
1204       ·   perltodo has been updated.
1205
1206       ·   perltootc has been renamed as perltooc (to not to conflict with
1207           perltoot in filesystems restricted to "8.3" names).
1208
1209       ·   perluniintro is an introduction to using Unicode in Perl.  (perlu‐
1210           nicode is more of a detailed reference and background information)
1211
1212       ·   perlutil explains the command line utilities packaged with the Perl
1213           distribution. [561+]
1214
1215       The following platform-specific documents are available before the
1216       installation as README.platform, and after the installation as
1217       perlplatform:
1218
1219           perlaix perlamiga perlapollo perlbeos perlbs2000
1220           perlce perlcygwin perldgux perldos perlepoc perlfreebsd perlhpux
1221           perlhurd perlirix perlmachten perlmacos perlmint perlmpeix
1222           perlnetware perlos2 perlos390 perlplan9 perlqnx perlsolaris
1223           perltru64 perluts perlvmesa perlvms perlvos perlwin32
1224
1225       These documents usually detail one or more of the following subjects:
1226       configuring, building, testing, installing, and sometimes also using
1227       Perl on the said platform.
1228
1229       Eastern Asian Perl users are now welcomed in their own languages:
1230       README.jp (Japanese), README.ko (Korean), README.cn (simplified Chi‐
1231       nese) and README.tw (traditional Chinese), which are written in normal
1232       pod but encoded in EUC-JP, EUC-KR, EUC-CN and Big5.  These will get
1233       installed as
1234
1235          perljp perlko perlcn perltw
1236
1237       ·   The documentation for the POSIX-BC platform is called "BS2000", to
1238           avoid confusion with the Perl POSIX module.
1239
1240       ·   The documentation for the WinCE platform is called perlce
1241           (README.ce in the source code kit), to avoid confusion with the
1242           perlwin32 documentation on 8.3-restricted filesystems.
1243

Performance Enhancements

1245       ·   map() could get pathologically slow when the result list it gener‐
1246           ates is larger than the source list.  The performance has been
1247           improved for common scenarios. [561]
1248
1249       ·   sort() is also fully reentrant, in the sense that the sort function
1250           can itself call sort().  This did not work reliably in previous
1251           releases. [561]
1252
1253       ·   sort() has been changed to use primarily mergesort internally as
1254           opposed to the earlier quicksort.  For very small lists this may
1255           result in slightly slower sorting times, but in general the speedup
1256           should be at least 20%.  Additional bonuses are that the worst case
1257           behaviour of sort() is now better (in computer science terms it now
1258           runs in time O(N log N), as opposed to quicksort's Theta(N**2)
1259           worst-case run time behaviour), and that sort() is now stable
1260           (meaning that elements with identical keys will stay ordered as
1261           they were before the sort).  See the "sort" pragma for information.
1262
1263           The story in more detail: suppose you want to serve yourself a lit‐
1264           tle slice of Pi.
1265
1266               @digits = ( 3,1,4,1,5,9 );
1267
1268           A numerical sort of the digits will yield (1,1,3,4,5,9), as
1269           expected.  Which 1 comes first is hard to know, since one 1 looks
1270           pretty much like any other.  You can regard this as totally triv‐
1271           ial, or somewhat profound.  However, if you just want to sort the
1272           even digits ahead of the odd ones, then what will
1273
1274               sort { ($a % 2) <=> ($b % 2) } @digits;
1275
1276           yield?  The only even digit, 4, will come first.  But how about the
1277           odd numbers, which all compare equal?  With the quicksort algorithm
1278           used to implement Perl 5.6 and earlier, the order of ties is left
1279           up to the sort.  So, as you add more and more digits of Pi, the
1280           order in which the sorted even and odd digits appear will change.
1281           and, for sufficiently large slices of Pi, the quicksort algorithm
1282           in Perl 5.8 won't return the same results even if reinvoked with
1283           the same input.  The justification for this rests with quicksort's
1284           worst case behavior.  If you run
1285
1286              sort { $a <=> $b } ( 1 .. $N , 1 .. $N );
1287
1288           (something you might approximate if you wanted to merge two sorted
1289           arrays using sort), doubling $N doesn't just double the quicksort
1290           time, it quadruples it.  Quicksort has a worst case run time that
1291           can grow like N**2, so-called quadratic behaviour, and it can hap‐
1292           pen on patterns that may well arise in normal use.  You won't
1293           notice this for small arrays, but you will notice it with larger
1294           arrays, and you may not live long enough for the sort to complete
1295           on arrays of a million elements.  So the 5.8 quicksort scrambles
1296           large arrays before sorting them, as a statistical defence against
1297           quadratic behaviour.  But that means if you sort the same large
1298           array twice, ties may be broken in different ways.
1299
1300           Because of the unpredictability of tie-breaking order, and the qua‐
1301           dratic worst-case behaviour, quicksort was almost replaced com‐
1302           pletely with a stable mergesort.  Stable means that ties are broken
1303           to preserve the original order of appearance in the input array.
1304           So
1305
1306               sort { ($a % 2) <=> ($b % 2) } (3,1,4,1,5,9);
1307
1308           will yield (4,3,1,1,5,9), guaranteed.  The even and odd numbers
1309           appear in the output in the same order they appeared in the input.
1310           Mergesort has worst case O(N log N) behaviour, the best value
1311           attainable.  And, ironically, this mergesort does particularly well
1312           where quicksort goes quadratic:  mergesort sorts (1..$N, 1..$N) in
1313           O(N) time.  But quicksort was rescued at the last moment because it
1314           is faster than mergesort on certain inputs and platforms.  For
1315           example, if you really don't care about the order of even and odd
1316           digits, quicksort will run in O(N) time; it's very good at sorting
1317           many repetitions of a small number of distinct elements.  The
1318           quicksort divide and conquer strategy works well on platforms with
1319           relatively small, very fast, caches.  Eventually, the problem gets
1320           whittled down to one that fits in the cache, from which point it
1321           benefits from the increased memory speed.
1322
1323           Quicksort was rescued by implementing a sort pragma to control
1324           aspects of the sort.  The stable subpragma forces stable behaviour,
1325           regardless of algorithm.  The _quicksort and _mergesort subpragmas
1326           are heavy-handed ways to select the underlying implementation.  The
1327           leading "_" is a reminder that these subpragmas may not survive
1328           beyond 5.8.  More appropriate mechanisms for selecting the imple‐
1329           mentation exist, but they wouldn't have arrived in time to save
1330           quicksort.
1331
1332       ·   Hashes now use Bob Jenkins "One-at-a-Time" hashing key algorithm (
1333           http://burtleburtle.net/bob/hash/doobs.html ).  This algorithm is
1334           reasonably fast while producing a much better spread of values than
1335           the old hashing algorithm (originally by Chris Torek, later tweaked
1336           by Ilya Zakharevich).  Hash values output from the algorithm on a
1337           hash of all 3-char printable ASCII keys comes much closer to pass‐
1338           ing the DIEHARD random number generation tests.  According to perl‐
1339           bench, this change has not affected the overall speed of Perl.
1340
1341       ·   unshift() should now be noticeably faster.
1342

Installation and Configuration Improvements

1344       Generic Improvements
1345
1346       ·   INSTALL now explains how you can configure Perl to use 64-bit inte‐
1347           gers even on non-64-bit platforms.
1348
1349       ·   Policy.sh policy change: if you are reusing a Policy.sh file (see
1350           INSTALL) and you use Configure -Dprefix=/foo/bar and in the old
1351           Policy $prefix eq $siteprefix and $prefix eq $vendorprefix, all of
1352           them will now be changed to the new prefix, /foo/bar.  (Previously
1353           only $prefix changed.)  If you do not like this new behaviour,
1354           specify prefix, siteprefix, and vendorprefix explicitly.
1355
1356       ·   A new optional location for Perl libraries, otherlibdirs, is avail‐
1357           able.  It can be used for example for vendor add-ons without dis‐
1358           turbing Perl's own library directories.
1359
1360       ·   In many platforms, the vendor-supplied 'cc' is too stripped-down to
1361           build Perl (basically, 'cc' doesn't do ANSI C).  If this seems to
1362           be the case and 'cc' does not seem to be the GNU C compiler 'gcc',
1363           an automatic attempt is made to find and use 'gcc' instead.
1364
1365       ·   gcc needs to closely track the operating system release to avoid
1366           build problems. If Configure finds that gcc was built for a differ‐
1367           ent operating system release than is running, it now gives a
1368           clearly visible warning that there may be trouble ahead.
1369
1370       ·   Since Perl 5.8 is not binary-compatible with previous releases of
1371           Perl, Configure no longer suggests including the 5.005 modules in
1372           @INC.
1373
1374       ·   Configure "-S" can now run non-interactively. [561]
1375
1376       ·   Configure support for pdp11-style memory models has been removed
1377           due to obsolescence. [561]
1378
1379       ·   configure.gnu now works with options with whitespace in them.
1380
1381       ·   installperl now outputs everything to STDERR.
1382
1383       ·   Because PerlIO is now the default on most platforms, "-perlio"
1384           doesn't get appended to the $Config{archname} (also known as $^O)
1385           anymore.  Instead, if you explicitly choose not to use perlio (Con‐
1386           figure command line option -Uuseperlio), you will get "-stdio"
1387           appended.
1388
1389       ·   Another change related to the architecture name is that "-64all"
1390           (-Duse64bitall, or "maximally 64-bit") is appended only if your
1391           pointers are 64 bits wide.  (To be exact, the use64bitall is
1392           ignored.)
1393
1394       ·   In AFS installations, one can configure the root of the AFS to be
1395           somewhere else than the default /afs by using the Configure parame‐
1396           ter "-Dafsroot=/some/where/else".
1397
1398       ·   APPLLIB_EXP, a lesser-known configuration-time definition, has been
1399           documented.  It can be used to prepend site-specific directories to
1400           Perl's default search path (@INC); see INSTALL for information.
1401
1402       ·   The version of Berkeley DB used when the Perl (and, presumably, the
1403           DB_File extension) was built is now available as @Config{qw(db_ver‐
1404           sion_major db_version_minor db_version_patch)} from Perl and as
1405           "DB_VERSION_MAJOR_CFG DB_VERSION_MINOR_CFG DB_VERSION_PATCH_CFG"
1406           from C.
1407
1408       ·   Building Berkeley DB3 for compatibility modes for DB, NDBM, and
1409           ODBM has been documented in INSTALL.
1410
1411       ·   If you have CPAN access (either network or a local copy such as a
1412           CD-ROM) you can during specify extra modules to Configure to build
1413           and install with Perl using the -Dextras=...  option.  See INSTALL
1414           for more details.
1415
1416       ·   In addition to config.over, a new override file, config.arch, is
1417           available.  This file is supposed to be used by hints file writers
1418           for architecture-wide changes (as opposed to config.over which is
1419           for site-wide changes).
1420
1421       ·   If your file system supports symbolic links, you can build Perl
1422           outside of the source directory by
1423
1424                   mkdir perl/build/directory
1425                   cd perl/build/directory
1426                   sh /path/to/perl/source/Configure -Dmksymlinks ...
1427
1428           This will create in perl/build/directory a tree of symbolic links
1429           pointing to files in /path/to/perl/source.  The original files are
1430           left unaffected.  After Configure has finished, you can just say
1431
1432                   make all test
1433
1434           and Perl will be built and tested, all in perl/build/directory.
1435           [561]
1436
1437       ·   For Perl developers, several new make targets for profiling and
1438           debugging have been added; see perlhack.
1439
1440           ·       Use of the gprof tool to profile Perl has been documented
1441                   in perlhack.  There is a make target called "perl.gprof"
1442                   for generating a gprofiled Perl executable.
1443
1444           ·       If you have GCC 3, there is a make target called
1445                   "perl.gcov" for creating a gcoved Perl executable for cov‐
1446                   erage analysis.  See perlhack.
1447
1448           ·       If you are on IRIX or Tru64 platforms, new profiling/debug‐
1449                   ging options have been added; see perlhack for more infor‐
1450                   mation about pixie and Third Degree.
1451
1452       ·   Guidelines of how to construct minimal Perl installations have been
1453           added to INSTALL.
1454
1455       ·   The Thread extension is now not built at all under ithreads ("Con‐
1456           figure -Duseithreads") because it wouldn't work anyway (the Thread
1457           extension requires being Configured with "-Duse5005threads").
1458
1459           Note that the 5.005 threads are unsupported and deprecated: if you
1460           have code written for the old threads you should migrate it to the
1461           new ithreads model.
1462
1463       ·   The Gconvert macro ($Config{d_Gconvert}) used by perl for stringi‐
1464           fying floating-point numbers is now more picky about using sprintf
1465           %.*g rules for the conversion.  Some platforms that used to use
1466           gcvt may now resort to the slower sprintf.
1467
1468       ·   The obsolete method of making a special (e.g., debugging) flavor of
1469           perl by saying
1470
1471                   make LIBPERL=libperld.a
1472
1473           has been removed. Use -DDEBUGGING instead.
1474
1475       New Or Improved Platforms
1476
1477       For the list of platforms known to support Perl, see "Supported Plat‐
1478       forms" in perlport.
1479
1480       ·   AIX dynamic loading should be now better supported.
1481
1482       ·   AIX should now work better with gcc, threads, and 64-bitness.  Also
1483           the long doubles support in AIX should be better now.  See perlaix.
1484
1485       ·   AtheOS ( http://www.atheos.cx/ ) is a new platform.
1486
1487       ·   BeOS has been reclaimed.
1488
1489       ·   The DG/UX platform now supports 5.005-style threads.  See perldgux.
1490
1491       ·   The DYNIX/ptx platform (also known as dynixptx) is supported at or
1492           near osvers 4.5.2.
1493
1494       ·   EBCDIC platforms (z/OS (also known as OS/390), POSIX-BC, and
1495           VM/ESA) have been regained.  Many test suite tests still fail and
1496           the co-existence of Unicode and EBCDIC isn't quite settled, but the
1497           situation is much better than with Perl 5.6.  See perlos390,
1498           perlbs2000 (for POSIX-BC), and perlvmesa for more information.
1499
1500       ·   Building perl with -Duseithreads or -Duse5005threads now works
1501           under HP-UX 10.20 (previously it only worked under 10.30 or later).
1502           You will need a thread library package installed. See README.hpux.
1503           [561]
1504
1505       ·   Mac OS Classic is now supported in the mainstream source package
1506           (MacPerl has of course been available since perl 5.004 but now the
1507           source code bases of standard Perl and MacPerl have been synchro‐
1508           nised) [561]
1509
1510       ·   Mac OS X (or Darwin) should now be able to build Perl even on HFS+
1511           filesystems.  (The case-insensitivity used to confuse the Perl
1512           build process.)
1513
1514       ·   NCR MP-RAS is now supported. [561]
1515
1516       ·   All the NetBSD specific patches (except for the installation spe‐
1517           cific ones) have been merged back to the main distribution.
1518
1519       ·   NetWare from Novell is now supported.  See perlnetware.
1520
1521       ·   NonStop-UX is now supported. [561]
1522
1523       ·   NEC SUPER-UX is now supported.
1524
1525       ·   All the OpenBSD specific patches (except for the installation spe‐
1526           cific ones) have been merged back to the main distribution.
1527
1528       ·   Perl has been tested with the GNU pth userlevel thread package (
1529           http://www.gnu.org/software/pth/pth.html ).  All thread tests of
1530           Perl now work, but not without adding some yield()s to the tests,
1531           so while pth (and other userlevel thread implementations) can be
1532           considered to be "working" with Perl ithreads, keep in mind the
1533           possible non-preemptability of the underlying thread implementa‐
1534           tion.
1535
1536       ·   Stratus VOS is now supported using Perl's native build method (Con‐
1537           figure).  This is the recommended method to build Perl on VOS.  The
1538           older methods, which build miniperl, are still available.  See per‐
1539           lvos. [561+]
1540
1541       ·   The Amdahl UTS UNIX mainframe platform is now supported. [561]
1542
1543       ·   WinCE is now supported.  See perlce.
1544
1545       ·   z/OS (formerly known as OS/390, formerly known as MVS OE) now has
1546           support for dynamic loading.  This is not selected by default, how‐
1547           ever, you must specify -Dusedl in the arguments of Configure. [561]
1548

Selected Bug Fixes

1550       Numerous memory leaks and uninitialized memory accesses have been
1551       hunted down.  Most importantly, anonymous subs used to leak quite a
1552       bit. [561]
1553
1554       ·   The autouse pragma didn't work for Multi::Part::Function::Names.
1555
1556       ·   caller() could cause core dumps in certain situations.  Carp was
1557           sometimes affected by this problem.  In particular, caller() now
1558           returns a subroutine name of "(unknown)" for subroutines that have
1559           been removed from the symbol table.
1560
1561       ·   chop(@list) in list context returned the characters chopped in
1562           reverse order.  This has been reversed to be in the right order.
1563           [561]
1564
1565       ·   Configure no longer includes the DBM libraries (dbm, gdbm, db,
1566           ndbm) when building the Perl binary.  The only exception to this is
1567           SunOS 4.x, which needs them. [561]
1568
1569       ·   The behaviour of non-decimal but numeric string constants such as
1570           "0x23" was platform-dependent: in some platforms that was seen as
1571           35, in some as 0, in some as a floating point number (don't ask).
1572           This was caused by Perl's using the operating system libraries in a
1573           situation where the result of the string to number conversion is
1574           undefined: now Perl consistently handles such strings as zero in
1575           numeric contexts.
1576
1577       ·   Several debugger fixes: exit code now reflects the script exit
1578           code, condition "0" now treated correctly, the "d" command now
1579           checks line number, $. no longer gets corrupted, and all debugger
1580           output now goes correctly to the socket if RemotePort is set. [561]
1581
1582       ·   The debugger (perl5db.pl) has been modified to present a more con‐
1583           sistent commands interface, via (CommandSet=580).  perl5db.t was
1584           also added to test the changes, and as a placeholder for further
1585           tests.
1586
1587           See perldebug.
1588
1589       ·   The debugger has a new "dumpDepth" option to control the maximum
1590           depth to which nested structures are dumped.  The "x" command has
1591           been extended so that "x N EXPR" dumps out the value of EXPR to a
1592           depth of at most N levels.
1593
1594       ·   The debugger can now show lexical variables if you have the CPAN
1595           module PadWalker installed.
1596
1597       ·   The order of DESTROYs has been made more predictable.
1598
1599       ·   Perl 5.6.0 could emit spurious warnings about redefinition of
1600           dl_error() when statically building extensions into perl.  This has
1601           been corrected. [561]
1602
1603       ·   dprofpp -R didn't work.
1604
1605       ·   *foo{FORMAT} now works.
1606
1607       ·   Infinity is now recognized as a number.
1608
1609       ·   UNIVERSAL::isa no longer caches methods incorrectly.  (This broke
1610           the Tk extension with 5.6.0.) [561]
1611
1612       ·   Lexicals I: lexicals outside an eval "" weren't resolved correctly
1613           inside a subroutine definition inside the eval "" if they were not
1614           already referenced in the top level of the eval""ed code.
1615
1616       ·   Lexicals II: lexicals leaked at file scope into subroutines that
1617           were declared before the lexicals.
1618
1619       ·   Lexical warnings now propagating correctly between scopes and into
1620           "eval "..."".
1621
1622       ·   "use warnings qw(FATAL all)" did not work as intended.  This has
1623           been corrected. [561]
1624
1625       ·   warnings::enabled() now reports the state of $^W correctly if the
1626           caller isn't using lexical warnings. [561]
1627
1628       ·   Line renumbering with eval and "#line" now works. [561]
1629
1630       ·   Fixed numerous memory leaks, especially in eval "".
1631
1632       ·   Localised tied variables no longer leak memory
1633
1634               use Tie::Hash;
1635               tie my %tied_hash => 'Tie::StdHash';
1636
1637               ...
1638
1639               # Used to leak memory every time local() was called;
1640               # in a loop, this added up.
1641               local($tied_hash{Foo}) = 1;
1642
1643       ·   Localised hash elements (and %ENV) are correctly unlocalised to not
1644           exist, if they didn't before they were localised.
1645
1646               use Tie::Hash;
1647               tie my %tied_hash => 'Tie::StdHash';
1648
1649               ...
1650
1651               # Nothing has set the FOO element so far
1652
1653               { local $tied_hash{FOO} = 'Bar' }
1654
1655               # This used to print, but not now.
1656               print "exists!\n" if exists $tied_hash{FOO};
1657
1658           As a side effect of this fix, tied hash interfaces must define the
1659           EXISTS and DELETE methods.
1660
1661       ·   mkdir() now ignores trailing slashes in the directory name, as man‐
1662           dated by POSIX.
1663
1664       ·   Some versions of glibc have a broken modfl().  This affects builds
1665           with "-Duselongdouble".  This version of Perl detects this broken‐
1666           ness and has a workaround for it.  The glibc release 2.2.2 is known
1667           to have fixed the modfl() bug.
1668
1669       ·   Modulus of unsigned numbers now works (4063328477 % 65535 used to
1670           return 27406, instead of 27047). [561]
1671
1672       ·   Some "not a number" warnings introduced in 5.6.0 eliminated to be
1673           more compatible with 5.005.  Infinity is now recognised as a num‐
1674           ber. [561]
1675
1676       ·   Numeric conversions did not recognize changes in the string value
1677           properly in certain circumstances. [561]
1678
1679       ·   Attributes (such as :shared) didn't work with our().
1680
1681       ·   our() variables will not cause bogus "Variable will not stay
1682           shared" warnings. [561]
1683
1684       ·   "our" variables of the same name declared in two sibling blocks
1685           resulted in bogus warnings about "redeclaration" of the variables.
1686           The problem has been corrected. [561]
1687
1688       ·   pack "Z" now correctly terminates the string with "\0".
1689
1690       ·   Fix password routines which in some shadow password platforms (e.g.
1691           HP-UX) caused getpwent() to return every other entry.
1692
1693       ·   The PERL5OPT environment variable (for passing command line argu‐
1694           ments to Perl) didn't work for more than a single group of options.
1695           [561]
1696
1697       ·   PERL5OPT with embedded spaces didn't work.
1698
1699       ·   printf() no longer resets the numeric locale to "C".
1700
1701       ·   "qw(a\\b)" now parses correctly as 'a\\b': that is, as three char‐
1702           acters, not four. [561]
1703
1704       ·   pos() did not return the correct value within s///ge in earlier
1705           versions.  This is now handled correctly. [561]
1706
1707       ·   Printing quads (64-bit integers) with printf/sprintf now works
1708           without the q L ll prefixes (assuming you are on a quad-capable
1709           platform).
1710
1711       ·   Regular expressions on references and overloaded scalars now work.
1712           [561+]
1713
1714       ·   Right-hand side magic (GMAGIC) could in many cases such as string
1715           concatenation be invoked too many times.
1716
1717       ·   scalar() now forces scalar context even when used in void context.
1718
1719       ·   SOCKS support is now much more robust.
1720
1721       ·   sort() arguments are now compiled in the right wantarray context
1722           (they were accidentally using the context of the sort() itself).
1723           The comparison block is now run in scalar context, and the argu‐
1724           ments to be sorted are always provided list context. [561]
1725
1726       ·   Changed the POSIX character class "[[:space:]]" to include the
1727           (very rarely used) vertical tab character.  Added a new POSIX-ish
1728           character class "[[:blank:]]" which stands for horizontal white‐
1729           space (currently, the space and the tab).
1730
1731       ·   The tainting behaviour of sprintf() has been rationalized.  It does
1732           not taint the result of floating point formats anymore, making the
1733           behaviour consistent with that of string interpolation. [561]
1734
1735       ·   Some cases of inconsistent taint propagation (such as within hash
1736           values) have been fixed.
1737
1738       ·   The RE engine found in Perl 5.6.0 accidentally pessimised certain
1739           kinds of simple pattern matches.  These are now handled better.
1740           [561]
1741
1742       ·   Regular expression debug output (whether through "use re 'debug'"
1743           or via "-Dr") now looks better. [561]
1744
1745       ·   Multi-line matches like ""a\nxb\n" =~ /(?!\A)x/m" were flawed.  The
1746           bug has been fixed. [561]
1747
1748       ·   Use of $& could trigger a core dump under some situations.  This is
1749           now avoided. [561]
1750
1751       ·   The regular expression captured submatches ($1, $2, ...) are now
1752           more consistently unset if the match fails, instead of leaving
1753           false data lying around in them. [561]
1754
1755       ·   readline() on files opened in "slurp" mode could return an extra ""
1756           (blank line) at the end in certain situations.  This has been cor‐
1757           rected. [561]
1758
1759       ·   Autovivification of symbolic references of special variables
1760           described in perlvar (as in "${$num}") was accidentally disabled.
1761           This works again now. [561]
1762
1763       ·   Sys::Syslog ignored the "LOG_AUTH" constant.
1764
1765       ·   $AUTOLOAD, sort(), lock(), and spawning subprocesses in multiple
1766           threads simultaneously are now thread-safe.
1767
1768       ·   Tie::Array's SPLICE method was broken.
1769
1770       ·   Allow a read-only string on the left-hand side of a non-modifying
1771           tr///.
1772
1773       ·   If "STDERR" is tied, warnings caused by "warn" and "die" now cor‐
1774           rectly pass to it.
1775
1776       ·   Several Unicode fixes.
1777
1778           ·       BOMs (byte order marks) at the beginning of Perl files
1779                   (scripts, modules) should now be transparently skipped.
1780                   UTF-16 and UCS-2 encoded Perl files should now be read cor‐
1781                   rectly.
1782
1783           ·       The character tables have been updated to Unicode 3.2.0.
1784
1785           ·       Comparing with utf8 data does not magically upgrade
1786                   non-utf8 data into utf8.  (This was a problem for example
1787                   if you were mixing data from I/O and Unicode data: your
1788                   output might have got magically encoded as UTF-8.)
1789
1790           ·       Generating illegal Unicode code points such as U+FFFE, or
1791                   the UTF-16 surrogates, now also generates an optional warn‐
1792                   ing.
1793
1794           ·       "IsAlnum", "IsAlpha", and "IsWord" now match titlecase.
1795
1796           ·       Concatenation with the "." operator or via variable inter‐
1797                   polation, "eq", "substr", "reverse", "quotemeta", the "x"
1798                   operator, substitution with "s///", single-quoted UTF-8,
1799                   should now work.
1800
1801           ·       The "tr///" operator now works.  Note that the "tr///CU"
1802                   functionality has been removed (but see pack('U0', ...)).
1803
1804           ·       "eval "v200"" now works.
1805
1806           ·       Perl 5.6.0 parsed m/\x{ab}/ incorrectly, leading to spuri‐
1807                   ous warnings.  This has been corrected. [561]
1808
1809           ·       Zero entries were missing from the Unicode classes such as
1810                   "IsDigit".
1811
1812       ·   Large unsigned numbers (those above 2**31) could sometimes lose
1813           their unsignedness, causing bogus results in arithmetic operations.
1814           [561]
1815
1816       ·   The Perl parser has been stress tested using both random input and
1817           Markov chain input and the few found crashes and lockups have been
1818           fixed.
1819
1820       Platform Specific Changes and Fixes
1821
1822       ·   BSDI 4.*
1823
1824           Perl now works on post-4.0 BSD/OSes.
1825
1826       ·   All BSDs
1827
1828           Setting $0 now works (as much as possible; see perlvar for
1829           details).
1830
1831       ·   Cygwin
1832
1833           Numerous updates; currently synchronised with Cygwin 1.3.10.
1834
1835       ·   Previously DYNIX/ptx had problems in its Configure probe for non-
1836           blocking I/O.
1837
1838       ·   EPOC
1839
1840           EPOC now better supported.  See README.epoc. [561]
1841
1842       ·   FreeBSD 3.*
1843
1844           Perl now works on post-3.0 FreeBSDs.
1845
1846       ·   HP-UX
1847
1848           README.hpux updated; "Configure -Duse64bitall" now works; now uses
1849           HP-UX malloc instead of Perl malloc.
1850
1851       ·   IRIX
1852
1853           Numerous compilation flag and hint enhancements; accidental mixing
1854           of 32-bit and 64-bit libraries (a doomed attempt) made much harder.
1855
1856       ·   Linux
1857
1858           ·       Long doubles should now work (see INSTALL). [561]
1859
1860           ·       Linux previously had problems related to sockaddrlen when
1861                   using accept(), recvfrom() (in Perl: recv()), getpeer‐
1862                   name(), and getsockname().
1863
1864       ·   Mac OS Classic
1865
1866           Compilation of the standard Perl distribution in Mac OS Classic
1867           should now work if you have the Metrowerks development environment
1868           and the missing Mac-specific toolkit bits.  Contact the macperl
1869           mailing list for details.
1870
1871       ·   MPE/iX
1872
1873           MPE/iX update after Perl 5.6.0.  See README.mpeix. [561]
1874
1875       ·   NetBSD/threads: try installing the GNU pth (should be in the pack‐
1876           ages collection, or http://www.gnu.org/software/pth/), and Config‐
1877           ure with -Duseithreads.
1878
1879       ·   NetBSD/sparc
1880
1881           Perl now works on NetBSD/sparc.
1882
1883       ·   OS/2
1884
1885           Now works with usethreads (see INSTALL). [561]
1886
1887       ·   Solaris
1888
1889           64-bitness using the Sun Workshop compiler now works.
1890
1891       ·   Stratus VOS
1892
1893           The native build method requires at least VOS Release 14.5.0 and
1894           GNU C++/GNU Tools 2.0.1 or later.  The Perl pack function now maps
1895           overflowed values to +infinity and underflowed values to -infinity.
1896
1897       ·   Tru64 (aka Digital UNIX, aka DEC OSF/1)
1898
1899           The operating system version letter now recorded in $Con‐
1900           fig{osvers}.  Allow compiling with gcc (previously explicitly for‐
1901           bidden).  Compiling with gcc still not recommended because buggy
1902           code results, even with gcc 2.95.2.
1903
1904       ·   Unicos
1905
1906           Fixed various alignment problems that lead into core dumps either
1907           during build or later; no longer dies on math errors at runtime;
1908           now using full quad integers (64 bits), previously was using only
1909           46 bit integers for speed.
1910
1911       ·   VMS
1912
1913           See "Socket Extension Dynamic in VMS" and "IEEE-format Floating
1914           Point Default on OpenVMS Alpha" for important changes not otherwise
1915           listed here.
1916
1917           chdir() now works better despite a CRT bug; now works with MULTI‐
1918           PLICITY (see INSTALL); now works with Perl's malloc.
1919
1920           The tainting of %ENV elements via "keys" or "values" was previously
1921           unimplemented.  It now works as documented.
1922
1923           The "waitpid" emulation has been improved.  The worst bug (now
1924           fixed) was that a pid of -1 would cause a wildcard search of all
1925           processes on the system.
1926
1927           POSIX-style signals are now emulated much better on VMS versions
1928           prior to 7.0.
1929
1930           The "system" function and backticks operator have improved func‐
1931           tionality and better error handling. [561]
1932
1933           File access tests now use current process privileges rather than
1934           the user's default privileges, which could sometimes result in a
1935           mismatch between reported access and actual access.  This improve‐
1936           ment is only available on VMS v6.0 and later.
1937
1938           There is a new "kill" implementation based on "sys$sigprc" that
1939           allows older VMS systems (pre-7.0) to use "kill" to send signals
1940           rather than simply force exit.  This implementation also allows
1941           later systems to call "kill" from within a signal handler.
1942
1943           Iterative logical name translations are now limited to 10 itera‐
1944           tions in imitation of SHOW LOGICAL and other OpenVMS facilities.
1945
1946       ·   Windows
1947
1948           ·       Signal handling now works better than it used to.  It is
1949                   now implemented using a Windows message loop, and is there‐
1950                   fore less prone to random crashes.
1951
1952           ·       fork() emulation is now more robust, but still continues to
1953                   have a few esoteric bugs and caveats.  See perlfork for
1954                   details. [561+]
1955
1956           ·       A failed (pseudo)fork now returns undef and sets errno to
1957                   EAGAIN. [561]
1958
1959           ·       The following modules now work on Windows:
1960
1961                       ExtUtils::Embed         [561]
1962                       IO::Pipe
1963                       IO::Poll
1964                       Net::Ping
1965
1966           ·       IO::File::new_tmpfile() is no longer limited to 32767 invo‐
1967                   cations per-process.
1968
1969           ·       Better chdir() return value for a non-existent directory.
1970
1971           ·       Compiling perl using the 64-bit Platform SDK tools is now
1972                   supported.
1973
1974           ·       The Win32::SetChildShowWindow() builtin can be used to con‐
1975                   trol the visibility of windows created by child processes.
1976                   See Win32 for details.
1977
1978           ·       Non-blocking waits for child processes (or pseudo-pro‐
1979                   cesses) are supported via "waitpid($pid, &POSIX::WNOHANG)".
1980
1981           ·       The behavior of system() with multiple arguments has been
1982                   rationalized.  Each unquoted argument will be automatically
1983                   quoted to protect whitespace, and any existing whitespace
1984                   in the arguments will be preserved.  This improves the
1985                   portability of system(@args) by avoiding the need for Win‐
1986                   dows "cmd" shell specific quoting in perl programs.
1987
1988                   Note that this means that some scripts that may have relied
1989                   on earlier buggy behavior may no longer work correctly.
1990                   For example, "system("nmake /nologo", @args)" will now
1991                   attempt to run the file "nmake /nologo" and will fail when
1992                   such a file isn't found.  On the other hand, perl will now
1993                   execute code such as "system("c:/Program
1994                   Files/MyApp/foo.exe", @args)" correctly.
1995
1996           ·       The perl header files no longer suppress common warnings
1997                   from the Microsoft Visual C++ compiler.  This means that
1998                   additional warnings may now show up when compiling XS code.
1999
2000           ·       Borland C++ v5.5 is now a supported compiler that can build
2001                   Perl.  However, the generated binaries continue to be
2002                   incompatible with those generated by the other supported
2003                   compilers (GCC and Visual C++). [561]
2004
2005           ·       Duping socket handles with open(F, ">&MYSOCK") now works
2006                   under Windows 9x.  [561]
2007
2008           ·       Current directory entries in %ENV are now correctly propa‐
2009                   gated to child processes. [561]
2010
2011           ·       New %ENV entries now propagate to subprocesses. [561]
2012
2013           ·       Win32::GetCwd() correctly returns C:\ instead of C: when at
2014                   the drive root.  Other bugs in chdir() and Cwd::cwd() have
2015                   also been fixed. [561]
2016
2017           ·       The makefiles now default to the features enabled in
2018                   ActiveState ActivePerl (a popular Win32 binary distribu‐
2019                   tion). [561]
2020
2021           ·       HTML files will now be installed in c:\perl\html instead of
2022                   c:\perl\lib\pod\html
2023
2024           ·       REG_EXPAND_SZ keys are now allowed in registry settings
2025                   used by perl. [561]
2026
2027           ·       Can now send() from all threads, not just the first one.
2028                   [561]
2029
2030           ·       ExtUtils::MakeMaker now uses $ENV{LIB} to search for
2031                   libraries. [561]
2032
2033           ·       Less stack reserved per thread so that more threads can run
2034                   concurrently. (Still 16M per thread.) [561]
2035
2036           ·       "File::Spec->tmpdir()" now prefers C:/temp over /tmp (works
2037                   better when perl is running as service).
2038
2039           ·       Better UNC path handling under ithreads. [561]
2040
2041           ·       wait(), waitpid(), and backticks now return the correct
2042                   exit status under Windows 9x. [561]
2043
2044           ·       A socket handle leak in accept() has been fixed. [561]
2045

New or Changed Diagnostics

2047       Please see perldiag for more details.
2048
2049       ·   Ambiguous range in the transliteration operator (like a-z-9) now
2050           gives a warning.
2051
2052       ·   chdir("") and chdir(undef) now give a deprecation warning because
2053           they cause a possible unintentional chdir to the home directory.
2054           Say chdir() if you really mean that.
2055
2056       ·   Two new debugging options have been added: if you have compiled
2057           your Perl with debugging, you can use the -DT [561] and -DR options
2058           to trace tokenising and to add reference counts to displaying vari‐
2059           ables, respectively.
2060
2061       ·   The lexical warnings category "deprecated" is no longer a sub-cate‐
2062           gory of the "syntax" category. It is now a top-level category in
2063           its own right.
2064
2065       ·   Unadorned dump() will now give a warning suggesting to use explicit
2066           CORE::dump() if that's what really is meant.
2067
2068       ·   The "Unrecognized escape" warning has been extended to include
2069           "\8", "\9", and "\_".  There is no need to escape any of the "\w"
2070           characters.
2071
2072       ·   All regular expression compilation error messages are now hopefully
2073           easier to understand both because the error message now comes
2074           before the failed regex and because the point of failure is now
2075           clearly marked by a "<-- HERE" marker.
2076
2077       ·   Various I/O (and socket) functions like binmode(), close(), and so
2078           forth now more consistently warn if they are used illogically
2079           either on a yet unopened or on an already closed filehandle (or
2080           socket).
2081
2082       ·   Using lstat() on a filehandle now gives a warning.  (It's a non-
2083           sensical thing to do.)
2084
2085       ·   The "-M" and "-m" options now warn if you didn't supply the module
2086           name.
2087
2088       ·   If you in "use" specify a required minimum version, modules match‐
2089           ing the name and but not defining a $VERSION will cause a fatal
2090           failure.
2091
2092       ·   Using negative offset for vec() in lvalue context is now a warnable
2093           offense.
2094
2095       ·   Odd number of arguments to overload::constant now elicits a warn‐
2096           ing.
2097
2098       ·   Odd number of elements in anonymous hash now elicits a warning.
2099
2100       ·   The various "opened only for", "on closed", "never opened" warnings
2101           drop the "main::" prefix for filehandles in the "main" package, for
2102           example "STDIN" instead of "main::STDIN".
2103
2104       ·   Subroutine prototypes are now checked more carefully, you may get
2105           warnings for example if you have used non-prototype characters.
2106
2107       ·   If an attempt to use a (non-blessed) reference as an array index is
2108           made, a warning is given.
2109
2110       ·   "push @a;" and "unshift @a;" (with no values to push or unshift)
2111           now give a warning.  This may be a problem for generated and evaled
2112           code.
2113
2114       ·   If you try to "pack" in perlfunc a number less than 0 or larger
2115           than 255 using the "C" format you will get an optional warning.
2116           Similarly for the "c" format and a number less than -128 or more
2117           than 127.
2118
2119       ·   pack "P" format now demands an explicit size.
2120
2121       ·   unpack "w" now warns of unterminated compressed integers.
2122
2123       ·   Warnings relating to the use of PerlIO have been added.
2124
2125       ·   Certain regex modifiers such as "(?o)" make sense only if applied
2126           to the entire regex.  You will get an optional warning if you try
2127           to do otherwise.
2128
2129       ·   Variable length lookbehind has not yet been implemented, trying to
2130           use it will tell that.
2131
2132       ·   Using arrays or hashes as references (e.g. "%foo->{bar}" has been
2133           deprecated for a while.  Now you will get an optional warning.
2134
2135       ·   Warnings relating to the use of the new restricted hashes feature
2136           have been added.
2137
2138       ·   Self-ties of arrays and hashes are not supported and fatal errors
2139           will happen even at an attempt to do so.
2140
2141       ·   Using "sort" in scalar context now issues an optional warning.
2142           This didn't do anything useful, as the sort was not performed.
2143
2144       ·   Using the /g modifier in split() is meaningless and will cause a
2145           warning.
2146
2147       ·   Using splice() past the end of an array now causes a warning.
2148
2149       ·   Malformed Unicode encodings (UTF-8 and UTF-16) cause a lot of warn‐
2150           ings, as does trying to use UTF-16 surrogates (which are unimple‐
2151           mented).
2152
2153       ·   Trying to use Unicode characters on an I/O stream without marking
2154           the stream's encoding (using open() or binmode()) will cause "Wide
2155           character" warnings.
2156
2157       ·   Use of v-strings in use/require causes a (backward) portability
2158           warning.
2159
2160       ·   Warnings relating to the use interpreter threads and their shared
2161           data have been added.
2162

Changed Internals

2164       ·   PerlIO is now the default.
2165
2166       ·   perlapi.pod (a companion to perlguts) now attempts to document the
2167           internal API.
2168
2169       ·   You can now build a really minimal perl called microperl.  Building
2170           microperl does not require even running Configure; "make -f Make‐
2171           file.micro" should be enough.  Beware: microperl makes many assump‐
2172           tions, some of which may be too bold; the resulting executable may
2173           crash or otherwise misbehave in wondrous ways.  For careful hackers
2174           only.
2175
2176       ·   Added rsignal(), whichsig(), do_join(), op_clear, op_null, ptr_ta‐
2177           ble_clear(), ptr_table_free(), sv_setref_uv(), and several UTF-8
2178           interfaces to the publicised API.  For the full list of the avail‐
2179           able APIs see perlapi.
2180
2181       ·   Made possible to propagate customised exceptions via croak()ing.
2182
2183       ·   Now xsubs can have attributes just like subs.  (Well, at least the
2184           built-in attributes.)
2185
2186       ·   dTHR and djSP have been obsoleted; the former removed (because it's
2187           a no-op) and the latter replaced with dSP.
2188
2189       ·   PERL_OBJECT has been completely removed.
2190
2191       ·   The MAGIC constants (e.g. 'P') have been macrofied (e.g.
2192           "PERL_MAGIC_TIED") for better source code readability and maintain‐
2193           ability.
2194
2195       ·   The regex compiler now maintains a structure that identifies nodes
2196           in the compiled bytecode with the corresponding syntactic features
2197           of the original regex expression.  The information is attached to
2198           the new "offsets" member of the "struct regexp". See perldebguts
2199           for more complete information.
2200
2201       ·   The C code has been made much more "gcc -Wall" clean.  Some warning
2202           messages still remain in some platforms, so if you are compiling
2203           with gcc you may see some warnings about dubious practices.  The
2204           warnings are being worked on.
2205
2206       ·   perly.c, sv.c, and sv.h have now been extensively commented.
2207
2208       ·   Documentation on how to use the Perl source repository has been
2209           added to Porting/repository.pod.
2210
2211       ·   There are now several profiling make targets.
2212

Security Vulnerability Closed [561]

2214       (This change was already made in 5.7.0 but bears repeating here.)
2215       (5.7.0 came out before 5.6.1: the development branch 5.7 released ear‐
2216       lier than the maintenance branch 5.6)
2217
2218       A potential security vulnerability in the optional suidperl component
2219       of Perl was identified in August 2000.  suidperl is neither built nor
2220       installed by default.  As of November 2001 the only known vulnerable
2221       platform is Linux, most likely all Linux distributions.  CERT and vari‐
2222       ous vendors and distributors have been alerted about the vulnerability.
2223       See http://www.cpan.org/src/5.0/sperl-2000-08-05/sperl-2000-08-05.txt
2224       for more information.
2225
2226       The problem was caused by Perl trying to report a suspected security
2227       exploit attempt using an external program, /bin/mail.  On Linux plat‐
2228       forms the /bin/mail program had an undocumented feature which when com‐
2229       bined with suidperl gave access to a root shell, resulting in a serious
2230       compromise instead of reporting the exploit attempt.  If you don't have
2231       /bin/mail, or if you have 'safe setuid scripts', or if suidperl is not
2232       installed, you are safe.
2233
2234       The exploit attempt reporting feature has been completely removed from
2235       Perl 5.8.0 (and the maintenance release 5.6.1, and it was removed also
2236       from all the Perl 5.7 releases), so that particular vulnerability isn't
2237       there anymore.  However, further security vulnerabilities are, unfortu‐
2238       nately, always possible.  The suidperl functionality is most probably
2239       going to be removed in Perl 5.10.  In any case, suidperl should only be
2240       used by security experts who know exactly what they are doing and why
2241       they are using suidperl instead of some other solution such as sudo (
2242       see http://www.courtesan.com/sudo/ ).
2243

New Tests

2245       Several new tests have been added, especially for the lib and ext sub‐
2246       sections.  There are now about 69 000 individual tests (spread over
2247       about 700 test scripts), in the regression suite (5.6.1 has about 11
2248       700 tests, in 258 test scripts)  The exact numbers depend on the plat‐
2249       form and Perl configuration used.  Many of the new tests are of course
2250       introduced by the new modules, but still in general Perl is now more
2251       thoroughly tested.
2252
2253       Because of the large number of tests, running the regression suite will
2254       take considerably longer time than it used to: expect the suite to take
2255       up to 4-5 times longer to run than in perl 5.6.  On a really fast
2256       machine you can hope to finish the suite in about 6-8 minutes (wall‐
2257       clock time).
2258
2259       The tests are now reported in a different order than in earlier Perls.
2260       (This happens because the test scripts from under t/lib have been moved
2261       to be closer to the library/extension they are testing.)
2262

Known Problems

2264       The Compiler Suite Is Still Very Experimental
2265
2266       The compiler suite is slowly getting better but it continues to be
2267       highly experimental.  Use in production environments is discouraged.
2268
2269       Localising Tied Arrays and Hashes Is Broken
2270
2271           local %tied_array;
2272
2273       doesn't work as one would expect: the old value is restored incor‐
2274       rectly.  This will be changed in a future release, but we don't know
2275       yet what the new semantics will exactly be.  In any case, the change
2276       will break existing code that relies on the current (ill-defined)
2277       semantics, so just avoid doing this in general.
2278
2279       Building Extensions Can Fail Because Of Largefiles
2280
2281       Some extensions like mod_perl are known to have issues with `large‐
2282       files', a change brought by Perl 5.6.0 in which file offsets default to
2283       64 bits wide, where supported.  Modules may fail to compile at all, or
2284       they may compile and work incorrectly.  Currently, there is no good
2285       solution for the problem, but Configure now provides appropriate non-
2286       largefile ccflags, ldflags, libswanted, and libs in the %Config hash
2287       (e.g., $Config{ccflags_nolargefiles}) so the extensions that are having
2288       problems can try configuring themselves without the largefileness.
2289       This is admittedly not a clean solution, and the solution may not even
2290       work at all.  One potential failure is whether one can (or, if one can,
2291       whether it's a good idea to) link together at all binaries with differ‐
2292       ent ideas about file offsets; all this is platform-dependent.
2293
2294       Modifying $_ Inside for(..)
2295
2296          for (1..5) { $_++ }
2297
2298       works without complaint.  It shouldn't.  (You should be able to modify
2299       only lvalue elements inside the loops.)  You can see the correct behav‐
2300       iour by replacing the 1..5 with 1, 2, 3, 4, 5.
2301
2302       mod_perl 1.26 Doesn't Build With Threaded Perl
2303
2304       Use mod_perl 1.27 or higher.
2305
2306       lib/ftmp-security tests warn 'system possibly insecure'
2307
2308       Don't panic.  Read the 'make test' section of INSTALL instead.
2309
2310       libwww-perl (LWP) fails base/date #51
2311
2312       Use libwww-perl 5.65 or later.
2313
2314       PDL failing some tests
2315
2316       Use PDL 2.3.4 or later.
2317
2318       Perl_get_sv
2319
2320       You may get errors like 'Undefined symbol "Perl_get_sv"' or "can't
2321       resolve symbol 'Perl_get_sv'", or the symbol may be "Perl_sv_2pv".
2322       This probably means that you are trying to use an older shared Perl
2323       library (or extensions linked with such) with Perl 5.8.0 executable.
2324       Perl used to have such a subroutine, but that is no more the case.
2325       Check your shared library path, and any shared Perl libraries in those
2326       directories.
2327
2328       Sometimes this problem may also indicate a partial Perl 5.8.0 installa‐
2329       tion, see "Mac OS X dyld undefined symbols" for an example and how to
2330       deal with it.
2331
2332       Self-tying Problems
2333
2334       Self-tying of arrays and hashes is broken in rather deep and hard-to-
2335       fix ways.  As a stop-gap measure to avoid people from getting frus‐
2336       trated at the mysterious results (core dumps, most often), it is for‐
2337       bidden for now (you will get a fatal error even from an attempt).
2338
2339       A change to self-tying of globs has caused them to be recursively ref‐
2340       erenced (see: "Two-Phased Garbage Collection" in perlobj).  You will
2341       now need an explicit untie to destroy a self-tied glob.  This behaviour
2342       may be fixed at a later date.
2343
2344       Self-tying of scalars and IO thingies works.
2345
2346       ext/threads/t/libc
2347
2348       If this test fails, it indicates that your libc (C library) is not
2349       threadsafe.  This particular test stress tests the localtime() call to
2350       find out whether it is threadsafe.  See perlthrtut for more informa‐
2351       tion.
2352
2353       Failure of Thread (5.005-style) tests
2354
2355       Note that support for 5.005-style threading is deprecated, experimental
2356       and practically unsupported.  In 5.10, it is expected to be removed.
2357       You should migrate your code to ithreads.
2358
2359       The following tests are known to fail due to fundamental problems in
2360       the 5.005 threading implementation. These are not new failures--Perl
2361       5.005_0x has the same bugs, but didn't have these tests.
2362
2363        ../ext/B/t/xref.t                    255 65280    14   12  85.71%  3-14
2364        ../ext/List/Util/t/first.t           255 65280     7    4  57.14%  2 5-7
2365        ../lib/English.t                       2   512    54    2   3.70%  2-3
2366        ../lib/FileCache.t                                 5    1  20.00%  5
2367        ../lib/Filter/Simple/t/data.t                      6    3  50.00%  1-3
2368        ../lib/Filter/Simple/t/filter_only.                9    3  33.33%  1-2 5
2369        ../lib/Math/BigInt/t/bare_mbf.t                 1627    4   0.25%  8 11 1626-1627
2370        ../lib/Math/BigInt/t/bigfltpm.t                 1629    4   0.25%  10 13 1628-
2371                                                                           1629
2372        ../lib/Math/BigInt/t/sub_mbf.t                  1633    4   0.24%  8 11 1632-1633
2373        ../lib/Math/BigInt/t/with_sub.t                 1628    4   0.25%  9 12 1627-1628
2374        ../lib/Tie/File/t/31_autodefer.t     255 65280    65   32  49.23%  34-65
2375        ../lib/autouse.t                                  10    1  10.00%  4
2376        op/flip.t                                         15    1   6.67%  15
2377
2378       These failures are unlikely to get fixed as 5.005-style threads are
2379       considered fundamentally broken.  (Basically what happens is that com‐
2380       peting threads can corrupt shared global state, one good example being
2381       regular expression engine's state.)
2382
2383       Timing problems
2384
2385       The following tests may fail intermittently because of timing problems,
2386       for example if the system is heavily loaded.
2387
2388           t/op/alarm.t
2389           ext/Time/HiRes/HiRes.t
2390           lib/Benchmark.t
2391           lib/Memoize/t/expmod_t.t
2392           lib/Memoize/t/speed.t
2393
2394       In case of failure please try running them manually, for example
2395
2396           ./perl -Ilib ext/Time/HiRes/HiRes.t
2397
2398       Tied/Magical Array/Hash Elements Do Not Autovivify
2399
2400       For normal arrays "$foo = \$bar[1]" will assign "undef" to $bar[1]
2401       (assuming that it didn't exist before), but for tied/magical arrays and
2402       hashes such autovivification does not happen because there is currently
2403       no way to catch the reference creation.  The same problem affects slic‐
2404       ing over non-existent indices/keys of a tied/magical array/hash.
2405
2406       Unicode in package/class and subroutine names does not work
2407
2408       One can have Unicode in identifier names, but not in package/class or
2409       subroutine names.  While some limited functionality towards this does
2410       exist as of Perl 5.8.0, that is more accidental than designed; use of
2411       Unicode for the said purposes is unsupported.
2412
2413       One reason of this unfinishedness is its (currently) inherent unporta‐
2414       bility: since both package names and subroutine names may need to be
2415       mapped to file and directory names, the Unicode capability of the
2416       filesystem becomes important-- and there unfortunately aren't portable
2417       answers.
2418

Platform Specific Problems

2420       AIX
2421
2422       ·   If using the AIX native make command, instead of just "make" issue
2423           "make all".  In some setups the former has been known to spuriously
2424           also try to run "make install".  Alternatively, you may want to use
2425           GNU make.
2426
2427       ·   In AIX 4.2, Perl extensions that use C++ functions that use statics
2428           may have problems in that the statics are not getting initialized.
2429           In newer AIX releases, this has been solved by linking Perl with
2430           the libC_r library, but unfortunately in AIX 4.2 the said library
2431           has an obscure bug where the various functions related to time
2432           (such as time() and gettimeofday()) return broken values, and
2433           therefore in AIX 4.2 Perl is not linked against libC_r.
2434
2435       ·   vac 5.0.0.0 May Produce Buggy Code For Perl
2436
2437           The AIX C compiler vac version 5.0.0.0 may produce buggy code,
2438           resulting in a few random tests failing when run as part of "make
2439           test", but when the failing tests are run by hand, they succeed.
2440           We suggest upgrading to at least vac version 5.0.1.0, that has been
2441           known to compile Perl correctly.  "lslpp -L⎪grep vac.C" will tell
2442           you the vac version.  See README.aix.
2443
2444       ·   If building threaded Perl, you may get compilation warning from
2445           pp_sys.c:
2446
2447             "pp_sys.c", line 4651.39: 1506-280 (W) Function argument assignment between types "unsigned char*" and "const void*" is not allowed.
2448
2449           This is harmless; it is caused by the getnetbyaddr() and getnet‐
2450           byaddr_r() having slightly different types for their first argu‐
2451           ment.
2452
2453       Alpha systems with old gccs fail several tests
2454
2455       If you see op/pack, op/pat, op/regexp, or ext/Storable tests failing in
2456       a Linux/alpha or *BSD/Alpha, it's probably time to upgrade your gcc.
2457       gccs prior to 2.95.3 are definitely not good enough, and gcc 3.1 may be
2458       even better.  (RedHat Linux/alpha with gcc 3.1 reported no problems, as
2459       did Linux 2.4.18 with gcc 2.95.4.)  (In Tru64, it is preferable to use
2460       the bundled C compiler.)
2461
2462       AmigaOS
2463
2464       Perl 5.8.0 doesn't build in AmigaOS.  It broke at some point during the
2465       ithreads work and we could not find Amiga experts to unbreak the prob‐
2466       lems.  Perl 5.6.1 still works for AmigaOS (as does the 5.7.2 develop‐
2467       ment release).
2468
2469       BeOS
2470
2471       The following tests fail on 5.8.0 Perl in BeOS Personal 5.03:
2472
2473        t/op/lfs............................FAILED at test 17
2474        t/op/magic..........................FAILED at test 24
2475        ext/Fcntl/t/syslfs..................FAILED at test 17
2476        ext/File/Glob/t/basic...............FAILED at test 3
2477        ext/POSIX/t/sigaction...............FAILED at test 13
2478        ext/POSIX/t/waitpid.................FAILED at test 1
2479
2480       See perlbeos (README.beos) for more details.
2481
2482       Cygwin "unable to remap"
2483
2484       For example when building the Tk extension for Cygwin, you may get an
2485       error message saying "unable to remap".  This is known problem with
2486       Cygwin, and a workaround is detailed in here: http://sources.red
2487       hat.com/ml/cygwin/2001-12/msg00894.html
2488
2489       Cygwin ndbm tests fail on FAT
2490
2491       One can build but not install (or test the build of) the NDBM_File on
2492       FAT filesystems.  Installation (or build) on NTFS works fine.  If one
2493       attempts the test on a FAT install (or build) the following failures
2494       are expected:
2495
2496        ../ext/NDBM_File/ndbm.t       13  3328    71   59  83.10%  1-2 4 16-71
2497        ../ext/ODBM_File/odbm.t      255 65280    ??   ??       %  ??
2498        ../lib/AnyDBM_File.t           2   512    12    2  16.67%  1 4
2499        ../lib/Memoize/t/errors.t      0   139    11    5  45.45%  7-11
2500        ../lib/Memoize/t/tie_ndbm.t   13  3328     4    4 100.00%  1-4
2501        run/fresh_perl.t                          97    1   1.03%  91
2502
2503       NDBM_File fails and ODBM_File just coredumps.
2504
2505       If you intend to run only on FAT (or if using AnyDBM_File on FAT), run
2506       Configure with the -Ui_ndbm and -Ui_dbm options to prevent NDBM_File
2507       and ODBM_File being built.
2508
2509       DJGPP Failures
2510
2511        t/op/stat............................FAILED at test 29
2512        lib/File/Find/t/find.................FAILED at test 1
2513        lib/File/Find/t/taint................FAILED at test 1
2514        lib/h2xs.............................FAILED at test 15
2515        lib/Pod/t/eol........................FAILED at test 1
2516        lib/Test/Harness/t/strap-analyze.....FAILED at test 8
2517        lib/Test/Harness/t/test-harness......FAILED at test 23
2518        lib/Test/Simple/t/exit...............FAILED at test 1
2519
2520       The above failures are known as of 5.8.0 with native builds with long
2521       filenames, but there are a few more if running under dosemu because of
2522       limitations (and maybe bugs) of dosemu:
2523
2524        t/comp/cpp...........................FAILED at test 3
2525        t/op/inccode.........................(crash)
2526
2527       and a few lib/ExtUtils tests, and several hundred Encode/t/Aliases.t
2528       failures that work fine with long filenames.  So you really might pre‐
2529       fer native builds and long filenames.
2530
2531       FreeBSD built with ithreads coredumps reading large directories
2532
2533       This is a known bug in FreeBSD 4.5's readdir_r(), it has been fixed in
2534       FreeBSD 4.6 (see perlfreebsd (README.freebsd)).
2535
2536       FreeBSD Failing locale Test 117 For ISO 8859-15 Locales
2537
2538       The ISO 8859-15 locales may fail the locale test 117 in FreeBSD.  This
2539       is caused by the characters \xFF (y with diaeresis) and \xBE (Y with
2540       diaeresis) not behaving correctly when being matched case-insensi‐
2541       tively.  Apparently this problem has been fixed in the latest FreeBSD
2542       releases.  ( http://www.freebsd.org/cgi/query-pr.cgi?pr=34308 )
2543
2544       IRIX fails ext/List/Util/t/shuffle.t or Digest::MD5
2545
2546       IRIX with MIPSpro 7.3.1.2m or 7.3.1.3m compiler may fail the List::Util
2547       test ext/List/Util/t/shuffle.t by dumping core.  This seems to be a
2548       compiler error since if compiled with gcc no core dump ensues, and no
2549       failures have been seen on the said test on any other platform.
2550
2551       Similarly, building the Digest::MD5 extension has been known to fail
2552       with "*** Termination code 139 (bu21)".
2553
2554       The cure is to drop optimization level (Configure -Doptimize=-O2).
2555
2556       HP-UX lib/posix Subtest 9 Fails When LP64-Configured
2557
2558       If perl is configured with -Duse64bitall, the successful result of the
2559       subtest 10 of lib/posix may arrive before the successful result of the
2560       subtest 9, which confuses the test harness so much that it thinks the
2561       subtest 9 failed.
2562
2563       Linux with glibc 2.2.5 fails t/op/int subtest #6 with -Duse64bitint
2564
2565       This is a known bug in the glibc 2.2.5 with long long integers.  (
2566       http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=65612 )
2567
2568       Linux With Sfio Fails op/misc Test 48
2569
2570       No known fix.
2571
2572       Mac OS X
2573
2574       Please remember to set your environment variable LC_ALL to "C" (setenv
2575       LC_ALL C) before running "make test" to avoid a lot of warnings about
2576       the broken locales of Mac OS X.
2577
2578       The following tests are known to fail in Mac OS X 10.1.5 because of
2579       buggy (old) implementations of Berkeley DB included in Mac OS X:
2580
2581        Failed Test                 Stat Wstat Total Fail  Failed  List of Failed
2582        -------------------------------------------------------------------------
2583        ../ext/DB_File/t/db-btree.t    0    11    ??   ??       %  ??
2584        ../ext/DB_File/t/db-recno.t              149    3   2.01%  61 63 65
2585
2586       If you are building on a UFS partition, you will also probably see
2587       t/op/stat.t subtest #9 fail.  This is caused by Darwin's UFS not sup‐
2588       porting inode change time.
2589
2590       Also the ext/POSIX/t/posix.t subtest #10 fails but it is skipped for
2591       now because the failure is Apple's fault, not Perl's (blocked signals
2592       are lost).
2593
2594       If you Configure with ithreads, ext/threads/t/libc.t will fail. Again,
2595       this is not Perl's fault-- the libc of Mac OS X is not threadsafe (in
2596       this particular test, the localtime() call is found to be threadun‐
2597       safe.)
2598
2599       Mac OS X dyld undefined symbols
2600
2601       If after installing Perl 5.8.0 you are getting warnings about missing
2602       symbols, for example
2603
2604           dyld: perl Undefined symbols
2605           _perl_sv_2pv
2606           _perl_get_sv
2607
2608       you probably have an old pre-Perl-5.8.0 installation (or parts of one)
2609       in /Library/Perl (the undefined symbols used to exist in pre-5.8.0
2610       Perls).  It seems that for some reason "make install" doesn't always
2611       completely overwrite the files in /Library/Perl.  You can move the old
2612       Perl shared library out of the way like this:
2613
2614           cd /Library/Perl/darwin/CORE
2615           mv libperl.dylib libperlold.dylib
2616
2617       and then reissue "make install".  Note that the above of course is
2618       extremely disruptive for anything using the /usr/local/bin/perl.  If
2619       that doesn't help, you may have to try removing all the .bundle files
2620       from beneath /Library/Perl, and again "make install"-ing.
2621
2622       OS/2 Test Failures
2623
2624       The following tests are known to fail on OS/2 (for clarity only the
2625       failures are shown, not the full error messages):
2626
2627        ../lib/ExtUtils/t/Mkbootstrap.t    1   256    18    1   5.56%  8
2628        ../lib/ExtUtils/t/Packlist.t       1   256    34    1   2.94%  17
2629        ../lib/ExtUtils/t/basic.t          1   256    17    1   5.88%  14
2630        lib/os2_process.t                  2   512   227    2   0.88%  174 209
2631        lib/os2_process_kid.t                        227    2   0.88%  174 209
2632        lib/rx_cmprt.t                   255 65280    18    3  16.67%  16-18
2633
2634       op/sprintf tests 91, 129, and 130
2635
2636       The op/sprintf tests 91, 129, and 130 are known to fail on some plat‐
2637       forms.  Examples include any platform using sfio, and Compaq/Tandem's
2638       NonStop-UX.
2639
2640       Test 91 is known to fail on QNX6 (nto), because "sprintf '%e',0" incor‐
2641       rectly produces 0.000000e+0 instead of 0.000000e+00.
2642
2643       For tests 129 and 130, the failing platforms do not comply with the
2644       ANSI C Standard: lines 19ff on page 134 of ANSI X3.159 1989, to be
2645       exact.  (They produce something other than "1" and "-1" when formatting
2646       0.6 and -0.6 using the printf format "%.0f"; most often, they produce
2647       "0" and "-0".)
2648
2649       SCO
2650
2651       The socketpair tests are known to be unhappy in SCO 3.2v5.0.4:
2652
2653        ext/Socket/socketpair.t...............FAILED tests 15-45
2654
2655       Solaris 2.5
2656
2657       In case you are still using Solaris 2.5 (aka SunOS 5.5), you may expe‐
2658       rience failures (the test core dumping) in lib/locale.t.  The suggested
2659       cure is to upgrade your Solaris.
2660
2661       Solaris x86 Fails Tests With -Duse64bitint
2662
2663       The following tests are known to fail in Solaris x86 with Perl config‐
2664       ured to use 64 bit integers:
2665
2666        ext/Data/Dumper/t/dumper.............FAILED at test 268
2667        ext/Devel/Peek/Peek..................FAILED at test 7
2668
2669       SUPER-UX (NEC SX)
2670
2671       The following tests are known to fail on SUPER-UX:
2672
2673        op/64bitint...........................FAILED tests 29-30, 32-33, 35-36
2674        op/arith..............................FAILED tests 128-130
2675        op/pack...............................FAILED tests 25-5625
2676        op/pow................................
2677        op/taint..............................# msgsnd failed
2678        ../ext/IO/lib/IO/t/io_poll............FAILED tests 3-4
2679        ../ext/IPC/SysV/ipcsysv...............FAILED tests 2, 5-6
2680        ../ext/IPC/SysV/t/msg.................FAILED tests 2, 4-6
2681        ../ext/Socket/socketpair..............FAILED tests 12
2682        ../lib/IPC/SysV.......................FAILED tests 2, 5-6
2683        ../lib/warnings.......................FAILED tests 115-116, 118-119
2684
2685       The op/pack failure ("Cannot compress negative numbers at op/pack.t
2686       line 126") is serious but as of yet unsolved.  It points at some prob‐
2687       lems with the signedness handling of the C compiler, as do the
2688       64bitint, arith, and pow failures.  Most of the rest point at problems
2689       with SysV IPC.
2690
2691       Term::ReadKey not working on Win32
2692
2693       Use Term::ReadKey 2.20 or later.
2694
2695       UNICOS/mk
2696
2697       ·   During Configure, the test
2698
2699               Guessing which symbols your C compiler and preprocessor define...
2700
2701           will probably fail with error messages like
2702
2703               CC-20 cc: ERROR File = try.c, Line = 3
2704                 The identifier "bad" is undefined.
2705
2706                 bad switch yylook 79bad switch yylook 79bad switch yylook 79bad switch yylook 79#ifdef A29K
2707                 ^
2708
2709               CC-65 cc: ERROR File = try.c, Line = 3
2710                 A semicolon is expected at this point.
2711
2712           This is caused by a bug in the awk utility of UNICOS/mk.  You can
2713           ignore the error, but it does cause a slight problem: you cannot
2714           fully benefit from the h2ph utility (see h2ph) that can be used to
2715           convert C headers to Perl libraries, mainly used to be able to
2716           access from Perl the constants defined using C preprocessor, cpp.
2717           Because of the above error, parts of the converted headers will be
2718           invisible.  Luckily, these days the need for h2ph is rare.
2719
2720       ·   If building Perl with interpreter threads (ithreads), the get‐
2721           grent(), getgrnam(), and getgrgid() functions cannot return the
2722           list of the group members due to a bug in the multithreaded support
2723           of UNICOS/mk.  What this means is that in list context the func‐
2724           tions will return only three values, not four.
2725
2726       UTS
2727
2728       There are a few known test failures, see perluts (README.uts).
2729
2730       VOS (Stratus)
2731
2732       When Perl is built using the native build process on VOS Release 14.5.0
2733       and GNU C++/GNU Tools 2.0.1, all attempted tests either pass or result
2734       in TODO (ignored) failures.
2735
2736       VMS
2737
2738       There should be no reported test failures with a default configuration,
2739       though there are a number of tests marked TODO that point to areas
2740       needing further debugging and/or porting work.
2741
2742       Win32
2743
2744       In multi-CPU boxes, there are some problems with the I/O buffering:
2745       some output may appear twice.
2746
2747       XML::Parser not working
2748
2749       Use XML::Parser 2.31 or later.
2750
2751       z/OS (OS/390)
2752
2753       z/OS has rather many test failures but the situation is actually much
2754       better than it was in 5.6.0; it's just that so many new modules and
2755       tests have been added.
2756
2757        Failed Test                   Stat Wstat Total Fail  Failed  List of Failed
2758        ---------------------------------------------------------------------------
2759        ../ext/Data/Dumper/t/dumper.t              357    8   2.24%  311 314 325 327
2760                                                                     331 333 337 339
2761        ../ext/IO/lib/IO/t/io_unix.t                 5    4  80.00%  2-5
2762        ../ext/Storable/t/downgrade.t   12  3072   169   12   7.10%  14-15 46-47 78-79
2763                                                                     110-111 150 161
2764        ../lib/ExtUtils/t/Constant.t   121 30976    48   48 100.00%  1-48
2765        ../lib/ExtUtils/t/Embed.t                    9    9 100.00%  1-9
2766        op/pat.t                                   922    7   0.76%  665 776 785 832-
2767                                                                     834 845
2768        op/sprintf.t                               224    3   1.34%  98 100 136
2769        op/tr.t                                     97    5   5.15%  63 71-74
2770        uni/fold.t                                 780    6   0.77%  61 169 196 661
2771                                                                     710-711
2772
2773       The failures in dumper.t and downgrade.t are problems in the tests,
2774       those in io_unix and sprintf are problems in the USS (UDP sockets and
2775       printf formats).  The pat, tr, and fold failures are genuine Perl prob‐
2776       lems caused by EBCDIC (and in the pat and fold cases, combining that
2777       with Unicode).  The Constant and Embed are probably problems in the
2778       tests (since they test Perl's ability to build extensions, and that
2779       seems to be working reasonably well.)
2780
2781       Unicode Support on EBCDIC Still Spotty
2782
2783       Though mostly working, Unicode support still has problem spots on
2784       EBCDIC platforms.  One such known spot are the "\p{}" and "\P{}" regu‐
2785       lar expression constructs for code points less than 256: the "pP" are
2786       testing for Unicode code points, not knowing about EBCDIC.
2787
2788       Seen In Perl 5.7 But Gone Now
2789
2790       "Time::Piece" (previously known as "Time::Object") was removed because
2791       it was felt that it didn't have enough value in it to be a core module.
2792       It is still a useful module, though, and is available from the CPAN.
2793
2794       Perl 5.8 unfortunately does not build anymore on AmigaOS; this broke
2795       accidentally at some point.  Since there are not that many Amiga devel‐
2796       opers available, we could not get this fixed and tested in time for
2797       5.8.0.  Perl 5.6.1 still works for AmigaOS (as does the 5.7.2 develop‐
2798       ment release).
2799
2800       The "PerlIO::Scalar" and "PerlIO::Via" (capitalised) were renamed as
2801       "PerlIO::scalar" and "PerlIO::via" (all lowercase) just before 5.8.0.
2802       The main rationale was to have all core PerlIO layers to have all low‐
2803       ercase names.  The "plugins" are named as usual, for example "Per‐
2804       lIO::via::QuotedPrint".
2805
2806       The "threads::shared::queue" and "threads::shared::semaphore" were
2807       renamed as "Thread::Queue" and "Thread::Semaphore" just before 5.8.0.
2808       The main rationale was to have thread modules to obey normal naming,
2809       "Thread::" (the "threads" and "threads::shared" themselves are more
2810       pragma-like, they affect compile-time, so they stay lowercase).
2811

Reporting Bugs

2813       If you find what you think is a bug, you might check the articles
2814       recently posted to the comp.lang.perl.misc newsgroup and the perl bug
2815       database at http://bugs.perl.org/ .  There may also be information at
2816       http://www.perl.com/ , the Perl Home Page.
2817
2818       If you believe you have an unreported bug, please run the perlbug pro‐
2819       gram included with your release.  Be sure to trim your bug down to a
2820       tiny but sufficient test case.  Your bug report, along with the output
2821       of "perl -V", will be sent off to perlbug@perl.org to be analysed by
2822       the Perl porting team.
2823

SEE ALSO

2825       The Changes file for exhaustive details on what changed.
2826
2827       The INSTALL file for how to build Perl.
2828
2829       The README file for general stuff.
2830
2831       The Artistic and Copying files for copyright information.
2832

HISTORY

2834       Written by Jarkko Hietaniemi <jhi@iki.fi>.
2835
2836
2837
2838perl v5.8.8                       2006-01-07                    PERL58DELTA(1)
Impressum