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