Install Perl 5.8.8
[msysgit.git] / mingw / html / pod / perl561delta.html
blobcc2adaeef87564e1e2968a3f621d76f07bdc4996
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>perl561delta - what's new for perl v5.6.x</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;perl561delta - what's new for perl v5.6.x</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="#summary_of_changes_between_5_6_0_and_5_6_1">Summary of changes between 5.6.0 and 5.6.1</a></li>
25 <ul>
27 <li><a href="#security_issues">Security Issues</a></li>
28 <li><a href="#core_bug_fixes">Core bug fixes</a></li>
29 <li><a href="#core_features">Core features</a></li>
30 <li><a href="#configuration_issues">Configuration issues</a></li>
31 <li><a href="#documentation">Documentation</a></li>
32 <li><a href="#bundled_modules">Bundled modules</a></li>
33 <li><a href="#platformspecific_improvements">Platform-specific improvements</a></li>
34 </ul>
36 <li><a href="#core_enhancements">Core Enhancements</a></li>
37 <ul>
39 <li><a href="#interpreter_cloning__threads__and_concurrency">Interpreter cloning, threads, and concurrency</a></li>
40 <li><a href="#lexically_scoped_warning_categories">Lexically scoped warning categories</a></li>
41 <li><a href="#unicode_and_utf8_support">Unicode and UTF-8 support</a></li>
42 <li><a href="#support_for_interpolating_named_characters">Support for interpolating named characters</a></li>
43 <li><a href="#our_declarations">``our'' declarations</a></li>
44 <li><a href="#support_for_strings_represented_as_a_vector_of_ordinals">Support for strings represented as a vector of ordinals</a></li>
45 <li><a href="#improved_perl_version_numbering_system">Improved Perl version numbering system</a></li>
46 <li><a href="#new_syntax_for_declaring_subroutine_attributes">New syntax for declaring subroutine attributes</a></li>
47 <li><a href="#file_and_directory_handles_can_be_autovivified">File and directory handles can be autovivified</a></li>
48 <li><a href="#open___with_more_than_two_arguments"><a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_open"><code>open()</code></a> with more than two arguments</a></li>
49 <li><a href="#64bit_support">64-bit support</a></li>
50 <li><a href="#large_file_support">Large file support</a></li>
51 <li><a href="#long_doubles">Long doubles</a></li>
52 <li><a href="#more_bits">``more bits''</a></li>
53 <li><a href="#enhanced_support_for_sort___subroutines">Enhanced support for <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_sort"><code>sort()</code></a> subroutines</a></li>
54 <li><a href="#sort__coderef__foo_allowed"><code>sort $coderef @foo</code> allowed</a></li>
55 <li><a href="#file_globbing_implemented_internally">File globbing implemented internally</a></li>
56 <li><a href="#support_for_check_blocks">Support for CHECK blocks</a></li>
57 <li><a href="#posix_character_class_syntax_______supported">POSIX character class syntax [: :] supported</a></li>
58 <li><a href="#better_pseudorandom_number_generator">Better pseudo-random number generator</a></li>
59 <li><a href="#improved_qw___operator">Improved <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_qw_"><code>qw//</code></a> operator</a></li>
60 <li><a href="#better_worstcase_behavior_of_hashes">Better worst-case behavior of hashes</a></li>
61 <li><a href="#pack___format__z__supported"><code>pack()</code> format 'Z' supported</a></li>
62 <li><a href="#pack___format_modifier_____supported"><code>pack()</code> format modifier '!' supported</a></li>
63 <li><a href="#pack___and_unpack___support_counted_strings"><code>pack()</code> and <code>unpack()</code> support counted strings</a></li>
64 <li><a href="#comments_in_pack___templates">Comments in <code>pack()</code> templates</a></li>
65 <li><a href="#weak_references">Weak references</a></li>
66 <li><a href="#binary_numbers_supported">Binary numbers supported</a></li>
67 <li><a href="#lvalue_subroutines">Lvalue subroutines</a></li>
68 <li><a href="#some_arrows_may_be_omitted_in_calls_through_references">Some arrows may be omitted in calls through references</a></li>
69 <li><a href="#boolean_assignment_operators_are_legal_lvalues">Boolean assignment operators are legal lvalues</a></li>
70 <li><a href="#exists___is_supported_on_subroutine_names"><code>exists()</code> is supported on subroutine names</a></li>
71 <li><a href="#exists___and_delete___are_supported_on_array_elements"><code>exists()</code> and <code>delete()</code> are supported on array elements</a></li>
72 <li><a href="#pseudohashes_work_better">Pseudo-hashes work better</a></li>
73 <li><a href="#automatic_flushing_of_output_buffers">Automatic flushing of output buffers</a></li>
74 <li><a href="#better_diagnostics_on_meaningless_filehandle_operations">Better diagnostics on meaningless filehandle operations</a></li>
75 <li><a href="#where_possible__buffered_data_discarded_from_duped_input_filehandle">Where possible, buffered data discarded from duped input filehandle</a></li>
76 <li><a href="#eof___has_the_same_old_magic_as___"><a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_eof"><code>eof()</code></a> has the same old magic as &lt;&gt;</a></li>
77 <li><a href="#binmode___can_be_used_to_set__crlf_and__raw_modes"><a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_binmode"><code>binmode()</code></a> can be used to set :crlf and :raw modes</a></li>
78 <li><a href="#t_filetest_recognizes_utf8_encoded_files_as_text"><code>-T</code> filetest recognizes UTF-8 encoded files as ``text''</a></li>
79 <li><a href="#system____backticks_and_pipe_open_now_reflect_exec___failure">system(), backticks and pipe open now reflect <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_exec"><code>exec()</code></a> failure</a></li>
80 <li><a href="#improved_diagnostics">Improved diagnostics</a></li>
81 <li><a href="#diagnostics_follow_stderr">Diagnostics follow STDERR</a></li>
82 <li><a href="#more_consistent_closeonexec_behavior">More consistent close-on-exec behavior</a></li>
83 <li><a href="#syswrite___easeofuse"><a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_syswrite"><code>syswrite()</code></a> ease-of-use</a></li>
84 <li><a href="#better_syntax_checks_on_parenthesized_unary_operators">Better syntax checks on parenthesized unary operators</a></li>
85 <li><a href="#bit_operators_support_full_native_integer_width">Bit operators support full native integer width</a></li>
86 <li><a href="#improved_security_features">Improved security features</a></li>
87 <li><a href="#more_functional_bareword_prototype____">More functional bareword prototype (*)</a></li>
88 <li><a href="#require_and_do_may_be_overridden"><a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_require"><code>require</code></a> and <code>do</code> may be overridden</a></li>
89 <li><a href="#__x_variables_may_now_have_names_longer_than_one_character">$^X variables may now have names longer than one character</a></li>
90 <li><a href="#new_variable___c_reflects_c_switch">New variable $^C reflects <code>-c</code> switch</a></li>
91 <li><a href="#new_variable___v_contains_perl_version_as_a_string">New variable $^V contains Perl version as a string</a></li>
92 <li><a href="#optional_y2k_warnings">Optional Y2K warnings</a></li>
93 <li><a href="#arrays_now_always_interpolate_into_doublequoted_strings">Arrays now always interpolate into double-quoted strings</a></li>
94 <li><a href="#__and____provide_starting_ending_offsets_of_regex_submatches">@- and @+ provide starting/ending offsets of regex submatches</a></li>
95 </ul>
97 <li><a href="#modules_and_pragmata">Modules and Pragmata</a></li>
98 <ul>
100 <li><a href="#modules">Modules</a></li>
101 <li><a href="#pragmata">Pragmata</a></li>
102 </ul>
104 <li><a href="#utility_changes">Utility Changes</a></li>
105 <ul>
107 <li><a href="#dprofpp">dprofpp</a></li>
108 <li><a href="#find2perl">find2perl</a></li>
109 <li><a href="#h2xs">h2xs</a></li>
110 <li><a href="#perlcc">perlcc</a></li>
111 <li><a href="#perldoc">perldoc</a></li>
112 <li><a href="#the_perl_debugger">The Perl Debugger</a></li>
113 </ul>
115 <li><a href="#improved_documentation">Improved Documentation</a></li>
116 <li><a href="#performance_enhancements">Performance enhancements</a></li>
117 <ul>
119 <li><a href="#simple_sort___using____a______b___and_the_like_are_optimized">Simple <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_sort"><code>sort()</code></a> using { $a &lt;=&gt; $b } and the like are optimized</a></li>
120 <li><a href="#optimized_assignments_to_lexical_variables">Optimized assignments to lexical variables</a></li>
121 <li><a href="#faster_subroutine_calls">Faster subroutine calls</a></li>
122 <li><a href="#delete____each____values___and_hash_iteration_are_faster">delete(), each(), <code>values()</code> and hash iteration are faster</a></li>
123 </ul>
125 <li><a href="#installation_and_configuration_improvements">Installation and Configuration Improvements</a></li>
126 <ul>
128 <li><a href="#dusethreads_means_something_different">-Dusethreads means something different</a></li>
129 <li><a href="#new_configure_flags">New Configure flags</a></li>
130 <li><a href="#threadedness_and_64bitness_now_more_daring">Threadedness and 64-bitness now more daring</a></li>
131 <li><a href="#long_doubles">Long Doubles</a></li>
132 <li><a href="#dusemorebits">-Dusemorebits</a></li>
133 <li><a href="#duselargefiles">-Duselargefiles</a></li>
134 <li><a href="#installusrbinperl">installusrbinperl</a></li>
135 <li><a href="#socks_support">SOCKS support</a></li>
136 <li><a href="#a_flag"><code>-A</code> flag</a></li>
137 <li><a href="#enhanced_installation_directories">Enhanced Installation Directories</a></li>
138 <li><a href="#gcc_automatically_tried_if__cc__does_not_seem_to_be_working">gcc automatically tried if 'cc' does not seem to be working</a></li>
139 </ul>
141 <li><a href="#platform_specific_changes">Platform specific changes</a></li>
142 <ul>
144 <li><a href="#supported_platforms">Supported platforms</a></li>
145 <li><a href="#dos">DOS</a></li>
146 <li><a href="#os390__openedition_mvs_">OS390 (OpenEdition MVS)</a></li>
147 <li><a href="#vms">VMS</a></li>
148 <li><a href="#win32">Win32</a></li>
149 </ul>
151 <li><a href="#significant_bug_fixes">Significant bug fixes</a></li>
152 <ul>
154 <li><a href="#_handle__on_empty_files">&lt;HANDLE&gt; on empty files</a></li>
155 <li><a href="#eval_______improvements"><code>eval '...'</code> improvements</a></li>
156 <li><a href="#all_compilation_errors_are_true_errors">All compilation errors are true errors</a></li>
157 <li><a href="#implicitly_closed_filehandles_are_safer">Implicitly closed filehandles are safer</a></li>
158 <li><a href="#behavior_of_list_slices_is_more_consistent">Behavior of list slices is more consistent</a></li>
159 <li><a href="#_____prototype_and__foo_a_"><code>(\$)</code> prototype and <code>$foo{a}</code></a></li>
160 <li><a href="#goto__sub_and_autoload"><code>goto &amp;sub</code> and AUTOLOAD</a></li>
161 <li><a href="#bareword_allowed_under_use_integer"><code>-bareword</code> allowed under <code>use integer</code></a></li>
162 <li><a href="#failures_in_destroy__">Failures in <code>DESTROY()</code></a></li>
163 <li><a href="#locale_bugs_fixed">Locale bugs fixed</a></li>
164 <li><a href="#memory_leaks">Memory leaks</a></li>
165 <li><a href="#spurious_subroutine_stubs_after_failed_subroutine_calls">Spurious subroutine stubs after failed subroutine calls</a></li>
166 <li><a href="#taint_failures_under_u">Taint failures under <code>-U</code></a></li>
167 <li><a href="#end_blocks_and_the_c_switch">END blocks and the <code>-c</code> switch</a></li>
168 <li><a href="#potential_to_leak_data_filehandles">Potential to leak DATA filehandles</a></li>
169 </ul>
171 <li><a href="#new_or_changed_diagnostics">New or Changed Diagnostics</a></li>
172 <li><a href="#new_tests">New tests</a></li>
173 <li><a href="#incompatible_changes">Incompatible Changes</a></li>
174 <ul>
176 <li><a href="#perl_source_incompatibilities">Perl Source Incompatibilities</a></li>
177 <li><a href="#c_source_incompatibilities">C Source Incompatibilities</a></li>
178 <li><a href="#compatible_c_source_api_changes">Compatible C Source API Changes</a></li>
179 <li><a href="#binary_incompatibilities">Binary Incompatibilities</a></li>
180 </ul>
182 <li><a href="#known_problems">Known Problems</a></li>
183 <ul>
185 <li><a href="#localizing_a_tied_hash_element_may_leak_memory">Localizing a tied hash element may leak memory</a></li>
186 <li><a href="#known_test_failures">Known test failures</a></li>
187 <li><a href="#ebcdic_platforms_not_fully_supported">EBCDIC platforms not fully supported</a></li>
188 <li><a href="#unicos_mk_cc_failures_during_configure_run">UNICOS/mk CC failures during Configure run</a></li>
189 <li><a href="#arrow_operator_and_arrays">Arrow operator and arrays</a></li>
190 <li><a href="#experimental_features">Experimental features</a></li>
191 </ul>
193 <li><a href="#obsolete_diagnostics">Obsolete Diagnostics</a></li>
194 <li><a href="#reporting_bugs">Reporting Bugs</a></li>
195 <li><a href="#see_also">SEE ALSO</a></li>
196 <li><a href="#history">HISTORY</a></li>
197 </ul>
198 <!-- INDEX END -->
200 <hr />
202 </p>
203 <h1><a name="name">NAME</a></h1>
204 <p>perl561delta - what's new for perl v5.6.x</p>
206 </p>
207 <hr />
208 <h1><a name="description">DESCRIPTION</a></h1>
209 <p>This document describes differences between the 5.005 release and the 5.6.1
210 release.</p>
212 </p>
213 <hr />
214 <h1><a name="summary_of_changes_between_5_6_0_and_5_6_1">Summary of changes between 5.6.0 and 5.6.1</a></h1>
215 <p>This section contains a summary of the changes between the 5.6.0 release
216 and the 5.6.1 release. More details about the changes mentioned here
217 may be found in the <em>Changes</em> files that accompany the Perl source
218 distribution. See <a href="file://C|\msysgit\mingw\html/pod/perlhack.html">the perlhack manpage</a> for pointers to online resources where you
219 can inspect the individual patches described by these changes.</p>
221 </p>
222 <h2><a name="security_issues">Security Issues</a></h2>
223 <p>suidperl will not run /bin/mail anymore, because some platforms have
224 a /bin/mail that is vulnerable to buffer overflow attacks.</p>
225 <p>Note that suidperl is neither built nor installed by default in
226 any recent version of perl. Use of suidperl is highly discouraged.
227 If you think you need it, try alternatives such as sudo first.
228 See <a href="http://www.courtesan.com/sudo/">http://www.courtesan.com/sudo/</a> .</p>
230 </p>
231 <h2><a name="core_bug_fixes">Core bug fixes</a></h2>
232 <p>This is not an exhaustive list. It is intended to cover only the
233 significant user-visible changes.</p>
234 <dl>
235 <dt><strong><a name="item_isa"><code>UNIVERSAL::isa()</code></a></strong>
237 <dd>
238 <p>A bug in the caching mechanism used by <a href="#item_isa"><code>UNIVERSAL::isa()</code></a> that affected
239 base.pm has been fixed. The bug has existed since the 5.005 releases,
240 but wasn't tickled by base.pm in those releases.</p>
241 </dd>
242 </li>
243 <dt><strong><a name="item_memory_leaks">Memory leaks</a></strong>
245 <dd>
246 <p>Various cases of memory leaks and attempts to access uninitialized memory
247 have been cured. See <a href="#known_problems">Known Problems</a> below for further issues.</p>
248 </dd>
249 </li>
250 <dt><strong><a name="item_numeric_conversions">Numeric conversions</a></strong>
252 <dd>
253 <p>Numeric conversions did not recognize changes in the string value
254 properly in certain circumstances.</p>
255 </dd>
256 <dd>
257 <p>In other situations, large unsigned numbers (those above 2**31) could
258 sometimes lose their unsignedness, causing bogus results in arithmetic
259 operations.</p>
260 </dd>
261 <dd>
262 <p>Integer modulus on large unsigned integers sometimes returned
263 incorrect values.</p>
264 </dd>
265 <dd>
266 <p>Perl 5.6.0 generated ``not a number'' warnings on certain conversions where
267 previous versions didn't.</p>
268 </dd>
269 <dd>
270 <p>These problems have all been rectified.</p>
271 </dd>
272 <dd>
273 <p>Infinity is now recognized as a number.</p>
274 </dd>
275 </li>
276 <dt><strong><a name="item_qw"><code>qw(a\\b)</code></a></strong>
278 <dd>
279 <p>In Perl 5.6.0, <a href="#item_qw"><code>qw(a\\b)</code></a> produced a string with two backslashes instead
280 of one, in a departure from the behavior in previous versions. The
281 older behavior has been reinstated.</p>
282 </dd>
283 </li>
284 <dt><strong><a name="item_caller"><code>caller()</code></a></strong>
286 <dd>
287 <p><a href="#item_caller"><code>caller()</code></a> could cause core dumps in certain situations. Carp was sometimes
288 affected by this problem.</p>
289 </dd>
290 </li>
291 <dt><strong><a name="item_bugs_in_regular_expressions">Bugs in regular expressions</a></strong>
293 <dd>
294 <p>Pattern matches on overloaded values are now handled correctly.</p>
295 </dd>
296 <dd>
297 <p>Perl 5.6.0 parsed m/\x{ab}/ incorrectly, leading to spurious warnings.
298 This has been corrected.</p>
299 </dd>
300 <dd>
301 <p>The RE engine found in Perl 5.6.0 accidentally pessimised certain kinds
302 of simple pattern matches. These are now handled better.</p>
303 </dd>
304 <dd>
305 <p>Regular expression debug output (whether through <code>use re 'debug'</code>
306 or via <code>-Dr</code>) now looks better.</p>
307 </dd>
308 <dd>
309 <p>Multi-line matches like <code>&quot;a\nxb\n&quot; =~ /(?!\A)x/m</code> were flawed. The
310 bug has been fixed.</p>
311 </dd>
312 <dd>
313 <p>Use of $&amp; could trigger a core dump under some situations. This
314 is now avoided.</p>
315 </dd>
316 <dd>
317 <p>Match variables $1 et al., weren't being unset when a pattern match
318 was backtracking, and the anomaly showed up inside <code>/...(?{ ... }).../</code>
319 etc. These variables are now tracked correctly.</p>
320 </dd>
321 <dd>
322 <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
323 versions. This is now handled correctly.</p>
324 </dd>
325 </li>
326 <dt><strong><a name="item__22slurp_22_mode">``slurp'' mode</a></strong>
328 <dd>
329 <p><code>readline()</code> on files opened in ``slurp'' mode could return an extra ``'' at
330 the end in certain situations. This has been corrected.</p>
331 </dd>
332 </li>
333 <dt><strong><a name="item_autovivification_of_symbolic_references_to_special">Autovivification of symbolic references to special variables</a></strong>
335 <dd>
336 <p>Autovivification of symbolic references of special variables described
337 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
338 again now.</p>
339 </dd>
340 </li>
341 <dt><strong><a name="item_lexical_warnings">Lexical warnings</a></strong>
343 <dd>
344 <p>Lexical warnings now propagate correctly into <code>eval &quot;...&quot;</code>.</p>
345 </dd>
346 <dd>
347 <p><a href="#item_qw"><code>use warnings qw(FATAL all)</code></a> did not work as intended. This has been
348 corrected.</p>
349 </dd>
350 <dd>
351 <p>Lexical warnings could leak into other scopes in some situations.
352 This is now fixed.</p>
353 </dd>
354 <dd>
355 <p>warnings::enabled() now reports the state of $^W correctly if the caller
356 isn't using lexical warnings.</p>
357 </dd>
358 </li>
359 <dt><strong><a name="item_spurious_warnings_and_errors">Spurious warnings and errors</a></strong>
361 <dd>
362 <p>Perl 5.6.0 could emit spurious warnings about redefinition of <code>dl_error()</code>
363 when statically building extensions into perl. This has been corrected.</p>
364 </dd>
365 <dd>
366 <p>``our'' variables could result in bogus ``Variable will not stay shared''
367 warnings. This is now fixed.</p>
368 </dd>
369 <dd>
370 <p>``our'' variables of the same name declared in two sibling blocks
371 resulted in bogus warnings about ``redeclaration'' of the variables.
372 The problem has been corrected.</p>
373 </dd>
374 </li>
375 <dt><strong><a name="item_glob"><code>glob()</code></a></strong>
377 <dd>
378 <p>Compatibility of the builtin <a href="#item_glob"><code>glob()</code></a> with old csh-based glob has been
379 improved with the addition of GLOB_ALPHASORT option. See <a href="#item_file_3a_3aglob"><code>File::Glob</code></a>.</p>
380 </dd>
381 <dd>
382 <p>File::Glob::glob() has been renamed to File::Glob::bsd_glob()
383 because the name clashes with the builtin glob(). The older
384 name is still available for compatibility, but is deprecated.</p>
385 </dd>
386 <dd>
387 <p>Spurious syntax errors generated in certain situations, when <a href="#item_glob"><code>glob()</code></a>
388 caused File::Glob to be loaded for the first time, have been fixed.</p>
389 </dd>
390 </li>
391 <dt><strong><a name="item_tainting">Tainting</a></strong>
393 <dd>
394 <p>Some cases of inconsistent taint propagation (such as within hash
395 values) have been fixed.</p>
396 </dd>
397 <dd>
398 <p>The tainting behavior of <code>sprintf()</code> has been rationalized. It does
399 not taint the result of floating point formats anymore, making the
400 behavior consistent with that of string interpolation.</p>
401 </dd>
402 </li>
403 <dt><strong><a name="item_sort"><code>sort()</code></a></strong>
405 <dd>
406 <p>Arguments to <a href="#item_sort"><code>sort()</code></a> weren't being provided the right <code>wantarray()</code> context.
407 The comparison block is now run in scalar context, and the arguments to
408 be sorted are always provided list context.</p>
409 </dd>
410 <dd>
411 <p><a href="#item_sort"><code>sort()</code></a> is also fully reentrant, in the sense that the sort function
412 can itself call sort(). This did not work reliably in previous releases.</p>
413 </dd>
414 </li>
415 <dt><strong><a name="item__23line_directives">#line directives</a></strong>
417 <dd>
418 <p>#line directives now work correctly when they appear at the very
419 beginning of <code>eval &quot;...&quot;</code>.</p>
420 </dd>
421 </li>
422 <dt><strong><a name="item_subroutine_prototypes">Subroutine prototypes</a></strong>
424 <dd>
425 <p>The (\&amp;) prototype now works properly.</p>
426 </dd>
427 </li>
428 <dt><strong><a name="item_map"><code>map()</code></a></strong>
430 <dd>
431 <p><a href="#item_map"><code>map()</code></a> could get pathologically slow when the result list it generates
432 is larger than the source list. The performance has been improved for
433 common scenarios.</p>
434 </dd>
435 </li>
436 <dt><strong><a name="item_debugger">Debugger</a></strong>
438 <dd>
439 <p>Debugger exit code now reflects the script exit code.</p>
440 </dd>
441 <dd>
442 <p>Condition <code>&quot;0&quot;</code> in breakpoints is now treated correctly.</p>
443 </dd>
444 <dd>
445 <p>The <a href="file://C|\msysgit\mingw\html/pod/perlguts.html#item_d"><code>d</code></a> command now checks the line number.</p>
446 </dd>
447 <dd>
448 <p><a href="file://C|\msysgit\mingw\html/pod/perlvar.html#item___"><code>$.</code></a> is no longer corrupted by the debugger.</p>
449 </dd>
450 <dd>
451 <p>All debugger output now correctly goes to the socket if RemotePort
452 is set.</p>
453 </dd>
454 </li>
455 <dt><strong><a name="item_perl5opt">PERL5OPT</a></strong>
457 <dd>
458 <p>PERL5OPT can be set to more than one switch group. Previously,
459 it used to be limited to one group of options only.</p>
460 </dd>
461 </li>
462 <dt><strong><a name="item_chop"><code>chop()</code></a></strong>
464 <dd>
465 <p><a href="#item_chop"><code>chop(@list)</code></a> in list context returned the characters chopped in reverse
466 order. This has been reversed to be in the right order.</p>
467 </dd>
468 </li>
469 <dt><strong><a name="item_unicode_support">Unicode support</a></strong>
471 <dd>
472 <p>Unicode support has seen a large number of incremental improvements,
473 but continues to be highly experimental. It is not expected to be
474 fully supported in the 5.6.x maintenance releases.</p>
475 </dd>
476 <dd>
477 <p>substr(), join(), repeat(), reverse(), <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_quotemeta"><code>quotemeta()</code></a> and string
478 concatenation were all handling Unicode strings incorrectly in
479 Perl 5.6.0. This has been corrected.</p>
480 </dd>
481 <dd>
482 <p>Support for <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_tr_"><code>tr///CU</code></a> and <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_tr_"><code>tr///UC</code></a> etc., have been removed since
483 we realized the interface is broken. For similar functionality,
484 see <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#pack">pack in the perlfunc manpage</a>.</p>
485 </dd>
486 <dd>
487 <p>The Unicode Character Database has been updated to version 3.0.1
488 with additions made available to the public as of August 30, 2000.</p>
489 </dd>
490 <dd>
491 <p>The Unicode character classes \p{Blank} and \p{SpacePerl} have been
492 added. ``Blank'' is like C isblank(), that is, it contains only
493 ``horizontal whitespace'' (the space character is, the newline isn't),
494 and the ``SpacePerl'' is the Unicode equivalent of <code>\s</code> (\p{Space}
495 isn't, since that includes the vertical tabulator character, whereas
496 <code>\s</code> doesn't.)</p>
497 </dd>
498 <dd>
499 <p>If you are experimenting with Unicode support in perl, the development
500 versions of Perl may have more to offer. In particular, I/O layers
501 are now available in the development track, but not in the maintenance
502 track, primarily to do backward compatibility issues. Unicode support
503 is also evolving rapidly on a daily basis in the development track--the
504 maintenance track only reflects the most conservative of these changes.</p>
505 </dd>
506 </li>
507 <li><strong><a name="item__2dbit_support">-bit support</a></strong>
509 <p>Support for 64-bit platforms has been improved, but continues to be
510 experimental. The level of support varies greatly among platforms.</p>
511 </li>
512 <dt><strong><a name="item_compiler">Compiler</a></strong>
514 <dd>
515 <p>The B Compiler and its various backends have had many incremental
516 improvements, but they continue to remain highly experimental. Use in
517 production environments is discouraged.</p>
518 </dd>
519 <dd>
520 <p>The perlcc tool has been rewritten so that the user interface is much
521 more like that of a C compiler.</p>
522 </dd>
523 <dd>
524 <p>The perlbc tools has been removed. Use <code>perlcc -B</code> instead.</p>
525 </dd>
526 </li>
527 <dt><strong><a name="item_lvalue_subroutines">Lvalue subroutines</a></strong>
529 <dd>
530 <p>There have been various bugfixes to support lvalue subroutines better.
531 However, the feature still remains experimental.</p>
532 </dd>
533 </li>
534 <dt><strong><a name="item_io_3a_3asocket">IO::Socket</a></strong>
536 <dd>
537 <p>IO::Socket::INET failed to open the specified port if the service
538 name was not known. It now correctly uses the supplied port number
539 as is.</p>
540 </dd>
541 </li>
542 <dt><strong><a name="item_file_3a_3afind">File::Find</a></strong>
544 <dd>
545 <p>File::Find now chdir()s correctly when chasing symbolic links.</p>
546 </dd>
547 </li>
548 <dt><strong><a name="item_xsubpp">xsubpp</a></strong>
550 <dd>
551 <p>xsubpp now tolerates embedded POD sections.</p>
552 </dd>
553 </li>
554 <dt><strong><a name="item_no_module_3b"><code>no Module;</code></a></strong>
556 <dd>
557 <p><a href="#item_no_module_3b"><code>no Module;</code></a> does not produce an error even if Module does not have an
558 <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
559 <code>import</code>.</p>
560 </dd>
561 </li>
562 <dt><strong><a name="item_tests">Tests</a></strong>
564 <dd>
565 <p>A large number of tests have been added.</p>
566 </dd>
567 </li>
568 </dl>
570 </p>
571 <h2><a name="core_features">Core features</a></h2>
572 <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>
573 for details.</p>
574 <p>The <code>-DT</code> command line switch outputs copious tokenizing information.
575 See <a href="file://C|\msysgit\mingw\html/pod/perlrun.html">the perlrun manpage</a>.</p>
576 <p>Arrays are now always interpolated in double-quotish strings. Previously,
577 <code>&quot;foo@bar.com&quot;</code> used to be a fatal error at compile time, if an array
578 <code>@bar</code> was not used or declared. This transitional behavior was
579 intended to help migrate perl4 code, and is deemed to be no longer useful.
580 See <a href="#arrays_now_always_interpolate_into_doublequoted_strings">Arrays now always interpolate into double-quoted strings</a>.</p>
581 <p>keys(), each(), pop(), push(), shift(), <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_splice"><code>splice()</code></a> and <code>unshift()</code>
582 can all be overridden now.</p>
583 <p><code>my __PACKAGE__ $obj</code> now does the expected thing.</p>
585 </p>
586 <h2><a name="configuration_issues">Configuration issues</a></h2>
587 <p>On some systems (IRIX and Solaris among them) the system malloc is demonstrably
588 better. While the defaults haven't been changed in order to retain binary
589 compatibility with earlier releases, you may be better off building perl
590 with <code>Configure -Uusemymalloc ...</code> as discussed in the <em>INSTALL</em> file.</p>
591 <p><code>Configure</code> has been enhanced in various ways:</p>
592 <ul>
593 <li>
594 <p>Minimizes use of temporary files.</p>
595 </li>
596 <li>
597 <p>By default, does not link perl with libraries not used by it, such as
598 the various dbm libraries. SunOS 4.x hints preserve behavior on that
599 platform.</p>
600 </li>
601 <li>
602 <p>Support for pdp11-style memory models has been removed due to obsolescence.</p>
603 </li>
604 <li>
605 <p>Building outside the source tree is supported on systems that have
606 symbolic links. This is done by running</p>
607 <pre>
608 sh /path/to/source/Configure -Dmksymlinks ...
609 make all test install</pre>
610 <p>in a directory other than the perl source directory. See <em>INSTALL</em>.</p>
611 </li>
612 <li>
613 <p><code>Configure -S</code> can be run non-interactively.</p>
614 </li>
615 </ul>
617 </p>
618 <h2><a name="documentation">Documentation</a></h2>
619 <p>README.aix, README.solaris and README.macos have been added.
620 README.posix-bc has been renamed to README.bs2000. These are
621 installed as <a href="file://C|\msysgit\mingw\html/pod/perlaix.html">the perlaix manpage</a>, <a href="file://C|\msysgit\mingw\html/pod/perlsolaris.html">the perlsolaris manpage</a>, <a href="file://C|\msysgit\mingw\html/pod/perlmacos.html">the perlmacos manpage</a>, and
622 <a href="file://C|\msysgit\mingw\html/pod/perlbs2000.html">the perlbs2000 manpage</a> respectively.</p>
623 <p>The following pod documents are brand new:</p>
624 <pre>
625 <a href="//C|\msysgit\mingw\html/pod/perlclib.html">perlclib</a> Internal replacements for standard C library functions
626 <a href="//C|\msysgit\mingw\html/pod/perldebtut.html">perldebtut</a> Perl debugging tutorial
627 <a href="//C|\msysgit\mingw\html/pod/perlebcdic.html">perlebcdic</a> Considerations for running Perl on EBCDIC platforms
628 <a href="//C|\msysgit\mingw\html/pod/perlnewmod.html">perlnewmod</a> Perl modules: preparing a new module for distribution
629 <a href="//C|\msysgit\mingw\html/pod/perlrequick.html">perlrequick</a> Perl regular expressions quick start
630 <a href="//C|\msysgit\mingw\html/pod/perlretut.html">perlretut</a> Perl regular expressions tutorial
631 <a href="//C|\msysgit\mingw\html/pod/perlutil.html">perlutil</a> utilities packaged with the Perl distribution</pre>
632 <p>The <em>INSTALL</em> file has been expanded to cover various issues, such as
633 64-bit support.</p>
634 <p>A longer list of contributors has been added to the source distribution.
635 See the file <code>AUTHORS</code>.</p>
636 <p>Numerous other changes have been made to the included documentation and FAQs.</p>
638 </p>
639 <h2><a name="bundled_modules">Bundled modules</a></h2>
640 <p>The following modules have been added.</p>
641 <dl>
642 <dt><strong><a name="item_b_3a_3aconcise">B::Concise</a></strong>
644 <dd>
645 <p>Walks Perl syntax tree, printing concise info about ops. See <a href="file://C|\msysgit\mingw\html/lib/B/Concise.html">the B::Concise manpage</a>.</p>
646 </dd>
647 </li>
648 <dt><strong><a name="item_file_3a_3atemp">File::Temp</a></strong>
650 <dd>
651 <p>Returns name and handle of a temporary file safely. See <a href="file://C|\msysgit\mingw\html/lib/File/Temp.html">the File::Temp manpage</a>.</p>
652 </dd>
653 </li>
654 <dt><strong><a name="item_pod_3a_3alatex">Pod::LaTeX</a></strong>
656 <dd>
657 <p>Converts Pod data to formatted LaTeX. See <a href="file://C|\msysgit\mingw\html/lib/Pod/LaTeX.html">the Pod::LaTeX manpage</a>.</p>
658 </dd>
659 </li>
660 <dt><strong><a name="item_pod_3a_3atext_3a_3aoverstrike">Pod::Text::Overstrike</a></strong>
662 <dd>
663 <p>Converts POD data to formatted overstrike text. See <a href="file://C|\msysgit\mingw\html/lib/Pod/Text/Overstrike.html">the Pod::Text::Overstrike manpage</a>.</p>
664 </dd>
665 </li>
666 </dl>
667 <p>The following modules have been upgraded.</p>
668 <dl>
669 <dt><strong><a name="item_cgi">CGI</a></strong>
671 <dd>
672 <p>CGI v2.752 is now included.</p>
673 </dd>
674 </li>
675 <dt><strong><a name="item_cpan">CPAN</a></strong>
677 <dd>
678 <p>CPAN v1.59_54 is now included.</p>
679 </dd>
680 </li>
681 <dt><strong><a name="item_class_3a_3astruct">Class::Struct</a></strong>
683 <dd>
684 <p>Various bugfixes have been added.</p>
685 </dd>
686 </li>
687 <dt><strong><a name="item_db_file">DB_File</a></strong>
689 <dd>
690 <p>DB_File v1.75 supports newer Berkeley DB versions, among other
691 improvements.</p>
692 </dd>
693 </li>
694 <dt><strong><a name="item_devel_3a_3apeek">Devel::Peek</a></strong>
696 <dd>
697 <p>Devel::Peek has been enhanced to support dumping of memory statistics,
698 when perl is built with the included malloc().</p>
699 </dd>
700 </li>
701 <dt><strong>File::Find</strong>
703 <dd>
704 <p>File::Find now supports pre and post-processing of the files in order
705 to <a href="#item_sort"><code>sort()</code></a> them, etc.</p>
706 </dd>
707 </li>
708 <dt><strong><a name="item_getopt_3a_3along">Getopt::Long</a></strong>
710 <dd>
711 <p>Getopt::Long v2.25 is included.</p>
712 </dd>
713 </li>
714 <dt><strong><a name="item_io_3a_3apoll">IO::Poll</a></strong>
716 <dd>
717 <p>Various bug fixes have been included.</p>
718 </dd>
719 </li>
720 <dt><strong><a name="item_ipc_3a_3aopen3">IPC::Open3</a></strong>
722 <dd>
723 <p>IPC::Open3 allows use of numeric file descriptors.</p>
724 </dd>
725 </li>
726 <dt><strong><a name="item_math_3a_3abigfloat">Math::BigFloat</a></strong>
728 <dd>
729 <p>The <code>fmod()</code> function supports modulus operations. Various bug fixes
730 have also been included.</p>
731 </dd>
732 </li>
733 <dt><strong><a name="item_math_3a_3acomplex">Math::Complex</a></strong>
735 <dd>
736 <p>Math::Complex handles inf, NaN etc., better.</p>
737 </dd>
738 </li>
739 <dt><strong><a name="item_net_3a_3aping">Net::Ping</a></strong>
741 <dd>
742 <p><code>ping()</code> could fail on odd number of data bytes, and when the echo service
743 isn't running. This has been corrected.</p>
744 </dd>
745 </li>
746 <dt><strong><a name="item_opcode">Opcode</a></strong>
748 <dd>
749 <p>A memory leak has been fixed.</p>
750 </dd>
751 </li>
752 <dt><strong><a name="item_pod_3a_3aparser">Pod::Parser</a></strong>
754 <dd>
755 <p>Version 1.13 of the Pod::Parser suite is included.</p>
756 </dd>
757 </li>
758 <dt><strong><a name="item_pod_3a_3atext">Pod::Text</a></strong>
760 <dd>
761 <p>Pod::Text and related modules have been upgraded to the versions
762 in podlators suite v2.08.</p>
763 </dd>
764 </li>
765 <dt><strong><a name="item_sdbm_file">SDBM_File</a></strong>
767 <dd>
768 <p>On dosish platforms, some keys went missing because of lack of support for
769 files with ``holes''. A workaround for the problem has been added.</p>
770 </dd>
771 </li>
772 <dt><strong><a name="item_sys_3a_3asyslog">Sys::Syslog</a></strong>
774 <dd>
775 <p>Various bug fixes have been included.</p>
776 </dd>
777 </li>
778 <dt><strong><a name="item_tie_3a_3arefhash">Tie::RefHash</a></strong>
780 <dd>
781 <p>Now supports Tie::RefHash::Nestable to automagically tie hashref values.</p>
782 </dd>
783 </li>
784 <dt><strong><a name="item_tie_3a_3asubstrhash">Tie::SubstrHash</a></strong>
786 <dd>
787 <p>Various bug fixes have been included.</p>
788 </dd>
789 </li>
790 </dl>
792 </p>
793 <h2><a name="platformspecific_improvements">Platform-specific improvements</a></h2>
794 <p>The following new ports are now available.</p>
795 <dl>
796 <dt><strong><a name="item_ncr_mp_2dras">NCR MP-RAS</a></strong>
798 <dt><strong><a name="item_nonstop_2dux">NonStop-UX</a></strong>
800 </dl>
801 <p>Perl now builds under Amdahl UTS.</p>
802 <p>Perl has also been verified to build under Amiga OS.</p>
803 <p>Support for EPOC has been much improved. See README.epoc.</p>
804 <p>Building perl with -Duseithreads or -Duse5005threads now works
805 under HP-UX 10.20 (previously it only worked under 10.30 or later).
806 You will need a thread library package installed. See README.hpux.</p>
807 <p>Long doubles should now work under Linux.</p>
808 <p>Mac OS Classic is now supported in the mainstream source package.
809 See README.macos.</p>
810 <p>Support for MPE/iX has been updated. See README.mpeix.</p>
811 <p>Support for OS/2 has been improved. See <code>os2/Changes</code> and README.os2.</p>
812 <p>Dynamic loading on z/OS (formerly OS/390) has been improved. See
813 README.os390.</p>
814 <p>Support for VMS has seen many incremental improvements, including
815 better support for operators like backticks and system(), and better
816 %ENV handling. See <code>README.vms</code> and <a href="file://C|\msysgit\mingw\html/pod/perlvms.html">the perlvms manpage</a>.</p>
817 <p>Support for Stratus VOS has been improved. See <code>vos/Changes</code> and README.vos.</p>
818 <p>Support for Windows has been improved.</p>
819 <ul>
820 <li>
821 <p><code>fork()</code> emulation has been improved in various ways, but still continues
822 to be experimental. See <a href="file://C|\msysgit\mingw\html/pod/perlfork.html">the perlfork manpage</a> for known bugs and caveats.</p>
823 </li>
824 <li>
825 <p>%SIG has been enabled under USE_ITHREADS, but its use is completely
826 unsupported under all configurations.</p>
827 </li>
828 <li>
829 <p>Borland C++ v5.5 is now a supported compiler that can build Perl.
830 However, the generated binaries continue to be incompatible with those
831 generated by the other supported compilers (GCC and Visual C++).</p>
832 </li>
833 <li>
834 <p>Non-blocking waits for child processes (or pseudo-processes) are
835 supported via <code>waitpid($pid, &amp;POSIX::WNOHANG)</code>.</p>
836 </li>
837 <li>
838 <p>A memory leak in <code>accept()</code> has been fixed.</p>
839 </li>
840 <li>
841 <p>wait(), <code>waitpid()</code> and backticks now return the correct exit status under
842 Windows 9x.</p>
843 </li>
844 <li>
845 <p>Trailing new %ENV entries weren't propagated to child processes. This
846 is now fixed.</p>
847 </li>
848 <li>
849 <p>Current directory entries in %ENV are now correctly propagated to child
850 processes.</p>
851 </li>
852 <li>
853 <p>Duping socket handles with open(F, ``&gt;&amp;MYSOCK'') now works under Windows 9x.</p>
854 </li>
855 <li>
856 <p>The makefiles now provide a single switch to bulk-enable all the features
857 enabled in ActiveState ActivePerl (a popular binary distribution).</p>
858 </li>
859 <li>
860 <p>Win32::GetCwd() correctly returns C:\ instead of C: when at the drive root.
861 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.</p>
862 </li>
863 <li>
864 <p><code>fork()</code> correctly returns undef and sets EAGAIN when it runs out of
865 pseudo-process handles.</p>
866 </li>
867 <li>
868 <p>ExtUtils::MakeMaker now uses $ENV{LIB} to search for libraries.</p>
869 </li>
870 <li>
871 <p>UNC path handling is better when perl is built to support fork().</p>
872 </li>
873 <li>
874 <p>A handle leak in socket handling has been fixed.</p>
875 </li>
876 <li>
877 <p><a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_send"><code>send()</code></a> works from within a pseudo-process.</p>
878 </li>
879 </ul>
880 <p>Unless specifically qualified otherwise, the remainder of this document
881 covers changes between the 5.005 and 5.6.0 releases.</p>
883 </p>
884 <hr />
885 <h1><a name="core_enhancements">Core Enhancements</a></h1>
887 </p>
888 <h2><a name="interpreter_cloning__threads__and_concurrency">Interpreter cloning, threads, and concurrency</a></h2>
889 <p>Perl 5.6.0 introduces the beginnings of support for running multiple
890 interpreters concurrently in different threads. In conjunction with
891 the <code>perl_clone()</code> API call, which can be used to selectively duplicate
892 the state of any given interpreter, it is possible to compile a
893 piece of code once in an interpreter, clone that interpreter
894 one or more times, and run all the resulting interpreters in distinct
895 threads.</p>
896 <p>On the Windows platform, this feature is used to emulate <code>fork()</code> at the
897 interpreter level. See <a href="file://C|\msysgit\mingw\html/pod/perlfork.html">the perlfork manpage</a> for details about that.</p>
898 <p>This feature is still in evolution. It is eventually meant to be used
899 to selectively clone a subroutine and data reachable from that
900 subroutine in a separate interpreter and run the cloned subroutine
901 in a separate thread. Since there is no shared data between the
902 interpreters, little or no locking will be needed (unless parts of
903 the symbol table are explicitly shared). This is obviously intended
904 to be an easy-to-use replacement for the existing threads support.</p>
905 <p>Support for cloning interpreters and interpreter concurrency can be
906 enabled using the -Dusethreads Configure option (see win32/Makefile for
907 how to enable it on Windows.) The resulting perl executable will be
908 functionally identical to one that was built with -Dmultiplicity, but
909 the <code>perl_clone()</code> API call will only be available in the former.</p>
910 <p>-Dusethreads enables the cpp macro USE_ITHREADS by default, which in turn
911 enables Perl source code changes that provide a clear separation between
912 the op tree and the data it operates with. The former is immutable, and
913 can therefore be shared between an interpreter and all of its clones,
914 while the latter is considered local to each interpreter, and is therefore
915 copied for each clone.</p>
916 <p>Note that building Perl with the -Dusemultiplicity Configure option
917 is adequate if you wish to run multiple <strong>independent</strong> interpreters
918 concurrently in different threads. -Dusethreads only provides the
919 additional functionality of the <code>perl_clone()</code> API call and other
920 support for running <strong>cloned</strong> interpreters concurrently.</p>
921 <pre>
922 NOTE: This is an experimental feature. Implementation details are
923 subject to change.</pre>
925 </p>
926 <h2><a name="lexically_scoped_warning_categories">Lexically scoped warning categories</a></h2>
927 <p>You can now control the granularity of warnings emitted by perl at a finer
928 level using the <code>use warnings</code> pragma. <a href="file://C|\msysgit\mingw\html/lib/warnings.html">the warnings manpage</a> and <a href="file://C|\msysgit\mingw\html/pod/perllexwarn.html">the perllexwarn manpage</a>
929 have copious documentation on this feature.</p>
931 </p>
932 <h2><a name="unicode_and_utf8_support">Unicode and UTF-8 support</a></h2>
933 <p>Perl now uses UTF-8 as its internal representation for character
934 strings. The <code>utf8</code> and <code>bytes</code> pragmas are used to control this support
935 in the current lexical scope. 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 <a href="file://C|\msysgit\mingw\html/lib/bytes.html">the bytes manpage</a> for
936 more information.</p>
937 <p>This feature is expected to evolve quickly to support some form of I/O
938 disciplines that can be used to specify the kind of input and output data
939 (bytes or characters). Until that happens, additional modules from CPAN
940 will be needed to complete the toolkit for dealing with Unicode.</p>
941 <pre>
942 NOTE: This should be considered an experimental feature. Implementation
943 details are subject to change.</pre>
945 </p>
946 <h2><a name="support_for_interpolating_named_characters">Support for interpolating named characters</a></h2>
947 <p>The new <code>\N</code> escape interpolates named characters within strings.
948 For example, <code>&quot;Hi! \N{WHITE SMILING FACE}&quot;</code> evaluates to a string
949 with a Unicode smiley face at the end.</p>
951 </p>
952 <h2><a name="our_declarations">``our'' declarations</a></h2>
953 <p>An ``our'' declaration introduces a value that can be best understood
954 as a lexically scoped symbolic alias to a global variable in the
955 package that was current where the variable was declared. This is
956 mostly useful as an alternative to the <code>vars</code> pragma, but also provides
957 the opportunity to introduce typing and other attributes for such
958 variables. See <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_our">our in the perlfunc manpage</a>.</p>
960 </p>
961 <h2><a name="support_for_strings_represented_as_a_vector_of_ordinals">Support for strings represented as a vector of ordinals</a></h2>
962 <p>Literals of the form <code>v1.2.3.4</code> are now parsed as a string composed
963 of characters with the specified ordinals. This is an alternative, more
964 readable way to construct (possibly Unicode) strings instead of
965 interpolating characters, as in <code>&quot;\x{1}\x{2}\x{3}\x{4}&quot;</code>. The leading
966 <code>v</code> may be omitted if there are more than two ordinals, so <code>1.2.3</code> is
967 parsed the same as <code>v1.2.3</code>.</p>
968 <p>Strings written in this form are also useful to represent version ``numbers''.
969 It is easy to compare such version ``numbers'' (which are really just plain
970 strings) using any of the usual string comparison operators <code>eq</code>, <code>ne</code>,
971 <code>lt</code>, <code>gt</code>, etc., or perform bitwise string operations on them using <code>|</code>,
972 <code>&amp;</code>, etc.</p>
973 <p>In conjunction with the new <a href="file://C|\msysgit\mingw\html/pod/perlvar.html#item___v"><code>$^V</code></a> magic variable (which contains
974 the perl version as a string), such literals can be used as a readable way
975 to check if you're running a particular version of Perl:</p>
976 <pre>
977 # this will parse in older versions of Perl also
978 if ($^V and $^V gt v5.6.0) {
979 # new features supported
980 }</pre>
981 <p><a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_require"><code>require</code></a> and <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_use"><code>use</code></a> also have some special magic to support such literals.
982 They will be interpreted as a version rather than as a module name:</p>
983 <pre>
984 require v5.6.0; # croak if $^V lt v5.6.0
985 use v5.6.0; # same, but croaks at compile-time</pre>
986 <p>Alternatively, the <code>v</code> may be omitted if there is more than one dot:</p>
987 <pre>
988 require 5.6.0;
989 use 5.6.0;</pre>
990 <p>Also, <code>sprintf</code> and <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_printf"><code>printf</code></a> support the Perl-specific format flag <code>%v</code>
991 to print ordinals of characters in arbitrary strings:</p>
992 <pre>
993 printf &quot;v%vd&quot;, $^V; # prints current version, such as &quot;v5.5.650&quot;
994 printf &quot;%*vX&quot;, &quot;:&quot;, $addr; # formats IPv6 address
995 printf &quot;%*vb&quot;, &quot; &quot;, $bits; # displays bitstring</pre>
996 <p>See <a href="file://C|\msysgit\mingw\html/pod/perldata.html#scalar_value_constructors">Scalar value constructors in the perldata manpage</a> for additional information.</p>
998 </p>
999 <h2><a name="improved_perl_version_numbering_system">Improved Perl version numbering system</a></h2>
1000 <p>Beginning with Perl version 5.6.0, the version number convention has been
1001 changed to a ``dotted integer'' scheme that is more commonly found in open
1002 source projects.</p>
1003 <p>Maintenance versions of v5.6.0 will be released as v5.6.1, v5.6.2 etc.
1004 The next development series following v5.6.0 will be numbered v5.7.x,
1005 beginning with v5.7.0, and the next major production release following
1006 v5.6.0 will be v5.8.0.</p>
1007 <p>The English module now sets $PERL_VERSION to $^V (a string value) rather
1008 than <a href="file://C|\msysgit\mingw\html/pod/perlvar.html#item___"><code>$]</code></a> (a numeric value). (This is a potential incompatibility.
1009 Send us a report via perlbug if you are affected by this.)</p>
1010 <p>The v1.2.3 syntax is also now legal in Perl.
1011 See <a href="#support_for_strings_represented_as_a_vector_of_ordinals">Support for strings represented as a vector of ordinals</a> for more on that.</p>
1012 <p>To cope with the new versioning system's use of at least three significant
1013 digits for each version component, the method used for incrementing the
1014 subversion number has also changed slightly. We assume that versions older
1015 than v5.6.0 have been incrementing the subversion component in multiples of
1016 10. Versions after v5.6.0 will increment them by 1. Thus, using the new
1017 notation, 5.005_03 is the ``same'' as v5.5.30, and the first maintenance
1018 version following v5.6.0 will be v5.6.1 (which should be read as being
1019 equivalent to a floating point value of 5.006_001 in the older format,
1020 stored in <a href="file://C|\msysgit\mingw\html/pod/perlvar.html#item___"><code>$]</code></a>).</p>
1022 </p>
1023 <h2><a name="new_syntax_for_declaring_subroutine_attributes">New syntax for declaring subroutine attributes</a></h2>
1024 <p>Formerly, if you wanted to mark a subroutine as being a method call or
1025 as requiring an automatic <code>lock()</code> when it is entered, you had to declare
1026 that with a <code>use attrs</code> pragma in the body of the subroutine.
1027 That can now be accomplished with declaration syntax, like this:</p>
1028 <pre>
1029 sub mymethod : locked method;
1031 sub mymethod : locked method {
1033 }</pre>
1034 <pre>
1035 sub othermethod :locked :method;
1037 sub othermethod :locked :method {
1039 }</pre>
1040 <p>(Note how only the first <code>:</code> is mandatory, and whitespace surrounding
1041 the <code>:</code> is optional.)</p>
1042 <p><em>AutoSplit.pm</em> and <em>SelfLoader.pm</em> have been updated to keep the attributes
1043 with the stubs they provide. See <a href="file://C|\msysgit\mingw\html/lib/attributes.html">the attributes manpage</a>.</p>
1045 </p>
1046 <h2><a name="file_and_directory_handles_can_be_autovivified">File and directory handles can be autovivified</a></h2>
1047 <p>Similar to how constructs such as <code>$x-&gt;[0]</code> autovivify a reference,
1048 handle constructors (open(), opendir(), pipe(), socketpair(), sysopen(),
1049 socket(), and <code>accept())</code> now autovivify a file or directory handle
1050 if the handle passed to them is an uninitialized scalar variable. This
1051 allows the constructs such as <a href="#item_open"><code>open(my $fh, ...)</code></a> and <a href="#item_open"><code>open(local $fh,...)</code></a>
1052 to be used to create filehandles that will conveniently be closed
1053 automatically when the scope ends, provided there are no other references
1054 to them. This largely eliminates the need for typeglobs when opening
1055 filehandles that must be passed around, as in the following example:</p>
1056 <pre>
1057 sub myopen {
1058 open my $fh, &quot;@_&quot;
1059 or die &quot;Can't open '@_': $!&quot;;
1060 return $fh;
1061 }</pre>
1062 <pre>
1064 my $f = myopen(&quot;&lt;/etc/motd&quot;);
1065 print &lt;$f&gt;;
1066 # $f implicitly closed here
1067 }</pre>
1069 </p>
1070 <h2><a name="open___with_more_than_two_arguments"><a href="#item_open"><code>open()</code></a> with more than two arguments</a></h2>
1071 <p>If <a href="#item_open"><code>open()</code></a> is passed three arguments instead of two, the second argument
1072 is used as the mode and the third argument is taken to be the file name.
1073 This is primarily useful for protecting against unintended magic behavior
1074 of the traditional two-argument form. See <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_open">open in the perlfunc manpage</a>.</p>
1076 </p>
1077 <h2><a name="64bit_support">64-bit support</a></h2>
1078 <p>Any platform that has 64-bit integers either</p>
1079 <pre>
1080 (1) natively as longs or ints
1081 (2) via special compiler flags
1082 (3) using long long or int64_t</pre>
1083 <p>is able to use ``quads'' (64-bit integers) as follows:</p>
1084 <ul>
1085 <li>
1086 <p>constants (decimal, hexadecimal, octal, binary) in the code</p>
1087 </li>
1088 <li>
1089 <p>arguments to <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_oct"><code>oct()</code></a> and <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_hex"><code>hex()</code></a></p>
1090 </li>
1091 <li>
1092 <p>arguments to print(), <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_printf"><code>printf()</code></a> and <code>sprintf()</code> (flag prefixes ll, L, q)</p>
1093 </li>
1094 <li>
1095 <p>printed as such</p>
1096 </li>
1097 <li>
1098 <p><code>pack()</code> and <code>unpack()</code> ``q'' and ``Q'' formats</p>
1099 </li>
1100 <li>
1101 <p>in basic arithmetics: + - * / % (NOTE: operating close to the limits
1102 of the integer values may produce surprising results)</p>
1103 </li>
1104 <li>
1105 <p>in bit arithmetics: &amp; | ^ ~ &lt;&lt; &gt;&gt; (NOTE: these used to be forced
1106 to be 32 bits wide but now operate on the full native width.)</p>
1107 </li>
1108 <li>
1109 <p><a href="#item_vec"><code>vec()</code></a></p>
1110 </li>
1111 </ul>
1112 <p>Note that unless you have the case (a) you will have to configure
1113 and compile Perl using the -Duse64bitint Configure flag.</p>
1114 <pre>
1115 NOTE: The Configure flags -Duselonglong and -Duse64bits have been
1116 deprecated. Use -Duse64bitint instead.</pre>
1117 <p>There are actually two modes of 64-bitness: the first one is achieved
1118 using Configure -Duse64bitint and the second one using Configure
1119 -Duse64bitall. The difference is that the first one is minimal and
1120 the second one maximal. The first works in more places than the second.</p>
1121 <p>The <code>use64bitint</code> does only as much as is required to get 64-bit
1122 integers into Perl (this may mean, for example, using ``long longs'')
1123 while your memory may still be limited to 2 gigabytes (because your
1124 pointers could still be 32-bit). Note that the name <code>64bitint</code> does
1125 not imply that your C compiler will be using 64-bit <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_int"><code>int</code></a>s (it might,
1126 but it doesn't have to): the <code>use64bitint</code> means that you will be
1127 able to have 64 bits wide scalar values.</p>
1128 <p>The <code>use64bitall</code> goes all the way by attempting to switch also
1129 integers (if it can), longs (and pointers) to being 64-bit. This may
1130 create an even more binary incompatible Perl than -Duse64bitint: the
1131 resulting executable may not run at all in a 32-bit box, or you may
1132 have to reboot/reconfigure/rebuild your operating system to be 64-bit
1133 aware.</p>
1134 <p>Natively 64-bit systems like Alpha and Cray need neither -Duse64bitint
1135 nor -Duse64bitall.</p>
1136 <p>Last but not least: note that due to Perl's habit of always using
1137 floating point numbers, the quads are still not true integers.
1138 When quads overflow their limits (0...18_446_744_073_709_551_615 unsigned,
1139 -9_223_372_036_854_775_808...9_223_372_036_854_775_807 signed), they
1140 are silently promoted to floating point numbers, after which they will
1141 start losing precision (in their lower digits).</p>
1142 <pre>
1143 NOTE: 64-bit support is still experimental on most platforms.
1144 Existing support only covers the LP64 data model. In particular, the
1145 LLP64 data model is not yet supported. 64-bit libraries and system
1146 APIs on many platforms have not stabilized--your mileage may vary.</pre>
1148 </p>
1149 <h2><a name="large_file_support">Large file support</a></h2>
1150 <p>If you have filesystems that support ``large files'' (files larger than
1151 2 gigabytes), you may now also be able to create and access them from
1152 Perl.</p>
1153 <pre>
1154 NOTE: The default action is to enable large file support, if
1155 available on the platform.</pre>
1156 <p>If the large file support is on, and you have a Fcntl constant
1157 O_LARGEFILE, the O_LARGEFILE is automatically added to the flags
1158 of sysopen().</p>
1159 <p>Beware that unless your filesystem also supports ``sparse files'' seeking
1160 to umpteen petabytes may be inadvisable.</p>
1161 <p>Note that in addition to requiring a proper file system to do large
1162 files you may also need to adjust your per-process (or your
1163 per-system, or per-process-group, or per-user-group) maximum filesize
1164 limits before running Perl scripts that try to handle large files,
1165 especially if you intend to write such files.</p>
1166 <p>Finally, in addition to your process/process group maximum filesize
1167 limits, you may have quota limits on your filesystems that stop you
1168 (your user id or your user group id) from using large files.</p>
1169 <p>Adjusting your process/user/group/file system/operating system limits
1170 is outside the scope of Perl core language. For process limits, you
1171 may try increasing the limits using your shell's limits/limit/ulimit
1172 command before running Perl. The BSD::Resource extension (not
1173 included with the standard Perl distribution) may also be of use, it
1174 offers the getrlimit/setrlimit interface that can be used to adjust
1175 process resource usage limits, including the maximum filesize limit.</p>
1177 </p>
1178 <h2><a name="long_doubles">Long doubles</a></h2>
1179 <p>In some systems you may be able to use long doubles to enhance the
1180 range and precision of your double precision floating point numbers
1181 (that is, Perl's numbers). Use Configure -Duselongdouble to enable
1182 this support (if it is available).</p>
1184 </p>
1185 <h2><a name="more_bits">``more bits''</a></h2>
1186 <p>You can ``Configure -Dusemorebits'' to turn on both the 64-bit support
1187 and the long double support.</p>
1189 </p>
1190 <h2><a name="enhanced_support_for_sort___subroutines">Enhanced support for <a href="#item_sort"><code>sort()</code></a> subroutines</a></h2>
1191 <p>Perl subroutines with a prototype of <code>($$)</code>, and XSUBs in general, can
1192 now be used as sort subroutines. In either case, the two elements to
1193 be compared are passed as normal parameters in @_. See <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_sort">sort in the perlfunc manpage</a>.</p>
1194 <p>For unprototyped sort subroutines, the historical behavior of passing
1195 the elements to be compared as the global variables $a and $b remains
1196 unchanged.</p>
1198 </p>
1199 <h2><a name="sort__coderef__foo_allowed"><code>sort $coderef @foo</code> allowed</a></h2>
1200 <p><a href="#item_sort"><code>sort()</code></a> did not accept a subroutine reference as the comparison
1201 function in earlier versions. This is now permitted.</p>
1203 </p>
1204 <h2><a name="file_globbing_implemented_internally">File globbing implemented internally</a></h2>
1205 <p>Perl now uses the File::Glob implementation of the <a href="#item_glob"><code>glob()</code></a> operator
1206 automatically. This avoids using an external csh process and the
1207 problems associated with it.</p>
1208 <pre>
1209 NOTE: This is currently an experimental feature. Interfaces and
1210 implementation are subject to change.</pre>
1212 </p>
1213 <h2><a name="support_for_check_blocks">Support for CHECK blocks</a></h2>
1214 <p>In addition to <code>BEGIN</code>, <code>INIT</code>, <code>END</code>, <code>DESTROY</code> and <code>AUTOLOAD</code>,
1215 subroutines named <code>CHECK</code> are now special. These are queued up during
1216 compilation and behave similar to END blocks, except they are called at
1217 the end of compilation rather than at the end of execution. They cannot
1218 be called directly.</p>
1220 </p>
1221 <h2><a name="posix_character_class_syntax_______supported">POSIX character class syntax [: :] supported</a></h2>
1222 <p>For example to match alphabetic characters use /[[:alpha:]]/.
1223 See <a href="file://C|\msysgit\mingw\html/pod/perlre.html">the perlre manpage</a> for details.</p>
1225 </p>
1226 <h2><a name="better_pseudorandom_number_generator">Better pseudo-random number generator</a></h2>
1227 <p>In 5.005_0x and earlier, perl's <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_rand"><code>rand()</code></a> function used the C library
1228 <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_rand"><code>rand(3)</code></a> function. As of 5.005_52, Configure tests for drand48(),
1229 random(), and <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_rand"><code>rand()</code></a> (in that order) and picks the first one it finds.</p>
1230 <p>These changes should result in better random numbers from rand().</p>
1232 </p>
1233 <h2><a name="improved_qw___operator">Improved <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_qw_"><code>qw//</code></a> operator</a></h2>
1234 <p>The <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_qw_"><code>qw//</code></a> operator is now evaluated at compile time into a true list
1235 instead of being replaced with a run time call to <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_split"><code>split()</code></a>. This
1236 removes the confusing misbehaviour of <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_qw_"><code>qw//</code></a> in scalar context, which
1237 had inherited that behaviour from split().</p>
1238 <p>Thus:</p>
1239 <pre>
1240 $foo = ($bar) = qw(a b c); print &quot;$foo|$bar\n&quot;;</pre>
1241 <p>now correctly prints ``3|a'', instead of ``2|a''.</p>
1243 </p>
1244 <h2><a name="better_worstcase_behavior_of_hashes">Better worst-case behavior of hashes</a></h2>
1245 <p>Small changes in the hashing algorithm have been implemented in
1246 order to improve the distribution of lower order bits in the
1247 hashed value. This is expected to yield better performance on
1248 keys that are repeated sequences.</p>
1250 </p>
1251 <h2><a name="pack___format__z__supported"><code>pack()</code> format 'Z' supported</a></h2>
1252 <p>The new format type 'Z' is useful for packing and unpacking null-terminated
1253 strings. See <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#pack">pack in the perlfunc manpage</a>.</p>
1255 </p>
1256 <h2><a name="pack___format_modifier_____supported"><code>pack()</code> format modifier '!' supported</a></h2>
1257 <p>The new format type modifier '!' is useful for packing and unpacking
1258 native shorts, ints, and longs. See <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#pack">pack in the perlfunc manpage</a>.</p>
1260 </p>
1261 <h2><a name="pack___and_unpack___support_counted_strings"><code>pack()</code> and <code>unpack()</code> support counted strings</a></h2>
1262 <p>The template character '/' can be used to specify a counted string
1263 type to be packed or unpacked. See <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#pack">pack in the perlfunc manpage</a>.</p>
1265 </p>
1266 <h2><a name="comments_in_pack___templates">Comments in <code>pack()</code> templates</a></h2>
1267 <p>The '#' character in a template introduces a comment up to
1268 end of the line. This facilitates documentation of <code>pack()</code>
1269 templates.</p>
1271 </p>
1272 <h2><a name="weak_references">Weak references</a></h2>
1273 <p>In previous versions of Perl, you couldn't cache objects so as
1274 to allow them to be deleted if the last reference from outside
1275 the cache is deleted. The reference in the cache would hold a
1276 reference count on the object and the objects would never be
1277 destroyed.</p>
1278 <p>Another familiar problem is with circular references. When an
1279 object references itself, its reference count would never go
1280 down to zero, and it would not get destroyed until the program
1281 is about to exit.</p>
1282 <p>Weak references solve this by allowing you to ``weaken'' any
1283 reference, that is, make it not count towards the reference count.
1284 When the last non-weak reference to an object is deleted, the object
1285 is destroyed and all the weak references to the object are
1286 automatically undef-ed.</p>
1287 <p>To use this feature, you need the Devel::WeakRef package from CPAN, which
1288 contains additional documentation.</p>
1289 <pre>
1290 NOTE: This is an experimental feature. Details are subject to change.</pre>
1292 </p>
1293 <h2><a name="binary_numbers_supported">Binary numbers supported</a></h2>
1294 <p>Binary numbers are now supported as literals, in s?printf formats, and
1295 <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_oct"><code>oct()</code></a>:</p>
1296 <pre>
1297 $answer = 0b101010;
1298 printf &quot;The answer is: %b\n&quot;, oct(&quot;0b101010&quot;);</pre>
1300 </p>
1301 <h2><a name="lvalue_subroutines">Lvalue subroutines</a></h2>
1302 <p>Subroutines can now return modifiable lvalues.
1303 See <a href="file://C|\msysgit\mingw\html/pod/perlsub.html#lvalue_subroutines">Lvalue subroutines in the perlsub manpage</a>.</p>
1304 <pre>
1305 NOTE: This is an experimental feature. Details are subject to change.</pre>
1307 </p>
1308 <h2><a name="some_arrows_may_be_omitted_in_calls_through_references">Some arrows may be omitted in calls through references</a></h2>
1309 <p>Perl now allows the arrow to be omitted in many constructs
1310 involving subroutine calls through references. For example,
1311 <code>$foo[10]-&gt;('foo')</code> may now be written <code>$foo[10]('foo')</code>.
1312 This is rather similar to how the arrow may be omitted from
1313 <code>$foo[10]-&gt;{'foo'}</code>. Note however, that the arrow is still
1314 required for <code>foo(10)-&gt;('bar')</code>.</p>
1316 </p>
1317 <h2><a name="boolean_assignment_operators_are_legal_lvalues">Boolean assignment operators are legal lvalues</a></h2>
1318 <p>Constructs such as <code>($a ||= 2) += 1</code> are now allowed.</p>
1320 </p>
1321 <h2><a name="exists___is_supported_on_subroutine_names"><code>exists()</code> is supported on subroutine names</a></h2>
1322 <p>The <code>exists()</code> builtin now works on subroutine names. A subroutine
1323 is considered to exist if it has been declared (even if implicitly).
1324 See <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#exists">exists in the perlfunc manpage</a> for examples.</p>
1326 </p>
1327 <h2><a name="exists___and_delete___are_supported_on_array_elements"><code>exists()</code> and <a href="#item_delete"><code>delete()</code></a> are supported on array elements</a></h2>
1328 <p>The <code>exists()</code> and <a href="#item_delete"><code>delete()</code></a> builtins now work on simple arrays as well.
1329 The behavior is similar to that on hash elements.</p>
1330 <p><code>exists()</code> can be used to check whether an array element has been
1331 initialized. This avoids autovivifying array elements that don't exist.
1332 If the array is tied, the <code>EXISTS()</code> method in the corresponding tied
1333 package will be invoked.</p>
1334 <p><a href="#item_delete"><code>delete()</code></a> may be used to remove an element from the array and return
1335 it. The array element at that position returns to its uninitialized
1336 state, so that testing for the same element with <code>exists()</code> will return
1337 false. If the element happens to be the one at the end, the size of
1338 the array also shrinks up to the highest element that tests true for
1339 exists(), or 0 if none such is found. If the array is tied, the <code>DELETE()</code>
1340 method in the corresponding tied package will be invoked.</p>
1341 <p>See <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#exists">exists in the perlfunc manpage</a> and <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#delete">delete in the perlfunc manpage</a> for examples.</p>
1343 </p>
1344 <h2><a name="pseudohashes_work_better">Pseudo-hashes work better</a></h2>
1345 <p>Dereferencing some types of reference values in a pseudo-hash,
1346 such as <code>$ph-&gt;{foo}[1]</code>, was accidentally disallowed. This has
1347 been corrected.</p>
1348 <p>When applied to a pseudo-hash element, <code>exists()</code> now reports whether
1349 the specified value exists, not merely if the key is valid.</p>
1350 <p><a href="#item_delete"><code>delete()</code></a> now works on pseudo-hashes. When given a pseudo-hash element
1351 or slice it deletes the values corresponding to the keys (but not the keys
1352 themselves). See <a href="file://C|\msysgit\mingw\html/pod/perlref.html#pseudohashes__using_an_array_as_a_hash">Pseudo-hashes: Using an array as a hash in the perlref manpage</a>.</p>
1353 <p>Pseudo-hash slices with constant keys are now optimized to array lookups
1354 at compile-time.</p>
1355 <p>List assignments to pseudo-hash slices are now supported.</p>
1356 <p>The <code>fields</code> pragma now provides ways to create pseudo-hashes, via
1357 fields::new() and fields::phash(). See <a href="file://C|\msysgit\mingw\html/lib/fields.html">the fields manpage</a>.</p>
1358 <pre>
1359 NOTE: The pseudo-hash data type continues to be experimental.
1360 Limiting oneself to the interface elements provided by the
1361 fields pragma will provide protection from any future changes.</pre>
1363 </p>
1364 <h2><a name="automatic_flushing_of_output_buffers">Automatic flushing of output buffers</a></h2>
1365 <p>fork(), exec(), system(), qx//, and pipe open()s now flush buffers
1366 of all files opened for output when the operation was attempted. This
1367 mostly eliminates confusing buffering mishaps suffered by users unaware
1368 of how Perl internally handles I/O.</p>
1369 <p>This is not supported on some platforms like Solaris where a suitably
1370 correct implementation of <code>fflush(NULL)</code> isn't available.</p>
1372 </p>
1373 <h2><a name="better_diagnostics_on_meaningless_filehandle_operations">Better diagnostics on meaningless filehandle operations</a></h2>
1374 <p>Constructs such as <a href="#item_open"><code>open(&lt;FH&gt;)</code></a> and <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_close"><code>close(&lt;FH&gt;)</code></a>
1375 are compile time errors. Attempting to read from filehandles that
1376 were opened only for writing will now produce warnings (just as
1377 writing to read-only filehandles does).</p>
1379 </p>
1380 <h2><a name="where_possible__buffered_data_discarded_from_duped_input_filehandle">Where possible, buffered data discarded from duped input filehandle</a></h2>
1381 <p><a href="#item_open"><code>open(NEW, &quot;&lt;&amp;OLD&quot;)</code></a> now attempts to discard any data that
1382 was previously read and buffered in <code>OLD</code> before duping the handle.
1383 On platforms where doing this is allowed, the next read operation
1384 on <code>NEW</code> will return the same data as the corresponding operation
1385 on <code>OLD</code>. Formerly, it would have returned the data from the start
1386 of the following disk block instead.</p>
1388 </p>
1389 <h2><a name="eof___has_the_same_old_magic_as___"><a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_eof"><code>eof()</code></a> has the same old magic as &lt;&gt;</a></h2>
1390 <p><a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_eof"><code>eof()</code></a> would return true if no attempt to read from <code>&lt;&gt;</code> had
1391 yet been made. <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_eof"><code>eof()</code></a> has been changed to have a little magic of its
1392 own, it now opens the <code>&lt;&gt;</code> files.</p>
1394 </p>
1395 <h2><a name="binmode___can_be_used_to_set__crlf_and__raw_modes"><a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_binmode"><code>binmode()</code></a> can be used to set :crlf and :raw modes</a></h2>
1396 <p><a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_binmode"><code>binmode()</code></a> now accepts a second argument that specifies a discipline
1397 for the handle in question. The two pseudo-disciplines ``:raw'' and
1398 ``:crlf'' are currently supported on DOS-derivative platforms.
1399 See <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_binmode">binmode in the perlfunc manpage</a> and <a href="file://C|\msysgit\mingw\html/lib/open.html">the open manpage</a>.</p>
1401 </p>
1402 <h2><a name="t_filetest_recognizes_utf8_encoded_files_as_text"><code>-T</code> filetest recognizes UTF-8 encoded files as ``text''</a></h2>
1403 <p>The algorithm used for the <code>-T</code> filetest has been enhanced to
1404 correctly identify UTF-8 content as ``text''.</p>
1406 </p>
1407 <h2><a name="system____backticks_and_pipe_open_now_reflect_exec___failure">system(), backticks and pipe open now reflect <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_exec"><code>exec()</code></a> failure</a></h2>
1408 <p>On Unix and similar platforms, system(), <code>qx()</code> and open(FOO, ``cmd |'')
1409 etc., are implemented via <code>fork()</code> and exec(). When the underlying
1410 <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_exec"><code>exec()</code></a> fails, earlier versions did not report the error properly,
1411 since the <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_exec"><code>exec()</code></a> happened to be in a different process.</p>
1412 <p>The child process now communicates with the parent about the
1413 error in launching the external command, which allows these
1414 constructs to return with their usual error value and set $!.</p>
1416 </p>
1417 <h2><a name="improved_diagnostics">Improved diagnostics</a></h2>
1418 <p>Line numbers are no longer suppressed (under most likely circumstances)
1419 during the global destruction phase.</p>
1420 <p>Diagnostics emitted from code running in threads other than the main
1421 thread are now accompanied by the thread ID.</p>
1422 <p>Embedded null characters in diagnostics now actually show up. They
1423 used to truncate the message in prior versions.</p>
1424 <p>$foo::a and $foo::b are now exempt from ``possible typo'' warnings only
1425 if <a href="#item_sort"><code>sort()</code></a> is encountered in package <code>foo</code>.</p>
1426 <p>Unrecognized alphabetic escapes encountered when parsing quote
1427 constructs now generate a warning, since they may take on new
1428 semantics in later versions of Perl.</p>
1429 <p>Many diagnostics now report the internal operation in which the warning
1430 was provoked, like so:</p>
1431 <pre>
1432 Use of uninitialized value in concatenation (.) at (eval 1) line 1.
1433 Use of uninitialized value in print at (eval 1) line 1.</pre>
1434 <p>Diagnostics that occur within eval may also report the file and line
1435 number where the eval is located, in addition to the eval sequence
1436 number and the line number within the evaluated text itself. For
1437 example:</p>
1438 <pre>
1439 Not enough arguments for scalar at (eval 4)[newlib/perl5db.pl:1411] line 2, at EOF</pre>
1441 </p>
1442 <h2><a name="diagnostics_follow_stderr">Diagnostics follow STDERR</a></h2>
1443 <p>Diagnostic output now goes to whichever file the <code>STDERR</code> handle
1444 is pointing at, instead of always going to the underlying C runtime
1445 library's <code>stderr</code>.</p>
1447 </p>
1448 <h2><a name="more_consistent_closeonexec_behavior">More consistent close-on-exec behavior</a></h2>
1449 <p>On systems that support a close-on-exec flag on filehandles, the
1450 flag is now set for any handles created by pipe(), socketpair(),
1451 socket(), and accept(), if that is warranted by the value of $^F
1452 that may be in effect. Earlier versions neglected to set the flag
1453 for handles created with these operators. See <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#pipe">pipe in the perlfunc manpage</a>,
1454 <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#socketpair">socketpair in the perlfunc manpage</a>, <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#socket">socket in the perlfunc manpage</a>, <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#accept">accept in the perlfunc manpage</a>,
1455 and <a href="file://C|\msysgit\mingw\html/pod/perlvar.html#item___f">$^F in the perlvar manpage</a>.</p>
1457 </p>
1458 <h2><a name="syswrite___easeofuse"><a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_syswrite"><code>syswrite()</code></a> ease-of-use</a></h2>
1459 <p>The length argument of <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_syswrite"><code>syswrite()</code></a> has become optional.</p>
1461 </p>
1462 <h2><a name="better_syntax_checks_on_parenthesized_unary_operators">Better syntax checks on parenthesized unary operators</a></h2>
1463 <p>Expressions such as:</p>
1464 <pre>
1465 print defined(&amp;foo,&amp;bar,&amp;baz);
1466 print uc(&quot;foo&quot;,&quot;bar&quot;,&quot;baz&quot;);
1467 undef($foo,&amp;bar);</pre>
1468 <p>used to be accidentally allowed in earlier versions, and produced
1469 unpredictable behaviour. Some produced ancillary warnings
1470 when used in this way; others silently did the wrong thing.</p>
1471 <p>The parenthesized forms of most unary operators that expect a single
1472 argument now ensure that they are not called with more than one
1473 argument, making the cases shown above syntax errors. The usual
1474 behaviour of:</p>
1475 <pre>
1476 print defined &amp;foo, &amp;bar, &amp;baz;
1477 print uc &quot;foo&quot;, &quot;bar&quot;, &quot;baz&quot;;
1478 undef $foo, &amp;bar;</pre>
1479 <p>remains unchanged. See <a href="file://C|\msysgit\mingw\html/pod/perlop.html">the perlop manpage</a>.</p>
1481 </p>
1482 <h2><a name="bit_operators_support_full_native_integer_width">Bit operators support full native integer width</a></h2>
1483 <p>The bit operators (&amp; | ^ ~ &lt;&lt; &gt;&gt;) now operate on the full native
1484 integral width (the exact size of which is available in $Config{ivsize}).
1485 For example, if your platform is either natively 64-bit or if Perl
1486 has been configured to use 64-bit integers, these operations apply
1487 to 8 bytes (as opposed to 4 bytes on 32-bit platforms).
1488 For portability, be sure to mask off the excess bits in the result of
1489 unary <code>~</code>, e.g., <code>~$x &amp; 0xffffffff</code>.</p>
1491 </p>
1492 <h2><a name="improved_security_features">Improved security features</a></h2>
1493 <p>More potentially unsafe operations taint their results for improved
1494 security.</p>
1495 <p>The <code>passwd</code> and <code>shell</code> fields returned by the getpwent(), getpwnam(),
1496 and <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_getpwuid"><code>getpwuid()</code></a> are now tainted, because the user can affect their own
1497 encrypted password and login shell.</p>
1498 <p>The variable modified by shmread(), and messages returned by <code>msgrcv()</code>
1499 (and its object-oriented interface IPC::SysV::Msg::rcv) are also tainted,
1500 because other untrusted processes can modify messages and shared memory
1501 segments for their own nefarious purposes.</p>
1503 </p>
1504 <h2><a name="more_functional_bareword_prototype____">More functional bareword prototype (*)</a></h2>
1505 <p>Bareword prototypes have been rationalized to enable them to be used
1506 to override builtins that accept barewords and interpret them in
1507 a special way, such as <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_require"><code>require</code></a> or <code>do</code>.</p>
1508 <p>Arguments prototyped as <code>*</code> will now be visible within the subroutine
1509 as either a simple scalar or as a reference to a typeglob.
1510 See <a href="file://C|\msysgit\mingw\html/pod/perlsub.html#prototypes">Prototypes in the perlsub manpage</a>.</p>
1512 </p>
1513 <h2><a name="require_and_do_may_be_overridden"><a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_require"><code>require</code></a> and <code>do</code> may be overridden</a></h2>
1514 <p><a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_require"><code>require</code></a> and <code>do 'file'</code> operations may be overridden locally
1515 by importing subroutines of the same name into the current package
1516 (or globally by importing them into the CORE::GLOBAL:: namespace).
1517 Overriding <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_require"><code>require</code></a> will also affect <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_use"><code>use</code></a>, provided the override
1518 is visible at compile-time.
1519 See <a href="file://C|\msysgit\mingw\html/pod/perlsub.html#overriding_builtin_functions">Overriding Built-in Functions in the perlsub manpage</a>.</p>
1521 </p>
1522 <h2><a name="__x_variables_may_now_have_names_longer_than_one_character">$^X variables may now have names longer than one character</a></h2>
1523 <p>Formerly, $^X was synonymous with ${``\cX''}, but $^XY was a syntax
1524 error. Now variable names that begin with a control character may be
1525 arbitrarily long. However, for compatibility reasons, these variables
1526 <em>must</em> be written with explicit braces, as <code>${^XY}</code> for example.
1527 <code>${^XYZ}</code> is synonymous with ${``\cXYZ''}. Variable names with more
1528 than one control character, such as <code>${^XY^Z}</code>, are illegal.</p>
1529 <p>The old syntax has not changed. As before, `^X' may be either a
1530 literal control-X character or the two-character sequence `caret' plus
1531 `X'. When braces are omitted, the variable name stops after the
1532 control character. Thus <code>&quot;$^XYZ&quot;</code> continues to be synonymous with
1533 <a href="file://C|\msysgit\mingw\html/pod/perlvar.html#item___x"><code>$^X . &quot;YZ&quot;</code></a> as before.</p>
1534 <p>As before, lexical variables may not have names beginning with control
1535 characters. As before, variables whose names begin with a control
1536 character are always forced to be in package `main'. All such variables
1537 are reserved for future extensions, except those that begin with
1538 <code>^_</code>, which may be used by user programs and are guaranteed not to
1539 acquire special meaning in any future version of Perl.</p>
1541 </p>
1542 <h2><a name="new_variable___c_reflects_c_switch">New variable $^C reflects <code>-c</code> switch</a></h2>
1543 <p><a href="file://C|\msysgit\mingw\html/pod/perlvar.html#item___c"><code>$^C</code></a> has a boolean value that reflects whether perl is being run
1544 in compile-only mode (i.e. via the <code>-c</code> switch). Since
1545 BEGIN blocks are executed under such conditions, this variable
1546 enables perl code to determine whether actions that make sense
1547 only during normal running are warranted. See <a href="file://C|\msysgit\mingw\html/pod/perlvar.html">the perlvar manpage</a>.</p>
1549 </p>
1550 <h2><a name="new_variable___v_contains_perl_version_as_a_string">New variable $^V contains Perl version as a string</a></h2>
1551 <p><a href="file://C|\msysgit\mingw\html/pod/perlvar.html#item___v"><code>$^V</code></a> contains the Perl version number as a string composed of
1552 characters whose ordinals match the version numbers, i.e. v5.6.0.
1553 This may be used in string comparisons.</p>
1554 <p>See <code>Support for strings represented as a vector of ordinals</code> for an
1555 example.</p>
1557 </p>
1558 <h2><a name="optional_y2k_warnings">Optional Y2K warnings</a></h2>
1559 <p>If Perl is built with the cpp macro <code>PERL_Y2KWARN</code> defined,
1560 it emits optional warnings when concatenating the number 19
1561 with another number.</p>
1562 <p>This behavior must be specifically enabled when running Configure.
1563 See <em>INSTALL</em> and <em>README.Y2K</em>.</p>
1565 </p>
1566 <h2><a name="arrays_now_always_interpolate_into_doublequoted_strings">Arrays now always interpolate into double-quoted strings</a></h2>
1567 <p>In double-quoted strings, arrays now interpolate, no matter what. The
1568 behavior in earlier versions of perl 5 was that arrays would interpolate
1569 into strings if the array had been mentioned before the string was
1570 compiled, and otherwise Perl would raise a fatal compile-time error.
1571 In versions 5.000 through 5.003, the error was</p>
1572 <pre>
1573 Literal @example now requires backslash</pre>
1574 <p>In versions 5.004_01 through 5.6.0, the error was</p>
1575 <pre>
1576 In string, @example now must be written as \@example</pre>
1577 <p>The idea here was to get people into the habit of writing
1578 <code>&quot;fred\@example.com&quot;</code> when they wanted a literal <code>@</code> sign, just as
1579 they have always written <code>&quot;Give me back my \$5&quot;</code> when they wanted a
1580 literal <code>$</code> sign.</p>
1581 <p>Starting with 5.6.1, when Perl now sees an <code>@</code> sign in a
1582 double-quoted string, it <em>always</em> attempts to interpolate an array,
1583 regardless of whether or not the array has been used or declared
1584 already. The fatal error has been downgraded to an optional warning:</p>
1585 <pre>
1586 Possible unintended interpolation of @example in string</pre>
1587 <p>This warns you that <code>&quot;fred@example.com&quot;</code> is going to turn into
1588 <code>fred.com</code> if you don't backslash the <code>@</code>.
1589 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
1590 about the history here.</p>
1592 </p>
1593 <h2><a name="__and____provide_starting_ending_offsets_of_regex_submatches">@- and @+ provide starting/ending offsets of regex submatches</a></h2>
1594 <p>The new magic variables @- and @+ provide the starting and ending
1595 offsets, respectively, of $&amp;, $1, $2, etc. See <a href="file://C|\msysgit\mingw\html/pod/perlvar.html">the perlvar manpage</a> for
1596 details.</p>
1598 </p>
1599 <hr />
1600 <h1><a name="modules_and_pragmata">Modules and Pragmata</a></h1>
1602 </p>
1603 <h2><a name="modules">Modules</a></h2>
1604 <dl>
1605 <dt><strong><a name="item_attributes">attributes</a></strong>
1607 <dd>
1608 <p>While used internally by Perl as a pragma, this module also
1609 provides a way to fetch subroutine and variable attributes.
1610 See <a href="file://C|\msysgit\mingw\html/lib/attributes.html">the attributes manpage</a>.</p>
1611 </dd>
1612 </li>
1613 <dt><strong><a name="item_b">B</a></strong>
1615 <dd>
1616 <p>The Perl Compiler suite has been extensively reworked for this
1617 release. More of the standard Perl testsuite passes when run
1618 under the Compiler, but there is still a significant way to
1619 go to achieve production quality compiled executables.</p>
1620 </dd>
1621 <dd>
1622 <pre>
1623 NOTE: The Compiler suite remains highly experimental. The
1624 generated code may not be correct, even when it manages to execute
1625 without errors.</pre>
1626 </dd>
1627 </li>
1628 <dt><strong><a name="item_benchmark">Benchmark</a></strong>
1630 <dd>
1631 <p>Overall, Benchmark results exhibit lower average error and better timing
1632 accuracy.</p>
1633 </dd>
1634 <dd>
1635 <p>You can now run tests for <em>n</em> seconds instead of guessing the right
1636 number of tests to run: e.g., timethese(-5, ...) will run each
1637 code for at least 5 CPU seconds. Zero as the ``number of repetitions''
1638 means ``for at least 3 CPU seconds''. The output format has also
1639 changed. For example:</p>
1640 </dd>
1641 <dd>
1642 <pre>
1643 use Benchmark;$x=3;timethese(-5,{a=&gt;sub{$x*$x},b=&gt;sub{$x**2}})</pre>
1644 </dd>
1645 <dd>
1646 <p>will now output something like this:</p>
1647 </dd>
1648 <dd>
1649 <pre>
1650 Benchmark: running a, b, each for at least 5 CPU seconds...
1651 a: 5 wallclock secs ( 5.77 usr + 0.00 sys = 5.77 CPU) @ 200551.91/s (n=1156516)
1652 b: 4 wallclock secs ( 5.00 usr + 0.02 sys = 5.02 CPU) @ 159605.18/s (n=800686)</pre>
1653 </dd>
1654 <dd>
1655 <p>New features: ``each for at least N CPU seconds...'', ``wallclock secs'',
1656 and the ``@ operations/CPU second (n=operations)''.</p>
1657 </dd>
1658 <dd>
1659 <p><code>timethese()</code> now returns a reference to a hash of Benchmark objects containing
1660 the test results, keyed on the names of the tests.</p>
1661 </dd>
1662 <dd>
1663 <p><code>timethis()</code> now returns the iterations field in the Benchmark result object
1664 instead of 0.</p>
1665 </dd>
1666 <dd>
1667 <p>timethese(), timethis(), and the new <code>cmpthese()</code> (see below) can also take
1668 a format specifier of 'none' to suppress output.</p>
1669 </dd>
1670 <dd>
1671 <p>A new function <code>countit()</code> is just like <code>timeit()</code> except that it takes a
1672 TIME instead of a COUNT.</p>
1673 </dd>
1674 <dd>
1675 <p>A new function <code>cmpthese()</code> prints a chart comparing the results of each test
1676 returned from a <code>timethese()</code> call. For each possible pair of tests, the
1677 percentage speed difference (iters/sec or seconds/iter) is shown.</p>
1678 </dd>
1679 <dd>
1680 <p>For other details, see <a href="file://C|\msysgit\mingw\html/lib/Benchmark.html">the Benchmark manpage</a>.</p>
1681 </dd>
1682 </li>
1683 <dt><strong><a name="item_byteloader">ByteLoader</a></strong>
1685 <dd>
1686 <p>The ByteLoader is a dedicated extension to generate and run
1687 Perl bytecode. See <a href="file://C|\msysgit\mingw\html/lib/ByteLoader.html">the ByteLoader manpage</a>.</p>
1688 </dd>
1689 </li>
1690 <dt><strong><a name="item_constant">constant</a></strong>
1692 <dd>
1693 <p>References can now be used.</p>
1694 </dd>
1695 <dd>
1696 <p>The new version also allows a leading underscore in constant names, but
1697 disallows a double leading underscore (as in ``__LINE__''). Some other names
1698 are disallowed or warned against, including BEGIN, END, etc. Some names
1699 which were forced into main:: used to fail silently in some cases; now they're
1700 fatal (outside of main::) and an optional warning (inside of main::).
1701 The ability to detect whether a constant had been set with a given name has
1702 been added.</p>
1703 </dd>
1704 <dd>
1705 <p>See <a href="file://C|\msysgit\mingw\html/lib/constant.html">the constant manpage</a>.</p>
1706 </dd>
1707 </li>
1708 <dt><strong><a name="item_charnames">charnames</a></strong>
1710 <dd>
1711 <p>This pragma implements the <code>\N</code> string escape. See <a href="file://C|\msysgit\mingw\html/lib/charnames.html">the charnames manpage</a>.</p>
1712 </dd>
1713 </li>
1714 <dt><strong><a name="item_data_3a_3adumper">Data::Dumper</a></strong>
1716 <dd>
1717 <p>A <code>Maxdepth</code> setting can be specified to avoid venturing
1718 too deeply into deep data structures. See <a href="file://C|\msysgit\mingw\html/lib/Data/Dumper.html">the Data::Dumper manpage</a>.</p>
1719 </dd>
1720 <dd>
1721 <p>The XSUB implementation of <code>Dump()</code> is now automatically called if the
1722 <code>Useqq</code> setting is not in use.</p>
1723 </dd>
1724 <dd>
1725 <p>Dumping <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_qr_"><code>qr//</code></a> objects works correctly.</p>
1726 </dd>
1727 </li>
1728 <dt><strong><a name="item_db">DB</a></strong>
1730 <dd>
1731 <p><a href="#item_db"><code>DB</code></a> is an experimental module that exposes a clean abstraction
1732 to Perl's debugging API.</p>
1733 </dd>
1734 </li>
1735 <dt><strong>DB_File</strong>
1737 <dd>
1738 <p>DB_File can now be built with Berkeley DB versions 1, 2 or 3.
1739 See <code>ext/DB_File/Changes</code>.</p>
1740 </dd>
1741 </li>
1742 <dt><strong><a name="item_devel_3a_3adprof">Devel::DProf</a></strong>
1744 <dd>
1745 <p>Devel::DProf, a Perl source code profiler has been added. See
1746 <a href="file://C|\msysgit\mingw\html/lib/Devel/DProf.html">the Devel::DProf manpage</a> and <a href="file://C|\msysgit\mingw\html/utils/dprofpp.html">the dprofpp manpage</a>.</p>
1747 </dd>
1748 </li>
1749 <dt><strong>Devel::Peek</strong>
1751 <dd>
1752 <p>The Devel::Peek module provides access to the internal representation
1753 of Perl variables and data. It is a data debugging tool for the XS programmer.</p>
1754 </dd>
1755 </li>
1756 <dt><strong><a name="item_dumpvalue">Dumpvalue</a></strong>
1758 <dd>
1759 <p>The Dumpvalue module provides screen dumps of Perl data.</p>
1760 </dd>
1761 </li>
1762 <dt><strong><a name="item_dynaloader">DynaLoader</a></strong>
1764 <dd>
1765 <p>DynaLoader now supports a <code>dl_unload_file()</code> function on platforms that
1766 support unloading shared objects using dlclose().</p>
1767 </dd>
1768 <dd>
1769 <p>Perl can also optionally arrange to unload all extension shared objects
1770 loaded by Perl. To enable this, build Perl with the Configure option
1771 <code>-Accflags=-DDL_UNLOAD_ALL_AT_EXIT</code>. (This maybe useful if you are
1772 using Apache with mod_perl.)</p>
1773 </dd>
1774 </li>
1775 <dt><strong><a name="item_english">English</a></strong>
1777 <dd>
1778 <p>$PERL_VERSION now stands for <a href="file://C|\msysgit\mingw\html/pod/perlvar.html#item___v"><code>$^V</code></a> (a string value) rather than for <a href="file://C|\msysgit\mingw\html/pod/perlvar.html#item___"><code>$]</code></a>
1779 (a numeric value).</p>
1780 </dd>
1781 </li>
1782 <dt><strong><a name="item_env">Env</a></strong>
1784 <dd>
1785 <p>Env now supports accessing environment variables like PATH as array
1786 variables.</p>
1787 </dd>
1788 </li>
1789 <dt><strong><a name="item_fcntl">Fcntl</a></strong>
1791 <dd>
1792 <p>More Fcntl constants added: F_SETLK64, F_SETLKW64, O_LARGEFILE for
1793 large file (more than 4GB) access (NOTE: the O_LARGEFILE is
1794 automatically added to <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_sysopen"><code>sysopen()</code></a> flags if large file support has been
1795 configured, as is the default), Free/Net/OpenBSD locking behaviour
1796 flags F_FLOCK, F_POSIX, Linux F_SHLCK, and O_ACCMODE: the combined
1797 mask of O_RDONLY, O_WRONLY, and O_RDWR. The <code>seek()/sysseek()</code>
1798 constants SEEK_SET, SEEK_CUR, and SEEK_END are available via the
1799 <code>:seek</code> tag. The <code>chmod()/stat()</code> S_IF* constants and S_IS* functions
1800 are available via the <code>:mode</code> tag.</p>
1801 </dd>
1802 </li>
1803 <dt><strong><a name="item_file_3a_3acompare">File::Compare</a></strong>
1805 <dd>
1806 <p>A <code>compare_text()</code> function has been added, which allows custom
1807 comparison functions. See <a href="file://C|\msysgit\mingw\html/lib/File/Compare.html">the File::Compare manpage</a>.</p>
1808 </dd>
1809 </li>
1810 <dt><strong>File::Find</strong>
1812 <dd>
1813 <p>File::Find now works correctly when the <code>wanted()</code> function is either
1814 autoloaded or is a symbolic reference.</p>
1815 </dd>
1816 <dd>
1817 <p>A bug that caused File::Find to lose track of the working directory
1818 when pruning top-level directories has been fixed.</p>
1819 </dd>
1820 <dd>
1821 <p>File::Find now also supports several other options to control its
1822 behavior. It can follow symbolic links if the <code>follow</code> option is
1823 specified. Enabling the <code>no_chdir</code> option will make File::Find skip
1824 changing the current directory when walking directories. The <code>untaint</code>
1825 flag can be useful when running with taint checks enabled.</p>
1826 </dd>
1827 <dd>
1828 <p>See <a href="file://C|\msysgit\mingw\html/lib/File/Find.html">the File::Find manpage</a>.</p>
1829 </dd>
1830 </li>
1831 <dt><strong><a name="item_file_3a_3aglob">File::Glob</a></strong>
1833 <dd>
1834 <p>This extension implements BSD-style file globbing. By default,
1835 it will also be used for the internal implementation of the <a href="#item_glob"><code>glob()</code></a>
1836 operator. See <a href="file://C|\msysgit\mingw\html/lib/File/Glob.html">the File::Glob manpage</a>.</p>
1837 </dd>
1838 </li>
1839 <dt><strong><a name="item_file_3a_3aspec">File::Spec</a></strong>
1841 <dd>
1842 <p>New methods have been added to the File::Spec module: <code>devnull()</code> returns
1843 the name of the null device (/dev/null on Unix) and <code>tmpdir()</code> the name of
1844 the temp directory (normally /tmp on Unix). There are now also methods
1845 to convert between absolute and relative filenames: <code>abs2rel()</code> and
1846 rel2abs(). For compatibility with operating systems that specify volume
1847 names in file paths, the splitpath(), splitdir(), and <code>catdir()</code> methods
1848 have been added.</p>
1849 </dd>
1850 </li>
1851 <dt><strong><a name="item_file_3a_3aspec_3a_3afunctions">File::Spec::Functions</a></strong>
1853 <dd>
1854 <p>The new File::Spec::Functions modules provides a function interface
1855 to the File::Spec module. Allows shorthand</p>
1856 </dd>
1857 <dd>
1858 <pre>
1859 $fullname = catfile($dir1, $dir2, $file);</pre>
1860 </dd>
1861 <dd>
1862 <p>instead of</p>
1863 </dd>
1864 <dd>
1865 <pre>
1866 $fullname = File::Spec-&gt;catfile($dir1, $dir2, $file);</pre>
1867 </dd>
1868 </li>
1869 <dt><strong>Getopt::Long</strong>
1871 <dd>
1872 <p>Getopt::Long licensing has changed to allow the Perl Artistic License
1873 as well as the GPL. It used to be GPL only, which got in the way of
1874 non-GPL applications that wanted to use Getopt::Long.</p>
1875 </dd>
1876 <dd>
1877 <p>Getopt::Long encourages the use of Pod::Usage to produce help
1878 messages. For example:</p>
1879 </dd>
1880 <dd>
1881 <pre>
1882 use Getopt::Long;
1883 use Pod::Usage;
1884 my $man = 0;
1885 my $help = 0;
1886 GetOptions('help|?' =&gt; \$help, man =&gt; \$man) or pod2usage(2);
1887 pod2usage(1) if $help;
1888 pod2usage(-exitstatus =&gt; 0, -verbose =&gt; 2) if $man;</pre>
1889 </dd>
1890 <dd>
1891 <pre>
1892 __END__</pre>
1893 </dd>
1894 <dd>
1895 <pre>
1896 =head1 NAME</pre>
1897 </dd>
1898 <dd>
1899 <pre>
1900 sample - Using Getopt::Long and Pod::Usage</pre>
1901 </dd>
1902 <dd>
1903 <pre>
1904 =head1 SYNOPSIS</pre>
1905 </dd>
1906 <dd>
1907 <pre>
1908 sample [options] [file ...]</pre>
1909 </dd>
1910 <dd>
1911 <pre>
1912 Options:
1913 -help brief help message
1914 -man full documentation</pre>
1915 </dd>
1916 <dd>
1917 <pre>
1918 =head1 OPTIONS</pre>
1919 </dd>
1920 <dd>
1921 <pre>
1922 =over 8</pre>
1923 </dd>
1924 <dd>
1925 <pre>
1926 =item B&lt;-help&gt;</pre>
1927 </dd>
1928 <dd>
1929 <pre>
1930 Print a brief help message and exits.</pre>
1931 </dd>
1932 <dd>
1933 <pre>
1934 =item B&lt;-man&gt;</pre>
1935 </dd>
1936 <dd>
1937 <pre>
1938 Prints the manual page and exits.</pre>
1939 </dd>
1940 <dd>
1941 <pre>
1942 =back</pre>
1943 </dd>
1944 <dd>
1945 <pre>
1946 =head1 DESCRIPTION</pre>
1947 </dd>
1948 <dd>
1949 <pre>
1950 B&lt;This program&gt; will read the given input file(s) and do something
1951 useful with the contents thereof.</pre>
1952 </dd>
1953 <dd>
1954 <pre>
1955 =cut</pre>
1956 </dd>
1957 <dd>
1958 <p>See <a href="file://C|\msysgit\mingw\html/lib/Pod/Usage.html">the Pod::Usage manpage</a> for details.</p>
1959 </dd>
1960 <dd>
1961 <p>A bug that prevented the non-option call-back &lt;&gt; from being
1962 specified as the first argument has been fixed.</p>
1963 </dd>
1964 <dd>
1965 <p>To specify the characters &lt; and &gt; as option starters, use &gt;&lt;. Note,
1966 however, that changing option starters is strongly deprecated.</p>
1967 </dd>
1968 </li>
1969 <dt><strong><a name="item_io">IO</a></strong>
1971 <dd>
1972 <p><a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_write"><code>write()</code></a> and <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_syswrite"><code>syswrite()</code></a> will now accept a single-argument
1973 form of the call, for consistency with Perl's syswrite().</p>
1974 </dd>
1975 <dd>
1976 <p>You can now create a TCP-based IO::Socket::INET without forcing
1977 a connect attempt. This allows you to configure its options
1978 (like making it non-blocking) and then call <code>connect()</code> manually.</p>
1979 </dd>
1980 <dd>
1981 <p>A bug that prevented the IO::Socket::protocol() accessor
1982 from ever returning the correct value has been corrected.</p>
1983 </dd>
1984 <dd>
1985 <p>IO::Socket::connect now uses non-blocking IO instead of <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_alarm"><code>alarm()</code></a>
1986 to do connect timeouts.</p>
1987 </dd>
1988 <dd>
1989 <p>IO::Socket::accept now uses <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_select"><code>select()</code></a> instead of <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_alarm"><code>alarm()</code></a> for doing
1990 timeouts.</p>
1991 </dd>
1992 <dd>
1993 <p>IO::Socket::INET-&gt;new now sets $! correctly on failure. $@ is
1994 still set for backwards compatibility.</p>
1995 </dd>
1996 </li>
1997 <dt><strong><a name="item_jpl">JPL</a></strong>
1999 <dd>
2000 <p>Java Perl Lingo is now distributed with Perl. See jpl/README
2001 for more information.</p>
2002 </dd>
2003 </li>
2004 <dt><strong><a name="item_lib">lib</a></strong>
2006 <dd>
2007 <p><code>use lib</code> now weeds out any trailing duplicate entries.
2008 <code>no lib</code> removes all named entries.</p>
2009 </dd>
2010 </li>
2011 <dt><strong><a name="item_math_3a_3abigint">Math::BigInt</a></strong>
2013 <dd>
2014 <p>The bitwise operations <code>&lt;&lt;</code>, <code>&gt;&gt;</code>, <code>&amp;</code>, <code>|</code>,
2015 and <code>~</code> are now supported on bigints.</p>
2016 </dd>
2017 </li>
2018 <dt><strong>Math::Complex</strong>
2020 <dd>
2021 <p>The accessor methods Re, Im, arg, abs, rho, and theta can now also
2022 act as mutators (accessor $z-&gt;Re(), mutator $z-&gt;Re(3)).</p>
2023 </dd>
2024 <dd>
2025 <p>The class method <code>display_format</code> and the corresponding object method
2026 <code>display_format</code>, in addition to accepting just one argument, now can
2027 also accept a parameter hash. Recognized keys of a parameter hash are
2028 <code>&quot;style&quot;</code>, which corresponds to the old one parameter case, and two
2029 new parameters: <code>&quot;format&quot;</code>, which is a printf()-style format string
2030 (defaults usually to <code>&quot;%.15g&quot;</code>, you can revert to the default by
2031 setting the format string to <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_undef"><code>undef</code></a>) used for both parts of a
2032 complex number, and <code>&quot;polar_pretty_print&quot;</code> (defaults to true),
2033 which controls whether an attempt is made to try to recognize small
2034 multiples and rationals of pi (2pi, pi/2) at the argument (angle) of a
2035 polar complex number.</p>
2036 </dd>
2037 <dd>
2038 <p>The potentially disruptive change is that in list context both methods
2039 now <em>return the parameter hash</em>, instead of only the value of the
2040 <code>&quot;style&quot;</code> parameter.</p>
2041 </dd>
2042 </li>
2043 <dt><strong><a name="item_math_3a_3atrig">Math::Trig</a></strong>
2045 <dd>
2046 <p>A little bit of radial trigonometry (cylindrical and spherical),
2047 radial coordinate conversions, and the great circle distance were added.</p>
2048 </dd>
2049 </li>
2050 <dt><strong><a name="item_pod_3a_3aparser_2c_pod_3a_3ainputobjects">Pod::Parser, Pod::InputObjects</a></strong>
2052 <dd>
2053 <p>Pod::Parser is a base class for parsing and selecting sections of
2054 pod documentation from an input stream. This module takes care of
2055 identifying pod paragraphs and commands in the input and hands off the
2056 parsed paragraphs and commands to user-defined methods which are free
2057 to interpret or translate them as they see fit.</p>
2058 </dd>
2059 <dd>
2060 <p>Pod::InputObjects defines some input objects needed by Pod::Parser, and
2061 for advanced users of Pod::Parser that need more about a command besides
2062 its name and text.</p>
2063 </dd>
2064 <dd>
2065 <p>As of release 5.6.0 of Perl, Pod::Parser is now the officially sanctioned
2066 ``base parser code'' recommended for use by all pod2xxx translators.
2067 Pod::Text (pod2text) and Pod::Man (pod2man) have already been converted
2068 to use Pod::Parser and efforts to convert Pod::HTML (pod2html) are already
2069 underway. For any questions or comments about pod parsing and translating
2070 issues and utilities, please use the <a href="mailto:pod-people@perl.org">pod-people@perl.org</a> mailing list.</p>
2071 </dd>
2072 <dd>
2073 <p>For further information, please see <a href="file://C|\msysgit\mingw\html/lib/Pod/Parser.html">the Pod::Parser manpage</a> and <a href="file://C|\msysgit\mingw\html/lib/Pod/InputObjects.html">the Pod::InputObjects manpage</a>.</p>
2074 </dd>
2075 </li>
2076 <dt><strong><a name="item_pod_3a_3achecker_2c_podchecker">Pod::Checker, podchecker</a></strong>
2078 <dd>
2079 <p>This utility checks pod files for correct syntax, according to
2080 <a href="file://C|\msysgit\mingw\html/pod/perlpod.html">the perlpod manpage</a>. Obvious errors are flagged as such, while warnings are
2081 printed for mistakes that can be handled gracefully. The checklist is
2082 not complete yet. See <a href="file://C|\msysgit\mingw\html/lib/Pod/Checker.html">the Pod::Checker manpage</a>.</p>
2083 </dd>
2084 </li>
2085 <dt><strong><a name="item_pod_3a_3aparseutils_2c_pod_3a_3afind">Pod::ParseUtils, Pod::Find</a></strong>
2087 <dd>
2088 <p>These modules provide a set of gizmos that are useful mainly for pod
2089 translators. <a href="file://C|\msysgit\mingw\html/lib/Pod/Find.html">Pod::Find</a> traverses directory structures and
2090 returns found pod files, along with their canonical names (like
2091 <code>File::Spec::Unix</code>). <a href="file://C|\msysgit\mingw\html/lib/Pod/ParseUtils.html">Pod::ParseUtils</a> contains
2092 <strong>Pod::List</strong> (useful for storing pod list information), <strong>Pod::Hyperlink</strong>
2093 (for parsing the contents of <code>L&lt;&gt;</code> sequences) and <strong>Pod::Cache</strong>
2094 (for caching information about pod files, e.g., link nodes).</p>
2095 </dd>
2096 </li>
2097 <dt><strong><a name="item_pod_3a_3aselect_2c_podselect">Pod::Select, podselect</a></strong>
2099 <dd>
2100 <p>Pod::Select is a subclass of Pod::Parser which provides a function
2101 named ``podselect()'' to filter out user-specified sections of raw pod
2102 documentation from an input stream. podselect is a script that provides
2103 access to Pod::Select from other scripts to be used as a filter.
2104 See <a href="file://C|\msysgit\mingw\html/lib/Pod/Select.html">the Pod::Select manpage</a>.</p>
2105 </dd>
2106 </li>
2107 <dt><strong><a name="item_pod_3a_3ausage_2c_pod2usage">Pod::Usage, pod2usage</a></strong>
2109 <dd>
2110 <p>Pod::Usage provides the function ``pod2usage()'' to print usage messages for
2111 a Perl script based on its embedded pod documentation. The <code>pod2usage()</code>
2112 function is generally useful to all script authors since it lets them
2113 write and maintain a single source (the pods) for documentation, thus
2114 removing the need to create and maintain redundant usage message text
2115 consisting of information already in the pods.</p>
2116 </dd>
2117 <dd>
2118 <p>There is also a pod2usage script which can be used from other kinds of
2119 scripts to print usage messages from pods (even for non-Perl scripts
2120 with pods embedded in comments).</p>
2121 </dd>
2122 <dd>
2123 <p>For details and examples, please see <a href="file://C|\msysgit\mingw\html/lib/Pod/Usage.html">the Pod::Usage manpage</a>.</p>
2124 </dd>
2125 </li>
2126 <dt><strong><a name="item_pod_3a_3atext_and_pod_3a_3aman">Pod::Text and Pod::Man</a></strong>
2128 <dd>
2129 <p>Pod::Text has been rewritten to use Pod::Parser. While <code>pod2text()</code> is
2130 still available for backwards compatibility, the module now has a new
2131 preferred interface. See <a href="file://C|\msysgit\mingw\html/lib/Pod/Text.html">the Pod::Text manpage</a> for the details. The new Pod::Text
2132 module is easily subclassed for tweaks to the output, and two such
2133 subclasses (Pod::Text::Termcap for man-page-style bold and underlining
2134 using termcap information, and Pod::Text::Color for markup with ANSI color
2135 sequences) are now standard.</p>
2136 </dd>
2137 <dd>
2138 <p>pod2man has been turned into a module, Pod::Man, which also uses
2139 Pod::Parser. In the process, several outstanding bugs related to quotes
2140 in section headers, quoting of code escapes, and nested lists have been
2141 fixed. pod2man is now a wrapper script around this module.</p>
2142 </dd>
2143 </li>
2144 <dt><strong>SDBM_File</strong>
2146 <dd>
2147 <p>An EXISTS method has been added to this module (and <code>sdbm_exists()</code> has
2148 been added to the underlying sdbm library), so one can now call exists
2149 on an SDBM_File tied hash and get the correct result, rather than a
2150 runtime error.</p>
2151 </dd>
2152 <dd>
2153 <p>A bug that may have caused data loss when more than one disk block
2154 happens to be read from the database in a single <code>FETCH()</code> has been
2155 fixed.</p>
2156 </dd>
2157 </li>
2158 <dt><strong>Sys::Syslog</strong>
2160 <dd>
2161 <p>Sys::Syslog now uses XSUBs to access facilities from syslog.h so it
2162 no longer requires syslog.ph to exist.</p>
2163 </dd>
2164 </li>
2165 <dt><strong><a name="item_sys_3a_3ahostname">Sys::Hostname</a></strong>
2167 <dd>
2168 <p>Sys::Hostname now uses XSUBs to call the C library's <code>gethostname()</code> or
2169 <code>uname()</code> if they exist.</p>
2170 </dd>
2171 </li>
2172 <dt><strong><a name="item_term_3a_3aansicolor">Term::ANSIColor</a></strong>
2174 <dd>
2175 <p>Term::ANSIColor is a very simple module to provide easy and readable
2176 access to the ANSI color and highlighting escape sequences, supported by
2177 most ANSI terminal emulators. It is now included standard.</p>
2178 </dd>
2179 </li>
2180 <dt><strong><a name="item_time_3a_3alocal">Time::Local</a></strong>
2182 <dd>
2183 <p>The <code>timelocal()</code> and <code>timegm()</code> functions used to silently return bogus
2184 results when the date fell outside the machine's integer range. They
2185 now consistently <code>croak()</code> if the date falls in an unsupported range.</p>
2186 </dd>
2187 </li>
2188 <dt><strong><a name="item_win32">Win32</a></strong>
2190 <dd>
2191 <p>The error return value in list context has been changed for all functions
2192 that return a list of values. Previously these functions returned a list
2193 with a single element <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_undef"><code>undef</code></a> if an error occurred. Now these functions
2194 return the empty list in these situations. This applies to the following
2195 functions:</p>
2196 </dd>
2197 <dd>
2198 <pre>
2199 Win32::FsType
2200 Win32::GetOSVersion</pre>
2201 </dd>
2202 <dd>
2203 <p>The remaining functions are unchanged and continue to return <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_undef"><code>undef</code></a> on
2204 error even in list context.</p>
2205 </dd>
2206 <dd>
2207 <p>The Win32::SetLastError(ERROR) function has been added as a complement
2208 to the Win32::GetLastError() function.</p>
2209 </dd>
2210 <dd>
2211 <p>The new Win32::GetFullPathName(FILENAME) returns the full absolute
2212 pathname for FILENAME in scalar context. In list context it returns
2213 a two-element list containing the fully qualified directory name and
2214 the filename. See <a href="file://C|\msysgit\mingw\html/lib/Win32.html">the Win32 manpage</a>.</p>
2215 </dd>
2216 </li>
2217 <dt><strong><a name="item_xsloader">XSLoader</a></strong>
2219 <dd>
2220 <p>The XSLoader extension is a simpler alternative to DynaLoader.
2221 See <a href="file://C|\msysgit\mingw\html/lib/XSLoader.html">the XSLoader manpage</a>.</p>
2222 </dd>
2223 </li>
2224 <dt><strong><a name="item_dbm_filters">DBM Filters</a></strong>
2226 <dd>
2227 <p>A new feature called ``DBM Filters'' has been added to all the
2228 DBM modules--DB_File, GDBM_File, NDBM_File, ODBM_File, and SDBM_File.
2229 DBM Filters add four new methods to each DBM module:</p>
2230 </dd>
2231 <dd>
2232 <pre>
2233 filter_store_key
2234 filter_store_value
2235 filter_fetch_key
2236 filter_fetch_value</pre>
2237 </dd>
2238 <dd>
2239 <p>These can be used to filter key-value pairs before the pairs are
2240 written to the database or just after they are read from the database.
2241 See <a href="file://C|\msysgit\mingw\html/pod/perldbmfilter.html">the perldbmfilter manpage</a> for further information.</p>
2242 </dd>
2243 </li>
2244 </dl>
2246 </p>
2247 <h2><a name="pragmata">Pragmata</a></h2>
2248 <p><code>use attrs</code> is now obsolete, and is only provided for
2249 backward-compatibility. It's been replaced by the <code>sub : attributes</code>
2250 syntax. See <a href="file://C|\msysgit\mingw\html/pod/perlsub.html#subroutine_attributes">Subroutine Attributes in the perlsub manpage</a> and <a href="file://C|\msysgit\mingw\html/lib/attributes.html">the attributes manpage</a>.</p>
2251 <p>Lexical warnings pragma, <code>use warnings;</code>, to control optional warnings.
2252 See <a href="file://C|\msysgit\mingw\html/pod/perllexwarn.html">the perllexwarn manpage</a>.</p>
2253 <p><code>use filetest</code> to control the behaviour of filetests (<code>-r</code> <code>-w</code>
2254 ...). Currently only one subpragma implemented, ``use filetest
2255 'access';'', that uses <code>access(2)</code> or equivalent to check permissions
2256 instead of using <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_stat"><code>stat(2)</code></a> as usual. This matters in filesystems
2257 where there are ACLs (access control lists): the <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_stat"><code>stat(2)</code></a> might lie,
2258 but <code>access(2)</code> knows better.</p>
2259 <p>The <a href="#item_open"><code>open</code></a> pragma can be used to specify default disciplines for
2260 handle constructors (e.g. <a href="#item_open"><code>open())</code></a> and for qx//. The two
2261 pseudo-disciplines <code>:raw</code> and <code>:crlf</code> are currently supported on
2262 DOS-derivative platforms (i.e. where binmode is not a no-op).
2263 See also <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_binmode">binmode() can be used to set :crlf and :raw modes</a>.</p>
2265 </p>
2266 <hr />
2267 <h1><a name="utility_changes">Utility Changes</a></h1>
2269 </p>
2270 <h2><a name="dprofpp">dprofpp</a></h2>
2271 <p><code>dprofpp</code> is used to display profile data generated using <a href="#item_devel_3a_3adprof"><code>Devel::DProf</code></a>.
2272 See <a href="file://C|\msysgit\mingw\html/utils/dprofpp.html">the dprofpp manpage</a>.</p>
2274 </p>
2275 <h2><a name="find2perl">find2perl</a></h2>
2276 <p>The <code>find2perl</code> utility now uses the enhanced features of the File::Find
2277 module. The -depth and -follow options are supported. Pod documentation
2278 is also included in the script.</p>
2280 </p>
2281 <h2><a name="h2xs">h2xs</a></h2>
2282 <p>The <code>h2xs</code> tool can now work in conjunction with <code>C::Scan</code> (available
2283 from CPAN) to automatically parse real-life header files. The <code>-M</code>,
2284 <code>-a</code>, <code>-k</code>, and <code>-o</code> options are new.</p>
2286 </p>
2287 <h2><a name="perlcc">perlcc</a></h2>
2288 <p><code>perlcc</code> now supports the C and Bytecode backends. By default,
2289 it generates output from the simple C backend rather than the
2290 optimized C backend.</p>
2291 <p>Support for non-Unix platforms has been improved.</p>
2293 </p>
2294 <h2><a name="perldoc">perldoc</a></h2>
2295 <p><code>perldoc</code> has been reworked to avoid possible security holes.
2296 It will not by default let itself be run as the superuser, but you
2297 may still use the <strong>-U</strong> switch to try to make it drop privileges
2298 first.</p>
2300 </p>
2301 <h2><a name="the_perl_debugger">The Perl Debugger</a></h2>
2302 <p>Many bug fixes and enhancements were added to <em>perl5db.pl</em>, the
2303 Perl debugger. The help documentation was rearranged. New commands
2304 include <code>&lt; ?</code>, <code>&gt; ?</code>, and <code>{ ?</code> to list out current
2305 actions, <code>man docpage</code> to run your doc viewer on some perl
2306 docset, and support for quoted options. The help information was
2307 rearranged, and should be viewable once again if you're using <strong>less</strong>
2308 as your pager. A serious security hole was plugged--you should
2309 immediately remove all older versions of the Perl debugger as
2310 installed in previous releases, all the way back to perl3, from
2311 your system to avoid being bitten by this.</p>
2313 </p>
2314 <hr />
2315 <h1><a name="improved_documentation">Improved Documentation</a></h1>
2316 <p>Many of the platform-specific README files are now part of the perl
2317 installation. See <a href="file://C|\msysgit\mingw\html/pod/perl.html">the perl manpage</a> for the complete list.</p>
2318 <dl>
2319 <dt><strong><a name="item_perlapi_2epod">perlapi.pod</a></strong>
2321 <dd>
2322 <p>The official list of public Perl API functions.</p>
2323 </dd>
2324 </li>
2325 <dt><strong><a name="item_perlboot_2epod">perlboot.pod</a></strong>
2327 <dd>
2328 <p>A tutorial for beginners on object-oriented Perl.</p>
2329 </dd>
2330 </li>
2331 <dt><strong><a name="item_perlcompile_2epod">perlcompile.pod</a></strong>
2333 <dd>
2334 <p>An introduction to using the Perl Compiler suite.</p>
2335 </dd>
2336 </li>
2337 <dt><strong><a name="item_perldbmfilter_2epod">perldbmfilter.pod</a></strong>
2339 <dd>
2340 <p>A howto document on using the DBM filter facility.</p>
2341 </dd>
2342 </li>
2343 <dt><strong><a name="item_perldebug_2epod">perldebug.pod</a></strong>
2345 <dd>
2346 <p>All material unrelated to running the Perl debugger, plus all
2347 low-level guts-like details that risked crushing the casual user
2348 of the debugger, have been relocated from the old manpage to the
2349 next entry below.</p>
2350 </dd>
2351 </li>
2352 <dt><strong><a name="item_perldebguts_2epod">perldebguts.pod</a></strong>
2354 <dd>
2355 <p>This new manpage contains excessively low-level material not related
2356 to the Perl debugger, but slightly related to debugging Perl itself.
2357 It also contains some arcane internal details of how the debugging
2358 process works that may only be of interest to developers of Perl
2359 debuggers.</p>
2360 </dd>
2361 </li>
2362 <dt><strong><a name="item_perlfork_2epod">perlfork.pod</a></strong>
2364 <dd>
2365 <p>Notes on the <code>fork()</code> emulation currently available for the Windows platform.</p>
2366 </dd>
2367 </li>
2368 <dt><strong><a name="item_perlfilter_2epod">perlfilter.pod</a></strong>
2370 <dd>
2371 <p>An introduction to writing Perl source filters.</p>
2372 </dd>
2373 </li>
2374 <dt><strong><a name="item_perlhack_2epod">perlhack.pod</a></strong>
2376 <dd>
2377 <p>Some guidelines for hacking the Perl source code.</p>
2378 </dd>
2379 </li>
2380 <dt><strong><a name="item_perlintern_2epod">perlintern.pod</a></strong>
2382 <dd>
2383 <p>A list of internal functions in the Perl source code.
2384 (List is currently empty.)</p>
2385 </dd>
2386 </li>
2387 <dt><strong><a name="item_perllexwarn_2epod">perllexwarn.pod</a></strong>
2389 <dd>
2390 <p>Introduction and reference information about lexically scoped
2391 warning categories.</p>
2392 </dd>
2393 </li>
2394 <dt><strong><a name="item_perlnumber_2epod">perlnumber.pod</a></strong>
2396 <dd>
2397 <p>Detailed information about numbers as they are represented in Perl.</p>
2398 </dd>
2399 </li>
2400 <dt><strong><a name="item_perlopentut_2epod">perlopentut.pod</a></strong>
2402 <dd>
2403 <p>A tutorial on using <a href="#item_open"><code>open()</code></a> effectively.</p>
2404 </dd>
2405 </li>
2406 <dt><strong><a name="item_perlreftut_2epod">perlreftut.pod</a></strong>
2408 <dd>
2409 <p>A tutorial that introduces the essentials of references.</p>
2410 </dd>
2411 </li>
2412 <dt><strong><a name="item_perltootc_2epod">perltootc.pod</a></strong>
2414 <dd>
2415 <p>A tutorial on managing class data for object modules.</p>
2416 </dd>
2417 </li>
2418 <dt><strong><a name="item_perltodo_2epod">perltodo.pod</a></strong>
2420 <dd>
2421 <p>Discussion of the most often wanted features that may someday be
2422 supported in Perl.</p>
2423 </dd>
2424 </li>
2425 <dt><strong><a name="item_perlunicode_2epod">perlunicode.pod</a></strong>
2427 <dd>
2428 <p>An introduction to Unicode support features in Perl.</p>
2429 </dd>
2430 </li>
2431 </dl>
2433 </p>
2434 <hr />
2435 <h1><a name="performance_enhancements">Performance enhancements</a></h1>
2437 </p>
2438 <h2><a name="simple_sort___using____a______b___and_the_like_are_optimized">Simple <a href="#item_sort"><code>sort()</code></a> using { $a &lt;=&gt; $b } and the like are optimized</a></h2>
2439 <p>Many common <a href="#item_sort"><code>sort()</code></a> operations using a simple inlined block are now
2440 optimized for faster performance.</p>
2442 </p>
2443 <h2><a name="optimized_assignments_to_lexical_variables">Optimized assignments to lexical variables</a></h2>
2444 <p>Certain operations in the RHS of assignment statements have been
2445 optimized to directly set the lexical variable on the LHS,
2446 eliminating redundant copying overheads.</p>
2448 </p>
2449 <h2><a name="faster_subroutine_calls">Faster subroutine calls</a></h2>
2450 <p>Minor changes in how subroutine calls are handled internally
2451 provide marginal improvements in performance.</p>
2453 </p>
2454 <h2><a name="delete____each____values___and_hash_iteration_are_faster">delete(), each(), <code>values()</code> and hash iteration are faster</a></h2>
2455 <p>The hash values returned by delete(), each(), <code>values()</code> and hashes in a
2456 list context are the actual values in the hash, instead of copies.
2457 This results in significantly better performance, because it eliminates
2458 needless copying in most situations.</p>
2460 </p>
2461 <hr />
2462 <h1><a name="installation_and_configuration_improvements">Installation and Configuration Improvements</a></h1>
2464 </p>
2465 <h2><a name="dusethreads_means_something_different">-Dusethreads means something different</a></h2>
2466 <p>The -Dusethreads flag now enables the experimental interpreter-based thread
2467 support by default. To get the flavor of experimental threads that was in
2468 5.005 instead, you need to run Configure with ``-Dusethreads -Duse5005threads''.</p>
2469 <p>As of v5.6.0, interpreter-threads support is still lacking a way to
2470 create new threads from Perl (i.e., <code>use Thread;</code> will not work with
2471 interpreter threads). <code>use Thread;</code> continues to be available when you
2472 specify the -Duse5005threads option to Configure, bugs and all.</p>
2473 <pre>
2474 NOTE: Support for threads continues to be an experimental feature.
2475 Interfaces and implementation are subject to sudden and drastic changes.</pre>
2477 </p>
2478 <h2><a name="new_configure_flags">New Configure flags</a></h2>
2479 <p>The following new flags may be enabled on the Configure command line
2480 by running Configure with <code>-Dflag</code>.</p>
2481 <pre>
2482 usemultiplicity
2483 usethreads useithreads (new interpreter threads: no Perl API yet)
2484 usethreads use5005threads (threads as they were in 5.005)</pre>
2485 <pre>
2486 use64bitint (equal to now deprecated 'use64bits')
2487 use64bitall</pre>
2488 <pre>
2489 uselongdouble
2490 usemorebits
2491 uselargefiles
2492 usesocks (only SOCKS v5 supported)</pre>
2494 </p>
2495 <h2><a name="threadedness_and_64bitness_now_more_daring">Threadedness and 64-bitness now more daring</a></h2>
2496 <p>The Configure options enabling the use of threads and the use of
2497 64-bitness are now more daring in the sense that they no more have an
2498 explicit list of operating systems of known threads/64-bit
2499 capabilities. In other words: if your operating system has the
2500 necessary APIs and datatypes, you should be able just to go ahead and
2501 use them, for threads by Configure -Dusethreads, and for 64 bits
2502 either explicitly by Configure -Duse64bitint or implicitly if your
2503 system has 64-bit wide datatypes. See also <a href="#64bit_support">64-bit support</a>.</p>
2505 </p>
2506 <h2><a name="long_doubles">Long Doubles</a></h2>
2507 <p>Some platforms have ``long doubles'', floating point numbers of even
2508 larger range than ordinary ``doubles''. To enable using long doubles for
2509 Perl's scalars, use -Duselongdouble.</p>
2511 </p>
2512 <h2><a name="dusemorebits">-Dusemorebits</a></h2>
2513 <p>You can enable both -Duse64bitint and -Duselongdouble with -Dusemorebits.
2514 See also <a href="#64bit_support">64-bit support</a>.</p>
2516 </p>
2517 <h2><a name="duselargefiles">-Duselargefiles</a></h2>
2518 <p>Some platforms support system APIs that are capable of handling large files
2519 (typically, files larger than two gigabytes). Perl will try to use these
2520 APIs if you ask for -Duselargefiles.</p>
2521 <p>See <a href="#large_file_support">Large file support</a> for more information.</p>
2523 </p>
2524 <h2><a name="installusrbinperl">installusrbinperl</a></h2>
2525 <p>You can use ``Configure -Uinstallusrbinperl'' which causes installperl
2526 to skip installing perl also as /usr/bin/perl. This is useful if you
2527 prefer not to modify /usr/bin for some reason or another but harmful
2528 because many scripts assume to find Perl in /usr/bin/perl.</p>
2530 </p>
2531 <h2><a name="socks_support">SOCKS support</a></h2>
2532 <p>You can use ``Configure -Dusesocks'' which causes Perl to probe
2533 for the SOCKS proxy protocol library (v5, not v4). For more information
2534 on SOCKS, see:</p>
2535 <pre>
2536 <a href="http://www.socks.nec.com/">http://www.socks.nec.com/</a></pre>
2538 </p>
2539 <h2><a name="a_flag"><code>-A</code> flag</a></h2>
2540 <p>You can ``post-edit'' the Configure variables using the Configure <code>-A</code>
2541 switch. The editing happens immediately after the platform specific
2542 hints files have been processed but before the actual configuration
2543 process starts. Run <code>Configure -h</code> to find out the full <code>-A</code> syntax.</p>
2545 </p>
2546 <h2><a name="enhanced_installation_directories">Enhanced Installation Directories</a></h2>
2547 <p>The installation structure has been enriched to improve the support
2548 for maintaining multiple versions of perl, to provide locations for
2549 vendor-supplied modules, scripts, and manpages, and to ease maintenance
2550 of locally-added modules, scripts, and manpages. See the section on
2551 Installation Directories in the INSTALL file for complete details.
2552 For most users building and installing from source, the defaults should
2553 be fine.</p>
2554 <p>If you previously used <code>Configure -Dsitelib</code> or <code>-Dsitearch</code> to set
2555 special values for library directories, you might wish to consider using
2556 the new <code>-Dsiteprefix</code> setting instead. Also, if you wish to re-use a
2557 config.sh file from an earlier version of perl, you should be sure to
2558 check that Configure makes sensible choices for the new directories.
2559 See INSTALL for complete details.</p>
2561 </p>
2562 <h2><a name="gcc_automatically_tried_if__cc__does_not_seem_to_be_working">gcc automatically tried if 'cc' does not seem to be working</a></h2>
2563 <p>In many platforms the vendor-supplied 'cc' is too stripped-down to
2564 build Perl (basically, the 'cc' doesn't do ANSI C). If this seems
2565 to be the case and the 'cc' does not seem to be the GNU C compiler
2566 'gcc', an automatic attempt is made to find and use 'gcc' instead.</p>
2568 </p>
2569 <hr />
2570 <h1><a name="platform_specific_changes">Platform specific changes</a></h1>
2572 </p>
2573 <h2><a name="supported_platforms">Supported platforms</a></h2>
2574 <ul>
2575 <li>
2576 <p>The Mach CThreads (NEXTSTEP, OPENSTEP) are now supported by the Thread
2577 extension.</p>
2578 </li>
2579 <li>
2580 <p>GNU/Hurd is now supported.</p>
2581 </li>
2582 <li>
2583 <p>Rhapsody/Darwin is now supported.</p>
2584 </li>
2585 <li>
2586 <p>EPOC is now supported (on Psion 5).</p>
2587 </li>
2588 <li>
2589 <p>The cygwin port (formerly cygwin32) has been greatly improved.</p>
2590 </li>
2591 </ul>
2593 </p>
2594 <h2><a name="dos">DOS</a></h2>
2595 <ul>
2596 <li>
2597 <p>Perl now works with djgpp 2.02 (and 2.03 alpha).</p>
2598 </li>
2599 <li>
2600 <p>Environment variable names are not converted to uppercase any more.</p>
2601 </li>
2602 <li>
2603 <p>Incorrect exit codes from backticks have been fixed.</p>
2604 </li>
2605 <li>
2606 <p>This port continues to use its own builtin globbing (not File::Glob).</p>
2607 </li>
2608 </ul>
2610 </p>
2611 <h2><a name="os390__openedition_mvs_">OS390 (OpenEdition MVS)</a></h2>
2612 <p>Support for this EBCDIC platform has not been renewed in this release.
2613 There are difficulties in reconciling Perl's standardization on UTF-8
2614 as its internal representation for characters with the EBCDIC character
2615 set, because the two are incompatible.</p>
2616 <p>It is unclear whether future versions will renew support for this
2617 platform, but the possibility exists.</p>
2619 </p>
2620 <h2><a name="vms">VMS</a></h2>
2621 <p>Numerous revisions and extensions to configuration, build, testing, and
2622 installation process to accommodate core changes and VMS-specific options.</p>
2623 <p>Expand %ENV-handling code to allow runtime mapping to logical names,
2624 CLI symbols, and CRTL environ array.</p>
2625 <p>Extension of subprocess invocation code to accept filespecs as command
2626 ``verbs''.</p>
2627 <p>Add to Perl command line processing the ability to use default file types and
2628 to recognize Unix-style <code>2&gt;&amp;1</code>.</p>
2629 <p>Expansion of File::Spec::VMS routines, and integration into ExtUtils::MM_VMS.</p>
2630 <p>Extension of ExtUtils::MM_VMS to handle complex extensions more flexibly.</p>
2631 <p>Barewords at start of Unix-syntax paths may be treated as text rather than
2632 only as logical names.</p>
2633 <p>Optional secure translation of several logical names used internally by Perl.</p>
2634 <p>Miscellaneous bugfixing and porting of new core code to VMS.</p>
2635 <p>Thanks are gladly extended to the many people who have contributed VMS
2636 patches, testing, and ideas.</p>
2638 </p>
2639 <h2><a name="win32">Win32</a></h2>
2640 <p>Perl can now emulate <code>fork()</code> internally, using multiple interpreters running
2641 in different concurrent threads. This support must be enabled at build
2642 time. See <a href="file://C|\msysgit\mingw\html/pod/perlfork.html">the perlfork manpage</a> for detailed information.</p>
2643 <p>When given a pathname that consists only of a drivename, such as <code>A:</code>,
2644 <code>opendir()</code> and <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_stat"><code>stat()</code></a> now use the current working directory for the drive
2645 rather than the drive root.</p>
2646 <p>The builtin XSUB functions in the Win32:: namespace are documented. See
2647 <a href="file://C|\msysgit\mingw\html/lib/Win32.html">the Win32 manpage</a>.</p>
2648 <p>$^X now contains the full path name of the running executable.</p>
2649 <p>A Win32::GetLongPathName() function is provided to complement
2650 Win32::GetFullPathName() and Win32::GetShortPathName(). See <a href="file://C|\msysgit\mingw\html/lib/Win32.html">the Win32 manpage</a>.</p>
2651 <p>POSIX::uname() is supported.</p>
2652 <p><a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_system"><code>system(1,...)</code></a> now returns true process IDs rather than process
2653 handles. <code>kill()</code> accepts any real process id, rather than strictly
2654 return values from system(1,...).</p>
2655 <p>For better compatibility with Unix, <code>kill(0, $pid)</code> can now be used to
2656 test whether a process exists.</p>
2657 <p>The <code>Shell</code> module is supported.</p>
2658 <p>Better support for building Perl under command.com in Windows 95
2659 has been added.</p>
2660 <p>Scripts are read in binary mode by default to allow ByteLoader (and
2661 the filter mechanism in general) to work properly. For compatibility,
2662 the DATA filehandle will be set to text mode if a carriage return is
2663 detected at the end of the line containing the __END__ or __DATA__
2664 token; if not, the DATA filehandle will be left open in binary mode.
2665 Earlier versions always opened the DATA filehandle in text mode.</p>
2666 <p>The <a href="#item_glob"><code>glob()</code></a> operator is implemented via the <a href="#item_file_3a_3aglob"><code>File::Glob</code></a> extension,
2667 which supports glob syntax of the C shell. This increases the flexibility
2668 of the <a href="#item_glob"><code>glob()</code></a> operator, but there may be compatibility issues for
2669 programs that relied on the older globbing syntax. If you want to
2670 preserve compatibility with the older syntax, you might want to run
2671 perl with <code>-MFile::DosGlob</code>. For details and compatibility information,
2672 see <a href="file://C|\msysgit\mingw\html/lib/File/Glob.html">the File::Glob manpage</a>.</p>
2674 </p>
2675 <hr />
2676 <h1><a name="significant_bug_fixes">Significant bug fixes</a></h1>
2678 </p>
2679 <h2><a name="_handle__on_empty_files">&lt;HANDLE&gt; on empty files</a></h2>
2680 <p>With <a href="file://C|\msysgit\mingw\html/pod/perlvar.html#item___"><code>$/</code></a> set to <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_undef"><code>undef</code></a>, ``slurping'' an empty file returns a string of
2681 zero length (instead of <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_undef"><code>undef</code></a>, as it used to) the first time the
2682 HANDLE is read after <a href="file://C|\msysgit\mingw\html/pod/perlvar.html#item___"><code>$/</code></a> is set to <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_undef"><code>undef</code></a>. Further reads yield
2683 <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_undef"><code>undef</code></a>.</p>
2684 <p>This means that the following will append ``foo'' to an empty file (it used
2685 to do nothing):</p>
2686 <pre>
2687 perl -0777 -pi -e 's/^/foo/' empty_file</pre>
2688 <p>The behaviour of:</p>
2689 <pre>
2690 perl -pi -e 's/^/foo/' empty_file</pre>
2691 <p>is unchanged (it continues to leave the file empty).</p>
2693 </p>
2694 <h2><a name="eval_______improvements"><code>eval '...'</code> improvements</a></h2>
2695 <p>Line numbers (as reflected by <a href="#item_caller"><code>caller()</code></a> and most diagnostics) within
2696 <code>eval '...'</code> were often incorrect where here documents were involved.
2697 This has been corrected.</p>
2698 <p>Lexical lookups for variables appearing in <code>eval '...'</code> within
2699 functions that were themselves called within an <code>eval '...'</code> were
2700 searching the wrong place for lexicals. The lexical search now
2701 correctly ends at the subroutine's block boundary.</p>
2702 <p>The use of <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_return"><code>return</code></a> within <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_eval"><code>eval {...}</code></a> caused $@ not to be reset
2703 correctly when no exception occurred within the eval. This has
2704 been fixed.</p>
2705 <p>Parsing of here documents used to be flawed when they appeared as
2706 the replacement expression in <code>eval 's/.../.../e'</code>. This has
2707 been fixed.</p>
2709 </p>
2710 <h2><a name="all_compilation_errors_are_true_errors">All compilation errors are true errors</a></h2>
2711 <p>Some ``errors'' encountered at compile time were by necessity
2712 generated as warnings followed by eventual termination of the
2713 program. This enabled more such errors to be reported in a
2714 single run, rather than causing a hard stop at the first error
2715 that was encountered.</p>
2716 <p>The mechanism for reporting such errors has been reimplemented
2717 to queue compile-time errors and report them at the end of the
2718 compilation as true errors rather than as warnings. This fixes
2719 cases where error messages leaked through in the form of warnings
2720 when code was compiled at run time using <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_eval"><code>eval STRING</code></a>, and
2721 also allows such errors to be reliably trapped using <code>eval &quot;...&quot;</code>.</p>
2723 </p>
2724 <h2><a name="implicitly_closed_filehandles_are_safer">Implicitly closed filehandles are safer</a></h2>
2725 <p>Sometimes implicitly closed filehandles (as when they are localized,
2726 and Perl automatically closes them on exiting the scope) could
2727 inadvertently set $? or $!. This has been corrected.</p>
2729 </p>
2730 <h2><a name="behavior_of_list_slices_is_more_consistent">Behavior of list slices is more consistent</a></h2>
2731 <p>When taking a slice of a literal list (as opposed to a slice of
2732 an array or hash), Perl used to return an empty list if the
2733 result happened to be composed of all undef values.</p>
2734 <p>The new behavior is to produce an empty list if (and only if)
2735 the original list was empty. Consider the following example:</p>
2736 <pre>
2737 @a = (1,undef,undef,2)[2,1,2];</pre>
2738 <p>The old behavior would have resulted in @a having no elements.
2739 The new behavior ensures it has three undefined elements.</p>
2740 <p>Note in particular that the behavior of slices of the following
2741 cases remains unchanged:</p>
2742 <pre>
2743 @a = ()[1,2];
2744 @a = (getpwent)[7,0];
2745 @a = (anything_returning_empty_list())[2,1,2];
2746 @a = @b[2,1,2];
2747 @a = @c{'a','b','c'};</pre>
2748 <p>See <a href="file://C|\msysgit\mingw\html/pod/perldata.html">the perldata manpage</a>.</p>
2750 </p>
2751 <h2><a name="_____prototype_and__foo_a_"><code>(\$)</code> prototype and <code>$foo{a}</code></a></h2>
2752 <p>A scalar reference prototype now correctly allows a hash or
2753 array element in that slot.</p>
2755 </p>
2756 <h2><a name="goto__sub_and_autoload"><code>goto &amp;sub</code> and AUTOLOAD</a></h2>
2757 <p>The <code>goto &amp;sub</code> construct works correctly when <code>&amp;sub</code> happens
2758 to be autoloaded.</p>
2760 </p>
2761 <h2><a name="bareword_allowed_under_use_integer"><code>-bareword</code> allowed under <code>use integer</code></a></h2>
2762 <p>The autoquoting of barewords preceded by <code>-</code> did not work
2763 in prior versions when the <code>integer</code> pragma was enabled.
2764 This has been fixed.</p>
2766 </p>
2767 <h2><a name="failures_in_destroy__">Failures in <code>DESTROY()</code></a></h2>
2768 <p>When code in a destructor threw an exception, it went unnoticed
2769 in earlier versions of Perl, unless someone happened to be
2770 looking in $@ just after the point the destructor happened to
2771 run. Such failures are now visible as warnings when warnings are
2772 enabled.</p>
2774 </p>
2775 <h2><a name="locale_bugs_fixed">Locale bugs fixed</a></h2>
2776 <p><a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_printf"><code>printf()</code></a> and <code>sprintf()</code> previously reset the numeric locale
2777 back to the default ``C'' locale. This has been fixed.</p>
2778 <p>Numbers formatted according to the local numeric locale
2779 (such as using a decimal comma instead of a decimal dot) caused
2780 ``isn't numeric'' warnings, even while the operations accessing
2781 those numbers produced correct results. These warnings have been
2782 discontinued.</p>
2784 </p>
2785 <h2><a name="memory_leaks">Memory leaks</a></h2>
2786 <p>The <code>eval 'return sub {...}'</code> construct could sometimes leak
2787 memory. This has been fixed.</p>
2788 <p>Operations that aren't filehandle constructors used to leak memory
2789 when used on invalid filehandles. This has been fixed.</p>
2790 <p>Constructs that modified <a href="file://C|\msysgit\mingw\html/pod/perlvar.html#item___"><code>@_</code></a> could fail to deallocate values
2791 in <a href="file://C|\msysgit\mingw\html/pod/perlvar.html#item___"><code>@_</code></a> and thus leak memory. This has been corrected.</p>
2793 </p>
2794 <h2><a name="spurious_subroutine_stubs_after_failed_subroutine_calls">Spurious subroutine stubs after failed subroutine calls</a></h2>
2795 <p>Perl could sometimes create empty subroutine stubs when a
2796 subroutine was not found in the package. Such cases stopped
2797 later method lookups from progressing into base packages.
2798 This has been corrected.</p>
2800 </p>
2801 <h2><a name="taint_failures_under_u">Taint failures under <code>-U</code></a></h2>
2802 <p>When running in unsafe mode, taint violations could sometimes
2803 cause silent failures. This has been fixed.</p>
2805 </p>
2806 <h2><a name="end_blocks_and_the_c_switch">END blocks and the <code>-c</code> switch</a></h2>
2807 <p>Prior versions used to run BEGIN <strong>and</strong> END blocks when Perl was
2808 run in compile-only mode. Since this is typically not the expected
2809 behavior, END blocks are not executed anymore when the <code>-c</code> switch
2810 is used, or if compilation fails.</p>
2811 <p>See <a href="#support_for_check_blocks">Support for CHECK blocks</a> for how to run things when the compile
2812 phase ends.</p>
2814 </p>
2815 <h2><a name="potential_to_leak_data_filehandles">Potential to leak DATA filehandles</a></h2>
2816 <p>Using the <code>__DATA__</code> token creates an implicit filehandle to
2817 the file that contains the token. It is the program's
2818 responsibility to close it when it is done reading from it.</p>
2819 <p>This caveat is now better explained in the documentation.
2820 See <a href="file://C|\msysgit\mingw\html/pod/perldata.html">the perldata manpage</a>.</p>
2822 </p>
2823 <hr />
2824 <h1><a name="new_or_changed_diagnostics">New or Changed Diagnostics</a></h1>
2825 <dl>
2826 <dt><strong><a name="item__22_25s_22_variable__25s_masks_earlier_declaration">``%s'' variable %s masks earlier declaration in same %s</a></strong>
2828 <dd>
2829 <p>(W misc) A ``my'' or ``our'' variable has been redeclared in the current scope or statement,
2830 effectively eliminating all access to the previous instance. This is almost
2831 always a typographical error. Note that the earlier variable will still exist
2832 until the end of the scope or until all closure referents to it are
2833 destroyed.</p>
2834 </dd>
2835 </li>
2836 <dt><strong><a name="item__22my_sub_22_not_yet_implemented">``my sub'' not yet implemented</a></strong>
2838 <dd>
2839 <p>(F) Lexically scoped subroutines are not yet implemented. Don't try that
2840 yet.</p>
2841 </dd>
2842 </li>
2843 <dt><strong><a name="item__22our_22_variable__25s_redeclared">``our'' variable %s redeclared</a></strong>
2845 <dd>
2846 <p>(W misc) You seem to have already declared the same global once before in the
2847 current lexical scope.</p>
2848 </dd>
2849 </li>
2850 <dt><strong><a name="item__27_21_27_allowed_only_after_types__25s">'!' allowed only after types %s</a></strong>
2852 <dd>
2853 <p>(F) The '!' is allowed in <code>pack()</code> and <code>unpack()</code> only after certain types.
2854 See <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#pack">pack in the perlfunc manpage</a>.</p>
2855 </dd>
2856 </li>
2857 <dt><strong><a name="item__2f_cannot_take_a_count">/ cannot take a count</a></strong>
2859 <dd>
2860 <p>(F) You had an unpack template indicating a counted-length string,
2861 but you have also specified an explicit size for the string.
2862 See <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#pack">pack in the perlfunc manpage</a>.</p>
2863 </dd>
2864 </li>
2865 <dt><strong><a name="item__2f_must_be_followed_by_a_2c_a_or_z">/ must be followed by a, A or Z</a></strong>
2867 <dd>
2868 <p>(F) You had an unpack template indicating a counted-length string,
2869 which must be followed by one of the letters a, A or Z
2870 to indicate what sort of string is to be unpacked.
2871 See <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#pack">pack in the perlfunc manpage</a>.</p>
2872 </dd>
2873 </li>
2874 <dt><strong><a name="item__2f_must_be_followed_by_a_2a_2c_a_2a_or_z_2a">/ must be followed by a*, A* or Z*</a></strong>
2876 <dd>
2877 <p>(F) You had a pack template indicating a counted-length string,
2878 Currently the only things that can have their length counted are a*, A* or Z*.
2879 See <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#pack">pack in the perlfunc manpage</a>.</p>
2880 </dd>
2881 </li>
2882 <dt><strong><a name="item__2f_must_follow_a_numeric_type">/ must follow a numeric type</a></strong>
2884 <dd>
2885 <p>(F) You had an unpack template that contained a '#',
2886 but this did not follow some numeric unpack specification.
2887 See <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#pack">pack in the perlfunc manpage</a>.</p>
2888 </dd>
2889 </li>
2890 <dt><strong><a name="item__2f_25s_2f_3a_unrecognized_escape__5c_5c_25c_passe">/%s/: Unrecognized escape \\%c passed through</a></strong>
2892 <dd>
2893 <p>(W regexp) You used a backslash-character combination which is not recognized
2894 by Perl. This combination appears in an interpolated variable or a
2895 <code>'</code>-delimited regular expression. The character was understood literally.</p>
2896 </dd>
2897 </li>
2898 <dt><strong><a name="item__2f_25s_2f_3a_unrecognized_escape__5c_5c_25c_in_ch">/%s/: Unrecognized escape \\%c in character class passed through</a></strong>
2900 <dd>
2901 <p>(W regexp) You used a backslash-character combination which is not recognized
2902 by Perl inside character classes. The character was understood literally.</p>
2903 </dd>
2904 </li>
2905 <dt><strong><a name="item__2f_25s_2f_should_probably_be_written_as__22_25s_2">/%s/ should probably be written as ``%s''</a></strong>
2907 <dd>
2908 <p>(W syntax) You have used a pattern where Perl expected to find a string,
2909 as in the first argument to <code>join</code>. Perl will treat the true
2910 or false result of matching the pattern against $_ as the string,
2911 which is probably not what you had in mind.</p>
2912 </dd>
2913 </li>
2914 <dt><strong><a name="item_s">%s() called too early to check prototype</a></strong>
2916 <dd>
2917 <p>(W prototype) You've called a function that has a prototype before the parser saw a
2918 definition or declaration for it, and Perl could not check that the call
2919 conforms to the prototype. You need to either add an early prototype
2920 declaration for the subroutine in question, or move the subroutine
2921 definition ahead of the call to get proper prototype checking. Alternatively,
2922 if you are certain that you're calling the function correctly, you may put
2923 an ampersand before the name to avoid the warning. See <a href="file://C|\msysgit\mingw\html/pod/perlsub.html">the perlsub manpage</a>.</p>
2924 </dd>
2925 </li>
2926 <dt><strong><a name="item__s">%s argument is not a HASH or ARRAY element</a></strong>
2928 <dd>
2929 <p>(F) The argument to <code>exists()</code> must be a hash or array element, such as:</p>
2930 </dd>
2931 <dd>
2932 <pre>
2933 $foo{$bar}
2934 $ref-&gt;{&quot;susie&quot;}[12]</pre>
2935 </dd>
2936 </li>
2937 <dt><strong>%s argument is not a HASH or ARRAY element or slice</strong>
2939 <dd>
2940 <p>(F) The argument to <a href="#item_delete"><code>delete()</code></a> must be either a hash or array element, such as:</p>
2941 </dd>
2942 <dd>
2943 <pre>
2944 $foo{$bar}
2945 $ref-&gt;{&quot;susie&quot;}[12]</pre>
2946 </dd>
2947 <dd>
2948 <p>or a hash or array slice, such as:</p>
2949 </dd>
2950 <dd>
2951 <pre>
2952 @foo[$bar, $baz, $xyzzy]
2953 @{$ref-&gt;[12]}{&quot;susie&quot;, &quot;queue&quot;}</pre>
2954 </dd>
2955 </li>
2956 <dt><strong>%s argument is not a subroutine name</strong>
2958 <dd>
2959 <p>(F) The argument to <code>exists()</code> for <code>exists &amp;sub</code> must be a subroutine
2960 name, and not a subroutine call. <code>exists &amp;sub()</code> will generate this error.</p>
2961 </dd>
2962 </li>
2963 <dt><strong>%s package attribute may clash with future reserved word: %s</strong>
2965 <dd>
2966 <p>(W reserved) A lowercase attribute name was used that had a package-specific handler.
2967 That name might have a meaning to Perl itself some day, even though it
2968 doesn't yet. Perhaps you should use a mixed-case attribute name, instead.
2969 See <a href="file://C|\msysgit\mingw\html/lib/attributes.html">the attributes manpage</a>.</p>
2970 </dd>
2971 </li>
2972 <dt><strong><a name="item__28in_cleanup_29__25s">(in cleanup) %s</a></strong>
2974 <dd>
2975 <p>(W misc) This prefix usually indicates that a <code>DESTROY()</code> method raised
2976 the indicated exception. Since destructors are usually called by
2977 the system at arbitrary points during execution, and often a vast
2978 number of times, the warning is issued only once for any number
2979 of failures that would otherwise result in the same message being
2980 repeated.</p>
2981 </dd>
2982 <dd>
2983 <p>Failure of user callbacks dispatched using the <code>G_KEEPERR</code> flag
2984 could also result in this warning. See <a href="file://C|\msysgit\mingw\html/pod/perlcall.html#g_keeperr">G_KEEPERR in the perlcall manpage</a>.</p>
2985 </dd>
2986 </li>
2987 <dt><strong><a name="item__3c_3e_should_be_quotes">&lt;&gt; should be quotes</a></strong>
2989 <dd>
2990 <p>(F) You wrote <code>require &lt;file&gt;</code> when you should have written
2991 <code>require 'file'</code>.</p>
2992 </dd>
2993 </li>
2994 <dt><strong><a name="item_attempt_to_join_self">Attempt to join self</a></strong>
2996 <dd>
2997 <p>(F) You tried to join a thread from within itself, which is an
2998 impossible task. You may be joining the wrong thread, or you may
2999 need to move the <code>join()</code> to some other thread.</p>
3000 </dd>
3001 </li>
3002 <dt><strong><a name="item_bad_evalled_substitution_pattern">Bad evalled substitution pattern</a></strong>
3004 <dd>
3005 <p>(F) You've used the /e switch to evaluate the replacement for a
3006 substitution, but perl found a syntax error in the code to evaluate,
3007 most likely an unexpected right brace '}'.</p>
3008 </dd>
3009 </li>
3010 <dt><strong><a name="item_realloc">Bad <code>realloc()</code> ignored</a></strong>
3012 <dd>
3013 <p>(S) An internal routine called <a href="#item_realloc"><code>realloc()</code></a> on something that had never been
3014 malloc()ed in the first place. Mandatory, but can be disabled by
3015 setting environment variable <code>PERL_BADFREE</code> to 1.</p>
3016 </dd>
3017 </li>
3018 <dt><strong><a name="item_bareword_found_in_conditional">Bareword found in conditional</a></strong>
3020 <dd>
3021 <p>(W bareword) The compiler found a bareword where it expected a conditional,
3022 which often indicates that an || or &amp;&amp; was parsed as part of the
3023 last argument of the previous construct, for example:</p>
3024 </dd>
3025 <dd>
3026 <pre>
3027 open FOO || die;</pre>
3028 </dd>
3029 <dd>
3030 <p>It may also indicate a misspelled constant that has been interpreted
3031 as a bareword:</p>
3032 </dd>
3033 <dd>
3034 <pre>
3035 use constant TYPO =&gt; 1;
3036 if (TYOP) { print &quot;foo&quot; }</pre>
3037 </dd>
3038 <dd>
3039 <p>The <code>strict</code> pragma is useful in avoiding such errors.</p>
3040 </dd>
3041 </li>
3042 <dt><strong><a name="item_binary_number__3e_0b111111111111111111111111111111">Binary number &gt; 0b11111111111111111111111111111111 non-portable</a></strong>
3044 <dd>
3045 <p>(W portable) The binary number you specified is larger than 2**32-1
3046 (4294967295) and therefore non-portable between systems. See
3047 <a href="file://C|\msysgit\mingw\html/pod/perlport.html">the perlport manpage</a> for more on portability concerns.</p>
3048 </dd>
3049 </li>
3050 <dt><strong><a name="item_bit_vector_size__3e_32_non_2dportable">Bit vector size &gt; 32 non-portable</a></strong>
3052 <dd>
3053 <p>(W portable) Using bit vector sizes larger than 32 is non-portable.</p>
3054 </dd>
3055 </li>
3056 <dt><strong><a name="item_buffer_overflow_in_prime_env_iter_3a__25s">Buffer overflow in prime_env_iter: %s</a></strong>
3058 <dd>
3059 <p>(W internal) A warning peculiar to VMS. While Perl was preparing to iterate over
3060 %ENV, it encountered a logical name or symbol definition which was too long,
3061 so it was truncated to the string shown.</p>
3062 </dd>
3063 </li>
3064 <dt><strong><a name="item_can_27t_check_filesystem_of_script__22_25s_22">Can't check filesystem of script ``%s''</a></strong>
3066 <dd>
3067 <p>(P) For some reason you can't check the filesystem of the script for nosuid.</p>
3068 </dd>
3069 </li>
3070 <dt><strong><a name="item_can_27t_declare_class_for_non_2dscalar__25s_in__22">Can't declare class for non-scalar %s in ``%s''</a></strong>
3072 <dd>
3073 <p>(S) Currently, only scalar variables can declared with a specific class
3074 qualifier in a ``my'' or ``our'' declaration. The semantics may be extended
3075 for other types of variables in future.</p>
3076 </dd>
3077 </li>
3078 <dt><strong><a name="item_can_27t_declare__25s_in__22_25s_22">Can't declare %s in ``%s''</a></strong>
3080 <dd>
3081 <p>(F) Only scalar, array, and hash variables may be declared as ``my'' or
3082 ``our'' variables. They must have ordinary identifiers as names.</p>
3083 </dd>
3084 </li>
3085 <dt><strong><a name="item_can_27t_ignore_signal_chld_2c_forcing_to_default">Can't ignore signal CHLD, forcing to default</a></strong>
3087 <dd>
3088 <p>(W signal) Perl has detected that it is being run with the SIGCHLD signal
3089 (sometimes known as SIGCLD) disabled. Since disabling this signal
3090 will interfere with proper determination of exit status of child
3091 processes, Perl has reset the signal to its default value.
3092 This situation typically indicates that the parent program under
3093 which Perl may be running (e.g., cron) is being very careless.</p>
3094 </dd>
3095 </li>
3096 <dt><strong><a name="item_can_27t_modify_non_2dlvalue_subroutine_call">Can't modify non-lvalue subroutine call</a></strong>
3098 <dd>
3099 <p>(F) Subroutines meant to be used in lvalue context should be declared as
3100 such, see <a href="file://C|\msysgit\mingw\html/pod/perlsub.html#lvalue_subroutines">Lvalue subroutines in the perlsub manpage</a>.</p>
3101 </dd>
3102 </li>
3103 <dt><strong><a name="item_can_27t_read_crtl_environ">Can't read CRTL environ</a></strong>
3105 <dd>
3106 <p>(S) A warning peculiar to VMS. Perl tried to read an element of %ENV
3107 from the CRTL's internal environment array and discovered the array was
3108 missing. You need to figure out where your CRTL misplaced its environ
3109 or define <em>PERL_ENV_TABLES</em> (see <a href="file://C|\msysgit\mingw\html/pod/perlvms.html">the perlvms manpage</a>) so that environ is not searched.</p>
3110 </dd>
3111 </li>
3112 <dt><strong><a name="item_can_27t_remove__25s_3a__25s_2c_skipping_file">Can't remove %s: %s, skipping file</a></strong>
3114 <dd>
3115 <p>(S) You requested an inplace edit without creating a backup file. Perl
3116 was unable to remove the original file to replace it with the modified
3117 file. The file was left unmodified.</p>
3118 </dd>
3119 </li>
3120 <dt><strong><a name="item_can_27t_return__25s_from_lvalue_subroutine">Can't return %s from lvalue subroutine</a></strong>
3122 <dd>
3123 <p>(F) Perl detected an attempt to return illegal lvalues (such
3124 as temporary or readonly values) from a subroutine used as an lvalue.
3125 This is not allowed.</p>
3126 </dd>
3127 </li>
3128 <dt><strong><a name="item_can_27t_weaken_a_nonreference">Can't weaken a nonreference</a></strong>
3130 <dd>
3131 <p>(F) You attempted to weaken something that was not a reference. Only
3132 references can be weakened.</p>
3133 </dd>
3134 </li>
3135 <dt><strong><a name="item_character_class__5b_3a_25s_3a_5d_unknown">Character class [:%s:] unknown</a></strong>
3137 <dd>
3138 <p>(F) The class in the character class [: :] syntax is unknown.
3139 See <a href="file://C|\msysgit\mingw\html/pod/perlre.html">the perlre manpage</a>.</p>
3140 </dd>
3141 </li>
3142 <dt><strong><a name="item_character_class_syntax__5b_25s_5d_belongs_inside_c">Character class syntax [%s] belongs inside character classes</a></strong>
3144 <dd>
3145 <p>(W unsafe) The character class constructs [: :], [= =], and [. .] go
3146 <em>inside</em> character classes, the [] are part of the construct,
3147 for example: /[012[:alpha:]345]/. Note that [= =] and [. .]
3148 are not currently implemented; they are simply placeholders for
3149 future extensions.</p>
3150 </dd>
3151 </li>
3152 <dt><strong><a name="item_constant_is_not__25s_reference">Constant is not %s reference</a></strong>
3154 <dd>
3155 <p>(F) A constant value (perhaps declared using the <code>use constant</code> pragma)
3156 is being dereferenced, but it amounts to the wrong type of reference. The
3157 message indicates the type of reference that was expected. This usually
3158 indicates a syntax error in dereferencing the constant value.
3159 See <a href="file://C|\msysgit\mingw\html/pod/perlsub.html#constant_functions">Constant Functions in the perlsub manpage</a> and <a href="file://C|\msysgit\mingw\html/lib/constant.html">the constant manpage</a>.</p>
3160 </dd>
3161 </li>
3162 <dt><strong>constant(%s): %s</strong>
3164 <dd>
3165 <p>(F) The parser found inconsistencies either while attempting to define an
3166 overloaded constant, or when trying to find the character name specified
3167 in the <code>\N{...}</code> escape. Perhaps you forgot to load the corresponding
3168 <code>overload</code> or <a href="#item_charnames"><code>charnames</code></a> pragma? See <a href="file://C|\msysgit\mingw\html/lib/charnames.html">the charnames manpage</a> and <a href="file://C|\msysgit\mingw\html/lib/overload.html">the overload manpage</a>.</p>
3169 </dd>
3170 </li>
3171 <dt><strong><a name="item_core_3a_3a_25s_is_not_a_keyword">CORE::%s is not a keyword</a></strong>
3173 <dd>
3174 <p>(F) The CORE:: namespace is reserved for Perl keywords.</p>
3175 </dd>
3176 </li>
3177 <dt><strong><a name="item_defined"><code>defined(@array)</code> is deprecated</a></strong>
3179 <dd>
3180 <p>(D) <a href="#item_defined"><code>defined()</code></a> is not usually useful on arrays because it checks for an
3181 undefined <em>scalar</em> value. If you want to see if the array is empty,
3182 just use <code>if (@array) { # not empty }</code> for example.</p>
3183 </dd>
3184 </li>
3185 <dt><strong><code>defined(%hash)</code> is deprecated</strong>
3187 <dd>
3188 <p>(D) <a href="#item_defined"><code>defined()</code></a> is not usually useful on hashes because it checks for an
3189 undefined <em>scalar</em> value. If you want to see if the hash is empty,
3190 just use <code>if (%hash) { # not empty }</code> for example.</p>
3191 </dd>
3192 </li>
3193 <dt><strong><a name="item_did_not_produce_a_valid_header">Did not produce a valid header</a></strong>
3195 <dd>
3196 <p>See Server error.</p>
3197 </dd>
3198 </li>
3199 <dt><strong><a name="item__28did_you_mean__22local_22_instead_of__22our_22_3">(Did you mean ``local'' instead of ``our''?)</a></strong>
3201 <dd>
3202 <p>(W misc) Remember that ``our'' does not localize the declared global variable.
3203 You have declared it again in the same lexical scope, which seems superfluous.</p>
3204 </dd>
3205 </li>
3206 <dt><strong><a name="item_document_contains_no_data">Document contains no data</a></strong>
3208 <dd>
3209 <p>See Server error.</p>
3210 </dd>
3211 </li>
3212 <dt><strong><a name="item_entering_effective__25s_failed">entering effective %s failed</a></strong>
3214 <dd>
3215 <p>(F) While under the <code>use filetest</code> pragma, switching the real and
3216 effective uids or gids failed.</p>
3217 </dd>
3218 </li>
3219 <dt><strong><a name="item_false__5b_5d_range__22_25s_22_in_regexp">false [] range ``%s'' in regexp</a></strong>
3221 <dd>
3222 <p>(W regexp) A character class range must start and end at a literal character, not
3223 another character class like <code>\d</code> or <code>[:alpha:]</code>. The ``-'' in your false
3224 range is interpreted as a literal ``-''. Consider quoting the ``-'', ``\-''.
3225 See <a href="file://C|\msysgit\mingw\html/pod/perlre.html">the perlre manpage</a>.</p>
3226 </dd>
3227 </li>
3228 <dt><strong><a name="item_filehandle__25s_opened_only_for_output">Filehandle %s opened only for output</a></strong>
3230 <dd>
3231 <p>(W io) You tried to read from a filehandle opened only for writing. If you
3232 intended it to be a read/write filehandle, you needed to open it with
3233 ``+&lt;'' or ``+&gt;'' or ``+&gt;&gt;'' instead of with ``&lt;'' or nothing. If
3234 you intended only to read from the file, use ``&lt;''. See
3235 <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_open">open in the perlfunc manpage</a>.</p>
3236 </dd>
3237 </li>
3238 <dt><strong><a name="item_flock"><code>flock()</code> on closed filehandle %s</a></strong>
3240 <dd>
3241 <p>(W closed) The filehandle you're attempting to <a href="#item_flock"><code>flock()</code></a> got itself closed some
3242 time before now. Check your logic flow. <a href="#item_flock"><code>flock()</code></a> operates on filehandles.
3243 Are you attempting to call <a href="#item_flock"><code>flock()</code></a> on a dirhandle by the same name?</p>
3244 </dd>
3245 </li>
3246 <dt><strong><a name="item_global_symbol__22_25s_22_requires_explicit_package">Global symbol ``%s'' requires explicit package name</a></strong>
3248 <dd>
3249 <p>(F) You've said ``use strict vars'', which indicates that all variables
3250 must either be lexically scoped (using ``my''), declared beforehand using
3251 ``our'', or explicitly qualified to say which package the global variable
3252 is in (using ``::'').</p>
3253 </dd>
3254 </li>
3255 <dt><strong><a name="item_hexadecimal_number__3e_0xffffffff_non_2dportable">Hexadecimal number &gt; 0xffffffff non-portable</a></strong>
3257 <dd>
3258 <p>(W portable) The hexadecimal number you specified is larger than 2**32-1
3259 (4294967295) and therefore non-portable between systems. See
3260 <a href="file://C|\msysgit\mingw\html/pod/perlport.html">the perlport manpage</a> for more on portability concerns.</p>
3261 </dd>
3262 </li>
3263 <dt><strong><a name="item_ill_2dformed_crtl_environ_value__22_25s_22">Ill-formed CRTL environ value ``%s''</a></strong>
3265 <dd>
3266 <p>(W internal) A warning peculiar to VMS. Perl tried to read the CRTL's internal
3267 environ array, and encountered an element without the <code>=</code> delimiter
3268 used to separate keys from values. The element is ignored.</p>
3269 </dd>
3270 </li>
3271 <dt><strong><a name="item_ill_2dformed_message_in_prime_env_iter_3a__7c_25s_">Ill-formed message in prime_env_iter: |%s|</a></strong>
3273 <dd>
3274 <p>(W internal) A warning peculiar to VMS. Perl tried to read a logical name
3275 or CLI symbol definition when preparing to iterate over %ENV, and
3276 didn't see the expected delimiter between key and value, so the
3277 line was ignored.</p>
3278 </dd>
3279 </li>
3280 <dt><strong><a name="item_illegal_binary_digit__25s">Illegal binary digit %s</a></strong>
3282 <dd>
3283 <p>(F) You used a digit other than 0 or 1 in a binary number.</p>
3284 </dd>
3285 </li>
3286 <dt><strong><a name="item_illegal_binary_digit__25s_ignored">Illegal binary digit %s ignored</a></strong>
3288 <dd>
3289 <p>(W digit) You may have tried to use a digit other than 0 or 1 in a binary number.
3290 Interpretation of the binary number stopped before the offending digit.</p>
3291 </dd>
3292 </li>
3293 <dt><strong><a name="item_illegal_number_of_bits_in_vec">Illegal number of bits in vec</a></strong>
3295 <dd>
3296 <p>(F) The number of bits in <a href="#item_vec"><code>vec()</code></a> (the third argument) must be a power of
3297 two from 1 to 32 (or 64, if your platform supports that).</p>
3298 </dd>
3299 </li>
3300 <dt><strong><a name="item_integer_overflow_in__25s_number">Integer overflow in %s number</a></strong>
3302 <dd>
3303 <p>(W overflow) The hexadecimal, octal or binary number you have specified either
3304 as a literal or as an argument to <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_hex"><code>hex()</code></a> or <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_oct"><code>oct()</code></a> is too big for your
3305 architecture, and has been converted to a floating point number. On a
3306 32-bit architecture the largest hexadecimal, octal or binary number
3307 representable without overflow is 0xFFFFFFFF, 037777777777, or
3308 0b11111111111111111111111111111111 respectively. Note that Perl
3309 transparently promotes all numbers to a floating point representation
3310 internally--subject to loss of precision errors in subsequent
3311 operations.</p>
3312 </dd>
3313 </li>
3314 <dt><strong><a name="item_invalid__25s_attribute_3a__25s">Invalid %s attribute: %s</a></strong>
3316 <dd>
3317 <p>The indicated attribute for a subroutine or variable was not recognized
3318 by Perl or by a user-supplied handler. See <a href="file://C|\msysgit\mingw\html/lib/attributes.html">the attributes manpage</a>.</p>
3319 </dd>
3320 </li>
3321 <dt><strong><a name="item_invalid__25s_attributes_3a__25s">Invalid %s attributes: %s</a></strong>
3323 <dd>
3324 <p>The indicated attributes for a subroutine or variable were not recognized
3325 by Perl or by a user-supplied handler. See <a href="file://C|\msysgit\mingw\html/lib/attributes.html">the attributes manpage</a>.</p>
3326 </dd>
3327 </li>
3328 <dt><strong><a name="item_invalid__5b_5d_range__22_25s_22_in_regexp">invalid [] range ``%s'' in regexp</a></strong>
3330 <dd>
3331 <p>The offending range is now explicitly displayed.</p>
3332 </dd>
3333 </li>
3334 <dt><strong><a name="item_invalid_separator_character__25s_in_attribute_list">Invalid separator character %s in attribute list</a></strong>
3336 <dd>
3337 <p>(F) Something other than a colon or whitespace was seen between the
3338 elements of an attribute list. If the previous attribute
3339 had a parenthesised parameter list, perhaps that list was terminated
3340 too soon. See <a href="file://C|\msysgit\mingw\html/lib/attributes.html">the attributes manpage</a>.</p>
3341 </dd>
3342 </li>
3343 <dt><strong><a name="item_invalid_separator_character__25s_in_subroutine_att">Invalid separator character %s in subroutine attribute list</a></strong>
3345 <dd>
3346 <p>(F) Something other than a colon or whitespace was seen between the
3347 elements of a subroutine attribute list. If the previous attribute
3348 had a parenthesised parameter list, perhaps that list was terminated
3349 too soon.</p>
3350 </dd>
3351 </li>
3352 <dt><strong><a name="item_leaving_effective__25s_failed">leaving effective %s failed</a></strong>
3354 <dd>
3355 <p>(F) While under the <code>use filetest</code> pragma, switching the real and
3356 effective uids or gids failed.</p>
3357 </dd>
3358 </li>
3359 <dt><strong><a name="item_lvalue_subs_returning__25s_not_implemented_yet">Lvalue subs returning %s not implemented yet</a></strong>
3361 <dd>
3362 <p>(F) Due to limitations in the current implementation, array and hash
3363 values cannot be returned in subroutines used in lvalue context.
3364 See <a href="file://C|\msysgit\mingw\html/pod/perlsub.html#lvalue_subroutines">Lvalue subroutines in the perlsub manpage</a>.</p>
3365 </dd>
3366 </li>
3367 <dt><strong><a name="item_method__25s_not_permitted">Method %s not permitted</a></strong>
3369 <dd>
3370 <p>See Server error.</p>
3371 </dd>
3372 </li>
3373 <dt><strong><a name="item_missing__25sbrace_25s_on__5cn_7b_7d">Missing %sbrace%s on \N{}</a></strong>
3375 <dd>
3376 <p>(F) Wrong syntax of character name literal <code>\N{charname}</code> within
3377 double-quotish context.</p>
3378 </dd>
3379 </li>
3380 <dt><strong><a name="item_missing_command_in_piped_open">Missing command in piped open</a></strong>
3382 <dd>
3383 <p>(W pipe) You used the <a href="#item_open"><code>open(FH, &quot;| command&quot;)</code></a> or <a href="#item_open"><code>open(FH, &quot;command |&quot;)</code></a>
3384 construction, but the command was missing or blank.</p>
3385 </dd>
3386 </li>
3387 <dt><strong><a name="item_missing_name_in__22my_sub_22">Missing name in ``my sub''</a></strong>
3389 <dd>
3390 <p>(F) The reserved syntax for lexically scoped subroutines requires that they
3391 have a name with which they can be found.</p>
3392 </dd>
3393 </li>
3394 <dt><strong><a name="item_no__25s_specified_for__2d_25c">No %s specified for -%c</a></strong>
3396 <dd>
3397 <p>(F) The indicated command line switch needs a mandatory argument, but
3398 you haven't specified one.</p>
3399 </dd>
3400 </li>
3401 <dt><strong><a name="item_no_package_name_allowed_for_variable__25s_in__22ou">No package name allowed for variable %s in ``our''</a></strong>
3403 <dd>
3404 <p>(F) Fully qualified variable names are not allowed in ``our'' declarations,
3405 because that doesn't make much sense under existing semantics. Such
3406 syntax is reserved for future extensions.</p>
3407 </dd>
3408 </li>
3409 <dt><strong><a name="item_no_space_allowed_after__2d_25c">No space allowed after -%c</a></strong>
3411 <dd>
3412 <p>(F) The argument to the indicated command line switch must follow immediately
3413 after the switch, without intervening spaces.</p>
3414 </dd>
3415 </li>
3416 <dt><strong><a name="item_no_utc_offset_information_3b_assuming_local_time_i">no UTC offset information; assuming local time is UTC</a></strong>
3418 <dd>
3419 <p>(S) A warning peculiar to VMS. Perl was unable to find the local
3420 timezone offset, so it's assuming that local system time is equivalent
3421 to UTC. If it's not, define the logical name <em>SYS$TIMEZONE_DIFFERENTIAL</em>
3422 to translate to the number of seconds which need to be added to UTC to
3423 get local time.</p>
3424 </dd>
3425 </li>
3426 <dt><strong><a name="item_octal_number__3e_037777777777_non_2dportable">Octal number &gt; 037777777777 non-portable</a></strong>
3428 <dd>
3429 <p>(W portable) The octal number you specified is larger than 2**32-1 (4294967295)
3430 and therefore non-portable between systems. See <a href="file://C|\msysgit\mingw\html/pod/perlport.html">the perlport manpage</a> for more
3431 on portability concerns.</p>
3432 </dd>
3433 <dd>
3434 <p>See also <a href="file://C|\msysgit\mingw\html/pod/perlport.html">the perlport manpage</a> for writing portable code.</p>
3435 </dd>
3436 </li>
3437 <dt><strong><a name="item_panic_3a_del_backref">panic: del_backref</a></strong>
3439 <dd>
3440 <p>(P) Failed an internal consistency check while trying to reset a weak
3441 reference.</p>
3442 </dd>
3443 </li>
3444 <dt><strong><a name="item_panic_3a_kid_popen_errno_read">panic: kid popen errno read</a></strong>
3446 <dd>
3447 <p>(F) forked child returned an incomprehensible message about its errno.</p>
3448 </dd>
3449 </li>
3450 <dt><strong><a name="item_panic_3a_magic_killbackrefs">panic: magic_killbackrefs</a></strong>
3452 <dd>
3453 <p>(P) Failed an internal consistency check while trying to reset all weak
3454 references to an object.</p>
3455 </dd>
3456 </li>
3457 <dt><strong><a name="item_parentheses_missing_around__22_25s_22_list">Parentheses missing around ``%s'' list</a></strong>
3459 <dd>
3460 <p>(W parenthesis) You said something like</p>
3461 </dd>
3462 <dd>
3463 <pre>
3464 my $foo, $bar = @_;</pre>
3465 </dd>
3466 <dd>
3467 <p>when you meant</p>
3468 </dd>
3469 <dd>
3470 <pre>
3471 my ($foo, $bar) = @_;</pre>
3472 </dd>
3473 <dd>
3474 <p>Remember that ``my'', ``our'', and ``local'' bind tighter than comma.</p>
3475 </dd>
3476 </li>
3477 <dt><strong><a name="item_possible_unintended_interpolation_of__25s_in_strin">Possible unintended interpolation of %s in string</a></strong>
3479 <dd>
3480 <p>(W ambiguous) It used to be that Perl would try to guess whether you
3481 wanted an array interpolated or a literal @. It no longer does this;
3482 arrays are now <em>always</em> interpolated into strings. This means that
3483 if you try something like:</p>
3484 </dd>
3485 <dd>
3486 <pre>
3487 print &quot;fred@example.com&quot;;</pre>
3488 </dd>
3489 <dd>
3490 <p>and the array <code>@example</code> doesn't exist, Perl is going to print
3491 <code>fred.com</code>, which is probably not what you wanted. To get a literal
3492 <code>@</code> sign in a string, put a backslash before it, just as you would
3493 to get a literal <code>$</code> sign.</p>
3494 </dd>
3495 </li>
3496 <dt><strong><a name="item_possible_y2k_bug_3a__25s">Possible Y2K bug: %s</a></strong>
3498 <dd>
3499 <p>(W y2k) You are concatenating the number 19 with another number, which
3500 could be a potential Year 2000 problem.</p>
3501 </dd>
3502 </li>
3503 <dt><strong><a name="item_pragma__22attrs_22_is_deprecated_2c_use__22sub_nam">pragma ``attrs'' is deprecated, use ``sub NAME : ATTRS'' instead</a></strong>
3505 <dd>
3506 <p>(W deprecated) You have written something like this:</p>
3507 </dd>
3508 <dd>
3509 <pre>
3510 sub doit
3512 use attrs qw(locked);
3513 }</pre>
3514 </dd>
3515 <dd>
3516 <p>You should use the new declaration syntax instead.</p>
3517 </dd>
3518 <dd>
3519 <pre>
3520 sub doit : locked
3522 ...</pre>
3523 </dd>
3524 <dd>
3525 <p>The <code>use attrs</code> pragma is now obsolete, and is only provided for
3526 backward-compatibility. See <a href="file://C|\msysgit\mingw\html/pod/perlsub.html#subroutine_attributes">Subroutine Attributes in the perlsub manpage</a>.</p>
3527 </dd>
3528 </li>
3529 <dt><strong><a name="item_premature_end_of_script_headers">Premature end of script headers</a></strong>
3531 <dd>
3532 <p>See Server error.</p>
3533 </dd>
3534 </li>
3535 <dt><strong><a name="item_repeat_count_in_pack_overflows">Repeat count in pack overflows</a></strong>
3537 <dd>
3538 <p>(F) You can't specify a repeat count so large that it overflows
3539 your signed integers. See <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#pack">pack in the perlfunc manpage</a>.</p>
3540 </dd>
3541 </li>
3542 <dt><strong><a name="item_repeat_count_in_unpack_overflows">Repeat count in unpack overflows</a></strong>
3544 <dd>
3545 <p>(F) You can't specify a repeat count so large that it overflows
3546 your signed integers. See <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#unpack">unpack in the perlfunc manpage</a>.</p>
3547 </dd>
3548 </li>
3549 <dt><strong><code>realloc()</code> of freed memory ignored</strong>
3551 <dd>
3552 <p>(S) An internal routine called <a href="#item_realloc"><code>realloc()</code></a> on something that had already
3553 been freed.</p>
3554 </dd>
3555 </li>
3556 <dt><strong><a name="item_reference_is_already_weak">Reference is already weak</a></strong>
3558 <dd>
3559 <p>(W misc) You have attempted to weaken a reference that is already weak.
3560 Doing so has no effect.</p>
3561 </dd>
3562 </li>
3563 <dt><strong><a name="item_setpgrp_can_27t_take_arguments">setpgrp can't take arguments</a></strong>
3565 <dd>
3566 <p>(F) Your system has the <code>setpgrp()</code> from BSD 4.2, which takes no arguments,
3567 unlike POSIX setpgid(), which takes a process ID and process group ID.</p>
3568 </dd>
3569 </li>
3570 <dt><strong><a name="item_strange__2a_2b_3f_7b_7d_on_zero_2dlength_expressio">Strange *+?{} on zero-length expression</a></strong>
3572 <dd>
3573 <p>(W regexp) You applied a regular expression quantifier in a place where it
3574 makes no sense, such as on a zero-width assertion.
3575 Try putting the quantifier inside the assertion instead. For example,
3576 the way to match ``abc'' provided that it is followed by three
3577 repetitions of ``xyz'' is <code>/abc(?=(?:xyz){3})/</code>, not <code>/abc(?=xyz){3}/</code>.</p>
3578 </dd>
3579 </li>
3580 <dt><strong><a name="item_switching_effective__25s_is_not_implemented">switching effective %s is not implemented</a></strong>
3582 <dd>
3583 <p>(F) While under the <code>use filetest</code> pragma, we cannot switch the
3584 real and effective uids or gids.</p>
3585 </dd>
3586 </li>
3587 <dt><strong><a name="item_elements">This Perl can't reset CRTL environ elements (%s)</a></strong>
3589 <dt><strong>This Perl can't set CRTL environ elements (%s=%s)</strong>
3591 <dd>
3592 <p>(W internal) Warnings peculiar to VMS. You tried to change or delete an element
3593 of the CRTL's internal environ array, but your copy of Perl wasn't
3594 built with a CRTL that contained the <code>setenv()</code> function. You'll need to
3595 rebuild Perl with a CRTL that does, or redefine <em>PERL_ENV_TABLES</em> (see
3596 <a href="file://C|\msysgit\mingw\html/pod/perlvms.html">the perlvms manpage</a>) so that the environ array isn't the target of the change to
3597 %ENV which produced the warning.</p>
3598 </dd>
3599 </li>
3600 <dt><strong><a name="item_too_late_to_run__25s_block">Too late to run %s block</a></strong>
3602 <dd>
3603 <p>(W void) A CHECK or INIT block is being defined during run time proper,
3604 when the opportunity to run them has already passed. Perhaps you are
3605 loading a file with <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_require"><code>require</code></a> or <code>do</code> when you should be using
3606 <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_use"><code>use</code></a> instead. Or perhaps you should put the <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_require"><code>require</code></a> or <code>do</code>
3607 inside a BEGIN block.</p>
3608 </dd>
3609 </li>
3610 <dt><strong><a name="item_open">Unknown <code>open()</code> mode '%s'</a></strong>
3612 <dd>
3613 <p>(F) The second argument of 3-argument <a href="#item_open"><code>open()</code></a> is not among the list
3614 of valid modes: <code>&lt;</code>, <code>&gt;</code>, <code>&gt;&gt;</code>, <code>+&lt;</code>,
3615 <code>+&gt;</code>, <code>+&gt;&gt;</code>, <code>-|</code>, <code>|-</code>.</p>
3616 </dd>
3617 </li>
3618 <dt><strong><a name="item_unknown_process__25x_sent_message_to_prime_env_ite">Unknown process %x sent message to prime_env_iter: %s</a></strong>
3620 <dd>
3621 <p>(P) An error peculiar to VMS. Perl was reading values for %ENV before
3622 iterating over it, and someone else stuck a message in the stream of
3623 data Perl expected. Someone's very confused, or perhaps trying to
3624 subvert Perl's population of %ENV for nefarious purposes.</p>
3625 </dd>
3626 </li>
3627 <dt><strong><a name="item_unrecognized_escape__5c_5c_25c_passed_through">Unrecognized escape \\%c passed through</a></strong>
3629 <dd>
3630 <p>(W misc) You used a backslash-character combination which is not recognized
3631 by Perl. The character was understood literally.</p>
3632 </dd>
3633 </li>
3634 <dt><strong><a name="item_unterminated_attribute_parameter_in_attribute_list">Unterminated attribute parameter in attribute list</a></strong>
3636 <dd>
3637 <p>(F) The lexer saw an opening (left) parenthesis character while parsing an
3638 attribute list, but the matching closing (right) parenthesis
3639 character was not found. You may need to add (or remove) a backslash
3640 character to get your parentheses to balance. See <a href="file://C|\msysgit\mingw\html/lib/attributes.html">the attributes manpage</a>.</p>
3641 </dd>
3642 </li>
3643 <dt><strong><a name="item_unterminated_attribute_list">Unterminated attribute list</a></strong>
3645 <dd>
3646 <p>(F) The lexer found something other than a simple identifier at the start
3647 of an attribute, and it wasn't a semicolon or the start of a
3648 block. Perhaps you terminated the parameter list of the previous attribute
3649 too soon. See <a href="file://C|\msysgit\mingw\html/lib/attributes.html">the attributes manpage</a>.</p>
3650 </dd>
3651 </li>
3652 <dt><strong><a name="item_unterminated_attribute_parameter_in_subroutine_att">Unterminated attribute parameter in subroutine attribute list</a></strong>
3654 <dd>
3655 <p>(F) The lexer saw an opening (left) parenthesis character while parsing a
3656 subroutine attribute list, but the matching closing (right) parenthesis
3657 character was not found. You may need to add (or remove) a backslash
3658 character to get your parentheses to balance.</p>
3659 </dd>
3660 </li>
3661 <dt><strong><a name="item_unterminated_subroutine_attribute_list">Unterminated subroutine attribute list</a></strong>
3663 <dd>
3664 <p>(F) The lexer found something other than a simple identifier at the start
3665 of a subroutine attribute, and it wasn't a semicolon or the start of a
3666 block. Perhaps you terminated the parameter list of the previous attribute
3667 too soon.</p>
3668 </dd>
3669 </li>
3670 <dt><strong><a name="item_value_of_cli_symbol__22_25s_22_too_long">Value of CLI symbol ``%s'' too long</a></strong>
3672 <dd>
3673 <p>(W misc) A warning peculiar to VMS. Perl tried to read the value of an %ENV
3674 element from a CLI symbol table, and found a resultant string longer
3675 than 1024 characters. The return value has been truncated to 1024
3676 characters.</p>
3677 </dd>
3678 </li>
3679 <dt><strong><a name="item_version_number_must_be_a_constant_number">Version number must be a constant number</a></strong>
3681 <dd>
3682 <p>(P) The attempt to translate a <code>use Module n.n LIST</code> statement into
3683 its equivalent <code>BEGIN</code> block found an internal inconsistency with
3684 the version number.</p>
3685 </dd>
3686 </li>
3687 </dl>
3689 </p>
3690 <hr />
3691 <h1><a name="new_tests">New tests</a></h1>
3692 <dl>
3693 <dt><strong><a name="item_lib_2fattrs">lib/attrs</a></strong>
3695 <dd>
3696 <p>Compatibility tests for <code>sub : attrs</code> vs the older <code>use attrs</code>.</p>
3697 </dd>
3698 </li>
3699 <dt><strong><a name="item_lib_2fenv">lib/env</a></strong>
3701 <dd>
3702 <p>Tests for new environment scalar capability (e.g., <a href="#item_qw"><code>use Env qw($BAR);</code></a>).</p>
3703 </dd>
3704 </li>
3705 <dt><strong><a name="item_lib_2fenv_2darray">lib/env-array</a></strong>
3707 <dd>
3708 <p>Tests for new environment array capability (e.g., <a href="#item_qw"><code>use Env qw(@PATH);</code></a>).</p>
3709 </dd>
3710 </li>
3711 <dt><strong><a name="item_lib_2fio_const">lib/io_const</a></strong>
3713 <dd>
3714 <p>IO constants (SEEK_*, _IO*).</p>
3715 </dd>
3716 </li>
3717 <dt><strong><a name="item_lib_2fio_dir">lib/io_dir</a></strong>
3719 <dd>
3720 <p>Directory-related IO methods (new, read, close, rewind, tied delete).</p>
3721 </dd>
3722 </li>
3723 <dt><strong><a name="item_lib_2fio_multihomed">lib/io_multihomed</a></strong>
3725 <dd>
3726 <p>INET sockets with multi-homed hosts.</p>
3727 </dd>
3728 </li>
3729 <dt><strong><a name="item_lib_2fio_poll">lib/io_poll</a></strong>
3731 <dd>
3732 <p>IO poll().</p>
3733 </dd>
3734 </li>
3735 <dt><strong><a name="item_lib_2fio_unix">lib/io_unix</a></strong>
3737 <dd>
3738 <p>UNIX sockets.</p>
3739 </dd>
3740 </li>
3741 <dt><strong><a name="item_op_2fattrs">op/attrs</a></strong>
3743 <dd>
3744 <p>Regression tests for <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_my"><code>my ($x,@y,%z) : attrs</code></a> and &lt;sub : attrs&gt;.</p>
3745 </dd>
3746 </li>
3747 <dt><strong><a name="item_op_2ffiletest">op/filetest</a></strong>
3749 <dd>
3750 <p>File test operators.</p>
3751 </dd>
3752 </li>
3753 <dt><strong><a name="item_op_2flex_assign">op/lex_assign</a></strong>
3755 <dd>
3756 <p>Verify operations that access pad objects (lexicals and temporaries).</p>
3757 </dd>
3758 </li>
3759 <dt><strong><a name="item_op_2fexists_sub">op/exists_sub</a></strong>
3761 <dd>
3762 <p>Verify <code>exists &amp;sub</code> operations.</p>
3763 </dd>
3764 </li>
3765 </dl>
3767 </p>
3768 <hr />
3769 <h1><a name="incompatible_changes">Incompatible Changes</a></h1>
3771 </p>
3772 <h2><a name="perl_source_incompatibilities">Perl Source Incompatibilities</a></h2>
3773 <p>Beware that any new warnings that have been added or old ones
3774 that have been enhanced are <strong>not</strong> considered incompatible changes.</p>
3775 <p>Since all new warnings must be explicitly requested via the <code>-w</code>
3776 switch or the <code>warnings</code> pragma, it is ultimately the programmer's
3777 responsibility to ensure that warnings are enabled judiciously.</p>
3778 <dl>
3779 <dt><strong><a name="item_check_is_a_new_keyword">CHECK is a new keyword</a></strong>
3781 <dd>
3782 <p>All subroutine definitions named CHECK are now special. See
3783 <code>/&quot;Support for CHECK blocks&quot;</code> for more information.</p>
3784 </dd>
3785 </li>
3786 <dt><strong><a name="item_treatment_of_list_slices_of_undef_has_changed">Treatment of list slices of undef has changed</a></strong>
3788 <dd>
3789 <p>There is a potential incompatibility in the behavior of list slices
3790 that are comprised entirely of undefined values.
3791 See <a href="#behavior_of_list_slices_is_more_consistent">Behavior of list slices is more consistent</a>.</p>
3792 </dd>
3793 </li>
3794 <dt><strong><a name="item_format_of__24english_3a_3aperl_version_is_differen">Format of $English::PERL_VERSION is different</a></strong>
3796 <dd>
3797 <p>The English module now sets $PERL_VERSION to $^V (a string value) rather
3798 than <a href="file://C|\msysgit\mingw\html/pod/perlvar.html#item___"><code>$]</code></a> (a numeric value). This is a potential incompatibility.
3799 Send us a report via perlbug if you are affected by this.</p>
3800 </dd>
3801 <dd>
3802 <p>See <a href="#improved_perl_version_numbering_system">Improved Perl version numbering system</a> for the reasons for
3803 this change.</p>
3804 </dd>
3805 </li>
3806 <dt><strong><a name="item_literals_of_the_form_1_2e2_2e3_parse_differently">Literals of the form <code>1.2.3</code> parse differently</a></strong>
3808 <dd>
3809 <p>Previously, numeric literals with more than one dot in them were
3810 interpreted as a floating point number concatenated with one or more
3811 numbers. Such ``numbers'' are now parsed as strings composed of the
3812 specified ordinals.</p>
3813 </dd>
3814 <dd>
3815 <p>For example, <code>print 97.98.99</code> used to output <code>97.9899</code> in earlier
3816 versions, but now prints <code>abc</code>.</p>
3817 </dd>
3818 <dd>
3819 <p>See <a href="#support_for_strings_represented_as_a_vector_of_ordinals">Support for strings represented as a vector of ordinals</a>.</p>
3820 </dd>
3821 </li>
3822 <dt><strong><a name="item_possibly_changed_pseudo_2drandom_number_generator">Possibly changed pseudo-random number generator</a></strong>
3824 <dd>
3825 <p>Perl programs that depend on reproducing a specific set of pseudo-random
3826 numbers may now produce different output due to improvements made to the
3827 <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_rand"><code>rand()</code></a> builtin. You can use <code>sh Configure -Drandfunc=rand</code> to obtain
3828 the old behavior.</p>
3829 </dd>
3830 <dd>
3831 <p>See <a href="#better_pseudorandom_number_generator">Better pseudo-random number generator</a>.</p>
3832 </dd>
3833 </li>
3834 <dt><strong><a name="item_hashing_function_for_hash_keys_has_changed">Hashing function for hash keys has changed</a></strong>
3836 <dd>
3837 <p>Even though Perl hashes are not order preserving, the apparently
3838 random order encountered when iterating on the contents of a hash
3839 is actually determined by the hashing algorithm used. Improvements
3840 in the algorithm may yield a random order that is <strong>different</strong> from
3841 that of previous versions, especially when iterating on hashes.</p>
3842 </dd>
3843 <dd>
3844 <p>See <a href="#better_worstcase_behavior_of_hashes">Better worst-case behavior of hashes</a> for additional
3845 information.</p>
3846 </dd>
3847 </li>
3848 <dt><strong><a name="item_undef_fails_on_read_only_values"><a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_undef"><code>undef</code></a> fails on read only values</a></strong>
3850 <dd>
3851 <p>Using the <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_undef"><code>undef</code></a> operator on a readonly value (such as $1) has
3852 the same effect as assigning <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_undef"><code>undef</code></a> to the readonly value--it
3853 throws an exception.</p>
3854 </dd>
3855 </li>
3856 <dt><strong><a name="item_close_2don_2dexec_bit_may_be_set_on_pipe_and_socke">Close-on-exec bit may be set on pipe and socket handles</a></strong>
3858 <dd>
3859 <p>Pipe and socket handles are also now subject to the close-on-exec
3860 behavior determined by the special variable $^F.</p>
3861 </dd>
3862 <dd>
3863 <p>See <a href="#more_consistent_closeonexec_behavior">More consistent close-on-exec behavior</a>.</p>
3864 </dd>
3865 </li>
3866 <dt><strong><a name="item_writing__22_24_241_22_to_mean__22_24_7b_24_7d1_22_">Writing <code>&quot;$$1&quot;</code> to mean <code>&quot;${$}1&quot;</code> is unsupported</a></strong>
3868 <dd>
3869 <p>Perl 5.004 deprecated the interpretation of <code>$$1</code> and
3870 similar within interpolated strings to mean <a href="file://C|\msysgit\mingw\html/pod/perlvar.html#item___"><code>$$ . &quot;1&quot;</code></a>,
3871 but still allowed it.</p>
3872 </dd>
3873 <dd>
3874 <p>In Perl 5.6.0 and later, <code>&quot;$$1&quot;</code> always means <code>&quot;${$1}&quot;</code>.</p>
3875 </dd>
3876 </li>
3877 <dt><strong><a name="item_delete">delete(), each(), <code>values()</code> and <code>\(%h)</code></a></strong>
3879 <dd>
3880 <p>operate on aliases to values, not copies</p>
3881 </dd>
3882 <dd>
3883 <p>delete(), each(), <code>values()</code> and hashes (e.g. <code>\(%h)</code>)
3884 in a list context return the actual
3885 values in the hash, instead of copies (as they used to in earlier
3886 versions). Typical idioms for using these constructs copy the
3887 returned values, but this can make a significant difference when
3888 creating references to the returned values. Keys in the hash are still
3889 returned as copies when iterating on a hash.</p>
3890 </dd>
3891 <dd>
3892 <p>See also <a href="#item_delete">delete(), each(), values() and hash iteration are faster</a>.</p>
3893 </dd>
3894 </li>
3895 <dt><strong><a name="item_vec"><code>vec(EXPR,OFFSET,BITS)</code> enforces powers-of-two BITS</a></strong>
3897 <dd>
3898 <p><a href="#item_vec"><code>vec()</code></a> generates a run-time error if the BITS argument is not
3899 a valid power-of-two integer.</p>
3900 </dd>
3901 </li>
3902 <dt><strong><a name="item_text_of_some_diagnostic_output_has_changed">Text of some diagnostic output has changed</a></strong>
3904 <dd>
3905 <p>Most references to internal Perl operations in diagnostics
3906 have been changed to be more descriptive. This may be an
3907 issue for programs that may incorrectly rely on the exact
3908 text of diagnostics for proper functioning.</p>
3909 </dd>
3910 </li>
3911 <dt><strong><a name="item___"><code>%@</code> has been removed</a></strong>
3913 <dd>
3914 <p>The undocumented special variable <a href="#item___"><code>%@</code></a> that used to accumulate
3915 ``background'' errors (such as those that happen in <code>DESTROY())</code>
3916 has been removed, because it could potentially result in memory
3917 leaks.</p>
3918 </dd>
3919 </li>
3920 <dt><strong><a name="item_not">Parenthesized <code>not()</code> behaves like a list operator</a></strong>
3922 <dd>
3923 <p>The <a href="#item_not"><code>not</code></a> operator now falls under the ``if it looks like a function,
3924 it behaves like a function'' rule.</p>
3925 </dd>
3926 <dd>
3927 <p>As a result, the parenthesized form can be used with <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_grep"><code>grep</code></a> and <a href="#item_map"><code>map</code></a>.
3928 The following construct used to be a syntax error before, but it works
3929 as expected now:</p>
3930 </dd>
3931 <dd>
3932 <pre>
3933 grep not($_), @things;</pre>
3934 </dd>
3935 <dd>
3936 <p>On the other hand, using <a href="#item_not"><code>not</code></a> with a literal list slice may not
3937 work. The following previously allowed construct:</p>
3938 </dd>
3939 <dd>
3940 <pre>
3941 print not (1,2,3)[0];</pre>
3942 </dd>
3943 <dd>
3944 <p>needs to be written with additional parentheses now:</p>
3945 </dd>
3946 <dd>
3947 <pre>
3948 print not((1,2,3)[0]);</pre>
3949 </dd>
3950 <dd>
3951 <p>The behavior remains unaffected when <a href="#item_not"><code>not</code></a> is not followed by parentheses.</p>
3952 </dd>
3953 </li>
3954 <dt><strong><a name="item_prototype">Semantics of bareword prototype <code>(*)</code> have changed</a></strong>
3956 <dd>
3957 <p>The semantics of the bareword prototype <code>*</code> have changed. Perl 5.005
3958 always coerced simple scalar arguments to a typeglob, which wasn't useful
3959 in situations where the subroutine must distinguish between a simple
3960 scalar and a typeglob. The new behavior is to not coerce bareword
3961 arguments to a typeglob. The value will always be visible as either
3962 a simple scalar or as a reference to a typeglob.</p>
3963 </dd>
3964 <dd>
3965 <p>See <a href="#item_prototype">More functional bareword prototype (*)</a>.</p>
3966 </dd>
3967 </li>
3968 <dt><strong><a name="item_semantics_of_bit_operators_may_have_changed_on_64_">Semantics of bit operators may have changed on 64-bit platforms</a></strong>
3970 <dd>
3971 <p>If your platform is either natively 64-bit or if Perl has been
3972 configured to used 64-bit integers, i.e., $Config{ivsize} is 8,
3973 there may be a potential incompatibility in the behavior of bitwise
3974 numeric operators (&amp; | ^ ~ &lt;&lt; &gt;&gt;). These operators used to strictly
3975 operate on the lower 32 bits of integers in previous versions, but now
3976 operate over the entire native integral width. In particular, note
3977 that unary <code>~</code> will produce different results on platforms that have
3978 different $Config{ivsize}. For portability, be sure to mask off
3979 the excess bits in the result of unary <code>~</code>, e.g., <code>~$x &amp; 0xffffffff</code>.</p>
3980 </dd>
3981 <dd>
3982 <p>See <a href="#bit_operators_support_full_native_integer_width">Bit operators support full native integer width</a>.</p>
3983 </dd>
3984 </li>
3985 <dt><strong><a name="item_more_builtins_taint_their_results">More builtins taint their results</a></strong>
3987 <dd>
3988 <p>As described in <a href="#improved_security_features">Improved security features</a>, there may be more
3989 sources of taint in a Perl program.</p>
3990 </dd>
3991 <dd>
3992 <p>To avoid these new tainting behaviors, you can build Perl with the
3993 Configure option <code>-Accflags=-DINCOMPLETE_TAINTS</code>. Beware that the
3994 ensuing perl binary may be insecure.</p>
3995 </dd>
3996 </li>
3997 </dl>
3999 </p>
4000 <h2><a name="c_source_incompatibilities">C Source Incompatibilities</a></h2>
4001 <dl>
4002 <dt><strong><a name="item_perl_pollute"><code>PERL_POLLUTE</code></a></strong>
4004 <dd>
4005 <p>Release 5.005 grandfathered old global symbol names by providing preprocessor
4006 macros for extension source compatibility. As of release 5.6.0, these
4007 preprocessor definitions are not available by default. You need to explicitly
4008 compile perl with <code>-DPERL_POLLUTE</code> to get these definitions. For
4009 extensions still using the old symbols, this option can be
4010 specified via MakeMaker:</p>
4011 </dd>
4012 <dd>
4013 <pre>
4014 perl Makefile.PL POLLUTE=1</pre>
4015 </dd>
4016 </li>
4017 <dt><strong><a name="item_perl_implicit_context"><code>PERL_IMPLICIT_CONTEXT</code></a></strong>
4019 <dd>
4020 <p>This new build option provides a set of macros for all API functions
4021 such that an implicit interpreter/thread context argument is passed to
4022 every API function. As a result of this, something like <code>sv_setsv(foo,bar)</code>
4023 amounts to a macro invocation that actually translates to something like
4024 <code>Perl_sv_setsv(my_perl,foo,bar)</code>. While this is generally expected
4025 to not have any significant source compatibility issues, the difference
4026 between a macro and a real function call will need to be considered.</p>
4027 </dd>
4028 <dd>
4029 <p>This means that there <strong>is</strong> a source compatibility issue as a result of
4030 this if your extensions attempt to use pointers to any of the Perl API
4031 functions.</p>
4032 </dd>
4033 <dd>
4034 <p>Note that the above issue is not relevant to the default build of
4035 Perl, whose interfaces continue to match those of prior versions
4036 (but subject to the other options described here).</p>
4037 </dd>
4038 <dd>
4039 <p>See <a href="file://C|\msysgit\mingw\html/pod/perlguts.html#the_perl_api">The Perl API in the perlguts manpage</a> for detailed information on the
4040 ramifications of building Perl with this option.</p>
4041 </dd>
4042 <dd>
4043 <pre>
4044 NOTE: PERL_IMPLICIT_CONTEXT is automatically enabled whenever Perl is built
4045 with one of -Dusethreads, -Dusemultiplicity, or both. It is not
4046 intended to be enabled by users at this time.</pre>
4047 </dd>
4048 </li>
4049 <dt><strong><a name="item_perl_pollute_malloc"><code>PERL_POLLUTE_MALLOC</code></a></strong>
4051 <dd>
4052 <p>Enabling Perl's malloc in release 5.005 and earlier caused the namespace of
4053 the system's malloc family of functions to be usurped by the Perl versions,
4054 since by default they used the same names. Besides causing problems on
4055 platforms that do not allow these functions to be cleanly replaced, this
4056 also meant that the system versions could not be called in programs that
4057 used Perl's malloc. Previous versions of Perl have allowed this behaviour
4058 to be suppressed with the HIDEMYMALLOC and EMBEDMYMALLOC preprocessor
4059 definitions.</p>
4060 </dd>
4061 <dd>
4062 <p>As of release 5.6.0, Perl's malloc family of functions have default names
4063 distinct from the system versions. You need to explicitly compile perl with
4064 <code>-DPERL_POLLUTE_MALLOC</code> to get the older behaviour. HIDEMYMALLOC
4065 and EMBEDMYMALLOC have no effect, since the behaviour they enabled is now
4066 the default.</p>
4067 </dd>
4068 <dd>
4069 <p>Note that these functions do <strong>not</strong> constitute Perl's memory allocation API.
4070 See <a href="file://C|\msysgit\mingw\html/pod/perlguts.html#memory_allocation">Memory Allocation in the perlguts manpage</a> for further information about that.</p>
4071 </dd>
4072 </li>
4073 </dl>
4075 </p>
4076 <h2><a name="compatible_c_source_api_changes">Compatible C Source API Changes</a></h2>
4077 <dl>
4078 <dt><strong><a name="item_patchlevel_is_now_perl_version"><code>PATCHLEVEL</code> is now <code>PERL_VERSION</code></a></strong>
4080 <dd>
4081 <p>The cpp macros <code>PERL_REVISION</code>, <code>PERL_VERSION</code>, and <code>PERL_SUBVERSION</code>
4082 are now available by default from perl.h, and reflect the base revision,
4083 patchlevel, and subversion respectively. <code>PERL_REVISION</code> had no
4084 prior equivalent, while <code>PERL_VERSION</code> and <code>PERL_SUBVERSION</code> were
4085 previously available as <code>PATCHLEVEL</code> and <code>SUBVERSION</code>.</p>
4086 </dd>
4087 <dd>
4088 <p>The new names cause less pollution of the <strong>cpp</strong> namespace and reflect what
4089 the numbers have come to stand for in common practice. For compatibility,
4090 the old names are still supported when <em>patchlevel.h</em> is explicitly
4091 included (as required before), so there is no source incompatibility
4092 from the change.</p>
4093 </dd>
4094 </li>
4095 </dl>
4097 </p>
4098 <h2><a name="binary_incompatibilities">Binary Incompatibilities</a></h2>
4099 <p>In general, the default build of this release is expected to be binary
4100 compatible for extensions built with the 5.005 release or its maintenance
4101 versions. However, specific platforms may have broken binary compatibility
4102 due to changes in the defaults used in hints files. Therefore, please be
4103 sure to always check the platform-specific README files for any notes to
4104 the contrary.</p>
4105 <p>The usethreads or usemultiplicity builds are <strong>not</strong> binary compatible
4106 with the corresponding builds in 5.005.</p>
4107 <p>On platforms that require an explicit list of exports (AIX, OS/2 and Windows,
4108 among others), purely internal symbols such as parser functions and the
4109 run time opcodes are not exported by default. Perl 5.005 used to export
4110 all functions irrespective of whether they were considered part of the
4111 public API or not.</p>
4112 <p>For the full list of public API functions, see <a href="file://C|\msysgit\mingw\html/pod/perlapi.html">the perlapi manpage</a>.</p>
4114 </p>
4115 <hr />
4116 <h1><a name="known_problems">Known Problems</a></h1>
4118 </p>
4119 <h2><a name="localizing_a_tied_hash_element_may_leak_memory">Localizing a tied hash element may leak memory</a></h2>
4120 <p>As of the 5.6.1 release, there is a known leak when code such as this
4121 is executed:</p>
4122 <pre>
4123 use Tie::Hash;
4124 tie my %tie_hash =&gt; 'Tie::StdHash';</pre>
4125 <pre>
4126 ...</pre>
4127 <pre>
4128 local($tie_hash{Foo}) = 1; # leaks</pre>
4130 </p>
4131 <h2><a name="known_test_failures">Known test failures</a></h2>
4132 <ul>
4133 <li>
4134 <p>64-bit builds</p>
4135 <p>Subtest #15 of lib/b.t may fail under 64-bit builds on platforms such
4136 as HP-UX PA64 and Linux IA64. The issue is still being investigated.</p>
4137 <p>The lib/io_multihomed test may hang in HP-UX if Perl has been
4138 configured to be 64-bit. Because other 64-bit platforms do not
4139 hang in this test, HP-UX is suspect. All other tests pass
4140 in 64-bit HP-UX. The test attempts to create and connect to
4141 ``multihomed'' sockets (sockets which have multiple IP addresses).</p>
4142 <p>Note that 64-bit support is still experimental.</p>
4143 </li>
4144 <li>
4145 <p>Failure of Thread tests</p>
4146 <p>The subtests 19 and 20 of lib/thr5005.t test are known to fail due to
4147 fundamental problems in the 5.005 threading implementation. These are
4148 not new failures--Perl 5.005_0x has the same bugs, but didn't have these
4149 tests. (Note that support for 5.005-style threading remains experimental.)</p>
4150 </li>
4151 <li>
4152 <p>NEXTSTEP 3.3 POSIX test failure</p>
4153 <p>In NEXTSTEP 3.3p2 the implementation of the <code>strftime(3)</code> in the
4154 operating system libraries is buggy: the %j format numbers the days of
4155 a month starting from zero, which, while being logical to programmers,
4156 will cause the subtests 19 to 27 of the lib/posix test may fail.</p>
4157 </li>
4158 <li>
4159 <p>Tru64 (aka Digital UNIX, aka DEC OSF/1) lib/sdbm test failure with gcc</p>
4160 <p>If compiled with gcc 2.95 the lib/sdbm test will fail (dump core).
4161 The cure is to use the vendor cc, it comes with the operating system
4162 and produces good code.</p>
4163 </li>
4164 </ul>
4166 </p>
4167 <h2><a name="ebcdic_platforms_not_fully_supported">EBCDIC platforms not fully supported</a></h2>
4168 <p>In earlier releases of Perl, EBCDIC environments like OS390 (also
4169 known as Open Edition MVS) and VM-ESA were supported. Due to changes
4170 required by the UTF-8 (Unicode) support, the EBCDIC platforms are not
4171 supported in Perl 5.6.0.</p>
4172 <p>The 5.6.1 release improves support for EBCDIC platforms, but they
4173 are not fully supported yet.</p>
4175 </p>
4176 <h2><a name="unicos_mk_cc_failures_during_configure_run">UNICOS/mk CC failures during Configure run</a></h2>
4177 <p>In UNICOS/mk the following errors may appear during the Configure run:</p>
4178 <pre>
4179 Guessing which symbols your C compiler and preprocessor define...
4180 CC-20 cc: ERROR File = try.c, Line = 3
4182 bad switch yylook 79bad switch yylook 79bad switch yylook 79bad switch yylook 79#ifdef A29K
4184 4 errors detected in the compilation of &quot;try.c&quot;.</pre>
4185 <p>The culprit is the broken awk of UNICOS/mk. The effect is fortunately
4186 rather mild: Perl itself is not adversely affected by the error, only
4187 the h2ph utility coming with Perl, and that is rather rarely needed
4188 these days.</p>
4190 </p>
4191 <h2><a name="arrow_operator_and_arrays">Arrow operator and arrays</a></h2>
4192 <p>When the left argument to the arrow operator <code>-&gt;</code> is an array, or
4193 the <code>scalar</code> operator operating on an array, the result of the
4194 operation must be considered erroneous. For example:</p>
4195 <pre>
4196 @x-&gt;[2]
4197 scalar(@x)-&gt;[2]</pre>
4198 <p>These expressions will get run-time errors in some future release of
4199 Perl.</p>
4201 </p>
4202 <h2><a name="experimental_features">Experimental features</a></h2>
4203 <p>As discussed above, many features are still experimental. Interfaces and
4204 implementation of these features are subject to change, and in extreme cases,
4205 even subject to removal in some future release of Perl. These features
4206 include the following:</p>
4207 <dl>
4208 <dt><strong><a name="item_threads">Threads</a></strong>
4210 <dt><strong><a name="item_unicode">Unicode</a></strong>
4212 <li><strong>-bit support</strong>
4214 <dt><strong>Lvalue subroutines</strong>
4216 <dt><strong><a name="item_weak_references">Weak references</a></strong>
4218 <dt><strong><a name="item_the_pseudo_2dhash_data_type">The pseudo-hash data type</a></strong>
4220 <dt><strong><a name="item_the_compiler_suite">The Compiler suite</a></strong>
4222 <dt><strong><a name="item_internal_implementation_of_file_globbing">Internal implementation of file globbing</a></strong>
4224 <dt><strong><a name="item_the_db_module">The DB module</a></strong>
4226 <dt><strong><a name="item_the_regular_expression_code_constructs_3a">The regular expression code constructs:</a></strong>
4228 <dd>
4229 <p><code>(?{ code })</code> and <code>(??{ code })</code></p>
4230 </dd>
4231 </li>
4232 </dl>
4234 </p>
4235 <hr />
4236 <h1><a name="obsolete_diagnostics">Obsolete Diagnostics</a></h1>
4237 <dl>
4238 <dt><strong><a name="item_character_class_syntax__5b_3a__3a_5d_is_reserved_f">Character class syntax [: :] is reserved for future extensions</a></strong>
4240 <dd>
4241 <p>(W) Within regular expression character classes ([]) the syntax beginning
4242 with ``[:'' and ending with ``:]'' is reserved for future extensions.
4243 If you need to represent those character sequences inside a regular
4244 expression character class, just quote the square brackets with the
4245 backslash: ``\[:'' and ``:\]''.</p>
4246 </dd>
4247 </li>
4248 <dt><strong><a name="item_ill_2dformed_logical_name__7c_25s_7c_in_prime_env_">Ill-formed logical name |%s| in prime_env_iter</a></strong>
4250 <dd>
4251 <p>(W) A warning peculiar to VMS. A logical name was encountered when preparing
4252 to iterate over %ENV which violates the syntactic rules governing logical
4253 names. Because it cannot be translated normally, it is skipped, and will not
4254 appear in %ENV. This may be a benign occurrence, as some software packages
4255 might directly modify logical name tables and introduce nonstandard names,
4256 or it may indicate that a logical name table has been corrupted.</p>
4257 </dd>
4258 </li>
4259 <dt><strong><a name="item_in_string_2c__40_25s_now_must_be_written_as__5c_40">In string, @%s now must be written as \@%s</a></strong>
4261 <dd>
4262 <p>The description of this error used to say:</p>
4263 </dd>
4264 <dd>
4265 <pre>
4266 (Someday it will simply assume that an unbackslashed @
4267 interpolates an array.)</pre>
4268 </dd>
4269 <dd>
4270 <p>That day has come, and this fatal error has been removed. It has been
4271 replaced by a non-fatal warning instead.
4272 See <a href="#arrays_now_always_interpolate_into_doublequoted_strings">Arrays now always interpolate into double-quoted strings</a> for
4273 details.</p>
4274 </dd>
4275 </li>
4276 <dt><strong><a name="item_probable_precedence_problem_on__25s">Probable precedence problem on %s</a></strong>
4278 <dd>
4279 <p>(W) The compiler found a bareword where it expected a conditional,
4280 which often indicates that an || or &amp;&amp; was parsed as part of the
4281 last argument of the previous construct, for example:</p>
4282 </dd>
4283 <dd>
4284 <pre>
4285 open FOO || die;</pre>
4286 </dd>
4287 </li>
4288 <dt><strong><a name="item_regexp_too_big">regexp too big</a></strong>
4290 <dd>
4291 <p>(F) The current implementation of regular expressions uses shorts as
4292 address offsets within a string. Unfortunately this means that if
4293 the regular expression compiles to longer than 32767, it'll blow up.
4294 Usually when you want a regular expression this big, there is a better
4295 way to do it with multiple statements. See <a href="file://C|\msysgit\mingw\html/pod/perlre.html">the perlre manpage</a>.</p>
4296 </dd>
4297 </li>
4298 <dt><strong><a name="item_use_of__22_24_24_3cdigit_3e_22_to_mean__22_24_7b_2">Use of ``$$&lt;digit&gt;'' to mean ``${$}&lt;digit&gt;'' is deprecated</a></strong>
4300 <dd>
4301 <p>(D) Perl versions before 5.004 misinterpreted any type marker followed
4302 by ``$'' and a digit. For example, ``$$0'' was incorrectly taken to mean
4303 ``${$}0'' instead of ``${$0}''. This bug is (mostly) fixed in Perl 5.004.</p>
4304 </dd>
4305 <dd>
4306 <p>However, the developers of Perl 5.004 could not fix this bug completely,
4307 because at least two widely-used modules depend on the old meaning of
4308 ``$$0'' in a string. So Perl 5.004 still interprets ``$$&lt;digit&gt;'' in the
4309 old (broken) way inside strings; but it generates this message as a
4310 warning. And in Perl 5.005, this special treatment will cease.</p>
4311 </dd>
4312 </li>
4313 </dl>
4315 </p>
4316 <hr />
4317 <h1><a name="reporting_bugs">Reporting Bugs</a></h1>
4318 <p>If you find what you think is a bug, you might check the
4319 articles recently posted to the comp.lang.perl.misc newsgroup.
4320 There may also be information at <a href="http://www.perl.com/">http://www.perl.com/</a> , the Perl
4321 Home Page.</p>
4322 <p>If you believe you have an unreported bug, please run the <strong>perlbug</strong>
4323 program included with your release. Be sure to trim your bug down
4324 to a tiny but sufficient test case. Your bug report, along with the
4325 output of <code>perl -V</code>, will be sent off to <a href="mailto:perlbug@perl.org">perlbug@perl.org</a> to be
4326 analysed by the Perl porting team.</p>
4328 </p>
4329 <hr />
4330 <h1><a name="see_also">SEE ALSO</a></h1>
4331 <p>The <em>Changes</em> file for exhaustive details on what changed.</p>
4332 <p>The <em>INSTALL</em> file for how to build Perl.</p>
4333 <p>The <em>README</em> file for general stuff.</p>
4334 <p>The <em>Artistic</em> and <em>Copying</em> files for copyright information.</p>
4336 </p>
4337 <hr />
4338 <h1><a name="history">HISTORY</a></h1>
4339 <p>Written by Gurusamy Sarathy &lt;<em><a href="mailto:gsar@ActiveState.com">gsar@ActiveState.com</a></em>&gt;, with many
4340 contributions from The Perl Porters.</p>
4341 <p>Send omissions or corrections to &lt;<em><a href="mailto:perlbug@perl.org">perlbug@perl.org</a></em>&gt;.</p>
4342 <table border="0" width="100%" cellspacing="0" cellpadding="3">
4343 <tr><td class="block" style="background-color: #cccccc" valign="middle">
4344 <big><strong><span class="block">&nbsp;perl561delta - what's new for perl v5.6.x</span></strong></big>
4345 </td></tr>
4346 </table>
4348 </body>
4350 </html>