Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / perl-5.8.0 / man / man1 / perldelta.1
CommitLineData
86530b38
AT
1.\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13
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 "PERLDELTA 1"
132.TH PERLDELTA 1 "2002-06-08" "perl v5.8.0" "Perl Programmers Reference Guide"
133.SH "NAME"
134perldelta \- 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, \s-1LANGUAGE\s0) look
465like you want to use \s-1UTF\-8\s0 (any of the the variables match \f(CW\*(C`/utf\-?8/i\*(C'\fR),
466your \s-1STDIN\s0, \s-1STDOUT\s0, \s-1STDERR\s0 handles and the default open layer
467(see open) are marked as \s-1UTF\-8\s0. (This feature, like other new
468features that combine Unicode and I/O, work only if you are using
469PerlIO, but that's the 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-1UTF8\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
674The \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\& print "%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("Smiley in Unicode: \ex{263a}");
970\& $decoded = decode_qp($encoded);
971.Ve
972.Sp
973.Vb 1
974\& print $encoded, "\en"; # "Smiley in Unicode: =263A"
975.Ve
976.Sp
977See also PerlIO::via::QuotedPrint.
978.IP "\(bu" 4
979\&\f(CW\*(C`NEXT\*(C'\fR, by Damian Conway, is a pseudo-class for method redispatch.
980See \s-1NEXT\s0.
981.IP "\(bu" 4
982\&\f(CW\*(C`open\*(C'\fR is a new pragma for setting the default I/O layers
983for \fIopen()\fR.
984.IP "\(bu" 4
985\&\f(CW\*(C`PerlIO::scalar\*(C'\fR, by Nick Ing\-Simmons, provides the implementation
986of \s-1IO\s0 to \*(L"in memory\*(R" Perl scalars as discussed above. It also serves
987as an example of a loadable PerlIO layer. Other future possibilities
988include PerlIO::Array and PerlIO::Code. See PerlIO::scalar.
989.IP "\(bu" 4
990\&\f(CW\*(C`PerlIO::via\*(C'\fR, by Nick Ing\-Simmons, acts as a PerlIO layer and wraps
991PerlIO layer functionality provided by a class (typically implemented
992in Perl code).
993.IP "\(bu" 4
994\&\f(CW\*(C`PerlIO::via::QuotedPrint\*(C'\fR, by Elizabeth Mattijsen, is an example
995of a \f(CW\*(C`PerlIO::via\*(C'\fR class:
996.Sp
997.Vb 2
998\& use PerlIO::via::QuotedPrint;
999\& open($fh,">:via(QuotedPrint)",$path);
1000.Ve
1001.Sp
1002This will automatically convert everything output to \f(CW$fh\fR to
1003Quoted\-Printable. See PerlIO::via and PerlIO::via::QuotedPrint.
1004.IP "\(bu" 4
1005\&\f(CW\*(C`Pod::ParseLink\*(C'\fR, by Russ Allbery, has been added,
1006to parse L\&<> links in pods as described in the new
1007perlpodspec.
1008.IP "\(bu" 4
1009\&\f(CW\*(C`Pod::Text::Overstrike\*(C'\fR, by Joe Smith, has been added.
1010It converts \s-1POD\s0 data to formatted overstrike text.
1011See Pod::Text::Overstrike. [561+]
1012.IP "\(bu" 4
1013\&\f(CW\*(C`Scalar::Util\*(C'\fR is a selection of general-utility scalar subroutines,
1014such as \fIblessed()\fR, \fIreftype()\fR, and \fItainted()\fR. See Scalar::Util.
1015.IP "\(bu" 4
1016\&\f(CW\*(C`sort\*(C'\fR is a new pragma for controlling the behaviour of \fIsort()\fR.
1017.IP "\(bu" 4
1018\&\f(CW\*(C`Storable\*(C'\fR gives persistence to Perl data structures by allowing the
1019storage and retrieval of Perl data to and from files in a fast and
1020compact binary format. Because in effect Storable does serialisation
1021of Perl data structures, with it you can also clone deep, hierarchical
1022datastructures. Storable was originally created by Raphael Manfredi,
1023but it is now maintained by Abhijit Menon\-Sen. Storable has been
1024enhanced to understand the two new hash features, Unicode keys and
1025restricted hashes. See Storable.
1026.IP "\(bu" 4
1027\&\f(CW\*(C`Switch\*(C'\fR, by Damian Conway, has been added. Just by saying
1028.Sp
1029.Vb 1
1030\& use Switch;
1031.Ve
1032.Sp
1033you have \f(CW\*(C`switch\*(C'\fR and \f(CW\*(C`case\*(C'\fR available in Perl.
1034.Sp
1035.Vb 1
1036\& use Switch;
1037.Ve
1038.Sp
1039.Vb 1
1040\& switch ($val) {
1041.Ve
1042.Sp
1043.Vb 11
1044\& case 1 { print "number 1" }
1045\& case "a" { print "string a" }
1046\& case [1..10,42] { print "number in list" }
1047\& case (@array) { print "number in list" }
1048\& case /\ew+/ { print "pattern" }
1049\& case qr/\ew+/ { print "pattern" }
1050\& case (%hash) { print "entry in hash" }
1051\& case (\e%hash) { print "entry in hash" }
1052\& case (\e&sub) { print "arg to subroutine" }
1053\& else { print "previous case not true" }
1054\& }
1055.Ve
1056.Sp
1057See Switch.
1058.IP "\(bu" 4
1059\&\f(CW\*(C`Test::More\*(C'\fR, by Michael Schwern, is yet another framework for writing
1060test scripts, more extensive than Test::Simple. See Test::More.
1061.IP "\(bu" 4
1062\&\f(CW\*(C`Test::Simple\*(C'\fR, by Michael Schwern, has basic utilities for writing
1063tests. See Test::Simple.
1064.IP "\(bu" 4
1065\&\f(CW\*(C`Text::Balanced\*(C'\fR, by Damian Conway, has been added, for extracting
1066delimited text sequences from strings.
1067.Sp
1068.Vb 1
1069\& use Text::Balanced 'extract_delimited';
1070.Ve
1071.Sp
1072.Vb 1
1073\& ($a, $b) = extract_delimited("'never say never', he never said", "'", '');
1074.Ve
1075.Sp
1076$a will be \*(L"'never say never'\*(R", \f(CW$b\fR will be ', he never said'.
1077.Sp
1078In addition to \fIextract_delimited()\fR, there are also \fIextract_bracketed()\fR,
1079\&\fIextract_quotelike()\fR, \fIextract_codeblock()\fR, \fIextract_variable()\fR,
1080\&\fIextract_tagged()\fR, \fIextract_multiple()\fR, \fIgen_delimited_pat()\fR, and
1081\&\fIgen_extract_tagged()\fR. With these, you can implement rather advanced
1082parsing algorithms. See Text::Balanced.
1083.IP "\(bu" 4
1084\&\f(CW\*(C`threads\*(C'\fR, by Arthur Bergman, is an interface to interpreter threads.
1085Interpreter threads (ithreads) is the new thread model introduced in
1086Perl 5.6 but only available as an internal interface for extension
1087writers (and for Win32 Perl for \f(CW\*(C`fork()\*(C'\fR emulation). See threads,
1088threads::shared, and perlthrtut.
1089.IP "\(bu" 4
1090\&\f(CW\*(C`threads::shared\*(C'\fR, by Arthur Bergman, allows data sharing for
1091interpreter threads. See threads::shared.
1092.IP "\(bu" 4
1093\&\f(CW\*(C`Tie::File\*(C'\fR, by Mark-Jason Dominus, associates a Perl array with the
1094lines of a file. See Tie::File.
1095.IP "\(bu" 4
1096\&\f(CW\*(C`Tie::Memoize\*(C'\fR, by Ilya Zakharevich, provides on-demand loaded hashes.
1097See Tie::Memoize.
1098.IP "\(bu" 4
1099\&\f(CW\*(C`Tie::RefHash::Nestable\*(C'\fR, by Edward Avis, allows storing hash
1100references (unlike the standard Tie::RefHash) The module is contained
1101within Tie::RefHash. See Tie::RefHash.
1102.IP "\(bu" 4
1103\&\f(CW\*(C`Time::HiRes\*(C'\fR, by Douglas E. Wegscheid, provides high resolution
1104timing (ualarm, usleep, and gettimeofday). See Time::HiRes.
1105.IP "\(bu" 4
1106\&\f(CW\*(C`Unicode::UCD\*(C'\fR offers a querying interface to the Unicode Character
1107Database. See Unicode::UCD.
1108.IP "\(bu" 4
1109\&\f(CW\*(C`Unicode::Collate\*(C'\fR, by \s-1SADAHIRO\s0 Tomoyuki, implements the \s-1UCA\s0
1110(Unicode Collation Algorithm) for sorting Unicode strings.
1111See Unicode::Collate.
1112.IP "\(bu" 4
1113\&\f(CW\*(C`Unicode::Normalize\*(C'\fR, by \s-1SADAHIRO\s0 Tomoyuki, implements the various
1114Unicode normalization forms. See Unicode::Normalize.
1115.IP "\(bu" 4
1116\&\f(CW\*(C`XS::APItest\*(C'\fR, by Tim Jenness, is a test extension that exercises \s-1XS\s0
1117APIs. Currently only \f(CW\*(C`printf()\*(C'\fR is tested: how to output various
1118basic data types from \s-1XS\s0.
1119.IP "\(bu" 4
1120\&\f(CW\*(C`XS::Typemap\*(C'\fR, by Tim Jenness, is a test extension that exercises
1121\&\s-1XS\s0 typemaps. Nothing gets installed, but the code is worth studying
1122for extension writers.
1123.Sh "Updated And Improved Modules and Pragmata"
1124.IX Subsection "Updated And Improved Modules and Pragmata"
1125.IP "\(bu" 4
1126The following independently supported modules have been updated to the
1127newest versions from \s-1CPAN:\s0 \s-1CGI\s0, \s-1CPAN\s0, DB_File, File::Spec, File::Temp,
1128Getopt::Long, Math::BigFloat, Math::BigInt, the podlators bundle
1129(Pod::Man, Pod::Text), Pod::LaTeX [561+], Pod::Parser, Storable,
1130Term::ANSIColor, Test, Text\-Tabs+Wrap.
1131.IP "\(bu" 4
1132\&\fIattributes::reftype()\fR now works on tied arguments.
1133.IP "\(bu" 4
1134AutoLoader can now be disabled with \f(CW\*(C`no AutoLoader;\*(C'\fR.
1135.IP "\(bu" 4
1136B::Deparse has been significantly enhanced by Robin Houston. It can
1137now deparse almost all of the standard test suite (so that the tests
1138still succeed). There is a make target \*(L"test.deparse\*(R" for trying this
1139out.
1140.IP "\(bu" 4
1141Carp now has better interface documentation, and the \f(CW@CARP_NOT\fR
1142interface has been added to get optional control over where errors
1143are reported independently of \f(CW@ISA\fR, by Ben Tilly.
1144.IP "\(bu" 4
1145Class::Struct can now define the classes in compile time.
1146.IP "\(bu" 4
1147Class::Struct now assigns the array/hash element if the accessor
1148is called with an array/hash element as the \fBsole\fR argument.
1149.IP "\(bu" 4
1150The return value of \fICwd::fastcwd()\fR is now tainted.
1151.IP "\(bu" 4
1152Data::Dumper now has an option to sort hashes.
1153.IP "\(bu" 4
1154Data::Dumper now has an option to dump code references
1155using B::Deparse.
1156.IP "\(bu" 4
1157DB_File now supports newer Berkeley \s-1DB\s0 versions, among
1158other improvements.
1159.IP "\(bu" 4
1160Devel::Peek now has an interface for the Perl memory statistics
1161(this works only if you are using perl's malloc, and if you have
1162compiled with debugging).
1163.IP "\(bu" 4
1164The English module can now be used without the infamous performance
1165hit by saying
1166.Sp
1167.Vb 1
1168\& use English '-no_match_vars';
1169.Ve
1170.Sp
1171(Assuming, of course, that you don't need the troublesome variables
1172\&\f(CW$`\fR, \f(CW$&\fR, or \f(CW$'\fR.) Also, introduced \f(CW@LAST_MATCH_START\fR and
1173\&\f(CW@LAST_MATCH_END\fR English aliases for \f(CW\*(C`@\-\*(C'\fR and \f(CW\*(C`@+\*(C'\fR.
1174.IP "\(bu" 4
1175ExtUtils::MakeMaker has been significantly cleaned up and fixed.
1176The enhanced version has also been backported to earlier releases
1177of Perl and submitted to \s-1CPAN\s0 so that the earlier releases can
1178enjoy the fixes.
1179.IP "\(bu" 4
1180The arguments of \fIWriteMakefile()\fR in Makefile.PL are now checked
1181for sanity much more carefully than before. This may cause new
1182warnings when modules are being installed. See ExtUtils::MakeMaker
1183for more details.
1184.IP "\(bu" 4
1185ExtUtils::MakeMaker now uses File::Spec internally, which hopefully
1186leads to better portability.
1187.IP "\(bu" 4
1188Fcntl, Socket, and Sys::Syslog have been rewritten by Nicholas Clark
1189to use the new-style constant dispatch section (see ExtUtils::Constant).
1190This means that they will be more robust and hopefully faster.
1191.IP "\(bu" 4
1192File::Find now \fIchdir()\fRs correctly when chasing symbolic links. [561]
1193.IP "\(bu" 4
1194File::Find now has pre\- and post-processing callbacks. It also
1195correctly changes directories when chasing symbolic links. Callbacks
1196(naughtily) exiting with \*(L"next;\*(R" instead of \*(L"return;\*(R" now work.
1197.IP "\(bu" 4
1198File::Find is now (again) reentrant. It also has been made
1199more portable.
1200.IP "\(bu" 4
1201The warnings issued by File::Find now belong to their own category.
1202You can enable/disable them with \f(CW\*(C`use/no warnings 'File::Find';\*(C'\fR.
1203.IP "\(bu" 4
1204\&\fIFile::Glob::glob()\fR has been renamed to \fIFile::Glob::bsd_glob()\fR
1205because the name clashes with the builtin \fIglob()\fR. The older
1206name is still available for compatibility, but is deprecated. [561]
1207.IP "\(bu" 4
1208File::Glob now supports \f(CW\*(C`GLOB_LIMIT\*(C'\fR constant to limit the size of
1209the returned list of filenames.
1210.IP "\(bu" 4
1211IPC::Open3 now allows the use of numeric file descriptors.
1212.IP "\(bu" 4
1213IO::Socket now has an \fIatmark()\fR method, which returns true if the socket
1214is positioned at the out-of-band mark. The method is also exportable
1215as a \fIsockatmark()\fR function.
1216.IP "\(bu" 4
1217IO::Socket::INET failed to open the specified port if the service name
1218was not known. It now correctly uses the supplied port number as is. [561]
1219.IP "\(bu" 4
1220IO::Socket::INET has support for the ReusePort option (if your
1221platform supports it). The Reuse option now has an alias, ReuseAddr.
1222For clarity, you may want to prefer ReuseAddr.
1223.IP "\(bu" 4
1224IO::Socket::INET now supports a value of zero for \f(CW\*(C`LocalPort\*(C'\fR
1225(usually meaning that the operating system will make one up.)
1226.IP "\(bu" 4
1227\&'use lib' now works identically to \f(CW@INC\fR. Removing directories
1228with 'no lib' now works.
1229.IP "\(bu" 4
1230Math::BigFloat and Math::BigInt have undergone a full rewrite by Tels.
1231They are now magnitudes faster, and they support various bignum
1232libraries such as \s-1GMP\s0 and \s-1PARI\s0 as their backends.
1233.IP "\(bu" 4
1234Math::Complex handles inf, NaN etc., better.
1235.IP "\(bu" 4
1236Net::Ping has been considerably enhanced by Rob Brown: multihoming is
1237now supported, Win32 functionality is better, there is now time
1238measuring functionality (optionally high-resolution using
1239Time::HiRes), and there is now \*(L"external\*(R" protocol which uses
1240Net::Ping::External module which runs your external ping utility and
1241parses the output. A version of Net::Ping::External is available in
1242\&\s-1CPAN\s0.
1243.Sp
1244Note that some of the Net::Ping tests are disabled when running
1245under the Perl distribution since one cannot assume one or more
1246of the following: enabled echo port at localhost, full Internet
1247connectivity, or sympathetic firewalls. You can set the environment
1248variable PERL_TEST_Net_Ping to \*(L"1\*(R" (one) before running the Perl test
1249suite to enable all the Net::Ping tests.
1250.IP "\(bu" 4
1251\&\fIPOSIX::sigaction()\fR is now much more flexible and robust.
1252You can now install coderef handlers, '\s-1DEFAULT\s0', and '\s-1IGNORE\s0'
1253handlers, installing new handlers was not atomic.
1254.IP "\(bu" 4
1255In Safe, \f(CW%INC\fR is now localised in a Safe compartment so that
1256use/require work.
1257.IP "\(bu" 4
1258In SDBM_File on dosish platforms, some keys went missing because of
1259lack of support for files with \*(L"holes\*(R". A workaround for the problem
1260has been added.
1261.IP "\(bu" 4
1262In Search::Dict one can now have a pre-processing hook for the
1263lines being searched.
1264.IP "\(bu" 4
1265The Shell module now has an \s-1OO\s0 interface.
1266.IP "\(bu" 4
1267In Sys::Syslog there is now a failover mechanism that will go
1268through alternative connection mechanisms until the message
1269is successfully logged.
1270.IP "\(bu" 4
1271The Test module has been significantly enhanced.
1272.IP "\(bu" 4
1273\&\fITime::Local::timelocal()\fR does not handle fractional seconds anymore.
1274The rationale is that neither does \fIlocaltime()\fR, and \fItimelocal()\fR and
1275\&\fIlocaltime()\fR are supposed to be inverses of each other.
1276.IP "\(bu" 4
1277The vars pragma now supports declaring fully qualified variables.
1278(Something that \f(CW\*(C`our()\*(C'\fR does not and will not support.)
1279.IP "\(bu" 4
1280The \f(CW\*(C`utf8::\*(C'\fR name space (as in the pragma) provides various
1281Perl-callable functions to provide low level access to Perl's
1282internal Unicode representation. At the moment only \fIlength()\fR
1283has been implemented.
1284.SH "Utility Changes"
1285.IX Header "Utility Changes"
1286.IP "\(bu" 4
1287Emacs perl mode (emacs/cperl\-mode.el) has been updated to version
12884.31.
1289.IP "\(bu" 4
1290\&\fIemacs/e2ctags.pl\fR is now much faster.
1291.IP "\(bu" 4
1292\&\f(CW\*(C`enc2xs\*(C'\fR is a tool for people adding their own encodings to the
1293Encode module.
1294.IP "\(bu" 4
1295\&\f(CW\*(C`h2ph\*(C'\fR now supports C trigraphs.
1296.IP "\(bu" 4
1297\&\f(CW\*(C`h2xs\*(C'\fR now produces a template \s-1README\s0.
1298.IP "\(bu" 4
1299\&\f(CW\*(C`h2xs\*(C'\fR now uses \f(CW\*(C`Devel::PPPort\*(C'\fR for better portability between
1300different versions of Perl.
1301.IP "\(bu" 4
1302\&\f(CW\*(C`h2xs\*(C'\fR uses the new ExtUtils::Constant module
1303which will affect newly created extensions that define constants.
1304Since the new code is more correct (if you have two constants where the
1305first one is a prefix of the second one, the first constant \fBnever\fR
1306got defined), less lossy (it uses integers for integer constant,
1307as opposed to the old code that used floating point numbers even for
1308integer constants), and slightly faster, you might want to consider
1309regenerating your extension code (the new scheme makes regenerating
1310easy). h2xs now also supports C trigraphs.
1311.IP "\(bu" 4
1312\&\f(CW\*(C`libnetcfg\*(C'\fR has been added to configure libnet.
1313.IP "\(bu" 4
1314\&\f(CW\*(C`perlbug\*(C'\fR is now much more robust. It also sends the bug report to
1315perl.org, not perl.com.
1316.IP "\(bu" 4
1317\&\f(CW\*(C`perlcc\*(C'\fR has been rewritten and its user interface (that is,
1318command line) is much more like that of the \s-1UNIX\s0 C compiler, cc.
1319(The perlbc tools has been removed. Use \f(CW\*(C`perlcc \-B\*(C'\fR instead.)
1320\&\fBNote that perlcc is still considered very experimental and
1321unsupported.\fR [561]
1322.IP "\(bu" 4
1323\&\f(CW\*(C`perlivp\*(C'\fR is a new Installation Verification Procedure utility
1324for running any time after installing Perl.
1325.IP "\(bu" 4
1326\&\f(CW\*(C`piconv\*(C'\fR is an implementation of the character conversion utility
1327\&\f(CW\*(C`iconv\*(C'\fR, demonstrating the new Encode module.
1328.IP "\(bu" 4
1329\&\f(CW\*(C`pod2html\*(C'\fR now allows specifying a cache directory.
1330.IP "\(bu" 4
1331\&\f(CW\*(C`pod2html\*(C'\fR now produces \s-1XHTML\s0 1.0.
1332.IP "\(bu" 4
1333\&\f(CW\*(C`pod2html\*(C'\fR now understands \s-1POD\s0 written using different line endings
1334(PC\-like \s-1CRLF\s0 versus UNIX-like \s-1LF\s0 versus MacClassic-like \s-1CR\s0).
1335.IP "\(bu" 4
1336\&\f(CW\*(C`s2p\*(C'\fR has been completely rewritten in Perl. (It is in fact a full
1337implementation of sed in Perl: you can use the sed functionality by
1338using the \f(CW\*(C`psed\*(C'\fR utility.)
1339.IP "\(bu" 4
1340\&\f(CW\*(C`xsubpp\*(C'\fR now understands \s-1POD\s0 documentation embedded in the *.xs
1341files. [561]
1342.IP "\(bu" 4
1343\&\f(CW\*(C`xsubpp\*(C'\fR now supports the \s-1OUT\s0 keyword.
1344.SH "New Documentation"
1345.IX Header "New Documentation"
1346.IP "\(bu" 4
1347perl56delta details the changes between the 5.005 release and the
13485.6.0 release.
1349.IP "\(bu" 4
1350perlclib documents the internal replacements for standard C library
1351functions. (Interesting only for extension writers and Perl core
1352hackers.) [561+]
1353.IP "\(bu" 4
1354perldebtut is a Perl debugging tutorial. [561+]
1355.IP "\(bu" 4
1356perlebcdic contains considerations for running Perl on \s-1EBCDIC\s0
1357platforms. [561+]
1358.IP "\(bu" 4
1359perlintro is a gentle introduction to Perl.
1360.IP "\(bu" 4
1361perliol documents the internals of PerlIO with layers.
1362.IP "\(bu" 4
1363perlmodstyle is a style guide for writing modules.
1364.IP "\(bu" 4
1365perlnewmod tells about writing and submitting a new module. [561+]
1366.IP "\(bu" 4
1367perlpacktut is a \fIpack()\fR tutorial.
1368.IP "\(bu" 4
1369perlpod has been rewritten to be clearer and to record the best
1370practices gathered over the years.
1371.IP "\(bu" 4
1372perlpodspec is a more formal specification of the pod format,
1373mainly of interest for writers of pod applications, not to
1374people writing in pod.
1375.IP "\(bu" 4
1376perlretut is a regular expression tutorial. [561+]
1377.IP "\(bu" 4
1378perlrequick is a regular expressions quick-start guide.
1379Yes, much quicker than perlretut. [561]
1380.IP "\(bu" 4
1381perltodo has been updated.
1382.IP "\(bu" 4
1383perltootc has been renamed as perltooc (to not to conflict
1384with perltoot in filesystems restricted to \*(L"8.3\*(R" names).
1385.IP "\(bu" 4
1386perluniintro is an introduction to using Unicode in Perl.
1387(perlunicode is more of a detailed reference and background
1388information)
1389.IP "\(bu" 4
1390perlutil explains the command line utilities packaged with the Perl
1391distribution. [561+]
1392.PP
1393The following platform-specific documents are available before
1394the installation as \s-1README\s0.\fIplatform\fR, and after the installation
1395as perl\fIplatform\fR:
1396.PP
1397.Vb 5
1398\& perlaix perlamiga perlapollo perlbeos perlbs2000
1399\& perlce perlcygwin perldgux perldos perlepoc perlfreebsd perlhpux
1400\& perlhurd perlirix perlmachten perlmacos perlmint perlmpeix
1401\& perlnetware perlos2 perlos390 perlplan9 perlqnx perlsolaris
1402\& perltru64 perluts perlvmesa perlvms perlvos perlwin32
1403.Ve
1404.PP
1405These documents usually detail one or more of the following subjects:
1406configuring, building, testing, installing, and sometimes also using
1407Perl on the said platform.
1408.PP
1409Eastern Asian Perl users are now welcomed in their own languages:
1410\&\s-1README\s0.jp (Japanese), \s-1README\s0.ko (Korean), \s-1README\s0.cn (simplified
1411Chinese) and \s-1README\s0.tw (traditional Chinese), which are written in
1412normal pod but encoded in \s-1EUC\-JP\s0, \s-1EUC\-KR\s0, EUC-CN and Big5. These
1413will get installed as
1414.PP
1415.Vb 1
1416\& perljp perlko perlcn perltw
1417.Ve
1418.IP "\(bu" 4
1419The documentation for the POSIX-BC platform is called \*(L"\s-1BS2000\s0\*(R", to avoid
1420confusion with the Perl \s-1POSIX\s0 module.
1421.IP "\(bu" 4
1422The documentation for the WinCE platform is called perlce (\s-1README\s0.ce
1423in the source code kit), to avoid confusion with the perlwin32
1424documentation on 8.3\-restricted filesystems.
1425.SH "Performance Enhancements"
1426.IX Header "Performance Enhancements"
1427.IP "\(bu" 4
1428\&\fImap()\fR could get pathologically slow when the result list it generates
1429is larger than the source list. The performance has been improved for
1430common scenarios. [561]
1431.IP "\(bu" 4
1432\&\fIsort()\fR is also fully reentrant, in the sense that the sort function
1433can itself call \fIsort()\fR. This did not work reliably in previous
1434releases. [561]
1435.IP "\(bu" 4
1436\&\fIsort()\fR has been changed to use primarily mergesort internally as
1437opposed to the earlier quicksort. For very small lists this may
1438result in slightly slower sorting times, but in general the speedup
1439should be at least 20%. Additional bonuses are that the worst case
1440behaviour of \fIsort()\fR is now better (in computer science terms it now
1441runs in time O(N log N), as opposed to quicksort's Theta(N**2)
1442worst-case run time behaviour), and that \fIsort()\fR is now stable
1443(meaning that elements with identical keys will stay ordered as they
1444were before the sort). See the \f(CW\*(C`sort\*(C'\fR pragma for information.
1445.Sp
1446The story in more detail: suppose you want to serve yourself a little
1447slice of Pi.
1448.Sp
1449.Vb 1
1450\& @digits = ( 3,1,4,1,5,9 );
1451.Ve
1452.Sp
1453A numerical sort of the digits will yield (1,1,3,4,5,9), as expected.
1454Which \f(CW1\fR comes first is hard to know, since one \f(CW1\fR looks pretty
1455much like any other. You can regard this as totally trivial,
1456or somewhat profound. However, if you just want to sort the even
1457digits ahead of the odd ones, then what will
1458.Sp
1459.Vb 1
1460\& sort { ($a % 2) <=> ($b % 2) } @digits;
1461.Ve
1462.Sp
1463yield? The only even digit, \f(CW4\fR, will come first. But how about
1464the odd numbers, which all compare equal? With the quicksort algorithm
1465used to implement Perl 5.6 and earlier, the order of ties is left up
1466to the sort. So, as you add more and more digits of Pi, the order
1467in which the sorted even and odd digits appear will change.
1468and, for sufficiently large slices of Pi, the quicksort algorithm
1469in Perl 5.8 won't return the same results even if reinvoked with the
1470same input. The justification for this rests with quicksort's
1471worst case behavior. If you run
1472.Sp
1473.Vb 1
1474\& sort { $a <=> $b } ( 1 .. $N , 1 .. $N );
1475.Ve
1476.Sp
1477(something you might approximate if you wanted to merge two sorted
1478arrays using sort), doubling \f(CW$N\fR doesn't just double the quicksort time,
1479it \fIquadruples\fR it. Quicksort has a worst case run time that can
1480grow like N**2, so-called \fIquadratic\fR behaviour, and it can happen
1481on patterns that may well arise in normal use. You won't notice this
1482for small arrays, but you \fIwill\fR notice it with larger arrays,
1483and you may not live long enough for the sort to complete on arrays
1484of a million elements. So the 5.8 quicksort scrambles large arrays
1485before sorting them, as a statistical defence against quadratic behaviour.
1486But that means if you sort the same large array twice, ties may be
1487broken in different ways.
1488.Sp
1489Because of the unpredictability of tie-breaking order, and the quadratic
1490worst-case behaviour, quicksort was \fIalmost\fR replaced completely with
1491a stable mergesort. \fIStable\fR means that ties are broken to preserve
1492the original order of appearance in the input array. So
1493.Sp
1494.Vb 1
1495\& sort { ($a % 2) <=> ($b % 2) } (3,1,4,1,5,9);
1496.Ve
1497.Sp
1498will yield (4,3,1,1,5,9), guaranteed. The even and odd numbers
1499appear in the output in the same order they appeared in the input.
1500Mergesort has worst case O(N log N) behaviour, the best value
1501attainable. And, ironically, this mergesort does particularly
1502well where quicksort goes quadratic: mergesort sorts (1..$N, 1..$N)
1503in O(N) time. But quicksort was rescued at the last moment because
1504it is faster than mergesort on certain inputs and platforms.
1505For example, if you really \fIdon't\fR care about the order of even
1506and odd digits, quicksort will run in O(N) time; it's very good
1507at sorting many repetitions of a small number of distinct elements.
1508The quicksort divide and conquer strategy works well on platforms
1509with relatively small, very fast, caches. Eventually, the problem gets
1510whittled down to one that fits in the cache, from which point it
1511benefits from the increased memory speed.
1512.Sp
1513Quicksort was rescued by implementing a sort pragma to control aspects
1514of the sort. The \fBstable\fR subpragma forces stable behaviour,
1515regardless of algorithm. The \fB_quicksort\fR and \fB_mergesort\fR
1516subpragmas are heavy-handed ways to select the underlying implementation.
1517The leading \f(CW\*(C`_\*(C'\fR is a reminder that these subpragmas may not survive
1518beyond 5.8. More appropriate mechanisms for selecting the implementation
1519exist, but they wouldn't have arrived in time to save quicksort.
1520.IP "\(bu" 4
1521Hashes now use Bob Jenkins \*(L"One\-at\-a\-Time\*(R" hashing key algorithm
1522( http://burtleburtle.net/bob/hash/doobs.html ). This algorithm is
1523reasonably fast while producing a much better spread of values than
1524the old hashing algorithm (originally by Chris Torek, later tweaked by
1525Ilya Zakharevich). Hash values output from the algorithm on a hash of
1526all 3\-char printable \s-1ASCII\s0 keys comes much closer to passing the
1527\&\s-1DIEHARD\s0 random number generation tests. According to perlbench, this
1528change has not affected the overall speed of Perl.
1529.IP "\(bu" 4
1530\&\fIunshift()\fR should now be noticeably faster.
1531.SH "Installation and Configuration Improvements"
1532.IX Header "Installation and Configuration Improvements"
1533.Sh "Generic Improvements"
1534.IX Subsection "Generic Improvements"
1535.IP "\(bu" 4
1536\&\s-1INSTALL\s0 now explains how you can configure Perl to use 64\-bit
1537integers even on non\-64\-bit platforms.
1538.IP "\(bu" 4
1539Policy.sh policy change: if you are reusing a Policy.sh file
1540(see \s-1INSTALL\s0) and you use Configure \-Dprefix=/foo/bar and in the old
1541Policy \f(CW$prefix\fR eq \f(CW$siteprefix\fR and \f(CW$prefix\fR eq \f(CW$vendorprefix\fR, all of
1542them will now be changed to the new prefix, /foo/bar. (Previously
1543only \f(CW$prefix\fR changed.) If you do not like this new behaviour,
1544specify prefix, siteprefix, and vendorprefix explicitly.
1545.IP "\(bu" 4
1546A new optional location for Perl libraries, otherlibdirs, is available.
1547It can be used for example for vendor add-ons without disturbing Perl's
1548own library directories.
1549.IP "\(bu" 4
1550In many platforms, the vendor-supplied 'cc' is too stripped-down to
1551build Perl (basically, 'cc' doesn't do \s-1ANSI\s0 C). If this seems
1552to be the case and 'cc' does not seem to be the \s-1GNU\s0 C compiler
1553\&'gcc', an automatic attempt is made to find and use 'gcc' instead.
1554.IP "\(bu" 4
1555gcc needs to closely track the operating system release to avoid
1556build problems. If Configure finds that gcc was built for a different
1557operating system release than is running, it now gives a clearly visible
1558warning that there may be trouble ahead.
1559.IP "\(bu" 4
1560Since Perl 5.8 is not binary-compatible with previous releases
1561of Perl, Configure no longer suggests including the 5.005
1562modules in \f(CW@INC\fR.
1563.IP "\(bu" 4
1564Configure \f(CW\*(C`\-S\*(C'\fR can now run non\-interactively. [561]
1565.IP "\(bu" 4
1566Configure support for pdp11\-style memory models has been removed due
1567to obsolescence. [561]
1568.IP "\(bu" 4
1569configure.gnu now works with options with whitespace in them.
1570.IP "\(bu" 4
1571installperl now outputs everything to \s-1STDERR\s0.
1572.IP "\(bu" 4
1573Because PerlIO is now the default on most platforms, \*(L"\-perlio\*(R" doesn't
1574get appended to the \f(CW$Config\fR{archname} (also known as $^O) anymore.
1575Instead, if you explicitly choose not to use perlio (Configure command
1576line option \-Uuseperlio), you will get \*(L"\-stdio\*(R" appended.
1577.IP "\(bu" 4
1578Another change related to the architecture name is that \*(L"\-64all\*(R"
1579(\-Duse64bitall, or \*(L"maximally 64\-bit\*(R") is appended only if your
1580pointers are 64 bits wide. (To be exact, the use64bitall is ignored.)
1581.IP "\(bu" 4
1582In \s-1AFS\s0 installations, one can configure the root of the \s-1AFS\s0 to be
1583somewhere else than the default \fI/afs\fR by using the Configure
1584parameter \f(CW\*(C`\-Dafsroot=/some/where/else\*(C'\fR.
1585.IP "\(bu" 4
1586\&\s-1APPLLIB_EXP\s0, a lesser-known configuration-time definition, has been
1587documented. It can be used to prepend site-specific directories
1588to Perl's default search path (@INC); see \s-1INSTALL\s0 for information.
1589.IP "\(bu" 4
1590The version of Berkeley \s-1DB\s0 used when the Perl (and, presumably, the
1591DB_File extension) was built is now available as
1592\&\f(CW@Config{qw(db_version_major db_version_minor db_version_patch)}\fR
1593from Perl and as \f(CW\*(C`DB_VERSION_MAJOR_CFG DB_VERSION_MINOR_CFG
1594DB_VERSION_PATCH_CFG\*(C'\fR from C.
1595.IP "\(bu" 4
1596Building Berkeley \s-1DB3\s0 for compatibility modes for \s-1DB\s0, \s-1NDBM\s0, and \s-1ODBM\s0
1597has been documented in \s-1INSTALL\s0.
1598.IP "\(bu" 4
1599If you have \s-1CPAN\s0 access (either network or a local copy such as a
1600\&\s-1CD\-ROM\s0) you can during specify extra modules to Configure to build and
1601install with Perl using the \-Dextras=... option. See \s-1INSTALL\s0 for
1602more details.
1603.IP "\(bu" 4
1604In addition to config.over, a new override file, config.arch, is
1605available. This file is supposed to be used by hints file writers
1606for architecture-wide changes (as opposed to config.over which is
1607for site-wide changes).
1608.IP "\(bu" 4
1609If your file system supports symbolic links, you can build Perl outside
1610of the source directory by
1611.Sp
1612.Vb 3
1613\& mkdir /tmp/perl/build/directory
1614\& cd /tmp/perl/build/directory
1615\& sh /path/to/perl/source/Configure -Dmksymlinks ...
1616.Ve
1617.Sp
1618This will create in /tmp/perl/build/directory a tree of symbolic links
1619pointing to files in /path/to/perl/source. The original files are left
1620unaffected. After Configure has finished, you can just say
1621.Sp
1622.Vb 1
1623\& make all test
1624.Ve
1625.Sp
1626and Perl will be built and tested, all in /tmp/perl/build/directory.
1627[561]
1628.IP "\(bu" 4
1629For Perl developers, several new make targets for profiling
1630and debugging have been added; see perlhack.
1631.RS 4
1632.IP "\(bu" 8
1633Use of the \fIgprof\fR tool to profile Perl has been documented in
1634perlhack. There is a make target called \*(L"perl.gprof\*(R" for
1635generating a gprofiled Perl executable.
1636.IP "\(bu" 8
1637If you have \s-1GCC\s0 3, there is a make target called \*(L"perl.gcov\*(R" for
1638creating a gcoved Perl executable for coverage analysis. See
1639perlhack.
1640.IP "\(bu" 8
1641If you are on \s-1IRIX\s0 or Tru64 platforms, new profiling/debugging options
1642have been added; see perlhack for more information about pixie and
1643Third Degree.
1644.RE
1645.RS 4
1646.RE
1647.IP "\(bu" 4
1648Guidelines of how to construct minimal Perl installations have
1649been added to \s-1INSTALL\s0.
1650.IP "\(bu" 4
1651The Thread extension is now not built at all under ithreads
1652(\f(CW\*(C`Configure \-Duseithreads\*(C'\fR) because it wouldn't work anyway (the
1653Thread extension requires being Configured with \f(CW\*(C`\-Duse5005threads\*(C'\fR).
1654.Sp
1655\&\fBNote that the 5.005 threads are unsupported and deprecated: if you
1656have code written for the old threads you should migrate it to the
1657new ithreads model.\fR
1658.IP "\(bu" 4
1659The Gconvert macro ($Config{d_Gconvert}) used by perl for stringifying
1660floating-point numbers is now more picky about using sprintf %.*g
1661rules for the conversion. Some platforms that used to use gcvt may
1662now resort to the slower sprintf.
1663.IP "\(bu" 4
1664The obsolete method of making a special (e.g., debugging) flavor
1665of perl by saying
1666.Sp
1667.Vb 1
1668\& make LIBPERL=libperld.a
1669.Ve
1670.Sp
1671has been removed. Use \-DDEBUGGING instead.
1672.Sh "New Or Improved Platforms"
1673.IX Subsection "New Or Improved Platforms"
1674For the list of platforms known to support Perl,
1675see \*(L"Supported Platforms\*(R" in perlport.
1676.IP "\(bu" 4
1677\&\s-1AIX\s0 dynamic loading should be now better supported.
1678.IP "\(bu" 4
1679\&\s-1AIX\s0 should now work better with gcc, threads, and 64\-bitness. Also the
1680long doubles support in \s-1AIX\s0 should be better now. See perlaix.
1681.IP "\(bu" 4
1682AtheOS ( http://www.atheos.cx/ ) is a new platform.
1683.IP "\(bu" 4
1684BeOS has been reclaimed.
1685.IP "\(bu" 4
1686The \s-1DG/UX\s0 platform now supports 5.005\-style threads.
1687See perldgux.
1688.IP "\(bu" 4
1689The DYNIX/ptx platform (also known as dynixptx) is supported at or
1690near osvers 4.5.2.
1691.IP "\(bu" 4
1692\&\s-1EBCDIC\s0 platforms (z/OS (also known as \s-1OS/390\s0), \s-1POSIX\-BC\s0, and \s-1VM/ESA\s0)
1693have been regained. Many test suite tests still fail and the
1694co-existence of Unicode and \s-1EBCDIC\s0 isn't quite settled, but the
1695situation is much better than with Perl 5.6. See perlos390,
1696perlbs2000 (for \s-1POSIX\-BC\s0), and perlvmesa for more information.
1697.IP "\(bu" 4
1698Building perl with \-Duseithreads or \-Duse5005threads now works under
1699HP-UX 10.20 (previously it only worked under 10.30 or later). You will
1700need a thread library package installed. See \s-1README\s0.hpux. [561]
1701.IP "\(bu" 4
1702Mac \s-1OS\s0 Classic is now supported in the mainstream source package
1703(MacPerl has of course been available since perl 5.004 but now the
1704source code bases of standard Perl and MacPerl have been synchronised)
1705[561]
1706.IP "\(bu" 4
1707Mac \s-1OS\s0 X (or Darwin) should now be able to build Perl even on \s-1HFS+\s0
1708filesystems. (The case-insensitivity used to confuse the Perl build
1709process.)
1710.IP "\(bu" 4
1711\&\s-1NCR\s0 MP-RAS is now supported. [561]
1712.IP "\(bu" 4
1713All the NetBSD specific patches (except for the installation
1714specific ones) have been merged back to the main distribution.
1715.IP "\(bu" 4
1716NetWare from Novell is now supported. See perlnetware.
1717.IP "\(bu" 4
1718NonStop-UX is now supported. [561]
1719.IP "\(bu" 4
1720\&\s-1NEC\s0 SUPER-UX is now supported.
1721.IP "\(bu" 4
1722All the OpenBSD specific patches (except for the installation
1723specific ones) have been merged back to the main distribution.
1724.IP "\(bu" 4
1725Perl has been tested with the \s-1GNU\s0 pth userlevel thread package
1726( http://www.gnu.org/software/pth/pth.html ). All thread tests
1727of Perl now work, but not without adding some \fIyield()\fRs to the tests,
1728so while pth (and other userlevel thread implementations) can be
1729considered to be \*(L"working\*(R" with Perl ithreads, keep in mind the
1730possible non-preemptability of the underlying thread implementation.
1731.IP "\(bu" 4
1732Stratus \s-1VOS\s0 is now supported using Perl's native build method
1733(Configure). This is the recommended method to build Perl on
1734\&\s-1VOS\s0. The older methods, which build miniperl, are still
1735available. See perlvos. [561+]
1736.IP "\(bu" 4
1737The Amdahl \s-1UTS\s0 \s-1UNIX\s0 mainframe platform is now supported. [561]
1738.IP "\(bu" 4
1739WinCE is now supported. See perlce.
1740.IP "\(bu" 4
1741z/OS (formerly known as \s-1OS/390\s0, formerly known as \s-1MVS\s0 \s-1OE\s0) now has
1742support for dynamic loading. This is not selected by default,
1743however, you must specify \-Dusedl in the arguments of Configure. [561]
1744.SH "Selected Bug Fixes"
1745.IX Header "Selected Bug Fixes"
1746Numerous memory leaks and uninitialized memory accesses have been
1747hunted down. Most importantly, anonymous subs used to leak quite
1748a bit. [561]
1749.IP "\(bu" 4
1750The autouse pragma didn't work for Multi::Part::Function::Names.
1751.IP "\(bu" 4
1752\&\fIcaller()\fR could cause core dumps in certain situations. Carp was
1753sometimes affected by this problem. In particular, \fIcaller()\fR now
1754returns a subroutine name of \f(CW\*(C`(unknown)\*(C'\fR for subroutines that have
1755been removed from the symbol table.
1756.IP "\(bu" 4
1757chop(@list) in list context returned the characters chopped in
1758reverse order. This has been reversed to be in the right order. [561]
1759.IP "\(bu" 4
1760Configure no longer includes the \s-1DBM\s0 libraries (dbm, gdbm, db, ndbm)
1761when building the Perl binary. The only exception to this is SunOS 4.x,
1762which needs them. [561]
1763.IP "\(bu" 4
1764The behaviour of non-decimal but numeric string constants such as
1765\&\*(L"0x23\*(R" was platform\-dependent: in some platforms that was seen as 35,
1766in some as 0, in some as a floating point number (don't ask). This
1767was caused by Perl's using the operating system libraries in a situation
1768where the result of the string to number conversion is undefined: now
1769Perl consistently handles such strings as zero in numeric contexts.
1770.IP "\(bu" 4
1771Several debugger fixes: exit code now reflects the script exit code,
1772condition \f(CW"0"\fR now treated correctly, the \f(CW\*(C`d\*(C'\fR command now checks
1773line number, \f(CW$.\fR no longer gets corrupted, and all debugger output
1774now goes correctly to the socket if RemotePort is set. [561]
1775.IP "\(bu" 4
1776The debugger (perl5db.pl) has been modified to present a more
1777consistent commands interface, via (CommandSet=580). perl5db.t was
1778also added to test the changes, and as a placeholder for further tests.
1779.Sp
1780See perldebug.
1781.IP "\(bu" 4
1782The debugger has a new \f(CW\*(C`dumpDepth\*(C'\fR option to control the maximum
1783depth to which nested structures are dumped. The \f(CW\*(C`x\*(C'\fR command has
1784been extended so that \f(CW\*(C`x N EXPR\*(C'\fR dumps out the value of \fI\s-1EXPR\s0\fR to a
1785depth of at most \fIN\fR levels.
1786.IP "\(bu" 4
1787The debugger can now show lexical variables if you have the \s-1CPAN\s0
1788module PadWalker installed.
1789.IP "\(bu" 4
1790The order of DESTROYs has been made more predictable.
1791.IP "\(bu" 4
1792Perl 5.6.0 could emit spurious warnings about redefinition of
1793\&\fIdl_error()\fR when statically building extensions into perl.
1794This has been corrected. [561]
1795.IP "\(bu" 4
1796dprofpp \-R didn't work.
1797.IP "\(bu" 4
1798\&\f(CW*foo{FORMAT}\fR now works.
1799.IP "\(bu" 4
1800Infinity is now recognized as a number.
1801.IP "\(bu" 4
1802UNIVERSAL::isa no longer caches methods incorrectly. (This broke
1803the Tk extension with 5.6.0.) [561]
1804.IP "\(bu" 4
1805Lexicals I: lexicals outside an eval "\*(L" weren't resolved
1806correctly inside a subroutine definition inside the eval \*(R"\*(L" if they
1807were not already referenced in the top level of the eval\*(R""ed code.
1808.IP "\(bu" 4
1809Lexicals \s-1II:\s0 lexicals leaked at file scope into subroutines that
1810were declared before the lexicals.
1811.IP "\(bu" 4
1812Lexical warnings now propagating correctly between scopes
1813and into \f(CW\*(C`eval "..."\*(C'\fR.
1814.IP "\(bu" 4
1815\&\f(CW\*(C`use warnings qw(FATAL all)\*(C'\fR did not work as intended. This has been
1816corrected. [561]
1817.IP "\(bu" 4
1818\&\fIwarnings::enabled()\fR now reports the state of $^W correctly if the caller
1819isn't using lexical warnings. [561]
1820.IP "\(bu" 4
1821Line renumbering with eval and \f(CW\*(C`#line\*(C'\fR now works. [561]
1822.IP "\(bu" 4
1823Fixed numerous memory leaks, especially in eval "".
1824.IP "\(bu" 4
1825Localised tied variables no longer leak memory
1826.Sp
1827.Vb 2
1828\& use Tie::Hash;
1829\& tie my %tied_hash => 'Tie::StdHash';
1830.Ve
1831.Sp
1832.Vb 1
1833\& ...
1834.Ve
1835.Sp
1836.Vb 3
1837\& # Used to leak memory every time local() was called;
1838\& # in a loop, this added up.
1839\& local($tied_hash{Foo}) = 1;
1840.Ve
1841.IP "\(bu" 4
1842Localised hash elements (and \f(CW%ENV\fR) are correctly unlocalised to not
1843exist, if they didn't before they were localised.
1844.Sp
1845.Vb 2
1846\& use Tie::Hash;
1847\& tie my %tied_hash => 'Tie::StdHash';
1848.Ve
1849.Sp
1850.Vb 1
1851\& ...
1852.Ve
1853.Sp
1854.Vb 1
1855\& # Nothing has set the FOO element so far
1856.Ve
1857.Sp
1858.Vb 1
1859\& { local $tied_hash{FOO} = 'Bar' }
1860.Ve
1861.Sp
1862.Vb 2
1863\& # This used to print, but not now.
1864\& print "exists!\en" if exists $tied_hash{FOO};
1865.Ve
1866.Sp
1867As a side effect of this fix, tied hash interfaces \fBmust\fR define
1868the \s-1EXISTS\s0 and \s-1DELETE\s0 methods.
1869.IP "\(bu" 4
1870\&\fImkdir()\fR now ignores trailing slashes in the directory name,
1871as mandated by \s-1POSIX\s0.
1872.IP "\(bu" 4
1873Some versions of glibc have a broken \fImodfl()\fR. This affects builds
1874with \f(CW\*(C`\-Duselongdouble\*(C'\fR. This version of Perl detects this brokenness
1875and has a workaround for it. The glibc release 2.2.2 is known to have
1876fixed the \fImodfl()\fR bug.
1877.IP "\(bu" 4
1878Modulus of unsigned numbers now works (4063328477 % 65535 used to
1879return 27406, instead of 27047). [561]
1880.IP "\(bu" 4
1881Some \*(L"not a number\*(R" warnings introduced in 5.6.0 eliminated to be
1882more compatible with 5.005. Infinity is now recognised as a number. [561]
1883.IP "\(bu" 4
1884Numeric conversions did not recognize changes in the string value
1885properly in certain circumstances. [561]
1886.IP "\(bu" 4
1887Attributes (such as :shared) didn't work with \fIour()\fR.
1888.IP "\(bu" 4
1889\&\fIour()\fR variables will not cause bogus \*(L"Variable will not stay shared\*(R"
1890warnings. [561]
1891.IP "\(bu" 4
1892\&\*(L"our\*(R" variables of the same name declared in two sibling blocks
1893resulted in bogus warnings about \*(L"redeclaration\*(R" of the variables.
1894The problem has been corrected. [561]
1895.IP "\(bu" 4
1896pack \*(L"Z\*(R" now correctly terminates the string with \*(L"\e0\*(R".
1897.IP "\(bu" 4
1898Fix password routines which in some shadow password platforms
1899(e.g. \s-1HP\-UX\s0) caused \fIgetpwent()\fR to return every other entry.
1900.IP "\(bu" 4
1901The \s-1PERL5OPT\s0 environment variable (for passing command line arguments
1902to Perl) didn't work for more than a single group of options. [561]
1903.IP "\(bu" 4
1904\&\s-1PERL5OPT\s0 with embedded spaces didn't work.
1905.IP "\(bu" 4
1906\&\fIprintf()\fR no longer resets the numeric locale to \*(L"C\*(R".
1907.IP "\(bu" 4
1908\&\f(CW\*(C`qw(a\e\eb)\*(C'\fR now parses correctly as \f(CW'a\e\eb'\fR: that is, as three
1909characters, not four. [561]
1910.IP "\(bu" 4
1911\&\fIpos()\fR did not return the correct value within s///ge in earlier
1912versions. This is now handled correctly. [561]
1913.IP "\(bu" 4
1914Printing quads (64\-bit integers) with printf/sprintf now works
1915without the q L ll prefixes (assuming you are on a quad-capable platform).
1916.IP "\(bu" 4
1917Regular expressions on references and overloaded scalars now work. [561+]
1918.IP "\(bu" 4
1919Right-hand side magic (\s-1GMAGIC\s0) could in many cases such as string
1920concatenation be invoked too many times.
1921.IP "\(bu" 4
1922\&\fIscalar()\fR now forces scalar context even when used in void context.
1923.IP "\(bu" 4
1924\&\s-1SOCKS\s0 support is now much more robust.
1925.IP "\(bu" 4
1926\&\fIsort()\fR arguments are now compiled in the right wantarray context
1927(they were accidentally using the context of the \fIsort()\fR itself).
1928The comparison block is now run in scalar context, and the arguments
1929to be sorted are always provided list context. [561]
1930.IP "\(bu" 4
1931Changed the \s-1POSIX\s0 character class \f(CW\*(C`[[:space:]]\*(C'\fR to include the (very
1932rarely used) vertical tab character. Added a new POSIX-ish character
1933class \f(CW\*(C`[[:blank:]]\*(C'\fR which stands for horizontal whitespace
1934(currently, the space and the tab).
1935.IP "\(bu" 4
1936The tainting behaviour of \fIsprintf()\fR has been rationalized. It does
1937not taint the result of floating point formats anymore, making the
1938behaviour consistent with that of string interpolation. [561]
1939.IP "\(bu" 4
1940Some cases of inconsistent taint propagation (such as within hash
1941values) have been fixed.
1942.IP "\(bu" 4
1943The \s-1RE\s0 engine found in Perl 5.6.0 accidentally pessimised certain kinds
1944of simple pattern matches. These are now handled better. [561]
1945.IP "\(bu" 4
1946Regular expression debug output (whether through \f(CW\*(C`use re 'debug'\*(C'\fR
1947or via \f(CW\*(C`\-Dr\*(C'\fR) now looks better. [561]
1948.IP "\(bu" 4
1949Multi-line matches like \f(CW\*(C`"a\enxb\en" =~ /(?!\eA)x/m\*(C'\fR were flawed. The
1950bug has been fixed. [561]
1951.IP "\(bu" 4
1952Use of $& could trigger a core dump under some situations. This
1953is now avoided. [561]
1954.IP "\(bu" 4
1955The regular expression captured submatches ($1, \f(CW$2\fR, ...) are now
1956more consistently unset if the match fails, instead of leaving false
1957data lying around in them. [561]
1958.IP "\(bu" 4
1959\&\fIreadline()\fR on files opened in \*(L"slurp\*(R" mode could return an extra
1960"" (blank line) at the end in certain situations. This has been
1961corrected. [561]
1962.IP "\(bu" 4
1963Autovivification of symbolic references of special variables described
1964in perlvar (as in \f(CW\*(C`${$num}\*(C'\fR) was accidentally disabled. This works
1965again now. [561]
1966.IP "\(bu" 4
1967Sys::Syslog ignored the \f(CW\*(C`LOG_AUTH\*(C'\fR constant.
1968.IP "\(bu" 4
1969$AUTOLOAD, \fIsort()\fR, \fIlock()\fR, and spawning subprocesses
1970in multiple threads simultaneously are now thread\-safe.
1971.IP "\(bu" 4
1972Tie::Array's \s-1SPLICE\s0 method was broken.
1973.IP "\(bu" 4
1974Allow a read-only string on the left-hand side of a non-modifying tr///.
1975.IP "\(bu" 4
1976If \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
1977correctly pass to it.
1978.IP "\(bu" 4
1979Several Unicode fixes.
1980.RS 4
1981.IP "\(bu" 8
1982BOMs (byte order marks) at the beginning of Perl files
1983(scripts, modules) should now be transparently skipped.
1984\&\s-1UTF\-16\s0 and \s-1UCS\-2\s0 encoded Perl files should now be read correctly.
1985.IP "\(bu" 8
1986The character tables have been updated to Unicode 3.2.0.
1987.IP "\(bu" 8
1988Comparing with utf8 data does not magically upgrade non\-utf8 data
1989into utf8. (This was a problem for example if you were mixing data
1990from I/O and Unicode data: your output might have got magically encoded
1991as \s-1UTF\-8\s0.)
1992.IP "\(bu" 8
1993Generating illegal Unicode code points such as U+FFFE, or the \s-1UTF\-16\s0
1994surrogates, now also generates an optional warning.
1995.IP "\(bu" 8
1996\&\f(CW\*(C`IsAlnum\*(C'\fR, \f(CW\*(C`IsAlpha\*(C'\fR, and \f(CW\*(C`IsWord\*(C'\fR now match titlecase.
1997.IP "\(bu" 8
1998Concatenation with the \f(CW\*(C`.\*(C'\fR operator or via variable interpolation,
1999\&\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,
2000substitution with \f(CW\*(C`s///\*(C'\fR, single-quoted \s-1UTF8\s0, should now work.
2001.IP "\(bu" 8
2002The \f(CW\*(C`tr///\*(C'\fR operator now works. Note that the \f(CW\*(C`tr///CU\*(C'\fR
2003functionality has been removed (but see pack('U0', ...)).
2004.IP "\(bu" 8
2005\&\f(CW\*(C`eval "v200"\*(C'\fR now works.
2006.IP "\(bu" 8
2007Perl 5.6.0 parsed m/\ex{ab}/ incorrectly, leading to spurious warnings.
2008This has been corrected. [561]
2009.IP "\(bu" 8
2010Zero entries were missing from the Unicode classes such as \f(CW\*(C`IsDigit\*(C'\fR.
2011.RE
2012.RS 4
2013.RE
2014.IP "\(bu" 4
2015Large unsigned numbers (those above 2**31) could sometimes lose their
2016unsignedness, causing bogus results in arithmetic operations. [561]
2017.IP "\(bu" 4
2018The Perl parser has been stress tested using both random input and
2019Markov chain input and the few found crashes and lockups have been
2020fixed.
2021.Sh "Platform Specific Changes and Fixes"
2022.IX Subsection "Platform Specific Changes and Fixes"
2023.IP "\(bu" 4
2024\&\s-1BSDI\s0 4.*
2025.Sp
2026Perl now works on post\-4.0 BSD/OSes.
2027.IP "\(bu" 4
2028All BSDs
2029.Sp
2030Setting \f(CW$0\fR now works (as much as possible; see perlvar for details).
2031.IP "\(bu" 4
2032Cygwin
2033.Sp
2034Numerous updates; currently synchronised with Cygwin 1.3.10.
2035.IP "\(bu" 4
2036Previously DYNIX/ptx had problems in its Configure probe for non-blocking I/O.
2037.IP "\(bu" 4
2038\&\s-1EPOC\s0
2039.Sp
2040\&\s-1EPOC\s0 now better supported. See \s-1README\s0.epoc. [561]
2041.IP "\(bu" 4
2042FreeBSD 3.*
2043.Sp
2044Perl now works on post\-3.0 FreeBSDs.
2045.IP "\(bu" 4
2046HP-UX
2047.Sp
2048\&\s-1README\s0.hpux updated; \f(CW\*(C`Configure \-Duse64bitall\*(C'\fR now works;
2049now uses HP-UX malloc instead of Perl malloc.
2050.IP "\(bu" 4
2051\&\s-1IRIX\s0
2052.Sp
2053Numerous compilation flag and hint enhancements; accidental mixing
2054of 32\-bit and 64\-bit libraries (a doomed attempt) made much harder.
2055.IP "\(bu" 4
2056Linux
2057.RS 4
2058.IP "\(bu" 8
2059Long doubles should now work (see \s-1INSTALL\s0). [561]
2060.IP "\(bu" 8
2061Linux previously had problems related to sockaddrlen when using
2062\&\fIaccept()\fR, \fIrecvfrom()\fR (in Perl: \fIrecv()\fR), \fIgetpeername()\fR, and
2063\&\fIgetsockname()\fR.
2064.RE
2065.RS 4
2066.RE
2067.IP "\(bu" 4
2068Mac \s-1OS\s0 Classic
2069.Sp
2070Compilation of the standard Perl distribution in Mac \s-1OS\s0 Classic should
2071now work if you have the Metrowerks development environment and the
2072missing Mac-specific toolkit bits. Contact the macperl mailing list
2073for details.
2074.IP "\(bu" 4
2075MPE/iX
2076.Sp
2077MPE/iX update after Perl 5.6.0. See \s-1README\s0.mpeix. [561]
2078.IP "\(bu" 4
2079NetBSD/threads: try installing the \s-1GNU\s0 pth (should be in the
2080packages collection, or http://www.gnu.org/software/pth/),
2081and Configure with \-Duseithreads.
2082.IP "\(bu" 4
2083NetBSD/sparc
2084.Sp
2085Perl now works on NetBSD/sparc.
2086.IP "\(bu" 4
2087\&\s-1OS/2\s0
2088.Sp
2089Now works with usethreads (see \s-1INSTALL\s0). [561]
2090.IP "\(bu" 4
2091Solaris
2092.Sp
209364\-bitness using the Sun Workshop compiler now works.
2094.IP "\(bu" 4
2095Stratus \s-1VOS\s0
2096.Sp
2097The native build method requires at least \s-1VOS\s0 Release 14.5.0
2098and \s-1GNU\s0 \*(C+/GNU Tools 2.0.1 or later. The Perl pack function
2099now maps overflowed values to +infinity and underflowed values
2100to \-infinity.
2101.IP "\(bu" 4
2102Tru64 (aka Digital \s-1UNIX\s0, aka \s-1DEC\s0 \s-1OSF/1\s0)
2103.Sp
2104The operating system version letter now recorded in \f(CW$Config\fR{osvers}.
2105Allow compiling with gcc (previously explicitly forbidden). Compiling
2106with gcc still not recommended because buggy code results, even with
2107gcc 2.95.2.
2108.IP "\(bu" 4
2109Unicos
2110.Sp
2111Fixed various alignment problems that lead into core dumps either
2112during build or later; no longer dies on math errors at runtime;
2113now using full quad integers (64 bits), previously was using
2114only 46 bit integers for speed.
2115.IP "\(bu" 4
2116\&\s-1VMS\s0
2117.Sp
2118See \*(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.
2119.Sp
2120\&\fIchdir()\fR now works better despite a \s-1CRT\s0 bug; now works with \s-1MULTIPLICITY\s0
2121(see \s-1INSTALL\s0); now works with Perl's malloc.
2122.Sp
2123The tainting of \f(CW%ENV\fR elements via \f(CW\*(C`keys\*(C'\fR or \f(CW\*(C`values\*(C'\fR was previously
2124unimplemented. It now works as documented.
2125.Sp
2126The \f(CW\*(C`waitpid\*(C'\fR emulation has been improved. The worst bug (now fixed)
2127was that a pid of \-1 would cause a wildcard search of all processes on
2128the system.
2129.Sp
2130POSIX-style signals are now emulated much better on \s-1VMS\s0 versions prior
2131to 7.0.
2132.Sp
2133The \f(CW\*(C`system\*(C'\fR function and backticks operator have improved
2134functionality and better error handling. [561]
2135.Sp
2136File access tests now use current process privileges rather than the
2137user's default privileges, which could sometimes result in a mismatch
2138between reported access and actual access. This improvement is only
2139available on \s-1VMS\s0 v6.0 and later.
2140.Sp
2141There is a new \f(CW\*(C`kill\*(C'\fR implementation based on \f(CW\*(C`sys$sigprc\*(C'\fR that allows
2142older \s-1VMS\s0 systems (pre\-7.0) to use \f(CW\*(C`kill\*(C'\fR to send signals rather than
2143simply force exit. This implementation also allows later systems to
2144call \f(CW\*(C`kill\*(C'\fR from within a signal handler.
2145.Sp
2146Iterative logical name translations are now limited to 10 iterations in
2147imitation of \s-1SHOW\s0 \s-1LOGICAL\s0 and other OpenVMS facilities.
2148.IP "\(bu" 4
2149Windows
2150.RS 4
2151.IP "\(bu" 8
2152Signal handling now works better than it used to. It is now implemented
2153using a Windows message loop, and is therefore less prone to random
2154crashes.
2155.IP "\(bu" 8
2156\&\fIfork()\fR emulation is now more robust, but still continues to have a few
2157esoteric bugs and caveats. See perlfork for details. [561+]
2158.IP "\(bu" 8
2159A failed (pseudo)fork now returns undef and sets errno to \s-1EAGAIN\s0. [561]
2160.IP "\(bu" 8
2161The following modules now work on Windows:
2162.Sp
2163.Vb 4
2164\& ExtUtils::Embed [561]
2165\& IO::Pipe
2166\& IO::Poll
2167\& Net::Ping
2168.Ve
2169.IP "\(bu" 8
2170\&\fIIO::File::new_tmpfile()\fR is no longer limited to 32767 invocations
2171per\-process.
2172.IP "\(bu" 8
2173Better \fIchdir()\fR return value for a non-existent directory.
2174.IP "\(bu" 8
2175Compiling perl using the 64\-bit Platform \s-1SDK\s0 tools is now supported.
2176.IP "\(bu" 8
2177The \fIWin32::SetChildShowWindow()\fR builtin can be used to control the
2178visibility of windows created by child processes. See Win32 for
2179details.
2180.IP "\(bu" 8
2181Non-blocking waits for child processes (or pseudo\-processes) are
2182supported via \f(CW\*(C`waitpid($pid, &POSIX::WNOHANG)\*(C'\fR.
2183.IP "\(bu" 8
2184The behavior of \fIsystem()\fR with multiple arguments has been rationalized.
2185Each unquoted argument will be automatically quoted to protect whitespace,
2186and any existing whitespace in the arguments will be preserved. This
2187improves the portability of system(@args) by avoiding the need for
2188Windows \f(CW\*(C`cmd\*(C'\fR shell specific quoting in perl programs.
2189.Sp
2190Note that this means that some scripts that may have relied on earlier
2191buggy behavior may no longer work correctly. For example,
2192\&\f(CW\*(C`system("nmake /nologo", @args)\*(C'\fR will now attempt to run the file
2193\&\f(CW\*(C`nmake /nologo\*(C'\fR and will fail when such a file isn't found.
2194On the other hand, perl will now execute code such as
2195\&\f(CW\*(C`system("c:/Program Files/MyApp/foo.exe", @args)\*(C'\fR correctly.
2196.IP "\(bu" 8
2197The perl header files no longer suppress common warnings from the
2198Microsoft Visual \*(C+ compiler. This means that additional warnings may
2199now show up when compiling \s-1XS\s0 code.
2200.IP "\(bu" 8
2201Borland \*(C+ v5.5 is now a supported compiler that can build Perl.
2202However, the generated binaries continue to be incompatible with those
2203generated by the other supported compilers (\s-1GCC\s0 and Visual \*(C+). [561]
2204.IP "\(bu" 8
2205Duping socket handles with open(F, \*(L">&MYSOCK\*(R") now works under Windows 9x.
2206[561]
2207.IP "\(bu" 8
2208Current directory entries in \f(CW%ENV\fR are now correctly propagated to child
2209processes. [561]
2210.IP "\(bu" 8
2211New \f(CW%ENV\fR entries now propagate to subprocesses. [561]
2212.IP "\(bu" 8
2213\&\fIWin32::GetCwd()\fR correctly returns C:\e instead of C: when at the drive root.
2214Other bugs in \fIchdir()\fR and \fICwd::cwd()\fR have also been fixed. [561]
2215.IP "\(bu" 8
2216The makefiles now default to the features enabled in ActiveState ActivePerl
2217(a popular Win32 binary distribution). [561]
2218.IP "\(bu" 8
2219\&\s-1HTML\s0 files will now be installed in c:\eperl\ehtml instead of
2220c:\eperl\elib\epod\ehtml
2221.IP "\(bu" 8
2222\&\s-1REG_EXPAND_SZ\s0 keys are now allowed in registry settings used by perl. [561]
2223.IP "\(bu" 8
2224Can now \fIsend()\fR from all threads, not just the first one. [561]
2225.IP "\(bu" 8
2226ExtUtils::MakeMaker now uses \f(CW$ENV\fR{\s-1LIB\s0} to search for libraries. [561]
2227.IP "\(bu" 8
2228Less stack reserved per thread so that more threads can run
2229concurrently. (Still 16M per thread.) [561]
2230.IP "\(bu" 8
2231\&\f(CW\*(C`File::Spec\->tmpdir()\*(C'\fR now prefers C:/temp over /tmp
2232(works better when perl is running as service).
2233.IP "\(bu" 8
2234Better \s-1UNC\s0 path handling under ithreads. [561]
2235.IP "\(bu" 8
2236\&\fIwait()\fR, \fIwaitpid()\fR, and backticks now return the correct exit status
2237under Windows 9x. [561]
2238.IP "\(bu" 8
2239A socket handle leak in \fIaccept()\fR has been fixed. [561]
2240.RE
2241.RS 4
2242.RE
2243.SH "New or Changed Diagnostics"
2244.IX Header "New or Changed Diagnostics"
2245Please see perldiag for more details.
2246.IP "\(bu" 4
2247Ambiguous range in the transliteration operator (like a\-z\-9) now
2248gives a warning.
2249.IP "\(bu" 4
2250chdir("") and chdir(undef) now give a deprecation warning because they
2251cause a possible unintentional chdir to the home directory.
2252Say \fIchdir()\fR if you really mean that.
2253.IP "\(bu" 4
2254Two new debugging options have been added: if you have compiled your
2255Perl with debugging, you can use the \-DT [561] and \-DR options to trace
2256tokenising and to add reference counts to displaying variables,
2257respectively.
2258.IP "\(bu" 4
2259The lexical warnings category \*(L"deprecated\*(R" is no longer a sub-category
2260of the \*(L"syntax\*(R" category. It is now a top-level category in its own
2261right.
2262.IP "\(bu" 4
2263Unadorned \fIdump()\fR will now give a warning suggesting to
2264use explicit \fICORE::dump()\fR if that's what really is meant.
2265.IP "\(bu" 4
2266The \*(L"Unrecognized escape\*(R" warning has been extended to include \f(CW\*(C`\e8\*(C'\fR,
2267\&\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.
2268.IP "\(bu" 4
2269All regular expression compilation error messages are now hopefully
2270easier to understand both because the error message now comes before
2271the failed regex and because the point of failure is now clearly
2272marked by a \f(CW\*(C`<\-\- HERE\*(C'\fR marker.
2273.IP "\(bu" 4
2274Various I/O (and socket) functions like \fIbinmode()\fR, \fIclose()\fR, and so
2275forth now more consistently warn if they are used illogically either
2276on a yet unopened or on an already closed filehandle (or socket).
2277.IP "\(bu" 4
2278Using \fIlstat()\fR on a filehandle now gives a warning. (It's a non-sensical
2279thing to do.)
2280.IP "\(bu" 4
2281The \f(CW\*(C`\-M\*(C'\fR and \f(CW\*(C`\-m\*(C'\fR options now warn if you didn't supply the module name.
2282.IP "\(bu" 4
2283If you in \f(CW\*(C`use\*(C'\fR specify a required minimum version, modules matching
2284the name and but not defining a \f(CW$VERSION\fR will cause a fatal failure.
2285.IP "\(bu" 4
2286Using negative offset for \fIvec()\fR in lvalue context is now a warnable offense.
2287.IP "\(bu" 4
2288Odd number of arguments to oveload::constant now elicits a warning.
2289.IP "\(bu" 4
2290Odd number of elements to in anonymous hash now elicits a warning.
2291.IP "\(bu" 4
2292The various \*(L"opened only for\*(R", \*(L"on closed\*(R", \*(L"never opened\*(R" warnings
2293drop the \f(CW\*(C`main::\*(C'\fR prefix for filehandles in the \f(CW\*(C`main\*(C'\fR package,
2294for example \f(CW\*(C`STDIN\*(C'\fR instead of \f(CW\*(C`main::STDIN\*(C'\fR.
2295.IP "\(bu" 4
2296Subroutine prototypes are now checked more carefully, you may
2297get warnings for example if you have used non-prototype characters.
2298.IP "\(bu" 4
2299If an attempt to use a (non\-blessed) reference as an array index
2300is made, a warning is given.
2301.IP "\(bu" 4
2302\&\f(CW\*(C`push @a;\*(C'\fR and \f(CW\*(C`unshift @a;\*(C'\fR (with no values to push or unshift)
2303now give a warning. This may be a problem for generated and evaled
2304code.
2305.IP "\(bu" 4
2306If you try to \*(L"pack\*(R" in perlfunc a number less than 0 or larger than 255
2307using the \f(CW"C"\fR format you will get an optional warning. Similarly
2308for the \f(CW"c"\fR format and a number less than \-128 or more than 127.
2309.IP "\(bu" 4
2310pack \f(CW\*(C`P\*(C'\fR format now demands an explicit size.
2311.IP "\(bu" 4
2312unpack \f(CW\*(C`w\*(C'\fR now warns of unterminated compressed integers.
2313.IP "\(bu" 4
2314Warnings relating to the use of PerlIO have been added.
2315.IP "\(bu" 4
2316Certain regex modifiers such as \f(CW\*(C`(?o)\*(C'\fR make sense only if applied to
2317the entire regex. You will get an optional warning if you try to do
2318otherwise.
2319.IP "\(bu" 4
2320Variable length lookbehind has not yet been implemented, trying to
2321use it will tell that.
2322.IP "\(bu" 4
2323Using arrays or hashes as references (e.g. \f(CW\*(C`%foo\->{bar}\*(C'\fR
2324has been deprecated for a while. Now you will get an optional warning.
2325.IP "\(bu" 4
2326Warnings relating to the use of the new restricted hashes feature
2327have been added.
2328.IP "\(bu" 4
2329Self-ties of arrays and hashes are not supported and fatal errors
2330will happen even at an attempt to do so.
2331.IP "\(bu" 4
2332Using \f(CW\*(C`sort\*(C'\fR in scalar context now issues an optional warning.
2333This didn't do anything useful, as the sort was not performed.
2334.IP "\(bu" 4
2335Using the /g modifier in \fIsplit()\fR is meaningless and will cause a warning.
2336.IP "\(bu" 4
2337Using \fIsplice()\fR past the end of an array now causes a warning.
2338.IP "\(bu" 4
2339Malformed Unicode encodings (\s-1UTF\-8\s0 and \s-1UTF\-16\s0) cause a lot of warnings,
2340ad doestrying to use \s-1UTF\-16\s0 surrogates (which are unimplemented).
2341.IP "\(bu" 4
2342Trying to use Unicode characters on an I/O stream without marking the
2343stream's encoding (using \fIopen()\fR or \fIbinmode()\fR) will cause \*(L"Wide character\*(R"
2344warnings.
2345.IP "\(bu" 4
2346Use of v\-strings in use/require causes a (backward) portability warning.
2347.IP "\(bu" 4
2348Warnings relating to the use interpreter threads and their shared data
2349have been added.
2350.SH "Changed Internals"
2351.IX Header "Changed Internals"
2352.IP "\(bu" 4
2353PerlIO is now the default.
2354.IP "\(bu" 4
2355perlapi.pod (a companion to perlguts) now attempts to document the
2356internal \s-1API\s0.
2357.IP "\(bu" 4
2358You can now build a really minimal perl called microperl.
2359Building microperl does not require even running Configure;
2360\&\f(CW\*(C`make \-f Makefile.micro\*(C'\fR should be enough. Beware: microperl makes
2361many assumptions, some of which may be too bold; the resulting
2362executable may crash or otherwise misbehave in wondrous ways.
2363For careful hackers only.
2364.IP "\(bu" 4
2365Added \fIrsignal()\fR, \fIwhichsig()\fR, \fIdo_join()\fR, op_clear, op_null,
2366\&\fIptr_table_clear()\fR, \fIptr_table_free()\fR, \fIsv_setref_uv()\fR, and several \s-1UTF\-8\s0
2367interfaces to the publicised \s-1API\s0. For the full list of the available
2368APIs see perlapi.
2369.IP "\(bu" 4
2370Made possible to propagate customised exceptions via \fIcroak()\fRing.
2371.IP "\(bu" 4
2372Now xsubs can have attributes just like subs. (Well, at least the
2373built-in attributes.)
2374.IP "\(bu" 4
2375dTHR and djSP have been obsoleted; the former removed (because it's
2376a no\-op) and the latter replaced with dSP.
2377.IP "\(bu" 4
2378\&\s-1PERL_OBJECT\s0 has been completely removed.
2379.IP "\(bu" 4
2380The \s-1MAGIC\s0 constants (e.g. \f(CW'P'\fR) have been macrofied
2381(e.g. \f(CW\*(C`PERL_MAGIC_TIED\*(C'\fR) for better source code readability
2382and maintainability.
2383.IP "\(bu" 4
2384The regex compiler now maintains a structure that identifies nodes in
2385the compiled bytecode with the corresponding syntactic features of the
2386original regex expression. The information is attached to the new
2387\&\f(CW\*(C`offsets\*(C'\fR member of the \f(CW\*(C`struct regexp\*(C'\fR. See perldebguts for more
2388complete information.
2389.IP "\(bu" 4
2390The C code has been made much more \f(CW\*(C`gcc \-Wall\*(C'\fR clean. Some warning
2391messages still remain in some platforms, so if you are compiling with
2392gcc you may see some warnings about dubious practices. The warnings
2393are being worked on.
2394.IP "\(bu" 4
2395\&\fIperly.c\fR, \fIsv.c\fR, and \fIsv.h\fR have now been extensively commented.
2396.IP "\(bu" 4
2397Documentation on how to use the Perl source repository has been added
2398to \fIPorting/repository.pod\fR.
2399.IP "\(bu" 4
2400There are now several profiling make targets.
2401.SH "Security Vulnerability Closed [561]"
2402.IX Header "Security Vulnerability Closed [561]"
2403(This change was already made in 5.7.0 but bears repeating here.)
2404(5.7.0 came out before 5.6.1: the development branch 5.7 released
2405earlier than the maintenance branch 5.6)
2406.PP
2407A potential security vulnerability in the optional suidperl component
2408of Perl was identified in August 2000. suidperl is neither built nor
2409installed by default. As of November 2001 the only known vulnerable
2410platform is Linux, most likely all Linux distributions. \s-1CERT\s0 and
2411various vendors and distributors have been alerted about the vulnerability.
2412See http://www.cpan.org/src/5.0/sperl\-2000\-08\-05/sperl\-2000\-08\-05.txt
2413for more information.
2414.PP
2415The problem was caused by Perl trying to report a suspected security
2416exploit attempt using an external program, /bin/mail. On Linux
2417platforms the /bin/mail program had an undocumented feature which
2418when combined with suidperl gave access to a root shell, resulting in
2419a serious compromise instead of reporting the exploit attempt. If you
2420don't have /bin/mail, or if you have 'safe setuid scripts', or if
2421suidperl is not installed, you are safe.
2422.PP
2423The exploit attempt reporting feature has been completely removed from
2424Perl 5.8.0 (and the maintenance release 5.6.1, and it was removed also
2425from all the Perl 5.7 releases), so that particular vulnerability
2426isn't there anymore. However, further security vulnerabilities are,
2427unfortunately, always possible. The suidperl functionality is most
2428probably going to be removed in Perl 5.10. In any case, suidperl
2429should only be used by security experts who know exactly what they are
2430doing and why they are using suidperl instead of some other solution
2431such as sudo ( see http://www.courtesan.com/sudo/ ).
2432.SH "New Tests"
2433.IX Header "New Tests"
2434Several new tests have been added, especially for the \fIlib\fR and
2435\&\fIext\fR subsections. There are now about 69 000 individual tests
2436(spread over about 700 test scripts), in the regression suite (5.6.1
2437has about 11 700 tests, in 258 test scripts) The exact numbers depend
2438on the platform and Perl configuration used. Many of the new tests
2439are of course introduced by the new modules, but still in general Perl
2440is now more thoroughly tested.
2441.PP
2442Because of the large number of tests, running the regression suite
2443will take considerably longer time than it used to: expect the suite
2444to take up to 4\-5 times longer to run than in perl 5.6. On a really
2445fast machine you can hope to finish the suite in about 6\-8 minutes
2446(wallclock time).
2447.PP
2448The tests are now reported in a different order than in earlier Perls.
2449(This happens because the test scripts from under t/lib have been moved
2450to be closer to the library/extension they are testing.)
2451.SH "Known Problems"
2452.IX Header "Known Problems"
2453.Sh "The Compiler Suite Is Still Very Experimental"
2454.IX Subsection "The Compiler Suite Is Still Very Experimental"
2455The compiler suite is slowly getting better but it continues to be
2456highly experimental. Use in production environments is discouraged.
2457.Sh "Localising Tied Arrays and Hashes Is Broken"
2458.IX Subsection "Localising Tied Arrays and Hashes Is Broken"
2459.Vb 1
2460\& local %tied_array;
2461.Ve
2462.PP
2463doesn't work as one would expect: the old value is restored
2464incorrectly. This will be changed in a future release, but we don't
2465know yet what the new semantics will exactly be. In any case, the
2466change will break existing code that relies on the current
2467(ill\-defined) semantics, so just avoid doing this in general.
2468.Sh "Building Extensions Can Fail Because Of Largefiles"
2469.IX Subsection "Building Extensions Can Fail Because Of Largefiles"
2470Some extensions like mod_perl are known to have issues with
2471`largefiles', a change brought by Perl 5.6.0 in which file offsets
2472default to 64 bits wide, where supported. Modules may fail to compile
2473at all, or they may compile and work incorrectly. Currently, there
2474is no good solution for the problem, but Configure now provides
2475appropriate non-largefile ccflags, ldflags, libswanted, and libs
2476in the \f(CW%Config\fR hash (e.g., \f(CW$Config\fR{ccflags_nolargefiles}) so the
2477extensions that are having problems can try configuring themselves
2478without the largefileness. This is admittedly not a clean solution,
2479and the solution may not even work at all. One potential failure is
2480whether one can (or, if one can, whether it's a good idea to) link
2481together at all binaries with different ideas about file offsets;
2482all this is platform\-dependent.
2483.ie n .Sh "Modifying $_ Inside for(..)"
2484.el .Sh "Modifying \f(CW$_\fP Inside for(..)"
2485.IX Subsection "Modifying $_ Inside for(..)"
2486.Vb 1
2487\& for (1..5) { $_++ }
2488.Ve
2489.PP
2490works without complaint. It shouldn't. (You should be able to
2491modify only lvalue elements inside the loops.) You can see the
2492correct behaviour by replacing the 1..5 with 1, 2, 3, 4, 5.
2493.Sh "mod_perl 1.26 Doesn't Build With Threaded Perl"
2494.IX Subsection "mod_perl 1.26 Doesn't Build With Threaded Perl"
2495Use mod_perl 1.27 or higher.
2496.Sh "lib/ftmp\-security tests warn 'system possibly insecure'"
2497.IX Subsection "lib/ftmp-security tests warn 'system possibly insecure'"
2498Don't panic. Read the 'make test' section of \s-1INSTALL\s0 instead.
2499.Sh "libwww-perl (\s-1LWP\s0) fails base/date #51"
2500.IX Subsection "libwww-perl (LWP) fails base/date #51"
2501Use libwww-perl 5.65 or later.
2502.Sh "\s-1PDL\s0 failing some tests"
2503.IX Subsection "PDL failing some tests"
2504Use \s-1PDL\s0 2.3.4 or later.
2505.Sh "Perl_get_sv"
2506.IX Subsection "Perl_get_sv"
2507You may get errors like 'Undefined symbol \*(L"Perl_get_sv\*(R"' or \*(L"can't
2508resolve symbol 'Perl_get_sv'\*(R", or the symbol may be \*(L"Perl_sv_2pv\*(R".
2509This probably means that you are trying to use an older shared Perl
2510library (or extensions linked with such) with Perl 5.8.0 executable.
2511Perl used to have such a subroutine, but that is no more the case.
2512Check your shared library path, and any shared Perl libraries in those
2513directories.
2514.PP
2515Sometimes this problem may also indicate a partial Perl 5.8.0
2516installation, see \*(L"Mac \s-1OS\s0 X dyld undefined symbols\*(R" for an
2517example and how to deal with it.
2518.Sh "Self-tying Problems"
2519.IX Subsection "Self-tying Problems"
2520Self-tying of arrays and hashes is broken in rather deep and
2521hard-to-fix ways. As a stop-gap measure to avoid people from getting
2522frustrated at the mysterious results (core dumps, most often), it is
2523forbidden for now (you will get a fatal error even from an attempt).
2524.PP
2525A change to self-tying of globs has caused them to be recursively
2526referenced (see: \*(L"Two\-Phased Garbage Collection\*(R" in perlobj). You
2527will now need an explicit untie to destroy a self-tied glob. This
2528behaviour may be fixed at a later date.
2529.PP
2530Self-tying of scalars and \s-1IO\s0 thingies works.
2531.Sh "ext/threads/t/libc"
2532.IX Subsection "ext/threads/t/libc"
2533If this test fails, it indicates that your libc (C library) is not
2534threadsafe. This particular test stress tests the \fIlocaltime()\fR call to
2535find out whether it is threadsafe. See perlthrtut for more information.
2536.Sh "Failure of Thread (5.005\-style) tests"
2537.IX Subsection "Failure of Thread (5.005-style) tests"
2538\&\fBNote that support for 5.005\-style threading is deprecated,
2539experimental and practically unsupported. In 5.10, it is expected
2540to be removed. You should migrate your code to ithreads.\fR
2541.PP
2542The following tests are known to fail due to fundamental problems in
2543the 5.005 threading implementation. These are not new failures\*(--Perl
25445.005_0x has the same bugs, but didn't have these tests.
2545.PP
2546.Vb 14
2547\& ../ext/B/t/xref.t 255 65280 14 12 85.71% 3-14
2548\& ../ext/List/Util/t/first.t 255 65280 7 4 57.14% 2 5-7
2549\& ../lib/English.t 2 512 54 2 3.70% 2-3
2550\& ../lib/FileCache.t 5 1 20.00% 5
2551\& ../lib/Filter/Simple/t/data.t 6 3 50.00% 1-3
2552\& ../lib/Filter/Simple/t/filter_only. 9 3 33.33% 1-2 5
2553\& ../lib/Math/BigInt/t/bare_mbf.t 1627 4 0.25% 8 11 1626-1627
2554\& ../lib/Math/BigInt/t/bigfltpm.t 1629 4 0.25% 10 13 1628-
2555\& 1629
2556\& ../lib/Math/BigInt/t/sub_mbf.t 1633 4 0.24% 8 11 1632-1633
2557\& ../lib/Math/BigInt/t/with_sub.t 1628 4 0.25% 9 12 1627-1628
2558\& ../lib/Tie/File/t/31_autodefer.t 255 65280 65 32 49.23% 34-65
2559\& ../lib/autouse.t 10 1 10.00% 4
2560\& op/flip.t 15 1 6.67% 15
2561.Ve
2562.PP
2563These failures are unlikely to get fixed as 5.005\-style threads
2564are considered fundamentally broken. (Basically what happens is that
2565competing threads can corrupt shared global state, one good example
2566being regular expression engine's state.)
2567.Sh "Timing problems"
2568.IX Subsection "Timing problems"
2569The following tests may fail intermittently because of timing
2570problems, for example if the system is heavily loaded.
2571.PP
2572.Vb 5
2573\& t/op/alarm.t
2574\& ext/Time/HiRes/HiRes.t
2575\& lib/Benchmark.t
2576\& lib/Memoize/t/expmod_t.t
2577\& lib/Memoize/t/speed.t
2578.Ve
2579.PP
2580In case of failure please try running them manually, for example
2581.PP
2582.Vb 1
2583\& ./perl -Ilib ext/Time/HiRes/HiRes.t
2584.Ve
2585.Sh "Tied/Magical Array/Hash Elements Do Not Autovivify"
2586.IX Subsection "Tied/Magical Array/Hash Elements Do Not Autovivify"
2587For normal arrays \f(CW\*(C`$foo = \e$bar[1]\*(C'\fR will assign \f(CW\*(C`undef\*(C'\fR to
2588\&\f(CW$bar[1]\fR (assuming that it didn't exist before), but for
2589tied/magical arrays and hashes such autovivification does not happen
2590because there is currently no way to catch the reference creation.
2591The same problem affects slicing over non-existent indices/keys of
2592a tied/magical array/hash.
2593.Sh "Unicode in package/class and subroutine names does not work"
2594.IX Subsection "Unicode in package/class and subroutine names does not work"
2595One can have Unicode in identifier names, but not in package/class or
2596subroutine names. While some limited functionality towards this does
2597exist as of Perl 5.8.0, that is more accidental than designed; use of
2598Unicode for the said purposes is unsupported.
2599.PP
2600One reason of this unfinishedness is its (currently) inherent
2601unportability: since both package names and subroutine names may
2602need to be mapped to file and directory names, the Unicode capability
2603of the filesystem becomes important\*(-- and there unfortunately aren't
2604portable answers.
2605.SH "Platform Specific Problems"
2606.IX Header "Platform Specific Problems"
2607.Sh "\s-1AIX\s0"
2608.IX Subsection "AIX"
2609.IP "\(bu" 4
2610If using the \s-1AIX\s0 native make command, instead of just \*(L"make\*(R" issue
2611\&\*(L"make all\*(R". In some setups the former has been known to spuriously
2612also try to run \*(L"make install\*(R". Alternatively, you may want to use
2613\&\s-1GNU\s0 make.
2614.IP "\(bu" 4
2615In \s-1AIX\s0 4.2, Perl extensions that use \*(C+ functions that use statics
2616may have problems in that the statics are not getting initialized.
2617In newer \s-1AIX\s0 releases, this has been solved by linking Perl with
2618the libC_r library, but unfortunately in \s-1AIX\s0 4.2 the said library
2619has an obscure bug where the various functions related to time
2620(such as \fItime()\fR and \fIgettimeofday()\fR) return broken values, and
2621therefore in \s-1AIX\s0 4.2 Perl is not linked against libC_r.
2622.IP "\(bu" 4
2623vac 5.0.0.0 May Produce Buggy Code For Perl
2624.Sp
2625The \s-1AIX\s0 C compiler vac version 5.0.0.0 may produce buggy code,
2626resulting in a few random tests failing when run as part of \*(L"make
2627test\*(R", but when the failing tests are run by hand, they succeed.
2628We suggest upgrading to at least vac version 5.0.1.0, that has been
2629known to compile Perl correctly. \*(L"lslpp \-L|grep vac.C\*(R" will tell
2630you the vac version. See \s-1README\s0.aix.
2631.IP "\(bu" 4
2632If building threaded Perl, you may get compilation warning from pp_sys.c:
2633.Sp
2634.Vb 1
2635\& "pp_sys.c", line 4651.39: 1506-280 (W) Function argument assignment between types "unsigned char*" and "const void*" is not allowed.
2636.Ve
2637.Sp
2638This is harmless; it is caused by the \fIgetnetbyaddr()\fR and \fIgetnetbyaddr_r()\fR
2639having slightly different types for their first argument.
2640.Sh "Alpha systems with old gccs fail several tests"
2641.IX Subsection "Alpha systems with old gccs fail several tests"
2642If you see op/pack, op/pat, op/regexp, or ext/Storable tests failing
2643in a Linux/alpha or *BSD/Alpha, it's probably time to upgrade your gcc.
2644gccs prior to 2.95.3 are definitely not good enough, and gcc 3.1 may
2645be even better. (RedHat Linux/alpha with gcc 3.1 reported no problems,
2646as did Linux 2.4.18 with gcc 2.95.4.) (In Tru64, it is preferable to
2647use the bundled C compiler.)
2648.Sh "AmigaOS"
2649.IX Subsection "AmigaOS"
2650Perl 5.8.0 doesn't build in AmigaOS. It broke at some point during
2651the ithreads work and we could not find Amiga experts to unbreak the
2652problems. Perl 5.6.1 still works for AmigaOS (as does the the 5.7.2
2653development release).
2654.Sh "BeOS"
2655.IX Subsection "BeOS"
2656The following tests fail on 5.8.0 Perl in BeOS Personal 5.03:
2657.PP
2658.Vb 6
2659\& t/op/lfs............................FAILED at test 17
2660\& t/op/magic..........................FAILED at test 24
2661\& ext/Fcntl/t/syslfs..................FAILED at test 17
2662\& ext/File/Glob/t/basic...............FAILED at test 3
2663\& ext/POSIX/t/sigaction...............FAILED at test 13
2664\& ext/POSIX/t/waitpid.................FAILED at test 1
2665.Ve
2666.PP
2667See perlbeos (\s-1README\s0.beos) for more details.
2668.ie n .Sh "Cygwin ""unable to remap"""
2669.el .Sh "Cygwin ``unable to remap''"
2670.IX Subsection "Cygwin unable to remap"
2671For example when building the Tk extension for Cygwin,
2672you may get an error message saying \*(L"unable to remap\*(R".
2673This is known problem with Cygwin, and a workaround is
2674detailed in here: http://sources.redhat.com/ml/cygwin/2001\-12/msg00894.html
2675.Sh "Cygwin ndbm tests fail on \s-1FAT\s0"
2676.IX Subsection "Cygwin ndbm tests fail on FAT"
2677One can build but not install (or test the build of) the NDBM_File
2678on \s-1FAT\s0 filesystems. Installation (or build) on \s-1NTFS\s0 works fine.
2679If one attempts the test on a \s-1FAT\s0 install (or build) the following
2680failures are expected:
2681.PP
2682.Vb 6
2683\& ../ext/NDBM_File/ndbm.t 13 3328 71 59 83.10% 1-2 4 16-71
2684\& ../ext/ODBM_File/odbm.t 255 65280 ?? ?? % ??
2685\& ../lib/AnyDBM_File.t 2 512 12 2 16.67% 1 4
2686\& ../lib/Memoize/t/errors.t 0 139 11 5 45.45% 7-11
2687\& ../lib/Memoize/t/tie_ndbm.t 13 3328 4 4 100.00% 1-4
2688\& run/fresh_perl.t 97 1 1.03% 91
2689.Ve
2690.PP
2691NDBM_File fails and ODBM_File just coredumps.
2692.Sh "\s-1DJGPP\s0 Failures"
2693.IX Subsection "DJGPP Failures"
2694.Vb 8
2695\& t/op/stat............................FAILED at test 29
2696\& lib/File/Find/t/find.................FAILED at test 1
2697\& lib/File/Find/t/taint................FAILED at test 1
2698\& lib/h2xs.............................FAILED at test 15
2699\& lib/Pod/t/eol........................FAILED at test 1
2700\& lib/Test/Harness/t/strap-analyze.....FAILED at test 8
2701\& lib/Test/Harness/t/test-harness......FAILED at test 23
2702\& lib/Test/Simple/t/exit...............FAILED at test 1
2703.Ve
2704.PP
2705The above failures are known as of 5.8.0 with native builds with long
2706filenames, but there are a few more if running under dosemu because of
2707limitations (and maybe bugs) of dosemu:
2708.PP
2709.Vb 2
2710\& t/comp/cpp...........................FAILED at test 3
2711\& t/op/inccode.........................(crash)
2712.Ve
2713.PP
2714and a few lib/ExtUtils tests, and several hundred Encode/t/Aliases.t
2715failures that work fine with long filenames. So you really might
2716prefer native builds and long filenames.
2717.Sh "FreeBSD built with ithreads coredumps reading large directories"
2718.IX Subsection "FreeBSD built with ithreads coredumps reading large directories"
2719This is a known bug in FreeBSD 4.5's \fIreaddir_r()\fR, it has been fixed in
2720FreeBSD 4.6 (see perlfreebsd (\s-1README\s0.freebsd)).
2721.Sh "FreeBSD Failing locale Test 117 For \s-1ISO\s0 8859\-15 Locales"
2722.IX Subsection "FreeBSD Failing locale Test 117 For ISO 8859-15 Locales"
2723The \s-1ISO\s0 8859\-15 locales may fail the locale test 117 in FreeBSD.
2724This is caused by the characters \exFF (y with diaeresis) and \exBE
2725(Y with diaeresis) not behaving correctly when being matched
2726case\-insensitively. Apparently this problem has been fixed in
2727the latest FreeBSD releases.
2728( http://www.freebsd.org/cgi/query\-pr.cgi?pr=34308 )
2729.Sh "\s-1IRIX\s0 fails ext/List/Util/t/shuffle.t or Digest::MD5"
2730.IX Subsection "IRIX fails ext/List/Util/t/shuffle.t or Digest::MD5"
2731\&\s-1IRIX\s0 with MIPSpro 7.3.1.2m or 7.3.1.3m compiler may fail the List::Util
2732test ext/List/Util/t/shuffle.t by dumping core. This seems to be
2733a compiler error since if compiled with gcc no core dump ensues, and
2734no failures have been seen on the said test on any other platform.
2735.PP
2736Similarly, building the Digest::MD5 extension has been
2737known to fail with \*(L"*** Termination code 139 (bu21)\*(R".
2738.PP
2739The cure is to drop optimization level (Configure \-Doptimize=\-O2).
2740.Sh "HP-UX lib/posix Subtest 9 Fails When LP64\-Configured"
2741.IX Subsection "HP-UX lib/posix Subtest 9 Fails When LP64-Configured"
2742If perl is configured with \-Duse64bitall, the successful result of the
2743subtest 10 of lib/posix may arrive before the successful result of the
2744subtest 9, which confuses the test harness so much that it thinks the
2745subtest 9 failed.
2746.Sh "Linux with glibc 2.2.5 fails t/op/int subtest #6 with \-Duse64bitint"
2747.IX Subsection "Linux with glibc 2.2.5 fails t/op/int subtest #6 with -Duse64bitint"
2748This is a known bug in the glibc 2.2.5 with long long integers.
2749( http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=65612 )
2750.Sh "Linux With Sfio Fails op/misc Test 48"
2751.IX Subsection "Linux With Sfio Fails op/misc Test 48"
2752No known fix.
2753.Sh "Mac \s-1OS\s0 X"
2754.IX Subsection "Mac OS X"
2755Please remember to set your environment variable \s-1LC_ALL\s0 to \*(L"C\*(R"
2756(setenv \s-1LC_ALL\s0 C) before running \*(L"make test\*(R" to avoid a lot of
2757warnings about the broken locales of Mac \s-1OS\s0 X.
2758.PP
2759The following tests are known to fail in Mac \s-1OS\s0 X 10.1.5 because of
2760buggy (old) implementations of Berkeley \s-1DB\s0 included in Mac \s-1OS\s0 X:
2761.PP
2762.Vb 4
2763\& Failed Test Stat Wstat Total Fail Failed List of Failed
2764\& -------------------------------------------------------------------------
2765\& ../ext/DB_File/t/db-btree.t 0 11 ?? ?? % ??
2766\& ../ext/DB_File/t/db-recno.t 149 3 2.01% 61 63 65
2767.Ve
2768.PP
2769If you are building on a \s-1UFS\s0 partition, you will also probably see
2770t/op/stat.t subtest #9 fail. This is caused by Darwin's \s-1UFS\s0 not
2771supporting inode change time.
2772.PP
2773Also the ext/POSIX/t/posix.t subtest #10 fails but it is skipped for
2774now because the failure is Apple's fault, not Perl's (blocked signals
2775are lost).
2776.PP
2777If you Configure with ithreads, ext/threads/t/libc.t will fail. Again,
2778this is not Perl's fault\*(-- the libc of Mac \s-1OS\s0 X is not threadsafe
2779(in this particular test, the \fIlocaltime()\fR call is found to be
2780threadunsafe.)
2781.Sh "Mac \s-1OS\s0 X dyld undefined symbols"
2782.IX Subsection "Mac OS X dyld undefined symbols"
2783If after installing Perl 5.8.0 you are getting warnings about missing
2784symbols, for example
2785.PP
2786.Vb 3
2787\& dyld: perl Undefined symbols
2788\& _perl_sv_2pv
2789\& _perl_get_sv
2790.Ve
2791.PP
2792you probably have an old pre\-Perl\-5.8.0 installation (or parts of one)
2793in /Library/Perl (the undefined symbols used to exist in pre\-5.8.0 Perls).
2794It seems that for some reason \*(L"make install\*(R" doesn't always completely
2795overwrite the files in /Library/Perl. You can move the old Perl
2796shared library out of the way like this:
2797.PP
2798.Vb 2
2799\& cd /Library/Perl/darwin/CORE
2800\& mv libperl.dylib libperlold.dylib
2801.Ve
2802.PP
2803and then reissue \*(L"make install\*(R". Note that the above of course is
2804extremely disruptive for anything using the /usr/local/bin/perl.
2805If that doesn't help, you may have to try removing all the .bundle
2806files from beneath /Library/Perl, and again \*(L"make install\*(R"\-ing.
2807.Sh "\s-1OS/2\s0 Test Failures"
2808.IX Subsection "OS/2 Test Failures"
2809The following tests are known to fail on \s-1OS/2\s0 (for clarity
2810only the failures are shown, not the full error messages):
2811.PP
2812.Vb 6
2813\& ../lib/ExtUtils/t/Mkbootstrap.t 1 256 18 1 5.56% 8
2814\& ../lib/ExtUtils/t/Packlist.t 1 256 34 1 2.94% 17
2815\& ../lib/ExtUtils/t/basic.t 1 256 17 1 5.88% 14
2816\& lib/os2_process.t 2 512 227 2 0.88% 174 209
2817\& lib/os2_process_kid.t 227 2 0.88% 174 209
2818\& lib/rx_cmprt.t 255 65280 18 3 16.67% 16-18
2819.Ve
2820.Sh "op/sprintf tests 91, 129, and 130"
2821.IX Subsection "op/sprintf tests 91, 129, and 130"
2822The op/sprintf tests 91, 129, and 130 are known to fail on some platforms.
2823Examples include any platform using sfio, and Compaq/Tandem's NonStop\-UX.
2824.PP
2825Test 91 is known to fail on \s-1QNX6\s0 (nto), because \f(CW\*(C`sprintf '%e',0\*(C'\fR
2826incorrectly produces \f(CW0.000000e+0\fR instead of \f(CW0.000000e+00\fR.
2827.PP
2828For tests 129 and 130, the failing platforms do not comply with
2829the \s-1ANSI\s0 C Standard: lines 19ff on page 134 of \s-1ANSI\s0 X3.159 1989, to
2830be exact. (They produce something other than \*(L"1\*(R" and \*(L"\-1\*(R" when
2831formatting 0.6 and \-0.6 using the printf format \*(L"%.0f\*(R"; most often,
2832they produce \*(L"0\*(R" and \*(L"\-0\*(R".)
2833.Sh "Solaris 2.5"
2834.IX Subsection "Solaris 2.5"
2835In case you are still using Solaris 2.5 (aka SunOS 5.5), you may
2836experience failures (the test core dumping) in lib/locale.t.
2837The suggested cure is to upgrade your Solaris.
2838.Sh "Solaris x86 Fails Tests With \-Duse64bitint"
2839.IX Subsection "Solaris x86 Fails Tests With -Duse64bitint"
2840The following tests are known to fail in Solaris x86 with Perl
2841configured to use 64 bit integers:
2842.PP
2843.Vb 2
2844\& ext/Data/Dumper/t/dumper.............FAILED at test 268
2845\& ext/Devel/Peek/Peek..................FAILED at test 7
2846.Ve
2847.Sh "SUPER-UX (\s-1NEC\s0 \s-1SX\s0)"
2848.IX Subsection "SUPER-UX (NEC SX)"
2849The following tests are known to fail on \s-1SUPER\-UX:\s0
2850.PP
2851.Vb 11
2852\& op/64bitint...........................FAILED tests 29-30, 32-33, 35-36
2853\& op/arith..............................FAILED tests 128-130
2854\& op/pack...............................FAILED tests 25-5625
2855\& op/pow................................
2856\& op/taint..............................# msgsnd failed
2857\& ../ext/IO/lib/IO/t/io_poll............FAILED tests 3-4
2858\& ../ext/IPC/SysV/ipcsysv...............FAILED tests 2, 5-6
2859\& ../ext/IPC/SysV/t/msg.................FAILED tests 2, 4-6
2860\& ../ext/Socket/socketpair..............FAILED tests 12
2861\& ../lib/IPC/SysV.......................FAILED tests 2, 5-6
2862\& ../lib/warnings.......................FAILED tests 115-116, 118-119
2863.Ve
2864.PP
2865The op/pack failure (\*(L"Cannot compress negative numbers at op/pack.t line 126\*(R")
2866is serious but as of yet unsolved. It points at some problems with the
2867signedness handling of the C compiler, as do the 64bitint, arith, and pow
2868failures. Most of the rest point at problems with SysV \s-1IPC\s0.
2869.Sh "Term::ReadKey not working on Win32"
2870.IX Subsection "Term::ReadKey not working on Win32"
2871Use Term::ReadKey 2.20 or later.
2872.Sh "UNICOS/mk"
2873.IX Subsection "UNICOS/mk"
2874.IP "\(bu" 4
2875During Configure, the test
2876.Sp
2877.Vb 1
2878\& Guessing which symbols your C compiler and preprocessor define...
2879.Ve
2880.Sp
2881will probably fail with error messages like
2882.Sp
2883.Vb 2
2884\& CC-20 cc: ERROR File = try.c, Line = 3
2885\& The identifier "bad" is undefined.
2886.Ve
2887.Sp
2888.Vb 2
2889\& bad switch yylook 79bad switch yylook 79bad switch yylook 79bad switch yylook 79#ifdef A29K
2890\& ^
2891.Ve
2892.Sp
2893.Vb 2
2894\& CC-65 cc: ERROR File = try.c, Line = 3
2895\& A semicolon is expected at this point.
2896.Ve
2897.Sp
2898This is caused by a bug in the awk utility of UNICOS/mk. You can ignore
2899the error, but it does cause a slight problem: you cannot fully
2900benefit from the h2ph utility (see h2ph) that can be used to
2901convert C headers to Perl libraries, mainly used to be able to access
2902from Perl the constants defined using C preprocessor, cpp. Because of
2903the above error, parts of the converted headers will be invisible.
2904Luckily, these days the need for h2ph is rare.
2905.IP "\(bu" 4
2906If building Perl with interpreter threads (ithreads), the
2907\&\fIgetgrent()\fR, \fIgetgrnam()\fR, and \fIgetgrgid()\fR functions cannot return the
2908list of the group members due to a bug in the multithreaded support of
2909UNICOS/mk. What this means is that in list context the functions will
2910return only three values, not four.
2911.Sh "\s-1UTS\s0"
2912.IX Subsection "UTS"
2913There are a few known test failures, see perluts (\s-1README\s0.uts).
2914.Sh "\s-1VOS\s0 (Stratus)"
2915.IX Subsection "VOS (Stratus)"
2916When Perl is built using the native build process on \s-1VOS\s0 Release
291714.5.0 and \s-1GNU\s0 \*(C+/GNU Tools 2.0.1, all attempted tests either
2918pass or result in \s-1TODO\s0 (ignored) failures.
2919.Sh "\s-1VMS\s0"
2920.IX Subsection "VMS"
2921There should be no reported test failures with a default configuration,
2922though there are a number of tests marked \s-1TODO\s0 that point to areas
2923needing further debugging and/or porting work.
2924.Sh "Win32"
2925.IX Subsection "Win32"
2926In multi-CPU boxes, there are some problems with the I/O buffering:
2927some output may appear twice.
2928.Sh "XML::Parser not working"
2929.IX Subsection "XML::Parser not working"
2930Use XML::Parser 2.31 or later.
2931.Sh "z/OS (\s-1OS/390\s0)"
2932.IX Subsection "z/OS (OS/390)"
2933z/OS has rather many test failures but the situation is actually much
2934better than it was in 5.6.0; it's just that so many new modules and
2935tests have been added.
2936.PP
2937.Vb 15
2938\& Failed Test Stat Wstat Total Fail Failed List of Failed
2939\& ---------------------------------------------------------------------------
2940\& ../ext/Data/Dumper/t/dumper.t 357 8 2.24% 311 314 325 327
2941\& 331 333 337 339
2942\& ../ext/IO/lib/IO/t/io_unix.t 5 4 80.00% 2-5
2943\& ../ext/Storable/t/downgrade.t 12 3072 169 12 7.10% 14-15 46-47 78-79
2944\& 110-111 150 161
2945\& ../lib/ExtUtils/t/Constant.t 121 30976 48 48 100.00% 1-48
2946\& ../lib/ExtUtils/t/Embed.t 9 9 100.00% 1-9
2947\& op/pat.t 922 7 0.76% 665 776 785 832-
2948\& 834 845
2949\& op/sprintf.t 224 3 1.34% 98 100 136
2950\& op/tr.t 97 5 5.15% 63 71-74
2951\& uni/fold.t 780 6 0.77% 61 169 196 661
2952\& 710-711
2953.Ve
2954.PP
2955The failures in dumper.t and downgrade.t are problems in the tests,
2956those in io_unix and sprintf are problems in the \s-1USS\s0 (\s-1UDP\s0 sockets and
2957printf formats). The pat, tr, and fold failures are genuine Perl
2958problems caused by \s-1EBCDIC\s0 (and in the pat and fold cases, combining
2959that with Unicode). The Constant and Embed are probably problems in
2960the tests (since they test Perl's ability to build extensions, and
2961that seems to be working reasonably well.)
2962.Sh "Unicode Support on \s-1EBCDIC\s0 Still Spotty"
2963.IX Subsection "Unicode Support on EBCDIC Still Spotty"
2964Though mostly working, Unicode support still has problem spots on
2965\&\s-1EBCDIC\s0 platforms. One such known spot are the \f(CW\*(C`\ep{}\*(C'\fR and \f(CW\*(C`\eP{}\*(C'\fR
2966regular expression constructs for code points less than 256: the
2967\&\f(CW\*(C`pP\*(C'\fR are testing for Unicode code points, not knowing about \s-1EBCDIC\s0.
2968.Sh "Seen In Perl 5.7 But Gone Now"
2969.IX Subsection "Seen In Perl 5.7 But Gone Now"
2970\&\f(CW\*(C`Time::Piece\*(C'\fR (previously known as \f(CW\*(C`Time::Object\*(C'\fR) was removed
2971because it was felt that it didn't have enough value in it to be a
2972core module. It is still a useful module, though, and is available
2973from the \s-1CPAN\s0.
2974.PP
2975Perl 5.8 unfortunately does not build anymore on AmigaOS; this broke
2976accidentally at some point. Since there are not that many Amiga
2977developers available, we could not get this fixed and tested in time
2978for 5.8.0. Perl 5.6.1 still works for AmigaOS (as does the the 5.7.2
2979development release).
2980.PP
2981The \f(CW\*(C`PerlIO::Scalar\*(C'\fR and \f(CW\*(C`PerlIO::Via\*(C'\fR (capitalised) were renamed as
2982\&\f(CW\*(C`PerlIO::scalar\*(C'\fR and \f(CW\*(C`PerlIO::via\*(C'\fR (all lowercase) just before 5.8.0.
2983The main rationale was to have all core PerlIO layers to have all
2984lowercase names. The \*(L"plugins\*(R" are named as usual, for example
2985\&\f(CW\*(C`PerlIO::via::QuotedPrint\*(C'\fR.
2986.PP
2987The \f(CW\*(C`threads::shared::queue\*(C'\fR and \f(CW\*(C`threads::shared::semaphore\*(C'\fR were
2988renamed as \f(CW\*(C`Thread::Queue\*(C'\fR and \f(CW\*(C`Thread::Semaphore\*(C'\fR just before 5.8.0.
2989The main rationale was to have thread modules to obey normal naming,
2990\&\f(CW\*(C`Thread::\*(C'\fR (the \f(CW\*(C`threads\*(C'\fR and \f(CW\*(C`threads::shared\*(C'\fR themselves are
2991more pragma\-like, they affect compile\-time, so they stay lowercase).
2992.SH "Reporting Bugs"
2993.IX Header "Reporting Bugs"
2994If you find what you think is a bug, you might check the articles
2995recently posted to the comp.lang.perl.misc newsgroup and the perl
2996bug database at http://bugs.perl.org/ . There may also be
2997information at http://www.perl.com/ , the Perl Home Page.
2998.PP
2999If you believe you have an unreported bug, please run the \fBperlbug\fR
3000program included with your release. Be sure to trim your bug down
3001to a tiny but sufficient test case. Your bug report, along with the
3002output of \f(CW\*(C`perl \-V\*(C'\fR, will be sent off to perlbug@perl.org to be
3003analysed by the Perl porting team.
3004.SH "SEE ALSO"
3005.IX Header "SEE ALSO"
3006The \fIChanges\fR file for exhaustive details on what changed.
3007.PP
3008The \fI\s-1INSTALL\s0\fR file for how to build Perl.
3009.PP
3010The \fI\s-1README\s0\fR file for general stuff.
3011.PP
3012The \fIArtistic\fR and \fICopying\fR files for copyright information.
3013.SH "HISTORY"
3014.IX Header "HISTORY"
3015Written by Jarkko Hietaniemi <\fIjhi@iki.fi\fR>.