Debian Codegraph @

upstream/opensuse-tumbleweed/man1/perl58delta.1

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