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