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