Debian Codegraph @

upstream/debian-unstable/man1/perl58delta.1

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