Install Perl 5.8.8
[msysgit.git] / mingw / html / pod / perl56delta.html
blob7a425966a8f8d43355474821168adf0058825a1c
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>perl56delta - what's new for perl v5.6.0</title>
6 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
7 <link rev="made" href="mailto:" />
8 </head>
10 <body style="background-color: white">
11 <table border="0" width="100%" cellspacing="0" cellpadding="3">
12 <tr><td class="block" style="background-color: #cccccc" valign="middle">
13 <big><strong><span class="block">&nbsp;perl56delta - what's new for perl v5.6.0</span></strong></big>
14 </td></tr>
15 </table>
17 <p><a name="__index__"></a></p>
18 <!-- INDEX BEGIN -->
20 <ul>
22 <li><a href="#name">NAME</a></li>
23 <li><a href="#description">DESCRIPTION</a></li>
24 <li><a href="#core_enhancements">Core Enhancements</a></li>
25 <ul>
27 <li><a href="#interpreter_cloning__threads__and_concurrency">Interpreter cloning, threads, and concurrency</a></li>
28 <li><a href="#lexically_scoped_warning_categories">Lexically scoped warning categories</a></li>
29 <li><a href="#unicode_and_utf8_support">Unicode and UTF-8 support</a></li>
30 <li><a href="#support_for_interpolating_named_characters">Support for interpolating named characters</a></li>
31 <li><a href="#our_declarations">``our'' declarations</a></li>
32 <li><a href="#support_for_strings_represented_as_a_vector_of_ordinals">Support for strings represented as a vector of ordinals</a></li>
33 <li><a href="#improved_perl_version_numbering_system">Improved Perl version numbering system</a></li>
34 <li><a href="#new_syntax_for_declaring_subroutine_attributes">New syntax for declaring subroutine attributes</a></li>
35 <li><a href="#file_and_directory_handles_can_be_autovivified">File and directory handles can be autovivified</a></li>
36 <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>
37 <li><a href="#64bit_support">64-bit support</a></li>
38 <li><a href="#large_file_support">Large file support</a></li>
39 <li><a href="#long_doubles">Long doubles</a></li>
40 <li><a href="#more_bits">``more bits''</a></li>
41 <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>
42 <li><a href="#sort__coderef__foo_allowed"><code>sort $coderef @foo</code> allowed</a></li>
43 <li><a href="#file_globbing_implemented_internally">File globbing implemented internally</a></li>
44 <li><a href="#support_for_check_blocks">Support for CHECK blocks</a></li>
45 <li><a href="#posix_character_class_syntax_______supported">POSIX character class syntax [: :] supported</a></li>
46 <li><a href="#better_pseudorandom_number_generator">Better pseudo-random number generator</a></li>
47 <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>
48 <li><a href="#better_worstcase_behavior_of_hashes">Better worst-case behavior of hashes</a></li>
49 <li><a href="#pack___format__z__supported"><code>pack()</code> format 'Z' supported</a></li>
50 <li><a href="#pack___format_modifier_____supported"><code>pack()</code> format modifier '!' supported</a></li>
51 <li><a href="#pack___and_unpack___support_counted_strings"><code>pack()</code> and <code>unpack()</code> support counted strings</a></li>
52 <li><a href="#comments_in_pack___templates">Comments in <code>pack()</code> templates</a></li>
53 <li><a href="#weak_references">Weak references</a></li>
54 <li><a href="#binary_numbers_supported">Binary numbers supported</a></li>
55 <li><a href="#lvalue_subroutines">Lvalue subroutines</a></li>
56 <li><a href="#some_arrows_may_be_omitted_in_calls_through_references">Some arrows may be omitted in calls through references</a></li>
57 <li><a href="#boolean_assignment_operators_are_legal_lvalues">Boolean assignment operators are legal lvalues</a></li>
58 <li><a href="#exists___is_supported_on_subroutine_names"><code>exists()</code> is supported on subroutine names</a></li>
59 <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>
60 <li><a href="#pseudohashes_work_better">Pseudo-hashes work better</a></li>
61 <li><a href="#automatic_flushing_of_output_buffers">Automatic flushing of output buffers</a></li>
62 <li><a href="#better_diagnostics_on_meaningless_filehandle_operations">Better diagnostics on meaningless filehandle operations</a></li>
63 <li><a href="#where_possible__buffered_data_discarded_from_duped_input_filehandle">Where possible, buffered data discarded from duped input filehandle</a></li>
64 <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>
65 <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>
66 <li><a href="#t_filetest_recognizes_utf8_encoded_files_as_text"><code>-T</code> filetest recognizes UTF-8 encoded files as ``text''</a></li>
67 <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>
68 <li><a href="#improved_diagnostics">Improved diagnostics</a></li>
69 <li><a href="#diagnostics_follow_stderr">Diagnostics follow STDERR</a></li>
70 <li><a href="#more_consistent_closeonexec_behavior">More consistent close-on-exec behavior</a></li>
71 <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>
72 <li><a href="#better_syntax_checks_on_parenthesized_unary_operators">Better syntax checks on parenthesized unary operators</a></li>
73 <li><a href="#bit_operators_support_full_native_integer_width">Bit operators support full native integer width</a></li>
74 <li><a href="#improved_security_features">Improved security features</a></li>
75 <li><a href="#more_functional_bareword_prototype____">More functional bareword prototype (*)</a></li>
76 <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>
77 <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>
78 <li><a href="#new_variable___c_reflects_c_switch">New variable $^C reflects <code>-c</code> switch</a></li>
79 <li><a href="#new_variable___v_contains_perl_version_as_a_string">New variable $^V contains Perl version as a string</a></li>
80 <li><a href="#optional_y2k_warnings">Optional Y2K warnings</a></li>
81 <li><a href="#arrays_now_always_interpolate_into_doublequoted_strings">Arrays now always interpolate into double-quoted strings</a></li>
82 <li><a href="#__and____provide_starting_ending_offsets_of_regex_matches">@- and @+ provide starting/ending offsets of regex matches</a></li>
83 </ul>
85 <li><a href="#modules_and_pragmata">Modules and Pragmata</a></li>
86 <ul>
88 <li><a href="#modules">Modules</a></li>
89 <li><a href="#pragmata">Pragmata</a></li>
90 </ul>
92 <li><a href="#utility_changes">Utility Changes</a></li>
93 <ul>
95 <li><a href="#dprofpp">dprofpp</a></li>
96 <li><a href="#find2perl">find2perl</a></li>
97 <li><a href="#h2xs">h2xs</a></li>
98 <li><a href="#perlcc">perlcc</a></li>
99 <li><a href="#perldoc">perldoc</a></li>
100 <li><a href="#the_perl_debugger">The Perl Debugger</a></li>
101 </ul>
103 <li><a href="#improved_documentation">Improved Documentation</a></li>
104 <li><a href="#performance_enhancements">Performance enhancements</a></li>
105 <ul>
107 <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>
108 <li><a href="#optimized_assignments_to_lexical_variables">Optimized assignments to lexical variables</a></li>
109 <li><a href="#faster_subroutine_calls">Faster subroutine calls</a></li>
110 <li><a href="#delete____each____values___and_hash_iteration_are_faster">delete(), each(), <code>values()</code> and hash iteration are faster</a></li>
111 </ul>
113 <li><a href="#installation_and_configuration_improvements">Installation and Configuration Improvements</a></li>
114 <ul>
116 <li><a href="#dusethreads_means_something_different">-Dusethreads means something different</a></li>
117 <li><a href="#new_configure_flags">New Configure flags</a></li>
118 <li><a href="#threadedness_and_64bitness_now_more_daring">Threadedness and 64-bitness now more daring</a></li>
119 <li><a href="#long_doubles">Long Doubles</a></li>
120 <li><a href="#dusemorebits">-Dusemorebits</a></li>
121 <li><a href="#duselargefiles">-Duselargefiles</a></li>
122 <li><a href="#installusrbinperl">installusrbinperl</a></li>
123 <li><a href="#socks_support">SOCKS support</a></li>
124 <li><a href="#a_flag"><code>-A</code> flag</a></li>
125 <li><a href="#enhanced_installation_directories">Enhanced Installation Directories</a></li>
126 </ul>
128 <li><a href="#platform_specific_changes">Platform specific changes</a></li>
129 <ul>
131 <li><a href="#supported_platforms">Supported platforms</a></li>
132 <li><a href="#dos">DOS</a></li>
133 <li><a href="#os390__openedition_mvs_">OS390 (OpenEdition MVS)</a></li>
134 <li><a href="#vms">VMS</a></li>
135 <li><a href="#win32">Win32</a></li>
136 </ul>
138 <li><a href="#significant_bug_fixes">Significant bug fixes</a></li>
139 <ul>
141 <li><a href="#_handle__on_empty_files">&lt;HANDLE&gt; on empty files</a></li>
142 <li><a href="#eval_______improvements"><code>eval '...'</code> improvements</a></li>
143 <li><a href="#all_compilation_errors_are_true_errors">All compilation errors are true errors</a></li>
144 <li><a href="#implicitly_closed_filehandles_are_safer">Implicitly closed filehandles are safer</a></li>
145 <li><a href="#behavior_of_list_slices_is_more_consistent">Behavior of list slices is more consistent</a></li>
146 <li><a href="#_____prototype_and__foo_a_"><code>(\$)</code> prototype and <code>$foo{a}</code></a></li>
147 <li><a href="#goto__sub_and_autoload"><code>goto &amp;sub</code> and AUTOLOAD</a></li>
148 <li><a href="#bareword_allowed_under_use_integer"><code>-bareword</code> allowed under <code>use integer</code></a></li>
149 <li><a href="#failures_in_destroy__">Failures in <code>DESTROY()</code></a></li>
150 <li><a href="#locale_bugs_fixed">Locale bugs fixed</a></li>
151 <li><a href="#memory_leaks">Memory leaks</a></li>
152 <li><a href="#spurious_subroutine_stubs_after_failed_subroutine_calls">Spurious subroutine stubs after failed subroutine calls</a></li>
153 <li><a href="#taint_failures_under_u">Taint failures under <code>-U</code></a></li>
154 <li><a href="#end_blocks_and_the_c_switch">END blocks and the <code>-c</code> switch</a></li>
155 <li><a href="#potential_to_leak_data_filehandles">Potential to leak DATA filehandles</a></li>
156 </ul>
158 <li><a href="#new_or_changed_diagnostics">New or Changed Diagnostics</a></li>
159 <li><a href="#new_tests">New tests</a></li>
160 <li><a href="#incompatible_changes">Incompatible Changes</a></li>
161 <ul>
163 <li><a href="#perl_source_incompatibilities">Perl Source Incompatibilities</a></li>
164 <li><a href="#c_source_incompatibilities">C Source Incompatibilities</a></li>
165 <li><a href="#compatible_c_source_api_changes">Compatible C Source API Changes</a></li>
166 <li><a href="#binary_incompatibilities">Binary Incompatibilities</a></li>
167 </ul>
169 <li><a href="#known_problems">Known Problems</a></li>
170 <ul>
172 <li><a href="#thread_test_failures">Thread test failures</a></li>
173 <li><a href="#ebcdic_platforms_not_supported">EBCDIC platforms not supported</a></li>
174 <li><a href="#in_64bit_hpux_the_lib_io_multihomed_test_may_hang">In 64-bit HP-UX the lib/io_multihomed test may hang</a></li>
175 <li><a href="#nextstep_3_3_posix_test_failure">NEXTSTEP 3.3 POSIX test failure</a></li>
176 <li><a href="#tru64__aka_digital_unix__aka_dec_osf_1__lib_sdbm_test_failure_with_gcc">Tru64 (aka Digital UNIX, aka DEC OSF/1) lib/sdbm test failure with gcc</a></li>
177 <li><a href="#unicos_mk_cc_failures_during_configure_run">UNICOS/mk CC failures during Configure run</a></li>
178 <li><a href="#arrow_operator_and_arrays">Arrow operator and arrays</a></li>
179 <li><a href="#experimental_features">Experimental features</a></li>
180 </ul>
182 <li><a href="#obsolete_diagnostics">Obsolete Diagnostics</a></li>
183 <li><a href="#reporting_bugs">Reporting Bugs</a></li>
184 <li><a href="#see_also">SEE ALSO</a></li>
185 <li><a href="#history">HISTORY</a></li>
186 </ul>
187 <!-- INDEX END -->
189 <hr />
191 </p>
192 <h1><a name="name">NAME</a></h1>
193 <p>perl56delta - what's new for perl v5.6.0</p>
195 </p>
196 <hr />
197 <h1><a name="description">DESCRIPTION</a></h1>
198 <p>This document describes differences between the 5.005 release and the 5.6.0
199 release.</p>
201 </p>
202 <hr />
203 <h1><a name="core_enhancements">Core Enhancements</a></h1>
205 </p>
206 <h2><a name="interpreter_cloning__threads__and_concurrency">Interpreter cloning, threads, and concurrency</a></h2>
207 <p>Perl 5.6.0 introduces the beginnings of support for running multiple
208 interpreters concurrently in different threads. In conjunction with
209 the <code>perl_clone()</code> API call, which can be used to selectively duplicate
210 the state of any given interpreter, it is possible to compile a
211 piece of code once in an interpreter, clone that interpreter
212 one or more times, and run all the resulting interpreters in distinct
213 threads.</p>
214 <p>On the Windows platform, this feature is used to emulate <code>fork()</code> at the
215 interpreter level. See <a href="file://C|\msysgit\mingw\html/pod/perlfork.html">the perlfork manpage</a> for details about that.</p>
216 <p>This feature is still in evolution. It is eventually meant to be used
217 to selectively clone a subroutine and data reachable from that
218 subroutine in a separate interpreter and run the cloned subroutine
219 in a separate thread. Since there is no shared data between the
220 interpreters, little or no locking will be needed (unless parts of
221 the symbol table are explicitly shared). This is obviously intended
222 to be an easy-to-use replacement for the existing threads support.</p>
223 <p>Support for cloning interpreters and interpreter concurrency can be
224 enabled using the -Dusethreads Configure option (see win32/Makefile for
225 how to enable it on Windows.) The resulting perl executable will be
226 functionally identical to one that was built with -Dmultiplicity, but
227 the <code>perl_clone()</code> API call will only be available in the former.</p>
228 <p>-Dusethreads enables the cpp macro USE_ITHREADS by default, which in turn
229 enables Perl source code changes that provide a clear separation between
230 the op tree and the data it operates with. The former is immutable, and
231 can therefore be shared between an interpreter and all of its clones,
232 while the latter is considered local to each interpreter, and is therefore
233 copied for each clone.</p>
234 <p>Note that building Perl with the -Dusemultiplicity Configure option
235 is adequate if you wish to run multiple <strong>independent</strong> interpreters
236 concurrently in different threads. -Dusethreads only provides the
237 additional functionality of the <code>perl_clone()</code> API call and other
238 support for running <strong>cloned</strong> interpreters concurrently.</p>
239 <pre>
240 NOTE: This is an experimental feature. Implementation details are
241 subject to change.</pre>
243 </p>
244 <h2><a name="lexically_scoped_warning_categories">Lexically scoped warning categories</a></h2>
245 <p>You can now control the granularity of warnings emitted by perl at a finer
246 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>
247 have copious documentation on this feature.</p>
249 </p>
250 <h2><a name="unicode_and_utf8_support">Unicode and UTF-8 support</a></h2>
251 <p>Perl now uses UTF-8 as its internal representation for character
252 strings. The <code>utf8</code> and <code>bytes</code> pragmas are used to control this support
253 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
254 more information.</p>
255 <p>This feature is expected to evolve quickly to support some form of I/O
256 disciplines that can be used to specify the kind of input and output data
257 (bytes or characters). Until that happens, additional modules from CPAN
258 will be needed to complete the toolkit for dealing with Unicode.</p>
259 <pre>
260 NOTE: This should be considered an experimental feature. Implementation
261 details are subject to change.</pre>
263 </p>
264 <h2><a name="support_for_interpolating_named_characters">Support for interpolating named characters</a></h2>
265 <p>The new <code>\N</code> escape interpolates named characters within strings.
266 For example, <code>&quot;Hi! \N{WHITE SMILING FACE}&quot;</code> evaluates to a string
267 with a unicode smiley face at the end.</p>
269 </p>
270 <h2><a name="our_declarations">``our'' declarations</a></h2>
271 <p>An ``our'' declaration introduces a value that can be best understood
272 as a lexically scoped symbolic alias to a global variable in the
273 package that was current where the variable was declared. This is
274 mostly useful as an alternative to the <code>vars</code> pragma, but also provides
275 the opportunity to introduce typing and other attributes for such
276 variables. See <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_our">our in the perlfunc manpage</a>.</p>
278 </p>
279 <h2><a name="support_for_strings_represented_as_a_vector_of_ordinals">Support for strings represented as a vector of ordinals</a></h2>
280 <p>Literals of the form <code>v1.2.3.4</code> are now parsed as a string composed
281 of characters with the specified ordinals. This is an alternative, more
282 readable way to construct (possibly unicode) strings instead of
283 interpolating characters, as in <code>&quot;\x{1}\x{2}\x{3}\x{4}&quot;</code>. The leading
284 <code>v</code> may be omitted if there are more than two ordinals, so <code>1.2.3</code> is
285 parsed the same as <code>v1.2.3</code>.</p>
286 <p>Strings written in this form are also useful to represent version ``numbers''.
287 It is easy to compare such version ``numbers'' (which are really just plain
288 strings) using any of the usual string comparison operators <code>eq</code>, <code>ne</code>,
289 <code>lt</code>, <code>gt</code>, etc., or perform bitwise string operations on them using <code>|</code>,
290 <code>&amp;</code>, etc.</p>
291 <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
292 the perl version as a string), such literals can be used as a readable way
293 to check if you're running a particular version of Perl:</p>
294 <pre>
295 # this will parse in older versions of Perl also
296 if ($^V and $^V gt v5.6.0) {
297 # new features supported
298 }</pre>
299 <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
300 literals, but this particular usage should be avoided because it leads to
301 misleading error messages under versions of Perl which don't support vector
302 strings. Using a true version number will ensure correct behavior in all
303 versions of Perl:</p>
304 <pre>
305 require 5.006; # run time check for v5.6
306 use 5.006_001; # compile time check for v5.6.1</pre>
307 <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>
308 to print ordinals of characters in arbitrary strings:</p>
309 <pre>
310 printf &quot;v%vd&quot;, $^V; # prints current version, such as &quot;v5.5.650&quot;
311 printf &quot;%*vX&quot;, &quot;:&quot;, $addr; # formats IPv6 address
312 printf &quot;%*vb&quot;, &quot; &quot;, $bits; # displays bitstring</pre>
313 <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>
315 </p>
316 <h2><a name="improved_perl_version_numbering_system">Improved Perl version numbering system</a></h2>
317 <p>Beginning with Perl version 5.6.0, the version number convention has been
318 changed to a ``dotted integer'' scheme that is more commonly found in open
319 source projects.</p>
320 <p>Maintenance versions of v5.6.0 will be released as v5.6.1, v5.6.2 etc.
321 The next development series following v5.6.0 will be numbered v5.7.x,
322 beginning with v5.7.0, and the next major production release following
323 v5.6.0 will be v5.8.0.</p>
324 <p>The English module now sets $PERL_VERSION to $^V (a string value) rather
325 than <a href="file://C|\msysgit\mingw\html/pod/perlvar.html#item___"><code>$]</code></a> (a numeric value). (This is a potential incompatibility.
326 Send us a report via perlbug if you are affected by this.)</p>
327 <p>The v1.2.3 syntax is also now legal in Perl.
328 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>
329 <p>To cope with the new versioning system's use of at least three significant
330 digits for each version component, the method used for incrementing the
331 subversion number has also changed slightly. We assume that versions older
332 than v5.6.0 have been incrementing the subversion component in multiples of
333 10. Versions after v5.6.0 will increment them by 1. Thus, using the new
334 notation, 5.005_03 is the ``same'' as v5.5.30, and the first maintenance
335 version following v5.6.0 will be v5.6.1 (which should be read as being
336 equivalent to a floating point value of 5.006_001 in the older format,
337 stored in <a href="file://C|\msysgit\mingw\html/pod/perlvar.html#item___"><code>$]</code></a>).</p>
339 </p>
340 <h2><a name="new_syntax_for_declaring_subroutine_attributes">New syntax for declaring subroutine attributes</a></h2>
341 <p>Formerly, if you wanted to mark a subroutine as being a method call or
342 as requiring an automatic <code>lock()</code> when it is entered, you had to declare
343 that with a <code>use attrs</code> pragma in the body of the subroutine.
344 That can now be accomplished with declaration syntax, like this:</p>
345 <pre>
346 sub mymethod : locked method;
348 sub mymethod : locked method {
350 }</pre>
351 <pre>
352 sub othermethod :locked :method;
354 sub othermethod :locked :method {
356 }</pre>
357 <p>(Note how only the first <code>:</code> is mandatory, and whitespace surrounding
358 the <code>:</code> is optional.)</p>
359 <p><em>AutoSplit.pm</em> and <em>SelfLoader.pm</em> have been updated to keep the attributes
360 with the stubs they provide. See <a href="file://C|\msysgit\mingw\html/lib/attributes.html">the attributes manpage</a>.</p>
362 </p>
363 <h2><a name="file_and_directory_handles_can_be_autovivified">File and directory handles can be autovivified</a></h2>
364 <p>Similar to how constructs such as <code>$x-&gt;[0]</code> autovivify a reference,
365 handle constructors (open(), opendir(), pipe(), socketpair(), sysopen(),
366 socket(), and <code>accept())</code> now autovivify a file or directory handle
367 if the handle passed to them is an uninitialized scalar variable. This
368 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>
369 to be used to create filehandles that will conveniently be closed
370 automatically when the scope ends, provided there are no other references
371 to them. This largely eliminates the need for typeglobs when opening
372 filehandles that must be passed around, as in the following example:</p>
373 <pre>
374 sub myopen {
375 open my $fh, &quot;@_&quot;
376 or die &quot;Can't open '@_': $!&quot;;
377 return $fh;
378 }</pre>
379 <pre>
381 my $f = myopen(&quot;&lt;/etc/motd&quot;);
382 print &lt;$f&gt;;
383 # $f implicitly closed here
384 }</pre>
386 </p>
387 <h2><a name="open___with_more_than_two_arguments"><a href="#item_open"><code>open()</code></a> with more than two arguments</a></h2>
388 <p>If <a href="#item_open"><code>open()</code></a> is passed three arguments instead of two, the second argument
389 is used as the mode and the third argument is taken to be the file name.
390 This is primarily useful for protecting against unintended magic behavior
391 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>
393 </p>
394 <h2><a name="64bit_support">64-bit support</a></h2>
395 <p>Any platform that has 64-bit integers either</p>
396 <pre>
397 (1) natively as longs or ints
398 (2) via special compiler flags
399 (3) using long long or int64_t</pre>
400 <p>is able to use ``quads'' (64-bit integers) as follows:</p>
401 <ul>
402 <li>
403 <p>constants (decimal, hexadecimal, octal, binary) in the code</p>
404 </li>
405 <li>
406 <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>
407 </li>
408 <li>
409 <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>
410 </li>
411 <li>
412 <p>printed as such</p>
413 </li>
414 <li>
415 <p><code>pack()</code> and <code>unpack()</code> ``q'' and ``Q'' formats</p>
416 </li>
417 <li>
418 <p>in basic arithmetics: + - * / % (NOTE: operating close to the limits
419 of the integer values may produce surprising results)</p>
420 </li>
421 <li>
422 <p>in bit arithmetics: &amp; | ^ ~ &lt;&lt; &gt;&gt; (NOTE: these used to be forced
423 to be 32 bits wide but now operate on the full native width.)</p>
424 </li>
425 <li>
426 <p><a href="#item_vec"><code>vec()</code></a></p>
427 </li>
428 </ul>
429 <p>Note that unless you have the case (a) you will have to configure
430 and compile Perl using the -Duse64bitint Configure flag.</p>
431 <pre>
432 NOTE: The Configure flags -Duselonglong and -Duse64bits have been
433 deprecated. Use -Duse64bitint instead.</pre>
434 <p>There are actually two modes of 64-bitness: the first one is achieved
435 using Configure -Duse64bitint and the second one using Configure
436 -Duse64bitall. The difference is that the first one is minimal and
437 the second one maximal. The first works in more places than the second.</p>
438 <p>The <code>use64bitint</code> does only as much as is required to get 64-bit
439 integers into Perl (this may mean, for example, using ``long longs'')
440 while your memory may still be limited to 2 gigabytes (because your
441 pointers could still be 32-bit). Note that the name <code>64bitint</code> does
442 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,
443 but it doesn't have to): the <code>use64bitint</code> means that you will be
444 able to have 64 bits wide scalar values.</p>
445 <p>The <code>use64bitall</code> goes all the way by attempting to switch also
446 integers (if it can), longs (and pointers) to being 64-bit. This may
447 create an even more binary incompatible Perl than -Duse64bitint: the
448 resulting executable may not run at all in a 32-bit box, or you may
449 have to reboot/reconfigure/rebuild your operating system to be 64-bit
450 aware.</p>
451 <p>Natively 64-bit systems like Alpha and Cray need neither -Duse64bitint
452 nor -Duse64bitall.</p>
453 <p>Last but not least: note that due to Perl's habit of always using
454 floating point numbers, the quads are still not true integers.
455 When quads overflow their limits (0...18_446_744_073_709_551_615 unsigned,
456 -9_223_372_036_854_775_808...9_223_372_036_854_775_807 signed), they
457 are silently promoted to floating point numbers, after which they will
458 start losing precision (in their lower digits).</p>
459 <pre>
460 NOTE: 64-bit support is still experimental on most platforms.
461 Existing support only covers the LP64 data model. In particular, the
462 LLP64 data model is not yet supported. 64-bit libraries and system
463 APIs on many platforms have not stabilized--your mileage may vary.</pre>
465 </p>
466 <h2><a name="large_file_support">Large file support</a></h2>
467 <p>If you have filesystems that support ``large files'' (files larger than
468 2 gigabytes), you may now also be able to create and access them from
469 Perl.</p>
470 <pre>
471 NOTE: The default action is to enable large file support, if
472 available on the platform.</pre>
473 <p>If the large file support is on, and you have a Fcntl constant
474 O_LARGEFILE, the O_LARGEFILE is automatically added to the flags
475 of sysopen().</p>
476 <p>Beware that unless your filesystem also supports ``sparse files'' seeking
477 to umpteen petabytes may be inadvisable.</p>
478 <p>Note that in addition to requiring a proper file system to do large
479 files you may also need to adjust your per-process (or your
480 per-system, or per-process-group, or per-user-group) maximum filesize
481 limits before running Perl scripts that try to handle large files,
482 especially if you intend to write such files.</p>
483 <p>Finally, in addition to your process/process group maximum filesize
484 limits, you may have quota limits on your filesystems that stop you
485 (your user id or your user group id) from using large files.</p>
486 <p>Adjusting your process/user/group/file system/operating system limits
487 is outside the scope of Perl core language. For process limits, you
488 may try increasing the limits using your shell's limits/limit/ulimit
489 command before running Perl. The BSD::Resource extension (not
490 included with the standard Perl distribution) may also be of use, it
491 offers the getrlimit/setrlimit interface that can be used to adjust
492 process resource usage limits, including the maximum filesize limit.</p>
494 </p>
495 <h2><a name="long_doubles">Long doubles</a></h2>
496 <p>In some systems you may be able to use long doubles to enhance the
497 range and precision of your double precision floating point numbers
498 (that is, Perl's numbers). Use Configure -Duselongdouble to enable
499 this support (if it is available).</p>
501 </p>
502 <h2><a name="more_bits">``more bits''</a></h2>
503 <p>You can ``Configure -Dusemorebits'' to turn on both the 64-bit support
504 and the long double support.</p>
506 </p>
507 <h2><a name="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></h2>
508 <p>Perl subroutines with a prototype of <code>($$)</code>, and XSUBs in general, can
509 now be used as sort subroutines. In either case, the two elements to
510 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>
511 <p>For unprototyped sort subroutines, the historical behavior of passing
512 the elements to be compared as the global variables $a and $b remains
513 unchanged.</p>
515 </p>
516 <h2><a name="sort__coderef__foo_allowed"><code>sort $coderef @foo</code> allowed</a></h2>
517 <p><a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_sort"><code>sort()</code></a> did not accept a subroutine reference as the comparison
518 function in earlier versions. This is now permitted.</p>
520 </p>
521 <h2><a name="file_globbing_implemented_internally">File globbing implemented internally</a></h2>
522 <p>Perl now uses the File::Glob implementation of the <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_glob"><code>glob()</code></a> operator
523 automatically. This avoids using an external csh process and the
524 problems associated with it.</p>
525 <pre>
526 NOTE: This is currently an experimental feature. Interfaces and
527 implementation are subject to change.</pre>
529 </p>
530 <h2><a name="support_for_check_blocks">Support for CHECK blocks</a></h2>
531 <p>In addition to <code>BEGIN</code>, <code>INIT</code>, <code>END</code>, <code>DESTROY</code> and <code>AUTOLOAD</code>,
532 subroutines named <code>CHECK</code> are now special. These are queued up during
533 compilation and behave similar to END blocks, except they are called at
534 the end of compilation rather than at the end of execution. They cannot
535 be called directly.</p>
537 </p>
538 <h2><a name="posix_character_class_syntax_______supported">POSIX character class syntax [: :] supported</a></h2>
539 <p>For example to match alphabetic characters use /[[:alpha:]]/.
540 See <a href="file://C|\msysgit\mingw\html/pod/perlre.html">the perlre manpage</a> for details.</p>
542 </p>
543 <h2><a name="better_pseudorandom_number_generator">Better pseudo-random number generator</a></h2>
544 <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
545 <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(),
546 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>
547 <p>These changes should result in better random numbers from rand().</p>
549 </p>
550 <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>
551 <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
552 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
553 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
554 had inherited that behaviour from split().</p>
555 <p>Thus:</p>
556 <pre>
557 $foo = ($bar) = qw(a b c); print &quot;$foo|$bar\n&quot;;</pre>
558 <p>now correctly prints ``3|a'', instead of ``2|a''.</p>
560 </p>
561 <h2><a name="better_worstcase_behavior_of_hashes">Better worst-case behavior of hashes</a></h2>
562 <p>Small changes in the hashing algorithm have been implemented in
563 order to improve the distribution of lower order bits in the
564 hashed value. This is expected to yield better performance on
565 keys that are repeated sequences.</p>
567 </p>
568 <h2><a name="pack___format__z__supported"><code>pack()</code> format 'Z' supported</a></h2>
569 <p>The new format type 'Z' is useful for packing and unpacking null-terminated
570 strings. See <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#pack">pack in the perlfunc manpage</a>.</p>
572 </p>
573 <h2><a name="pack___format_modifier_____supported"><code>pack()</code> format modifier '!' supported</a></h2>
574 <p>The new format type modifier '!' is useful for packing and unpacking
575 native shorts, ints, and longs. See <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#pack">pack in the perlfunc manpage</a>.</p>
577 </p>
578 <h2><a name="pack___and_unpack___support_counted_strings"><code>pack()</code> and <code>unpack()</code> support counted strings</a></h2>
579 <p>The template character '/' can be used to specify a counted string
580 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>
582 </p>
583 <h2><a name="comments_in_pack___templates">Comments in <code>pack()</code> templates</a></h2>
584 <p>The '#' character in a template introduces a comment up to
585 end of the line. This facilitates documentation of <code>pack()</code>
586 templates.</p>
588 </p>
589 <h2><a name="weak_references">Weak references</a></h2>
590 <p>In previous versions of Perl, you couldn't cache objects so as
591 to allow them to be deleted if the last reference from outside
592 the cache is deleted. The reference in the cache would hold a
593 reference count on the object and the objects would never be
594 destroyed.</p>
595 <p>Another familiar problem is with circular references. When an
596 object references itself, its reference count would never go
597 down to zero, and it would not get destroyed until the program
598 is about to exit.</p>
599 <p>Weak references solve this by allowing you to ``weaken'' any
600 reference, that is, make it not count towards the reference count.
601 When the last non-weak reference to an object is deleted, the object
602 is destroyed and all the weak references to the object are
603 automatically undef-ed.</p>
604 <p>To use this feature, you need the Devel::WeakRef package from CPAN, which
605 contains additional documentation.</p>
606 <pre>
607 NOTE: This is an experimental feature. Details are subject to change.</pre>
609 </p>
610 <h2><a name="binary_numbers_supported">Binary numbers supported</a></h2>
611 <p>Binary numbers are now supported as literals, in s?printf formats, and
612 <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_oct"><code>oct()</code></a>:</p>
613 <pre>
614 $answer = 0b101010;
615 printf &quot;The answer is: %b\n&quot;, oct(&quot;0b101010&quot;);</pre>
617 </p>
618 <h2><a name="lvalue_subroutines">Lvalue subroutines</a></h2>
619 <p>Subroutines can now return modifiable lvalues.
620 See <a href="file://C|\msysgit\mingw\html/pod/perlsub.html#lvalue_subroutines">Lvalue subroutines in the perlsub manpage</a>.</p>
621 <pre>
622 NOTE: This is an experimental feature. Details are subject to change.</pre>
624 </p>
625 <h2><a name="some_arrows_may_be_omitted_in_calls_through_references">Some arrows may be omitted in calls through references</a></h2>
626 <p>Perl now allows the arrow to be omitted in many constructs
627 involving subroutine calls through references. For example,
628 <code>$foo[10]-&gt;('foo')</code> may now be written <code>$foo[10]('foo')</code>.
629 This is rather similar to how the arrow may be omitted from
630 <code>$foo[10]-&gt;{'foo'}</code>. Note however, that the arrow is still
631 required for <code>foo(10)-&gt;('bar')</code>.</p>
633 </p>
634 <h2><a name="boolean_assignment_operators_are_legal_lvalues">Boolean assignment operators are legal lvalues</a></h2>
635 <p>Constructs such as <code>($a ||= 2) += 1</code> are now allowed.</p>
637 </p>
638 <h2><a name="exists___is_supported_on_subroutine_names"><code>exists()</code> is supported on subroutine names</a></h2>
639 <p>The <code>exists()</code> builtin now works on subroutine names. A subroutine
640 is considered to exist if it has been declared (even if implicitly).
641 See <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#exists">exists in the perlfunc manpage</a> for examples.</p>
643 </p>
644 <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>
645 <p>The <code>exists()</code> and <a href="#item_delete"><code>delete()</code></a> builtins now work on simple arrays as well.
646 The behavior is similar to that on hash elements.</p>
647 <p><code>exists()</code> can be used to check whether an array element has been
648 initialized. This avoids autovivifying array elements that don't exist.
649 If the array is tied, the <code>EXISTS()</code> method in the corresponding tied
650 package will be invoked.</p>
651 <p><a href="#item_delete"><code>delete()</code></a> may be used to remove an element from the array and return
652 it. The array element at that position returns to its uninitialized
653 state, so that testing for the same element with <code>exists()</code> will return
654 false. If the element happens to be the one at the end, the size of
655 the array also shrinks up to the highest element that tests true for
656 exists(), or 0 if none such is found. If the array is tied, the <code>DELETE()</code>
657 method in the corresponding tied package will be invoked.</p>
658 <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>
660 </p>
661 <h2><a name="pseudohashes_work_better">Pseudo-hashes work better</a></h2>
662 <p>Dereferencing some types of reference values in a pseudo-hash,
663 such as <code>$ph-&gt;{foo}[1]</code>, was accidentally disallowed. This has
664 been corrected.</p>
665 <p>When applied to a pseudo-hash element, <code>exists()</code> now reports whether
666 the specified value exists, not merely if the key is valid.</p>
667 <p><a href="#item_delete"><code>delete()</code></a> now works on pseudo-hashes. When given a pseudo-hash element
668 or slice it deletes the values corresponding to the keys (but not the keys
669 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>
670 <p>Pseudo-hash slices with constant keys are now optimized to array lookups
671 at compile-time.</p>
672 <p>List assignments to pseudo-hash slices are now supported.</p>
673 <p>The <code>fields</code> pragma now provides ways to create pseudo-hashes, via
674 fields::new() and fields::phash(). See <a href="file://C|\msysgit\mingw\html/lib/fields.html">the fields manpage</a>.</p>
675 <pre>
676 NOTE: The pseudo-hash data type continues to be experimental.
677 Limiting oneself to the interface elements provided by the
678 fields pragma will provide protection from any future changes.</pre>
680 </p>
681 <h2><a name="automatic_flushing_of_output_buffers">Automatic flushing of output buffers</a></h2>
682 <p>fork(), exec(), system(), qx//, and pipe open()s now flush buffers
683 of all files opened for output when the operation was attempted. This
684 mostly eliminates confusing buffering mishaps suffered by users unaware
685 of how Perl internally handles I/O.</p>
686 <p>This is not supported on some platforms like Solaris where a suitably
687 correct implementation of <code>fflush(NULL)</code> isn't available.</p>
689 </p>
690 <h2><a name="better_diagnostics_on_meaningless_filehandle_operations">Better diagnostics on meaningless filehandle operations</a></h2>
691 <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>
692 are compile time errors. Attempting to read from filehandles that
693 were opened only for writing will now produce warnings (just as
694 writing to read-only filehandles does).</p>
696 </p>
697 <h2><a name="where_possible__buffered_data_discarded_from_duped_input_filehandle">Where possible, buffered data discarded from duped input filehandle</a></h2>
698 <p><a href="#item_open"><code>open(NEW, &quot;&lt;&amp;OLD&quot;)</code></a> now attempts to discard any data that
699 was previously read and buffered in <code>OLD</code> before duping the handle.
700 On platforms where doing this is allowed, the next read operation
701 on <code>NEW</code> will return the same data as the corresponding operation
702 on <code>OLD</code>. Formerly, it would have returned the data from the start
703 of the following disk block instead.</p>
705 </p>
706 <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>
707 <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
708 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
709 own, it now opens the <code>&lt;&gt;</code> files.</p>
711 </p>
712 <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>
713 <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
714 for the handle in question. The two pseudo-disciplines ``:raw'' and
715 ``:crlf'' are currently supported on DOS-derivative platforms.
716 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>
718 </p>
719 <h2><a name="t_filetest_recognizes_utf8_encoded_files_as_text"><code>-T</code> filetest recognizes UTF-8 encoded files as ``text''</a></h2>
720 <p>The algorithm used for the <code>-T</code> filetest has been enhanced to
721 correctly identify UTF-8 content as ``text''.</p>
723 </p>
724 <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>
725 <p>On Unix and similar platforms, system(), <code>qx()</code> and open(FOO, ``cmd |'')
726 etc., are implemented via <code>fork()</code> and exec(). When the underlying
727 <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,
728 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>
729 <p>The child process now communicates with the parent about the
730 error in launching the external command, which allows these
731 constructs to return with their usual error value and set $!.</p>
733 </p>
734 <h2><a name="improved_diagnostics">Improved diagnostics</a></h2>
735 <p>Line numbers are no longer suppressed (under most likely circumstances)
736 during the global destruction phase.</p>
737 <p>Diagnostics emitted from code running in threads other than the main
738 thread are now accompanied by the thread ID.</p>
739 <p>Embedded null characters in diagnostics now actually show up. They
740 used to truncate the message in prior versions.</p>
741 <p>$foo::a and $foo::b are now exempt from ``possible typo'' warnings only
742 if <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_sort"><code>sort()</code></a> is encountered in package <code>foo</code>.</p>
743 <p>Unrecognized alphabetic escapes encountered when parsing quote
744 constructs now generate a warning, since they may take on new
745 semantics in later versions of Perl.</p>
746 <p>Many diagnostics now report the internal operation in which the warning
747 was provoked, like so:</p>
748 <pre>
749 Use of uninitialized value in concatenation (.) at (eval 1) line 1.
750 Use of uninitialized value in print at (eval 1) line 1.</pre>
751 <p>Diagnostics that occur within eval may also report the file and line
752 number where the eval is located, in addition to the eval sequence
753 number and the line number within the evaluated text itself. For
754 example:</p>
755 <pre>
756 Not enough arguments for scalar at (eval 4)[newlib/perl5db.pl:1411] line 2, at EOF</pre>
758 </p>
759 <h2><a name="diagnostics_follow_stderr">Diagnostics follow STDERR</a></h2>
760 <p>Diagnostic output now goes to whichever file the <code>STDERR</code> handle
761 is pointing at, instead of always going to the underlying C runtime
762 library's <code>stderr</code>.</p>
764 </p>
765 <h2><a name="more_consistent_closeonexec_behavior">More consistent close-on-exec behavior</a></h2>
766 <p>On systems that support a close-on-exec flag on filehandles, the
767 flag is now set for any handles created by pipe(), socketpair(),
768 socket(), and accept(), if that is warranted by the value of $^F
769 that may be in effect. Earlier versions neglected to set the flag
770 for handles created with these operators. See <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#pipe">pipe in the perlfunc manpage</a>,
771 <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>,
772 and <a href="file://C|\msysgit\mingw\html/pod/perlvar.html#item___f">$^F in the perlvar manpage</a>.</p>
774 </p>
775 <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>
776 <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>
778 </p>
779 <h2><a name="better_syntax_checks_on_parenthesized_unary_operators">Better syntax checks on parenthesized unary operators</a></h2>
780 <p>Expressions such as:</p>
781 <pre>
782 print defined(&amp;foo,&amp;bar,&amp;baz);
783 print uc(&quot;foo&quot;,&quot;bar&quot;,&quot;baz&quot;);
784 undef($foo,&amp;bar);</pre>
785 <p>used to be accidentally allowed in earlier versions, and produced
786 unpredictable behaviour. Some produced ancillary warnings
787 when used in this way; others silently did the wrong thing.</p>
788 <p>The parenthesized forms of most unary operators that expect a single
789 argument now ensure that they are not called with more than one
790 argument, making the cases shown above syntax errors. The usual
791 behaviour of:</p>
792 <pre>
793 print defined &amp;foo, &amp;bar, &amp;baz;
794 print uc &quot;foo&quot;, &quot;bar&quot;, &quot;baz&quot;;
795 undef $foo, &amp;bar;</pre>
796 <p>remains unchanged. See <a href="file://C|\msysgit\mingw\html/pod/perlop.html">the perlop manpage</a>.</p>
798 </p>
799 <h2><a name="bit_operators_support_full_native_integer_width">Bit operators support full native integer width</a></h2>
800 <p>The bit operators (&amp; | ^ ~ &lt;&lt; &gt;&gt;) now operate on the full native
801 integral width (the exact size of which is available in $Config{ivsize}).
802 For example, if your platform is either natively 64-bit or if Perl
803 has been configured to use 64-bit integers, these operations apply
804 to 8 bytes (as opposed to 4 bytes on 32-bit platforms).
805 For portability, be sure to mask off the excess bits in the result of
806 unary <code>~</code>, e.g., <code>~$x &amp; 0xffffffff</code>.</p>
808 </p>
809 <h2><a name="improved_security_features">Improved security features</a></h2>
810 <p>More potentially unsafe operations taint their results for improved
811 security.</p>
812 <p>The <code>passwd</code> and <code>shell</code> fields returned by the getpwent(), getpwnam(),
813 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
814 encrypted password and login shell.</p>
815 <p>The variable modified by shmread(), and messages returned by <code>msgrcv()</code>
816 (and its object-oriented interface IPC::SysV::Msg::rcv) are also tainted,
817 because other untrusted processes can modify messages and shared memory
818 segments for their own nefarious purposes.</p>
820 </p>
821 <h2><a name="more_functional_bareword_prototype____">More functional bareword prototype (*)</a></h2>
822 <p>Bareword prototypes have been rationalized to enable them to be used
823 to override builtins that accept barewords and interpret them in
824 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>
825 <p>Arguments prototyped as <code>*</code> will now be visible within the subroutine
826 as either a simple scalar or as a reference to a typeglob.
827 See <a href="file://C|\msysgit\mingw\html/pod/perlsub.html#prototypes">Prototypes in the perlsub manpage</a>.</p>
829 </p>
830 <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>
831 <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
832 by importing subroutines of the same name into the current package
833 (or globally by importing them into the CORE::GLOBAL:: namespace).
834 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
835 is visible at compile-time.
836 See <a href="file://C|\msysgit\mingw\html/pod/perlsub.html#overriding_builtin_functions">Overriding Built-in Functions in the perlsub manpage</a>.</p>
838 </p>
839 <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>
840 <p>Formerly, $^X was synonymous with ${``\cX''}, but $^XY was a syntax
841 error. Now variable names that begin with a control character may be
842 arbitrarily long. However, for compatibility reasons, these variables
843 <em>must</em> be written with explicit braces, as <code>${^XY}</code> for example.
844 <code>${^XYZ}</code> is synonymous with ${``\cXYZ''}. Variable names with more
845 than one control character, such as <code>${^XY^Z}</code>, are illegal.</p>
846 <p>The old syntax has not changed. As before, `^X' may be either a
847 literal control-X character or the two-character sequence `caret' plus
848 `X'. When braces are omitted, the variable name stops after the
849 control character. Thus <code>&quot;$^XYZ&quot;</code> continues to be synonymous with
850 <a href="file://C|\msysgit\mingw\html/pod/perlvar.html#item___x"><code>$^X . &quot;YZ&quot;</code></a> as before.</p>
851 <p>As before, lexical variables may not have names beginning with control
852 characters. As before, variables whose names begin with a control
853 character are always forced to be in package `main'. All such variables
854 are reserved for future extensions, except those that begin with
855 <code>^_</code>, which may be used by user programs and are guaranteed not to
856 acquire special meaning in any future version of Perl.</p>
858 </p>
859 <h2><a name="new_variable___c_reflects_c_switch">New variable $^C reflects <code>-c</code> switch</a></h2>
860 <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
861 in compile-only mode (i.e. via the <code>-c</code> switch). Since
862 BEGIN blocks are executed under such conditions, this variable
863 enables perl code to determine whether actions that make sense
864 only during normal running are warranted. See <a href="file://C|\msysgit\mingw\html/pod/perlvar.html">the perlvar manpage</a>.</p>
866 </p>
867 <h2><a name="new_variable___v_contains_perl_version_as_a_string">New variable $^V contains Perl version as a string</a></h2>
868 <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
869 characters whose ordinals match the version numbers, i.e. v5.6.0.
870 This may be used in string comparisons.</p>
871 <p>See <code>Support for strings represented as a vector of ordinals</code> for an
872 example.</p>
874 </p>
875 <h2><a name="optional_y2k_warnings">Optional Y2K warnings</a></h2>
876 <p>If Perl is built with the cpp macro <code>PERL_Y2KWARN</code> defined,
877 it emits optional warnings when concatenating the number 19
878 with another number.</p>
879 <p>This behavior must be specifically enabled when running Configure.
880 See <em>INSTALL</em> and <em>README.Y2K</em>.</p>
882 </p>
883 <h2><a name="arrays_now_always_interpolate_into_doublequoted_strings">Arrays now always interpolate into double-quoted strings</a></h2>
884 <p>In double-quoted strings, arrays now interpolate, no matter what. The
885 behavior in earlier versions of perl 5 was that arrays would interpolate
886 into strings if the array had been mentioned before the string was
887 compiled, and otherwise Perl would raise a fatal compile-time error.
888 In versions 5.000 through 5.003, the error was</p>
889 <pre>
890 Literal @example now requires backslash</pre>
891 <p>In versions 5.004_01 through 5.6.0, the error was</p>
892 <pre>
893 In string, @example now must be written as \@example</pre>
894 <p>The idea here was to get people into the habit of writing
895 <code>&quot;fred\@example.com&quot;</code> when they wanted a literal <code>@</code> sign, just as
896 they have always written <code>&quot;Give me back my \$5&quot;</code> when they wanted a
897 literal <code>$</code> sign.</p>
898 <p>Starting with 5.6.1, when Perl now sees an <code>@</code> sign in a
899 double-quoted string, it <em>always</em> attempts to interpolate an array,
900 regardless of whether or not the array has been used or declared
901 already. The fatal error has been downgraded to an optional warning:</p>
902 <pre>
903 Possible unintended interpolation of @example in string</pre>
904 <p>This warns you that <code>&quot;fred@example.com&quot;</code> is going to turn into
905 <code>fred.com</code> if you don't backslash the <code>@</code>.
906 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
907 about the history here.</p>
909 </p>
910 <h2><a name="__and____provide_starting_ending_offsets_of_regex_matches">@- and @+ provide starting/ending offsets of regex matches</a></h2>
911 <p>The new magic variables @- and @+ provide the starting and ending
912 offsets, respectively, of $&amp;, $1, $2, etc. See <a href="file://C|\msysgit\mingw\html/pod/perlvar.html">the perlvar manpage</a> for
913 details.</p>
915 </p>
916 <hr />
917 <h1><a name="modules_and_pragmata">Modules and Pragmata</a></h1>
919 </p>
920 <h2><a name="modules">Modules</a></h2>
921 <dl>
922 <dt><strong><a name="item_attributes">attributes</a></strong>
924 <dd>
925 <p>While used internally by Perl as a pragma, this module also
926 provides a way to fetch subroutine and variable attributes.
927 See <a href="file://C|\msysgit\mingw\html/lib/attributes.html">the attributes manpage</a>.</p>
928 </dd>
929 </li>
930 <dt><strong><a name="item_b">B</a></strong>
932 <dd>
933 <p>The Perl Compiler suite has been extensively reworked for this
934 release. More of the standard Perl testsuite passes when run
935 under the Compiler, but there is still a significant way to
936 go to achieve production quality compiled executables.</p>
937 </dd>
938 <dd>
939 <pre>
940 NOTE: The Compiler suite remains highly experimental. The
941 generated code may not be correct, even when it manages to execute
942 without errors.</pre>
943 </dd>
944 </li>
945 <dt><strong><a name="item_benchmark">Benchmark</a></strong>
947 <dd>
948 <p>Overall, Benchmark results exhibit lower average error and better timing
949 accuracy.</p>
950 </dd>
951 <dd>
952 <p>You can now run tests for <em>n</em> seconds instead of guessing the right
953 number of tests to run: e.g., timethese(-5, ...) will run each
954 code for at least 5 CPU seconds. Zero as the ``number of repetitions''
955 means ``for at least 3 CPU seconds''. The output format has also
956 changed. For example:</p>
957 </dd>
958 <dd>
959 <pre>
960 use Benchmark;$x=3;timethese(-5,{a=&gt;sub{$x*$x},b=&gt;sub{$x**2}})</pre>
961 </dd>
962 <dd>
963 <p>will now output something like this:</p>
964 </dd>
965 <dd>
966 <pre>
967 Benchmark: running a, b, each for at least 5 CPU seconds...
968 a: 5 wallclock secs ( 5.77 usr + 0.00 sys = 5.77 CPU) @ 200551.91/s (n=1156516)
969 b: 4 wallclock secs ( 5.00 usr + 0.02 sys = 5.02 CPU) @ 159605.18/s (n=800686)</pre>
970 </dd>
971 <dd>
972 <p>New features: ``each for at least N CPU seconds...'', ``wallclock secs'',
973 and the ``@ operations/CPU second (n=operations)''.</p>
974 </dd>
975 <dd>
976 <p><code>timethese()</code> now returns a reference to a hash of Benchmark objects containing
977 the test results, keyed on the names of the tests.</p>
978 </dd>
979 <dd>
980 <p><code>timethis()</code> now returns the iterations field in the Benchmark result object
981 instead of 0.</p>
982 </dd>
983 <dd>
984 <p>timethese(), timethis(), and the new <code>cmpthese()</code> (see below) can also take
985 a format specifier of 'none' to suppress output.</p>
986 </dd>
987 <dd>
988 <p>A new function <code>countit()</code> is just like <code>timeit()</code> except that it takes a
989 TIME instead of a COUNT.</p>
990 </dd>
991 <dd>
992 <p>A new function <code>cmpthese()</code> prints a chart comparing the results of each test
993 returned from a <code>timethese()</code> call. For each possible pair of tests, the
994 percentage speed difference (iters/sec or seconds/iter) is shown.</p>
995 </dd>
996 <dd>
997 <p>For other details, see <a href="file://C|\msysgit\mingw\html/lib/Benchmark.html">the Benchmark manpage</a>.</p>
998 </dd>
999 </li>
1000 <dt><strong><a name="item_byteloader">ByteLoader</a></strong>
1002 <dd>
1003 <p>The ByteLoader is a dedicated extension to generate and run
1004 Perl bytecode. See <a href="file://C|\msysgit\mingw\html/lib/ByteLoader.html">the ByteLoader manpage</a>.</p>
1005 </dd>
1006 </li>
1007 <dt><strong><a name="item_constant">constant</a></strong>
1009 <dd>
1010 <p>References can now be used.</p>
1011 </dd>
1012 <dd>
1013 <p>The new version also allows a leading underscore in constant names, but
1014 disallows a double leading underscore (as in ``__LINE__''). Some other names
1015 are disallowed or warned against, including BEGIN, END, etc. Some names
1016 which were forced into main:: used to fail silently in some cases; now they're
1017 fatal (outside of main::) and an optional warning (inside of main::).
1018 The ability to detect whether a constant had been set with a given name has
1019 been added.</p>
1020 </dd>
1021 <dd>
1022 <p>See <a href="file://C|\msysgit\mingw\html/lib/constant.html">the constant manpage</a>.</p>
1023 </dd>
1024 </li>
1025 <dt><strong><a name="item_charnames">charnames</a></strong>
1027 <dd>
1028 <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>
1029 </dd>
1030 </li>
1031 <dt><strong><a name="item_data_3a_3adumper">Data::Dumper</a></strong>
1033 <dd>
1034 <p>A <code>Maxdepth</code> setting can be specified to avoid venturing
1035 too deeply into deep data structures. See <a href="file://C|\msysgit\mingw\html/lib/Data/Dumper.html">the Data::Dumper manpage</a>.</p>
1036 </dd>
1037 <dd>
1038 <p>The XSUB implementation of <code>Dump()</code> is now automatically called if the
1039 <code>Useqq</code> setting is not in use.</p>
1040 </dd>
1041 <dd>
1042 <p>Dumping <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_qr_"><code>qr//</code></a> objects works correctly.</p>
1043 </dd>
1044 </li>
1045 <dt><strong><a name="item_db">DB</a></strong>
1047 <dd>
1048 <p><a href="#item_db"><code>DB</code></a> is an experimental module that exposes a clean abstraction
1049 to Perl's debugging API.</p>
1050 </dd>
1051 </li>
1052 <dt><strong><a name="item_db_file">DB_File</a></strong>
1054 <dd>
1055 <p>DB_File can now be built with Berkeley DB versions 1, 2 or 3.
1056 See <code>ext/DB_File/Changes</code>.</p>
1057 </dd>
1058 </li>
1059 <dt><strong><a name="item_devel_3a_3adprof">Devel::DProf</a></strong>
1061 <dd>
1062 <p>Devel::DProf, a Perl source code profiler has been added. See
1063 <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>
1064 </dd>
1065 </li>
1066 <dt><strong><a name="item_devel_3a_3apeek">Devel::Peek</a></strong>
1068 <dd>
1069 <p>The Devel::Peek module provides access to the internal representation
1070 of Perl variables and data. It is a data debugging tool for the XS programmer.</p>
1071 </dd>
1072 </li>
1073 <dt><strong><a name="item_dumpvalue">Dumpvalue</a></strong>
1075 <dd>
1076 <p>The Dumpvalue module provides screen dumps of Perl data.</p>
1077 </dd>
1078 </li>
1079 <dt><strong><a name="item_dynaloader">DynaLoader</a></strong>
1081 <dd>
1082 <p>DynaLoader now supports a <code>dl_unload_file()</code> function on platforms that
1083 support unloading shared objects using dlclose().</p>
1084 </dd>
1085 <dd>
1086 <p>Perl can also optionally arrange to unload all extension shared objects
1087 loaded by Perl. To enable this, build Perl with the Configure option
1088 <code>-Accflags=-DDL_UNLOAD_ALL_AT_EXIT</code>. (This maybe useful if you are
1089 using Apache with mod_perl.)</p>
1090 </dd>
1091 </li>
1092 <dt><strong><a name="item_english">English</a></strong>
1094 <dd>
1095 <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>
1096 (a numeric value).</p>
1097 </dd>
1098 </li>
1099 <dt><strong><a name="item_env">Env</a></strong>
1101 <dd>
1102 <p>Env now supports accessing environment variables like PATH as array
1103 variables.</p>
1104 </dd>
1105 </li>
1106 <dt><strong><a name="item_fcntl">Fcntl</a></strong>
1108 <dd>
1109 <p>More Fcntl constants added: F_SETLK64, F_SETLKW64, O_LARGEFILE for
1110 large file (more than 4GB) access (NOTE: the O_LARGEFILE is
1111 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
1112 configured, as is the default), Free/Net/OpenBSD locking behaviour
1113 flags F_FLOCK, F_POSIX, Linux F_SHLCK, and O_ACCMODE: the combined
1114 mask of O_RDONLY, O_WRONLY, and O_RDWR. The <code>seek()/sysseek()</code>
1115 constants SEEK_SET, SEEK_CUR, and SEEK_END are available via the
1116 <code>:seek</code> tag. The <code>chmod()/stat()</code> S_IF* constants and S_IS* functions
1117 are available via the <code>:mode</code> tag.</p>
1118 </dd>
1119 </li>
1120 <dt><strong><a name="item_file_3a_3acompare">File::Compare</a></strong>
1122 <dd>
1123 <p>A <code>compare_text()</code> function has been added, which allows custom
1124 comparison functions. See <a href="file://C|\msysgit\mingw\html/lib/File/Compare.html">the File::Compare manpage</a>.</p>
1125 </dd>
1126 </li>
1127 <dt><strong><a name="item_file_3a_3afind">File::Find</a></strong>
1129 <dd>
1130 <p>File::Find now works correctly when the <code>wanted()</code> function is either
1131 autoloaded or is a symbolic reference.</p>
1132 </dd>
1133 <dd>
1134 <p>A bug that caused File::Find to lose track of the working directory
1135 when pruning top-level directories has been fixed.</p>
1136 </dd>
1137 <dd>
1138 <p>File::Find now also supports several other options to control its
1139 behavior. It can follow symbolic links if the <code>follow</code> option is
1140 specified. Enabling the <code>no_chdir</code> option will make File::Find skip
1141 changing the current directory when walking directories. The <code>untaint</code>
1142 flag can be useful when running with taint checks enabled.</p>
1143 </dd>
1144 <dd>
1145 <p>See <a href="file://C|\msysgit\mingw\html/lib/File/Find.html">the File::Find manpage</a>.</p>
1146 </dd>
1147 </li>
1148 <dt><strong><a name="item_file_3a_3aglob">File::Glob</a></strong>
1150 <dd>
1151 <p>This extension implements BSD-style file globbing. By default,
1152 it will also be used for the internal implementation of the <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_glob"><code>glob()</code></a>
1153 operator. See <a href="file://C|\msysgit\mingw\html/lib/File/Glob.html">the File::Glob manpage</a>.</p>
1154 </dd>
1155 </li>
1156 <dt><strong><a name="item_file_3a_3aspec">File::Spec</a></strong>
1158 <dd>
1159 <p>New methods have been added to the File::Spec module: <code>devnull()</code> returns
1160 the name of the null device (/dev/null on Unix) and <code>tmpdir()</code> the name of
1161 the temp directory (normally /tmp on Unix). There are now also methods
1162 to convert between absolute and relative filenames: <code>abs2rel()</code> and
1163 rel2abs(). For compatibility with operating systems that specify volume
1164 names in file paths, the splitpath(), splitdir(), and <code>catdir()</code> methods
1165 have been added.</p>
1166 </dd>
1167 </li>
1168 <dt><strong><a name="item_file_3a_3aspec_3a_3afunctions">File::Spec::Functions</a></strong>
1170 <dd>
1171 <p>The new File::Spec::Functions modules provides a function interface
1172 to the File::Spec module. Allows shorthand</p>
1173 </dd>
1174 <dd>
1175 <pre>
1176 $fullname = catfile($dir1, $dir2, $file);</pre>
1177 </dd>
1178 <dd>
1179 <p>instead of</p>
1180 </dd>
1181 <dd>
1182 <pre>
1183 $fullname = File::Spec-&gt;catfile($dir1, $dir2, $file);</pre>
1184 </dd>
1185 </li>
1186 <dt><strong><a name="item_getopt_3a_3along">Getopt::Long</a></strong>
1188 <dd>
1189 <p>Getopt::Long licensing has changed to allow the Perl Artistic License
1190 as well as the GPL. It used to be GPL only, which got in the way of
1191 non-GPL applications that wanted to use Getopt::Long.</p>
1192 </dd>
1193 <dd>
1194 <p>Getopt::Long encourages the use of Pod::Usage to produce help
1195 messages. For example:</p>
1196 </dd>
1197 <dd>
1198 <pre>
1199 use Getopt::Long;
1200 use Pod::Usage;
1201 my $man = 0;
1202 my $help = 0;
1203 GetOptions('help|?' =&gt; \$help, man =&gt; \$man) or pod2usage(2);
1204 pod2usage(1) if $help;
1205 pod2usage(-exitstatus =&gt; 0, -verbose =&gt; 2) if $man;</pre>
1206 </dd>
1207 <dd>
1208 <pre>
1209 __END__</pre>
1210 </dd>
1211 <dd>
1212 <pre>
1213 =head1 NAME</pre>
1214 </dd>
1215 <dd>
1216 <pre>
1217 sample - Using Getopt::Long and Pod::Usage</pre>
1218 </dd>
1219 <dd>
1220 <pre>
1221 =head1 SYNOPSIS</pre>
1222 </dd>
1223 <dd>
1224 <pre>
1225 sample [options] [file ...]</pre>
1226 </dd>
1227 <dd>
1228 <pre>
1229 Options:
1230 -help brief help message
1231 -man full documentation</pre>
1232 </dd>
1233 <dd>
1234 <pre>
1235 =head1 OPTIONS</pre>
1236 </dd>
1237 <dd>
1238 <pre>
1239 =over 8</pre>
1240 </dd>
1241 <dd>
1242 <pre>
1243 =item B&lt;-help&gt;</pre>
1244 </dd>
1245 <dd>
1246 <pre>
1247 Print a brief help message and exits.</pre>
1248 </dd>
1249 <dd>
1250 <pre>
1251 =item B&lt;-man&gt;</pre>
1252 </dd>
1253 <dd>
1254 <pre>
1255 Prints the manual page and exits.</pre>
1256 </dd>
1257 <dd>
1258 <pre>
1259 =back</pre>
1260 </dd>
1261 <dd>
1262 <pre>
1263 =head1 DESCRIPTION</pre>
1264 </dd>
1265 <dd>
1266 <pre>
1267 B&lt;This program&gt; will read the given input file(s) and do something
1268 useful with the contents thereof.</pre>
1269 </dd>
1270 <dd>
1271 <pre>
1272 =cut</pre>
1273 </dd>
1274 <dd>
1275 <p>See <a href="file://C|\msysgit\mingw\html/lib/Pod/Usage.html">the Pod::Usage manpage</a> for details.</p>
1276 </dd>
1277 <dd>
1278 <p>A bug that prevented the non-option call-back &lt;&gt; from being
1279 specified as the first argument has been fixed.</p>
1280 </dd>
1281 <dd>
1282 <p>To specify the characters &lt; and &gt; as option starters, use &gt;&lt;. Note,
1283 however, that changing option starters is strongly deprecated.</p>
1284 </dd>
1285 </li>
1286 <dt><strong><a name="item_io">IO</a></strong>
1288 <dd>
1289 <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
1290 form of the call, for consistency with Perl's syswrite().</p>
1291 </dd>
1292 <dd>
1293 <p>You can now create a TCP-based IO::Socket::INET without forcing
1294 a connect attempt. This allows you to configure its options
1295 (like making it non-blocking) and then call <code>connect()</code> manually.</p>
1296 </dd>
1297 <dd>
1298 <p>A bug that prevented the IO::Socket::protocol() accessor
1299 from ever returning the correct value has been corrected.</p>
1300 </dd>
1301 <dd>
1302 <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>
1303 to do connect timeouts.</p>
1304 </dd>
1305 <dd>
1306 <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
1307 timeouts.</p>
1308 </dd>
1309 <dd>
1310 <p>IO::Socket::INET-&gt;new now sets $! correctly on failure. $@ is
1311 still set for backwards compatibility.</p>
1312 </dd>
1313 </li>
1314 <dt><strong><a name="item_jpl">JPL</a></strong>
1316 <dd>
1317 <p>Java Perl Lingo is now distributed with Perl. See jpl/README
1318 for more information.</p>
1319 </dd>
1320 </li>
1321 <dt><strong><a name="item_lib">lib</a></strong>
1323 <dd>
1324 <p><code>use lib</code> now weeds out any trailing duplicate entries.
1325 <code>no lib</code> removes all named entries.</p>
1326 </dd>
1327 </li>
1328 <dt><strong><a name="item_math_3a_3abigint">Math::BigInt</a></strong>
1330 <dd>
1331 <p>The bitwise operations <code>&lt;&lt;</code>, <code>&gt;&gt;</code>, <code>&amp;</code>, <code>|</code>,
1332 and <code>~</code> are now supported on bigints.</p>
1333 </dd>
1334 </li>
1335 <dt><strong><a name="item_math_3a_3acomplex">Math::Complex</a></strong>
1337 <dd>
1338 <p>The accessor methods Re, Im, arg, abs, rho, and theta can now also
1339 act as mutators (accessor $z-&gt;Re(), mutator $z-&gt;Re(3)).</p>
1340 </dd>
1341 <dd>
1342 <p>The class method <code>display_format</code> and the corresponding object method
1343 <code>display_format</code>, in addition to accepting just one argument, now can
1344 also accept a parameter hash. Recognized keys of a parameter hash are
1345 <code>&quot;style&quot;</code>, which corresponds to the old one parameter case, and two
1346 new parameters: <code>&quot;format&quot;</code>, which is a printf()-style format string
1347 (defaults usually to <code>&quot;%.15g&quot;</code>, you can revert to the default by
1348 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
1349 complex number, and <code>&quot;polar_pretty_print&quot;</code> (defaults to true),
1350 which controls whether an attempt is made to try to recognize small
1351 multiples and rationals of pi (2pi, pi/2) at the argument (angle) of a
1352 polar complex number.</p>
1353 </dd>
1354 <dd>
1355 <p>The potentially disruptive change is that in list context both methods
1356 now <em>return the parameter hash</em>, instead of only the value of the
1357 <code>&quot;style&quot;</code> parameter.</p>
1358 </dd>
1359 </li>
1360 <dt><strong><a name="item_math_3a_3atrig">Math::Trig</a></strong>
1362 <dd>
1363 <p>A little bit of radial trigonometry (cylindrical and spherical),
1364 radial coordinate conversions, and the great circle distance were added.</p>
1365 </dd>
1366 </li>
1367 <dt><strong><a name="item_pod_3a_3aparser_2c_pod_3a_3ainputobjects">Pod::Parser, Pod::InputObjects</a></strong>
1369 <dd>
1370 <p>Pod::Parser is a base class for parsing and selecting sections of
1371 pod documentation from an input stream. This module takes care of
1372 identifying pod paragraphs and commands in the input and hands off the
1373 parsed paragraphs and commands to user-defined methods which are free
1374 to interpret or translate them as they see fit.</p>
1375 </dd>
1376 <dd>
1377 <p>Pod::InputObjects defines some input objects needed by Pod::Parser, and
1378 for advanced users of Pod::Parser that need more about a command besides
1379 its name and text.</p>
1380 </dd>
1381 <dd>
1382 <p>As of release 5.6.0 of Perl, Pod::Parser is now the officially sanctioned
1383 ``base parser code'' recommended for use by all pod2xxx translators.
1384 Pod::Text (pod2text) and Pod::Man (pod2man) have already been converted
1385 to use Pod::Parser and efforts to convert Pod::HTML (pod2html) are already
1386 underway. For any questions or comments about pod parsing and translating
1387 issues and utilities, please use the <a href="mailto:pod-people@perl.org">pod-people@perl.org</a> mailing list.</p>
1388 </dd>
1389 <dd>
1390 <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>
1391 </dd>
1392 </li>
1393 <dt><strong><a name="item_pod_3a_3achecker_2c_podchecker">Pod::Checker, podchecker</a></strong>
1395 <dd>
1396 <p>This utility checks pod files for correct syntax, according to
1397 <a href="file://C|\msysgit\mingw\html/pod/perlpod.html">the perlpod manpage</a>. Obvious errors are flagged as such, while warnings are
1398 printed for mistakes that can be handled gracefully. The checklist is
1399 not complete yet. See <a href="file://C|\msysgit\mingw\html/lib/Pod/Checker.html">the Pod::Checker manpage</a>.</p>
1400 </dd>
1401 </li>
1402 <dt><strong><a name="item_pod_3a_3aparseutils_2c_pod_3a_3afind">Pod::ParseUtils, Pod::Find</a></strong>
1404 <dd>
1405 <p>These modules provide a set of gizmos that are useful mainly for pod
1406 translators. <a href="file://C|\msysgit\mingw\html/lib/Pod/Find.html">Pod::Find</a> traverses directory structures and
1407 returns found pod files, along with their canonical names (like
1408 <code>File::Spec::Unix</code>). <a href="file://C|\msysgit\mingw\html/lib/Pod/ParseUtils.html">Pod::ParseUtils</a> contains
1409 <strong>Pod::List</strong> (useful for storing pod list information), <strong>Pod::Hyperlink</strong>
1410 (for parsing the contents of <code>L&lt;&gt;</code> sequences) and <strong>Pod::Cache</strong>
1411 (for caching information about pod files, e.g., link nodes).</p>
1412 </dd>
1413 </li>
1414 <dt><strong><a name="item_pod_3a_3aselect_2c_podselect">Pod::Select, podselect</a></strong>
1416 <dd>
1417 <p>Pod::Select is a subclass of Pod::Parser which provides a function
1418 named ``podselect()'' to filter out user-specified sections of raw pod
1419 documentation from an input stream. podselect is a script that provides
1420 access to Pod::Select from other scripts to be used as a filter.
1421 See <a href="file://C|\msysgit\mingw\html/lib/Pod/Select.html">the Pod::Select manpage</a>.</p>
1422 </dd>
1423 </li>
1424 <dt><strong><a name="item_pod_3a_3ausage_2c_pod2usage">Pod::Usage, pod2usage</a></strong>
1426 <dd>
1427 <p>Pod::Usage provides the function ``pod2usage()'' to print usage messages for
1428 a Perl script based on its embedded pod documentation. The <code>pod2usage()</code>
1429 function is generally useful to all script authors since it lets them
1430 write and maintain a single source (the pods) for documentation, thus
1431 removing the need to create and maintain redundant usage message text
1432 consisting of information already in the pods.</p>
1433 </dd>
1434 <dd>
1435 <p>There is also a pod2usage script which can be used from other kinds of
1436 scripts to print usage messages from pods (even for non-Perl scripts
1437 with pods embedded in comments).</p>
1438 </dd>
1439 <dd>
1440 <p>For details and examples, please see <a href="file://C|\msysgit\mingw\html/lib/Pod/Usage.html">the Pod::Usage manpage</a>.</p>
1441 </dd>
1442 </li>
1443 <dt><strong><a name="item_pod_3a_3atext_and_pod_3a_3aman">Pod::Text and Pod::Man</a></strong>
1445 <dd>
1446 <p>Pod::Text has been rewritten to use Pod::Parser. While <code>pod2text()</code> is
1447 still available for backwards compatibility, the module now has a new
1448 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
1449 module is easily subclassed for tweaks to the output, and two such
1450 subclasses (Pod::Text::Termcap for man-page-style bold and underlining
1451 using termcap information, and Pod::Text::Color for markup with ANSI color
1452 sequences) are now standard.</p>
1453 </dd>
1454 <dd>
1455 <p>pod2man has been turned into a module, Pod::Man, which also uses
1456 Pod::Parser. In the process, several outstanding bugs related to quotes
1457 in section headers, quoting of code escapes, and nested lists have been
1458 fixed. pod2man is now a wrapper script around this module.</p>
1459 </dd>
1460 </li>
1461 <dt><strong><a name="item_sdbm_file">SDBM_File</a></strong>
1463 <dd>
1464 <p>An EXISTS method has been added to this module (and <code>sdbm_exists()</code> has
1465 been added to the underlying sdbm library), so one can now call exists
1466 on an SDBM_File tied hash and get the correct result, rather than a
1467 runtime error.</p>
1468 </dd>
1469 <dd>
1470 <p>A bug that may have caused data loss when more than one disk block
1471 happens to be read from the database in a single <code>FETCH()</code> has been
1472 fixed.</p>
1473 </dd>
1474 </li>
1475 <dt><strong><a name="item_sys_3a_3asyslog">Sys::Syslog</a></strong>
1477 <dd>
1478 <p>Sys::Syslog now uses XSUBs to access facilities from syslog.h so it
1479 no longer requires syslog.ph to exist.</p>
1480 </dd>
1481 </li>
1482 <dt><strong><a name="item_sys_3a_3ahostname">Sys::Hostname</a></strong>
1484 <dd>
1485 <p>Sys::Hostname now uses XSUBs to call the C library's <code>gethostname()</code> or
1486 <code>uname()</code> if they exist.</p>
1487 </dd>
1488 </li>
1489 <dt><strong><a name="item_term_3a_3aansicolor">Term::ANSIColor</a></strong>
1491 <dd>
1492 <p>Term::ANSIColor is a very simple module to provide easy and readable
1493 access to the ANSI color and highlighting escape sequences, supported by
1494 most ANSI terminal emulators. It is now included standard.</p>
1495 </dd>
1496 </li>
1497 <dt><strong><a name="item_time_3a_3alocal">Time::Local</a></strong>
1499 <dd>
1500 <p>The <code>timelocal()</code> and <code>timegm()</code> functions used to silently return bogus
1501 results when the date fell outside the machine's integer range. They
1502 now consistently <code>croak()</code> if the date falls in an unsupported range.</p>
1503 </dd>
1504 </li>
1505 <dt><strong><a name="item_win32">Win32</a></strong>
1507 <dd>
1508 <p>The error return value in list context has been changed for all functions
1509 that return a list of values. Previously these functions returned a list
1510 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
1511 return the empty list in these situations. This applies to the following
1512 functions:</p>
1513 </dd>
1514 <dd>
1515 <pre>
1516 Win32::FsType
1517 Win32::GetOSVersion</pre>
1518 </dd>
1519 <dd>
1520 <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
1521 error even in list context.</p>
1522 </dd>
1523 <dd>
1524 <p>The Win32::SetLastError(ERROR) function has been added as a complement
1525 to the Win32::GetLastError() function.</p>
1526 </dd>
1527 <dd>
1528 <p>The new Win32::GetFullPathName(FILENAME) returns the full absolute
1529 pathname for FILENAME in scalar context. In list context it returns
1530 a two-element list containing the fully qualified directory name and
1531 the filename. See <a href="file://C|\msysgit\mingw\html/lib/Win32.html">the Win32 manpage</a>.</p>
1532 </dd>
1533 </li>
1534 <dt><strong><a name="item_xsloader">XSLoader</a></strong>
1536 <dd>
1537 <p>The XSLoader extension is a simpler alternative to DynaLoader.
1538 See <a href="file://C|\msysgit\mingw\html/lib/XSLoader.html">the XSLoader manpage</a>.</p>
1539 </dd>
1540 </li>
1541 <dt><strong><a name="item_dbm_filters">DBM Filters</a></strong>
1543 <dd>
1544 <p>A new feature called ``DBM Filters'' has been added to all the
1545 DBM modules--DB_File, GDBM_File, NDBM_File, ODBM_File, and SDBM_File.
1546 DBM Filters add four new methods to each DBM module:</p>
1547 </dd>
1548 <dd>
1549 <pre>
1550 filter_store_key
1551 filter_store_value
1552 filter_fetch_key
1553 filter_fetch_value</pre>
1554 </dd>
1555 <dd>
1556 <p>These can be used to filter key-value pairs before the pairs are
1557 written to the database or just after they are read from the database.
1558 See <a href="file://C|\msysgit\mingw\html/pod/perldbmfilter.html">the perldbmfilter manpage</a> for further information.</p>
1559 </dd>
1560 </li>
1561 </dl>
1563 </p>
1564 <h2><a name="pragmata">Pragmata</a></h2>
1565 <p><code>use attrs</code> is now obsolete, and is only provided for
1566 backward-compatibility. It's been replaced by the <code>sub : attributes</code>
1567 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>
1568 <p>Lexical warnings pragma, <code>use warnings;</code>, to control optional warnings.
1569 See <a href="file://C|\msysgit\mingw\html/pod/perllexwarn.html">the perllexwarn manpage</a>.</p>
1570 <p><code>use filetest</code> to control the behaviour of filetests (<code>-r</code> <code>-w</code>
1571 ...). Currently only one subpragma implemented, ``use filetest
1572 'access';'', that uses <code>access(2)</code> or equivalent to check permissions
1573 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
1574 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,
1575 but <code>access(2)</code> knows better.</p>
1576 <p>The <a href="#item_open"><code>open</code></a> pragma can be used to specify default disciplines for
1577 handle constructors (e.g. <a href="#item_open"><code>open())</code></a> and for qx//. The two
1578 pseudo-disciplines <code>:raw</code> and <code>:crlf</code> are currently supported on
1579 DOS-derivative platforms (i.e. where binmode is not a no-op).
1580 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>
1582 </p>
1583 <hr />
1584 <h1><a name="utility_changes">Utility Changes</a></h1>
1586 </p>
1587 <h2><a name="dprofpp">dprofpp</a></h2>
1588 <p><code>dprofpp</code> is used to display profile data generated using <a href="#item_devel_3a_3adprof"><code>Devel::DProf</code></a>.
1589 See <a href="file://C|\msysgit\mingw\html/utils/dprofpp.html">the dprofpp manpage</a>.</p>
1591 </p>
1592 <h2><a name="find2perl">find2perl</a></h2>
1593 <p>The <code>find2perl</code> utility now uses the enhanced features of the File::Find
1594 module. The -depth and -follow options are supported. Pod documentation
1595 is also included in the script.</p>
1597 </p>
1598 <h2><a name="h2xs">h2xs</a></h2>
1599 <p>The <code>h2xs</code> tool can now work in conjunction with <code>C::Scan</code> (available
1600 from CPAN) to automatically parse real-life header files. The <code>-M</code>,
1601 <code>-a</code>, <code>-k</code>, and <code>-o</code> options are new.</p>
1603 </p>
1604 <h2><a name="perlcc">perlcc</a></h2>
1605 <p><code>perlcc</code> now supports the C and Bytecode backends. By default,
1606 it generates output from the simple C backend rather than the
1607 optimized C backend.</p>
1608 <p>Support for non-Unix platforms has been improved.</p>
1610 </p>
1611 <h2><a name="perldoc">perldoc</a></h2>
1612 <p><code>perldoc</code> has been reworked to avoid possible security holes.
1613 It will not by default let itself be run as the superuser, but you
1614 may still use the <strong>-U</strong> switch to try to make it drop privileges
1615 first.</p>
1617 </p>
1618 <h2><a name="the_perl_debugger">The Perl Debugger</a></h2>
1619 <p>Many bug fixes and enhancements were added to <em>perl5db.pl</em>, the
1620 Perl debugger. The help documentation was rearranged. New commands
1621 include <code>&lt; ?</code>, <code>&gt; ?</code>, and <code>{ ?</code> to list out current
1622 actions, <code>man docpage</code> to run your doc viewer on some perl
1623 docset, and support for quoted options. The help information was
1624 rearranged, and should be viewable once again if you're using <strong>less</strong>
1625 as your pager. A serious security hole was plugged--you should
1626 immediately remove all older versions of the Perl debugger as
1627 installed in previous releases, all the way back to perl3, from
1628 your system to avoid being bitten by this.</p>
1630 </p>
1631 <hr />
1632 <h1><a name="improved_documentation">Improved Documentation</a></h1>
1633 <p>Many of the platform-specific README files are now part of the perl
1634 installation. See <a href="file://C|\msysgit\mingw\html/pod/perl.html">the perl manpage</a> for the complete list.</p>
1635 <dl>
1636 <dt><strong><a name="item_perlapi_2epod">perlapi.pod</a></strong>
1638 <dd>
1639 <p>The official list of public Perl API functions.</p>
1640 </dd>
1641 </li>
1642 <dt><strong><a name="item_perlboot_2epod">perlboot.pod</a></strong>
1644 <dd>
1645 <p>A tutorial for beginners on object-oriented Perl.</p>
1646 </dd>
1647 </li>
1648 <dt><strong><a name="item_perlcompile_2epod">perlcompile.pod</a></strong>
1650 <dd>
1651 <p>An introduction to using the Perl Compiler suite.</p>
1652 </dd>
1653 </li>
1654 <dt><strong><a name="item_perldbmfilter_2epod">perldbmfilter.pod</a></strong>
1656 <dd>
1657 <p>A howto document on using the DBM filter facility.</p>
1658 </dd>
1659 </li>
1660 <dt><strong><a name="item_perldebug_2epod">perldebug.pod</a></strong>
1662 <dd>
1663 <p>All material unrelated to running the Perl debugger, plus all
1664 low-level guts-like details that risked crushing the casual user
1665 of the debugger, have been relocated from the old manpage to the
1666 next entry below.</p>
1667 </dd>
1668 </li>
1669 <dt><strong><a name="item_perldebguts_2epod">perldebguts.pod</a></strong>
1671 <dd>
1672 <p>This new manpage contains excessively low-level material not related
1673 to the Perl debugger, but slightly related to debugging Perl itself.
1674 It also contains some arcane internal details of how the debugging
1675 process works that may only be of interest to developers of Perl
1676 debuggers.</p>
1677 </dd>
1678 </li>
1679 <dt><strong><a name="item_perlfork_2epod">perlfork.pod</a></strong>
1681 <dd>
1682 <p>Notes on the <code>fork()</code> emulation currently available for the Windows platform.</p>
1683 </dd>
1684 </li>
1685 <dt><strong><a name="item_perlfilter_2epod">perlfilter.pod</a></strong>
1687 <dd>
1688 <p>An introduction to writing Perl source filters.</p>
1689 </dd>
1690 </li>
1691 <dt><strong><a name="item_perlhack_2epod">perlhack.pod</a></strong>
1693 <dd>
1694 <p>Some guidelines for hacking the Perl source code.</p>
1695 </dd>
1696 </li>
1697 <dt><strong><a name="item_perlintern_2epod">perlintern.pod</a></strong>
1699 <dd>
1700 <p>A list of internal functions in the Perl source code.
1701 (List is currently empty.)</p>
1702 </dd>
1703 </li>
1704 <dt><strong><a name="item_perllexwarn_2epod">perllexwarn.pod</a></strong>
1706 <dd>
1707 <p>Introduction and reference information about lexically scoped
1708 warning categories.</p>
1709 </dd>
1710 </li>
1711 <dt><strong><a name="item_perlnumber_2epod">perlnumber.pod</a></strong>
1713 <dd>
1714 <p>Detailed information about numbers as they are represented in Perl.</p>
1715 </dd>
1716 </li>
1717 <dt><strong><a name="item_perlopentut_2epod">perlopentut.pod</a></strong>
1719 <dd>
1720 <p>A tutorial on using <a href="#item_open"><code>open()</code></a> effectively.</p>
1721 </dd>
1722 </li>
1723 <dt><strong><a name="item_perlreftut_2epod">perlreftut.pod</a></strong>
1725 <dd>
1726 <p>A tutorial that introduces the essentials of references.</p>
1727 </dd>
1728 </li>
1729 <dt><strong><a name="item_perltootc_2epod">perltootc.pod</a></strong>
1731 <dd>
1732 <p>A tutorial on managing class data for object modules.</p>
1733 </dd>
1734 </li>
1735 <dt><strong><a name="item_perltodo_2epod">perltodo.pod</a></strong>
1737 <dd>
1738 <p>Discussion of the most often wanted features that may someday be
1739 supported in Perl.</p>
1740 </dd>
1741 </li>
1742 <dt><strong><a name="item_perlunicode_2epod">perlunicode.pod</a></strong>
1744 <dd>
1745 <p>An introduction to Unicode support features in Perl.</p>
1746 </dd>
1747 </li>
1748 </dl>
1750 </p>
1751 <hr />
1752 <h1><a name="performance_enhancements">Performance enhancements</a></h1>
1754 </p>
1755 <h2><a name="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></h2>
1756 <p>Many common <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_sort"><code>sort()</code></a> operations using a simple inlined block are now
1757 optimized for faster performance.</p>
1759 </p>
1760 <h2><a name="optimized_assignments_to_lexical_variables">Optimized assignments to lexical variables</a></h2>
1761 <p>Certain operations in the RHS of assignment statements have been
1762 optimized to directly set the lexical variable on the LHS,
1763 eliminating redundant copying overheads.</p>
1765 </p>
1766 <h2><a name="faster_subroutine_calls">Faster subroutine calls</a></h2>
1767 <p>Minor changes in how subroutine calls are handled internally
1768 provide marginal improvements in performance.</p>
1770 </p>
1771 <h2><a name="delete____each____values___and_hash_iteration_are_faster">delete(), each(), <code>values()</code> and hash iteration are faster</a></h2>
1772 <p>The hash values returned by delete(), each(), <code>values()</code> and hashes in a
1773 list context are the actual values in the hash, instead of copies.
1774 This results in significantly better performance, because it eliminates
1775 needless copying in most situations.</p>
1777 </p>
1778 <hr />
1779 <h1><a name="installation_and_configuration_improvements">Installation and Configuration Improvements</a></h1>
1781 </p>
1782 <h2><a name="dusethreads_means_something_different">-Dusethreads means something different</a></h2>
1783 <p>The -Dusethreads flag now enables the experimental interpreter-based thread
1784 support by default. To get the flavor of experimental threads that was in
1785 5.005 instead, you need to run Configure with ``-Dusethreads -Duse5005threads''.</p>
1786 <p>As of v5.6.0, interpreter-threads support is still lacking a way to
1787 create new threads from Perl (i.e., <code>use Thread;</code> will not work with
1788 interpreter threads). <code>use Thread;</code> continues to be available when you
1789 specify the -Duse5005threads option to Configure, bugs and all.</p>
1790 <pre>
1791 NOTE: Support for threads continues to be an experimental feature.
1792 Interfaces and implementation are subject to sudden and drastic changes.</pre>
1794 </p>
1795 <h2><a name="new_configure_flags">New Configure flags</a></h2>
1796 <p>The following new flags may be enabled on the Configure command line
1797 by running Configure with <code>-Dflag</code>.</p>
1798 <pre>
1799 usemultiplicity
1800 usethreads useithreads (new interpreter threads: no Perl API yet)
1801 usethreads use5005threads (threads as they were in 5.005)</pre>
1802 <pre>
1803 use64bitint (equal to now deprecated 'use64bits')
1804 use64bitall</pre>
1805 <pre>
1806 uselongdouble
1807 usemorebits
1808 uselargefiles
1809 usesocks (only SOCKS v5 supported)</pre>
1811 </p>
1812 <h2><a name="threadedness_and_64bitness_now_more_daring">Threadedness and 64-bitness now more daring</a></h2>
1813 <p>The Configure options enabling the use of threads and the use of
1814 64-bitness are now more daring in the sense that they no more have an
1815 explicit list of operating systems of known threads/64-bit
1816 capabilities. In other words: if your operating system has the
1817 necessary APIs and datatypes, you should be able just to go ahead and
1818 use them, for threads by Configure -Dusethreads, and for 64 bits
1819 either explicitly by Configure -Duse64bitint or implicitly if your
1820 system has 64-bit wide datatypes. See also <a href="#64bit_support">64-bit support</a>.</p>
1822 </p>
1823 <h2><a name="long_doubles">Long Doubles</a></h2>
1824 <p>Some platforms have ``long doubles'', floating point numbers of even
1825 larger range than ordinary ``doubles''. To enable using long doubles for
1826 Perl's scalars, use -Duselongdouble.</p>
1828 </p>
1829 <h2><a name="dusemorebits">-Dusemorebits</a></h2>
1830 <p>You can enable both -Duse64bitint and -Duselongdouble with -Dusemorebits.
1831 See also <a href="#64bit_support">64-bit support</a>.</p>
1833 </p>
1834 <h2><a name="duselargefiles">-Duselargefiles</a></h2>
1835 <p>Some platforms support system APIs that are capable of handling large files
1836 (typically, files larger than two gigabytes). Perl will try to use these
1837 APIs if you ask for -Duselargefiles.</p>
1838 <p>See <a href="#large_file_support">Large file support</a> for more information.</p>
1840 </p>
1841 <h2><a name="installusrbinperl">installusrbinperl</a></h2>
1842 <p>You can use ``Configure -Uinstallusrbinperl'' which causes installperl
1843 to skip installing perl also as /usr/bin/perl. This is useful if you
1844 prefer not to modify /usr/bin for some reason or another but harmful
1845 because many scripts assume to find Perl in /usr/bin/perl.</p>
1847 </p>
1848 <h2><a name="socks_support">SOCKS support</a></h2>
1849 <p>You can use ``Configure -Dusesocks'' which causes Perl to probe
1850 for the SOCKS proxy protocol library (v5, not v4). For more information
1851 on SOCKS, see:</p>
1852 <pre>
1853 <a href="http://www.socks.nec.com/">http://www.socks.nec.com/</a></pre>
1855 </p>
1856 <h2><a name="a_flag"><code>-A</code> flag</a></h2>
1857 <p>You can ``post-edit'' the Configure variables using the Configure <code>-A</code>
1858 switch. The editing happens immediately after the platform specific
1859 hints files have been processed but before the actual configuration
1860 process starts. Run <code>Configure -h</code> to find out the full <code>-A</code> syntax.</p>
1862 </p>
1863 <h2><a name="enhanced_installation_directories">Enhanced Installation Directories</a></h2>
1864 <p>The installation structure has been enriched to improve the support
1865 for maintaining multiple versions of perl, to provide locations for
1866 vendor-supplied modules, scripts, and manpages, and to ease maintenance
1867 of locally-added modules, scripts, and manpages. See the section on
1868 Installation Directories in the INSTALL file for complete details.
1869 For most users building and installing from source, the defaults should
1870 be fine.</p>
1871 <p>If you previously used <code>Configure -Dsitelib</code> or <code>-Dsitearch</code> to set
1872 special values for library directories, you might wish to consider using
1873 the new <code>-Dsiteprefix</code> setting instead. Also, if you wish to re-use a
1874 config.sh file from an earlier version of perl, you should be sure to
1875 check that Configure makes sensible choices for the new directories.
1876 See INSTALL for complete details.</p>
1878 </p>
1879 <hr />
1880 <h1><a name="platform_specific_changes">Platform specific changes</a></h1>
1882 </p>
1883 <h2><a name="supported_platforms">Supported platforms</a></h2>
1884 <ul>
1885 <li>
1886 <p>The Mach CThreads (NEXTSTEP, OPENSTEP) are now supported by the Thread
1887 extension.</p>
1888 </li>
1889 <li>
1890 <p>GNU/Hurd is now supported.</p>
1891 </li>
1892 <li>
1893 <p>Rhapsody/Darwin is now supported.</p>
1894 </li>
1895 <li>
1896 <p>EPOC is now supported (on Psion 5).</p>
1897 </li>
1898 <li>
1899 <p>The cygwin port (formerly cygwin32) has been greatly improved.</p>
1900 </li>
1901 </ul>
1903 </p>
1904 <h2><a name="dos">DOS</a></h2>
1905 <ul>
1906 <li>
1907 <p>Perl now works with djgpp 2.02 (and 2.03 alpha).</p>
1908 </li>
1909 <li>
1910 <p>Environment variable names are not converted to uppercase any more.</p>
1911 </li>
1912 <li>
1913 <p>Incorrect exit codes from backticks have been fixed.</p>
1914 </li>
1915 <li>
1916 <p>This port continues to use its own builtin globbing (not File::Glob).</p>
1917 </li>
1918 </ul>
1920 </p>
1921 <h2><a name="os390__openedition_mvs_">OS390 (OpenEdition MVS)</a></h2>
1922 <p>Support for this EBCDIC platform has not been renewed in this release.
1923 There are difficulties in reconciling Perl's standardization on UTF-8
1924 as its internal representation for characters with the EBCDIC character
1925 set, because the two are incompatible.</p>
1926 <p>It is unclear whether future versions will renew support for this
1927 platform, but the possibility exists.</p>
1929 </p>
1930 <h2><a name="vms">VMS</a></h2>
1931 <p>Numerous revisions and extensions to configuration, build, testing, and
1932 installation process to accommodate core changes and VMS-specific options.</p>
1933 <p>Expand %ENV-handling code to allow runtime mapping to logical names,
1934 CLI symbols, and CRTL environ array.</p>
1935 <p>Extension of subprocess invocation code to accept filespecs as command
1936 ``verbs''.</p>
1937 <p>Add to Perl command line processing the ability to use default file types and
1938 to recognize Unix-style <code>2&gt;&amp;1</code>.</p>
1939 <p>Expansion of File::Spec::VMS routines, and integration into ExtUtils::MM_VMS.</p>
1940 <p>Extension of ExtUtils::MM_VMS to handle complex extensions more flexibly.</p>
1941 <p>Barewords at start of Unix-syntax paths may be treated as text rather than
1942 only as logical names.</p>
1943 <p>Optional secure translation of several logical names used internally by Perl.</p>
1944 <p>Miscellaneous bugfixing and porting of new core code to VMS.</p>
1945 <p>Thanks are gladly extended to the many people who have contributed VMS
1946 patches, testing, and ideas.</p>
1948 </p>
1949 <h2><a name="win32">Win32</a></h2>
1950 <p>Perl can now emulate <code>fork()</code> internally, using multiple interpreters running
1951 in different concurrent threads. This support must be enabled at build
1952 time. See <a href="file://C|\msysgit\mingw\html/pod/perlfork.html">the perlfork manpage</a> for detailed information.</p>
1953 <p>When given a pathname that consists only of a drivename, such as <code>A:</code>,
1954 <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
1955 rather than the drive root.</p>
1956 <p>The builtin XSUB functions in the Win32:: namespace are documented. See
1957 <a href="file://C|\msysgit\mingw\html/lib/Win32.html">the Win32 manpage</a>.</p>
1958 <p>$^X now contains the full path name of the running executable.</p>
1959 <p>A Win32::GetLongPathName() function is provided to complement
1960 Win32::GetFullPathName() and Win32::GetShortPathName(). See <a href="file://C|\msysgit\mingw\html/lib/Win32.html">the Win32 manpage</a>.</p>
1961 <p>POSIX::uname() is supported.</p>
1962 <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
1963 handles. <code>kill()</code> accepts any real process id, rather than strictly
1964 return values from system(1,...).</p>
1965 <p>For better compatibility with Unix, <code>kill(0, $pid)</code> can now be used to
1966 test whether a process exists.</p>
1967 <p>The <code>Shell</code> module is supported.</p>
1968 <p>Better support for building Perl under command.com in Windows 95
1969 has been added.</p>
1970 <p>Scripts are read in binary mode by default to allow ByteLoader (and
1971 the filter mechanism in general) to work properly. For compatibility,
1972 the DATA filehandle will be set to text mode if a carriage return is
1973 detected at the end of the line containing the __END__ or __DATA__
1974 token; if not, the DATA filehandle will be left open in binary mode.
1975 Earlier versions always opened the DATA filehandle in text mode.</p>
1976 <p>The <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_glob"><code>glob()</code></a> operator is implemented via the <a href="#item_file_3a_3aglob"><code>File::Glob</code></a> extension,
1977 which supports glob syntax of the C shell. This increases the flexibility
1978 of the <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_glob"><code>glob()</code></a> operator, but there may be compatibility issues for
1979 programs that relied on the older globbing syntax. If you want to
1980 preserve compatibility with the older syntax, you might want to run
1981 perl with <code>-MFile::DosGlob</code>. For details and compatibility information,
1982 see <a href="file://C|\msysgit\mingw\html/lib/File/Glob.html">the File::Glob manpage</a>.</p>
1984 </p>
1985 <hr />
1986 <h1><a name="significant_bug_fixes">Significant bug fixes</a></h1>
1988 </p>
1989 <h2><a name="_handle__on_empty_files">&lt;HANDLE&gt; on empty files</a></h2>
1990 <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
1991 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
1992 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
1993 <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_undef"><code>undef</code></a>.</p>
1994 <p>This means that the following will append ``foo'' to an empty file (it used
1995 to do nothing):</p>
1996 <pre>
1997 perl -0777 -pi -e 's/^/foo/' empty_file</pre>
1998 <p>The behaviour of:</p>
1999 <pre>
2000 perl -pi -e 's/^/foo/' empty_file</pre>
2001 <p>is unchanged (it continues to leave the file empty).</p>
2003 </p>
2004 <h2><a name="eval_______improvements"><code>eval '...'</code> improvements</a></h2>
2005 <p>Line numbers (as reflected by <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_caller"><code>caller()</code></a> and most diagnostics) within
2006 <code>eval '...'</code> were often incorrect where here documents were involved.
2007 This has been corrected.</p>
2008 <p>Lexical lookups for variables appearing in <code>eval '...'</code> within
2009 functions that were themselves called within an <code>eval '...'</code> were
2010 searching the wrong place for lexicals. The lexical search now
2011 correctly ends at the subroutine's block boundary.</p>
2012 <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
2013 correctly when no exception occurred within the eval. This has
2014 been fixed.</p>
2015 <p>Parsing of here documents used to be flawed when they appeared as
2016 the replacement expression in <code>eval 's/.../.../e'</code>. This has
2017 been fixed.</p>
2019 </p>
2020 <h2><a name="all_compilation_errors_are_true_errors">All compilation errors are true errors</a></h2>
2021 <p>Some ``errors'' encountered at compile time were by necessity
2022 generated as warnings followed by eventual termination of the
2023 program. This enabled more such errors to be reported in a
2024 single run, rather than causing a hard stop at the first error
2025 that was encountered.</p>
2026 <p>The mechanism for reporting such errors has been reimplemented
2027 to queue compile-time errors and report them at the end of the
2028 compilation as true errors rather than as warnings. This fixes
2029 cases where error messages leaked through in the form of warnings
2030 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
2031 also allows such errors to be reliably trapped using <code>eval &quot;...&quot;</code>.</p>
2033 </p>
2034 <h2><a name="implicitly_closed_filehandles_are_safer">Implicitly closed filehandles are safer</a></h2>
2035 <p>Sometimes implicitly closed filehandles (as when they are localized,
2036 and Perl automatically closes them on exiting the scope) could
2037 inadvertently set $? or $!. This has been corrected.</p>
2039 </p>
2040 <h2><a name="behavior_of_list_slices_is_more_consistent">Behavior of list slices is more consistent</a></h2>
2041 <p>When taking a slice of a literal list (as opposed to a slice of
2042 an array or hash), Perl used to return an empty list if the
2043 result happened to be composed of all undef values.</p>
2044 <p>The new behavior is to produce an empty list if (and only if)
2045 the original list was empty. Consider the following example:</p>
2046 <pre>
2047 @a = (1,undef,undef,2)[2,1,2];</pre>
2048 <p>The old behavior would have resulted in @a having no elements.
2049 The new behavior ensures it has three undefined elements.</p>
2050 <p>Note in particular that the behavior of slices of the following
2051 cases remains unchanged:</p>
2052 <pre>
2053 @a = ()[1,2];
2054 @a = (getpwent)[7,0];
2055 @a = (anything_returning_empty_list())[2,1,2];
2056 @a = @b[2,1,2];
2057 @a = @c{'a','b','c'};</pre>
2058 <p>See <a href="file://C|\msysgit\mingw\html/pod/perldata.html">the perldata manpage</a>.</p>
2060 </p>
2061 <h2><a name="_____prototype_and__foo_a_"><code>(\$)</code> prototype and <code>$foo{a}</code></a></h2>
2062 <p>A scalar reference prototype now correctly allows a hash or
2063 array element in that slot.</p>
2065 </p>
2066 <h2><a name="goto__sub_and_autoload"><code>goto &amp;sub</code> and AUTOLOAD</a></h2>
2067 <p>The <code>goto &amp;sub</code> construct works correctly when <code>&amp;sub</code> happens
2068 to be autoloaded.</p>
2070 </p>
2071 <h2><a name="bareword_allowed_under_use_integer"><code>-bareword</code> allowed under <code>use integer</code></a></h2>
2072 <p>The autoquoting of barewords preceded by <code>-</code> did not work
2073 in prior versions when the <code>integer</code> pragma was enabled.
2074 This has been fixed.</p>
2076 </p>
2077 <h2><a name="failures_in_destroy__">Failures in <code>DESTROY()</code></a></h2>
2078 <p>When code in a destructor threw an exception, it went unnoticed
2079 in earlier versions of Perl, unless someone happened to be
2080 looking in $@ just after the point the destructor happened to
2081 run. Such failures are now visible as warnings when warnings are
2082 enabled.</p>
2084 </p>
2085 <h2><a name="locale_bugs_fixed">Locale bugs fixed</a></h2>
2086 <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
2087 back to the default ``C'' locale. This has been fixed.</p>
2088 <p>Numbers formatted according to the local numeric locale
2089 (such as using a decimal comma instead of a decimal dot) caused
2090 ``isn't numeric'' warnings, even while the operations accessing
2091 those numbers produced correct results. These warnings have been
2092 discontinued.</p>
2094 </p>
2095 <h2><a name="memory_leaks">Memory leaks</a></h2>
2096 <p>The <code>eval 'return sub {...}'</code> construct could sometimes leak
2097 memory. This has been fixed.</p>
2098 <p>Operations that aren't filehandle constructors used to leak memory
2099 when used on invalid filehandles. This has been fixed.</p>
2100 <p>Constructs that modified <a href="file://C|\msysgit\mingw\html/pod/perlvar.html#item___"><code>@_</code></a> could fail to deallocate values
2101 in <a href="file://C|\msysgit\mingw\html/pod/perlvar.html#item___"><code>@_</code></a> and thus leak memory. This has been corrected.</p>
2103 </p>
2104 <h2><a name="spurious_subroutine_stubs_after_failed_subroutine_calls">Spurious subroutine stubs after failed subroutine calls</a></h2>
2105 <p>Perl could sometimes create empty subroutine stubs when a
2106 subroutine was not found in the package. Such cases stopped
2107 later method lookups from progressing into base packages.
2108 This has been corrected.</p>
2110 </p>
2111 <h2><a name="taint_failures_under_u">Taint failures under <code>-U</code></a></h2>
2112 <p>When running in unsafe mode, taint violations could sometimes
2113 cause silent failures. This has been fixed.</p>
2115 </p>
2116 <h2><a name="end_blocks_and_the_c_switch">END blocks and the <code>-c</code> switch</a></h2>
2117 <p>Prior versions used to run BEGIN <strong>and</strong> END blocks when Perl was
2118 run in compile-only mode. Since this is typically not the expected
2119 behavior, END blocks are not executed anymore when the <code>-c</code> switch
2120 is used, or if compilation fails.</p>
2121 <p>See <a href="#support_for_check_blocks">Support for CHECK blocks</a> for how to run things when the compile
2122 phase ends.</p>
2124 </p>
2125 <h2><a name="potential_to_leak_data_filehandles">Potential to leak DATA filehandles</a></h2>
2126 <p>Using the <code>__DATA__</code> token creates an implicit filehandle to
2127 the file that contains the token. It is the program's
2128 responsibility to close it when it is done reading from it.</p>
2129 <p>This caveat is now better explained in the documentation.
2130 See <a href="file://C|\msysgit\mingw\html/pod/perldata.html">the perldata manpage</a>.</p>
2132 </p>
2133 <hr />
2134 <h1><a name="new_or_changed_diagnostics">New or Changed Diagnostics</a></h1>
2135 <dl>
2136 <dt><strong><a name="item__22_25s_22_variable__25s_masks_earlier_declaration">``%s'' variable %s masks earlier declaration in same %s</a></strong>
2138 <dd>
2139 <p>(W misc) A ``my'' or ``our'' variable has been redeclared in the current scope or statement,
2140 effectively eliminating all access to the previous instance. This is almost
2141 always a typographical error. Note that the earlier variable will still exist
2142 until the end of the scope or until all closure referents to it are
2143 destroyed.</p>
2144 </dd>
2145 </li>
2146 <dt><strong><a name="item__22my_sub_22_not_yet_implemented">``my sub'' not yet implemented</a></strong>
2148 <dd>
2149 <p>(F) Lexically scoped subroutines are not yet implemented. Don't try that
2150 yet.</p>
2151 </dd>
2152 </li>
2153 <dt><strong><a name="item__22our_22_variable__25s_redeclared">``our'' variable %s redeclared</a></strong>
2155 <dd>
2156 <p>(W misc) You seem to have already declared the same global once before in the
2157 current lexical scope.</p>
2158 </dd>
2159 </li>
2160 <dt><strong><a name="item__27_21_27_allowed_only_after_types__25s">'!' allowed only after types %s</a></strong>
2162 <dd>
2163 <p>(F) The '!' is allowed in <code>pack()</code> and <code>unpack()</code> only after certain types.
2164 See <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#pack">pack in the perlfunc manpage</a>.</p>
2165 </dd>
2166 </li>
2167 <dt><strong><a name="item__2f_cannot_take_a_count">/ cannot take a count</a></strong>
2169 <dd>
2170 <p>(F) You had an unpack template indicating a counted-length string,
2171 but you have also specified an explicit size for the string.
2172 See <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#pack">pack in the perlfunc manpage</a>.</p>
2173 </dd>
2174 </li>
2175 <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>
2177 <dd>
2178 <p>(F) You had an unpack template indicating a counted-length string,
2179 which must be followed by one of the letters a, A or Z
2180 to indicate what sort of string is to be unpacked.
2181 See <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#pack">pack in the perlfunc manpage</a>.</p>
2182 </dd>
2183 </li>
2184 <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>
2186 <dd>
2187 <p>(F) You had a pack template indicating a counted-length string,
2188 Currently the only things that can have their length counted are a*, A* or Z*.
2189 See <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#pack">pack in the perlfunc manpage</a>.</p>
2190 </dd>
2191 </li>
2192 <dt><strong><a name="item__2f_must_follow_a_numeric_type">/ must follow a numeric type</a></strong>
2194 <dd>
2195 <p>(F) You had an unpack template that contained a '#',
2196 but this did not follow some numeric unpack specification.
2197 See <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#pack">pack in the perlfunc manpage</a>.</p>
2198 </dd>
2199 </li>
2200 <dt><strong><a name="item__2f_25s_2f_3a_unrecognized_escape__5c_5c_25c_passe">/%s/: Unrecognized escape \\%c passed through</a></strong>
2202 <dd>
2203 <p>(W regexp) You used a backslash-character combination which is not recognized
2204 by Perl. This combination appears in an interpolated variable or a
2205 <code>'</code>-delimited regular expression. The character was understood literally.</p>
2206 </dd>
2207 </li>
2208 <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>
2210 <dd>
2211 <p>(W regexp) You used a backslash-character combination which is not recognized
2212 by Perl inside character classes. The character was understood literally.</p>
2213 </dd>
2214 </li>
2215 <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>
2217 <dd>
2218 <p>(W syntax) You have used a pattern where Perl expected to find a string,
2219 as in the first argument to <code>join</code>. Perl will treat the true
2220 or false result of matching the pattern against $_ as the string,
2221 which is probably not what you had in mind.</p>
2222 </dd>
2223 </li>
2224 <dt><strong><a name="item_s">%s() called too early to check prototype</a></strong>
2226 <dd>
2227 <p>(W prototype) You've called a function that has a prototype before the parser saw a
2228 definition or declaration for it, and Perl could not check that the call
2229 conforms to the prototype. You need to either add an early prototype
2230 declaration for the subroutine in question, or move the subroutine
2231 definition ahead of the call to get proper prototype checking. Alternatively,
2232 if you are certain that you're calling the function correctly, you may put
2233 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>
2234 </dd>
2235 </li>
2236 <dt><strong><a name="item__s">%s argument is not a HASH or ARRAY element</a></strong>
2238 <dd>
2239 <p>(F) The argument to <code>exists()</code> must be a hash or array element, such as:</p>
2240 </dd>
2241 <dd>
2242 <pre>
2243 $foo{$bar}
2244 $ref-&gt;{&quot;susie&quot;}[12]</pre>
2245 </dd>
2246 </li>
2247 <dt><strong>%s argument is not a HASH or ARRAY element or slice</strong>
2249 <dd>
2250 <p>(F) The argument to <a href="#item_delete"><code>delete()</code></a> must be either a hash or array element, such as:</p>
2251 </dd>
2252 <dd>
2253 <pre>
2254 $foo{$bar}
2255 $ref-&gt;{&quot;susie&quot;}[12]</pre>
2256 </dd>
2257 <dd>
2258 <p>or a hash or array slice, such as:</p>
2259 </dd>
2260 <dd>
2261 <pre>
2262 @foo[$bar, $baz, $xyzzy]
2263 @{$ref-&gt;[12]}{&quot;susie&quot;, &quot;queue&quot;}</pre>
2264 </dd>
2265 </li>
2266 <dt><strong>%s argument is not a subroutine name</strong>
2268 <dd>
2269 <p>(F) The argument to <code>exists()</code> for <code>exists &amp;sub</code> must be a subroutine
2270 name, and not a subroutine call. <code>exists &amp;sub()</code> will generate this error.</p>
2271 </dd>
2272 </li>
2273 <dt><strong>%s package attribute may clash with future reserved word: %s</strong>
2275 <dd>
2276 <p>(W reserved) A lowercase attribute name was used that had a package-specific handler.
2277 That name might have a meaning to Perl itself some day, even though it
2278 doesn't yet. Perhaps you should use a mixed-case attribute name, instead.
2279 See <a href="file://C|\msysgit\mingw\html/lib/attributes.html">the attributes manpage</a>.</p>
2280 </dd>
2281 </li>
2282 <dt><strong><a name="item__28in_cleanup_29__25s">(in cleanup) %s</a></strong>
2284 <dd>
2285 <p>(W misc) This prefix usually indicates that a <code>DESTROY()</code> method raised
2286 the indicated exception. Since destructors are usually called by
2287 the system at arbitrary points during execution, and often a vast
2288 number of times, the warning is issued only once for any number
2289 of failures that would otherwise result in the same message being
2290 repeated.</p>
2291 </dd>
2292 <dd>
2293 <p>Failure of user callbacks dispatched using the <code>G_KEEPERR</code> flag
2294 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>
2295 </dd>
2296 </li>
2297 <dt><strong><a name="item__3c_3e_should_be_quotes">&lt;&gt; should be quotes</a></strong>
2299 <dd>
2300 <p>(F) You wrote <code>require &lt;file&gt;</code> when you should have written
2301 <code>require 'file'</code>.</p>
2302 </dd>
2303 </li>
2304 <dt><strong><a name="item_attempt_to_join_self">Attempt to join self</a></strong>
2306 <dd>
2307 <p>(F) You tried to join a thread from within itself, which is an
2308 impossible task. You may be joining the wrong thread, or you may
2309 need to move the <code>join()</code> to some other thread.</p>
2310 </dd>
2311 </li>
2312 <dt><strong><a name="item_bad_evalled_substitution_pattern">Bad evalled substitution pattern</a></strong>
2314 <dd>
2315 <p>(F) You've used the /e switch to evaluate the replacement for a
2316 substitution, but perl found a syntax error in the code to evaluate,
2317 most likely an unexpected right brace '}'.</p>
2318 </dd>
2319 </li>
2320 <dt><strong><a name="item_realloc">Bad <code>realloc()</code> ignored</a></strong>
2322 <dd>
2323 <p>(S) An internal routine called <a href="#item_realloc"><code>realloc()</code></a> on something that had never been
2324 malloc()ed in the first place. Mandatory, but can be disabled by
2325 setting environment variable <code>PERL_BADFREE</code> to 1.</p>
2326 </dd>
2327 </li>
2328 <dt><strong><a name="item_bareword_found_in_conditional">Bareword found in conditional</a></strong>
2330 <dd>
2331 <p>(W bareword) The compiler found a bareword where it expected a conditional,
2332 which often indicates that an || or &amp;&amp; was parsed as part of the
2333 last argument of the previous construct, for example:</p>
2334 </dd>
2335 <dd>
2336 <pre>
2337 open FOO || die;</pre>
2338 </dd>
2339 <dd>
2340 <p>It may also indicate a misspelled constant that has been interpreted
2341 as a bareword:</p>
2342 </dd>
2343 <dd>
2344 <pre>
2345 use constant TYPO =&gt; 1;
2346 if (TYOP) { print &quot;foo&quot; }</pre>
2347 </dd>
2348 <dd>
2349 <p>The <code>strict</code> pragma is useful in avoiding such errors.</p>
2350 </dd>
2351 </li>
2352 <dt><strong><a name="item_binary_number__3e_0b111111111111111111111111111111">Binary number &gt; 0b11111111111111111111111111111111 non-portable</a></strong>
2354 <dd>
2355 <p>(W portable) The binary number you specified is larger than 2**32-1
2356 (4294967295) and therefore non-portable between systems. See
2357 <a href="file://C|\msysgit\mingw\html/pod/perlport.html">the perlport manpage</a> for more on portability concerns.</p>
2358 </dd>
2359 </li>
2360 <dt><strong><a name="item_bit_vector_size__3e_32_non_2dportable">Bit vector size &gt; 32 non-portable</a></strong>
2362 <dd>
2363 <p>(W portable) Using bit vector sizes larger than 32 is non-portable.</p>
2364 </dd>
2365 </li>
2366 <dt><strong><a name="item_buffer_overflow_in_prime_env_iter_3a__25s">Buffer overflow in prime_env_iter: %s</a></strong>
2368 <dd>
2369 <p>(W internal) A warning peculiar to VMS. While Perl was preparing to iterate over
2370 %ENV, it encountered a logical name or symbol definition which was too long,
2371 so it was truncated to the string shown.</p>
2372 </dd>
2373 </li>
2374 <dt><strong><a name="item_can_27t_check_filesystem_of_script__22_25s_22">Can't check filesystem of script ``%s''</a></strong>
2376 <dd>
2377 <p>(P) For some reason you can't check the filesystem of the script for nosuid.</p>
2378 </dd>
2379 </li>
2380 <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>
2382 <dd>
2383 <p>(S) Currently, only scalar variables can declared with a specific class
2384 qualifier in a ``my'' or ``our'' declaration. The semantics may be extended
2385 for other types of variables in future.</p>
2386 </dd>
2387 </li>
2388 <dt><strong><a name="item_can_27t_declare__25s_in__22_25s_22">Can't declare %s in ``%s''</a></strong>
2390 <dd>
2391 <p>(F) Only scalar, array, and hash variables may be declared as ``my'' or
2392 ``our'' variables. They must have ordinary identifiers as names.</p>
2393 </dd>
2394 </li>
2395 <dt><strong><a name="item_can_27t_ignore_signal_chld_2c_forcing_to_default">Can't ignore signal CHLD, forcing to default</a></strong>
2397 <dd>
2398 <p>(W signal) Perl has detected that it is being run with the SIGCHLD signal
2399 (sometimes known as SIGCLD) disabled. Since disabling this signal
2400 will interfere with proper determination of exit status of child
2401 processes, Perl has reset the signal to its default value.
2402 This situation typically indicates that the parent program under
2403 which Perl may be running (e.g., cron) is being very careless.</p>
2404 </dd>
2405 </li>
2406 <dt><strong><a name="item_can_27t_modify_non_2dlvalue_subroutine_call">Can't modify non-lvalue subroutine call</a></strong>
2408 <dd>
2409 <p>(F) Subroutines meant to be used in lvalue context should be declared as
2410 such, see <a href="file://C|\msysgit\mingw\html/pod/perlsub.html#lvalue_subroutines">Lvalue subroutines in the perlsub manpage</a>.</p>
2411 </dd>
2412 </li>
2413 <dt><strong><a name="item_can_27t_read_crtl_environ">Can't read CRTL environ</a></strong>
2415 <dd>
2416 <p>(S) A warning peculiar to VMS. Perl tried to read an element of %ENV
2417 from the CRTL's internal environment array and discovered the array was
2418 missing. You need to figure out where your CRTL misplaced its environ
2419 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>
2420 </dd>
2421 </li>
2422 <dt><strong><a name="item_can_27t_remove__25s_3a__25s_2c_skipping_file">Can't remove %s: %s, skipping file</a></strong>
2424 <dd>
2425 <p>(S) You requested an inplace edit without creating a backup file. Perl
2426 was unable to remove the original file to replace it with the modified
2427 file. The file was left unmodified.</p>
2428 </dd>
2429 </li>
2430 <dt><strong><a name="item_can_27t_return__25s_from_lvalue_subroutine">Can't return %s from lvalue subroutine</a></strong>
2432 <dd>
2433 <p>(F) Perl detected an attempt to return illegal lvalues (such
2434 as temporary or readonly values) from a subroutine used as an lvalue.
2435 This is not allowed.</p>
2436 </dd>
2437 </li>
2438 <dt><strong><a name="item_can_27t_weaken_a_nonreference">Can't weaken a nonreference</a></strong>
2440 <dd>
2441 <p>(F) You attempted to weaken something that was not a reference. Only
2442 references can be weakened.</p>
2443 </dd>
2444 </li>
2445 <dt><strong><a name="item_character_class__5b_3a_25s_3a_5d_unknown">Character class [:%s:] unknown</a></strong>
2447 <dd>
2448 <p>(F) The class in the character class [: :] syntax is unknown.
2449 See <a href="file://C|\msysgit\mingw\html/pod/perlre.html">the perlre manpage</a>.</p>
2450 </dd>
2451 </li>
2452 <dt><strong><a name="item_character_class_syntax__5b_25s_5d_belongs_inside_c">Character class syntax [%s] belongs inside character classes</a></strong>
2454 <dd>
2455 <p>(W unsafe) The character class constructs [: :], [= =], and [. .] go
2456 <em>inside</em> character classes, the [] are part of the construct,
2457 for example: /[012[:alpha:]345]/. Note that [= =] and [. .]
2458 are not currently implemented; they are simply placeholders for
2459 future extensions.</p>
2460 </dd>
2461 </li>
2462 <dt><strong><a name="item_constant_is_not__25s_reference">Constant is not %s reference</a></strong>
2464 <dd>
2465 <p>(F) A constant value (perhaps declared using the <code>use constant</code> pragma)
2466 is being dereferenced, but it amounts to the wrong type of reference. The
2467 message indicates the type of reference that was expected. This usually
2468 indicates a syntax error in dereferencing the constant value.
2469 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>
2470 </dd>
2471 </li>
2472 <dt><strong>constant(%s): %s</strong>
2474 <dd>
2475 <p>(F) The parser found inconsistencies either while attempting to define an
2476 overloaded constant, or when trying to find the character name specified
2477 in the <code>\N{...}</code> escape. Perhaps you forgot to load the corresponding
2478 <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>
2479 </dd>
2480 </li>
2481 <dt><strong><a name="item_core_3a_3a_25s_is_not_a_keyword">CORE::%s is not a keyword</a></strong>
2483 <dd>
2484 <p>(F) The CORE:: namespace is reserved for Perl keywords.</p>
2485 </dd>
2486 </li>
2487 <dt><strong><a name="item_defined"><code>defined(@array)</code> is deprecated</a></strong>
2489 <dd>
2490 <p>(D) <a href="#item_defined"><code>defined()</code></a> is not usually useful on arrays because it checks for an
2491 undefined <em>scalar</em> value. If you want to see if the array is empty,
2492 just use <code>if (@array) { # not empty }</code> for example.</p>
2493 </dd>
2494 </li>
2495 <dt><strong><code>defined(%hash)</code> is deprecated</strong>
2497 <dd>
2498 <p>(D) <a href="#item_defined"><code>defined()</code></a> is not usually useful on hashes because it checks for an
2499 undefined <em>scalar</em> value. If you want to see if the hash is empty,
2500 just use <code>if (%hash) { # not empty }</code> for example.</p>
2501 </dd>
2502 </li>
2503 <dt><strong><a name="item_did_not_produce_a_valid_header">Did not produce a valid header</a></strong>
2505 <dd>
2506 <p>See Server error.</p>
2507 </dd>
2508 </li>
2509 <dt><strong><a name="item__28did_you_mean__22local_22_instead_of__22our_22_3">(Did you mean ``local'' instead of ``our''?)</a></strong>
2511 <dd>
2512 <p>(W misc) Remember that ``our'' does not localize the declared global variable.
2513 You have declared it again in the same lexical scope, which seems superfluous.</p>
2514 </dd>
2515 </li>
2516 <dt><strong><a name="item_document_contains_no_data">Document contains no data</a></strong>
2518 <dd>
2519 <p>See Server error.</p>
2520 </dd>
2521 </li>
2522 <dt><strong><a name="item_entering_effective__25s_failed">entering effective %s failed</a></strong>
2524 <dd>
2525 <p>(F) While under the <code>use filetest</code> pragma, switching the real and
2526 effective uids or gids failed.</p>
2527 </dd>
2528 </li>
2529 <dt><strong><a name="item_false__5b_5d_range__22_25s_22_in_regexp">false [] range ``%s'' in regexp</a></strong>
2531 <dd>
2532 <p>(W regexp) A character class range must start and end at a literal character, not
2533 another character class like <code>\d</code> or <code>[:alpha:]</code>. The ``-'' in your false
2534 range is interpreted as a literal ``-''. Consider quoting the ``-'', ``\-''.
2535 See <a href="file://C|\msysgit\mingw\html/pod/perlre.html">the perlre manpage</a>.</p>
2536 </dd>
2537 </li>
2538 <dt><strong><a name="item_filehandle__25s_opened_only_for_output">Filehandle %s opened only for output</a></strong>
2540 <dd>
2541 <p>(W io) You tried to read from a filehandle opened only for writing. If you
2542 intended it to be a read/write filehandle, you needed to open it with
2543 ``+&lt;'' or ``+&gt;'' or ``+&gt;&gt;'' instead of with ``&lt;'' or nothing. If
2544 you intended only to read from the file, use ``&lt;''. See
2545 <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_open">open in the perlfunc manpage</a>.</p>
2546 </dd>
2547 </li>
2548 <dt><strong><a name="item_flock"><code>flock()</code> on closed filehandle %s</a></strong>
2550 <dd>
2551 <p>(W closed) The filehandle you're attempting to <a href="#item_flock"><code>flock()</code></a> got itself closed some
2552 time before now. Check your logic flow. <a href="#item_flock"><code>flock()</code></a> operates on filehandles.
2553 Are you attempting to call <a href="#item_flock"><code>flock()</code></a> on a dirhandle by the same name?</p>
2554 </dd>
2555 </li>
2556 <dt><strong><a name="item_global_symbol__22_25s_22_requires_explicit_package">Global symbol ``%s'' requires explicit package name</a></strong>
2558 <dd>
2559 <p>(F) You've said ``use strict vars'', which indicates that all variables
2560 must either be lexically scoped (using ``my''), declared beforehand using
2561 ``our'', or explicitly qualified to say which package the global variable
2562 is in (using ``::'').</p>
2563 </dd>
2564 </li>
2565 <dt><strong><a name="item_hexadecimal_number__3e_0xffffffff_non_2dportable">Hexadecimal number &gt; 0xffffffff non-portable</a></strong>
2567 <dd>
2568 <p>(W portable) The hexadecimal number you specified is larger than 2**32-1
2569 (4294967295) and therefore non-portable between systems. See
2570 <a href="file://C|\msysgit\mingw\html/pod/perlport.html">the perlport manpage</a> for more on portability concerns.</p>
2571 </dd>
2572 </li>
2573 <dt><strong><a name="item_ill_2dformed_crtl_environ_value__22_25s_22">Ill-formed CRTL environ value ``%s''</a></strong>
2575 <dd>
2576 <p>(W internal) A warning peculiar to VMS. Perl tried to read the CRTL's internal
2577 environ array, and encountered an element without the <code>=</code> delimiter
2578 used to separate keys from values. The element is ignored.</p>
2579 </dd>
2580 </li>
2581 <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>
2583 <dd>
2584 <p>(W internal) A warning peculiar to VMS. Perl tried to read a logical name
2585 or CLI symbol definition when preparing to iterate over %ENV, and
2586 didn't see the expected delimiter between key and value, so the
2587 line was ignored.</p>
2588 </dd>
2589 </li>
2590 <dt><strong><a name="item_illegal_binary_digit__25s">Illegal binary digit %s</a></strong>
2592 <dd>
2593 <p>(F) You used a digit other than 0 or 1 in a binary number.</p>
2594 </dd>
2595 </li>
2596 <dt><strong><a name="item_illegal_binary_digit__25s_ignored">Illegal binary digit %s ignored</a></strong>
2598 <dd>
2599 <p>(W digit) You may have tried to use a digit other than 0 or 1 in a binary number.
2600 Interpretation of the binary number stopped before the offending digit.</p>
2601 </dd>
2602 </li>
2603 <dt><strong><a name="item_illegal_number_of_bits_in_vec">Illegal number of bits in vec</a></strong>
2605 <dd>
2606 <p>(F) The number of bits in <a href="#item_vec"><code>vec()</code></a> (the third argument) must be a power of
2607 two from 1 to 32 (or 64, if your platform supports that).</p>
2608 </dd>
2609 </li>
2610 <dt><strong><a name="item_integer_overflow_in__25s_number">Integer overflow in %s number</a></strong>
2612 <dd>
2613 <p>(W overflow) The hexadecimal, octal or binary number you have specified either
2614 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
2615 architecture, and has been converted to a floating point number. On a
2616 32-bit architecture the largest hexadecimal, octal or binary number
2617 representable without overflow is 0xFFFFFFFF, 037777777777, or
2618 0b11111111111111111111111111111111 respectively. Note that Perl
2619 transparently promotes all numbers to a floating point representation
2620 internally--subject to loss of precision errors in subsequent
2621 operations.</p>
2622 </dd>
2623 </li>
2624 <dt><strong><a name="item_invalid__25s_attribute_3a__25s">Invalid %s attribute: %s</a></strong>
2626 <dd>
2627 <p>The indicated attribute for a subroutine or variable was not recognized
2628 by Perl or by a user-supplied handler. See <a href="file://C|\msysgit\mingw\html/lib/attributes.html">the attributes manpage</a>.</p>
2629 </dd>
2630 </li>
2631 <dt><strong><a name="item_invalid__25s_attributes_3a__25s">Invalid %s attributes: %s</a></strong>
2633 <dd>
2634 <p>The indicated attributes for a subroutine or variable were not recognized
2635 by Perl or by a user-supplied handler. See <a href="file://C|\msysgit\mingw\html/lib/attributes.html">the attributes manpage</a>.</p>
2636 </dd>
2637 </li>
2638 <dt><strong><a name="item_invalid__5b_5d_range__22_25s_22_in_regexp">invalid [] range ``%s'' in regexp</a></strong>
2640 <dd>
2641 <p>The offending range is now explicitly displayed.</p>
2642 </dd>
2643 </li>
2644 <dt><strong><a name="item_invalid_separator_character__25s_in_attribute_list">Invalid separator character %s in attribute list</a></strong>
2646 <dd>
2647 <p>(F) Something other than a colon or whitespace was seen between the
2648 elements of an attribute list. If the previous attribute
2649 had a parenthesised parameter list, perhaps that list was terminated
2650 too soon. See <a href="file://C|\msysgit\mingw\html/lib/attributes.html">the attributes manpage</a>.</p>
2651 </dd>
2652 </li>
2653 <dt><strong><a name="item_invalid_separator_character__25s_in_subroutine_att">Invalid separator character %s in subroutine attribute list</a></strong>
2655 <dd>
2656 <p>(F) Something other than a colon or whitespace was seen between the
2657 elements of a subroutine attribute list. If the previous attribute
2658 had a parenthesised parameter list, perhaps that list was terminated
2659 too soon.</p>
2660 </dd>
2661 </li>
2662 <dt><strong><a name="item_leaving_effective__25s_failed">leaving effective %s failed</a></strong>
2664 <dd>
2665 <p>(F) While under the <code>use filetest</code> pragma, switching the real and
2666 effective uids or gids failed.</p>
2667 </dd>
2668 </li>
2669 <dt><strong><a name="item_lvalue_subs_returning__25s_not_implemented_yet">Lvalue subs returning %s not implemented yet</a></strong>
2671 <dd>
2672 <p>(F) Due to limitations in the current implementation, array and hash
2673 values cannot be returned in subroutines used in lvalue context.
2674 See <a href="file://C|\msysgit\mingw\html/pod/perlsub.html#lvalue_subroutines">Lvalue subroutines in the perlsub manpage</a>.</p>
2675 </dd>
2676 </li>
2677 <dt><strong><a name="item_method__25s_not_permitted">Method %s not permitted</a></strong>
2679 <dd>
2680 <p>See Server error.</p>
2681 </dd>
2682 </li>
2683 <dt><strong><a name="item_missing__25sbrace_25s_on__5cn_7b_7d">Missing %sbrace%s on \N{}</a></strong>
2685 <dd>
2686 <p>(F) Wrong syntax of character name literal <code>\N{charname}</code> within
2687 double-quotish context.</p>
2688 </dd>
2689 </li>
2690 <dt><strong><a name="item_missing_command_in_piped_open">Missing command in piped open</a></strong>
2692 <dd>
2693 <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>
2694 construction, but the command was missing or blank.</p>
2695 </dd>
2696 </li>
2697 <dt><strong><a name="item_missing_name_in__22my_sub_22">Missing name in ``my sub''</a></strong>
2699 <dd>
2700 <p>(F) The reserved syntax for lexically scoped subroutines requires that they
2701 have a name with which they can be found.</p>
2702 </dd>
2703 </li>
2704 <dt><strong><a name="item_no__25s_specified_for__2d_25c">No %s specified for -%c</a></strong>
2706 <dd>
2707 <p>(F) The indicated command line switch needs a mandatory argument, but
2708 you haven't specified one.</p>
2709 </dd>
2710 </li>
2711 <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>
2713 <dd>
2714 <p>(F) Fully qualified variable names are not allowed in ``our'' declarations,
2715 because that doesn't make much sense under existing semantics. Such
2716 syntax is reserved for future extensions.</p>
2717 </dd>
2718 </li>
2719 <dt><strong><a name="item_no_space_allowed_after__2d_25c">No space allowed after -%c</a></strong>
2721 <dd>
2722 <p>(F) The argument to the indicated command line switch must follow immediately
2723 after the switch, without intervening spaces.</p>
2724 </dd>
2725 </li>
2726 <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>
2728 <dd>
2729 <p>(S) A warning peculiar to VMS. Perl was unable to find the local
2730 timezone offset, so it's assuming that local system time is equivalent
2731 to UTC. If it's not, define the logical name <em>SYS$TIMEZONE_DIFFERENTIAL</em>
2732 to translate to the number of seconds which need to be added to UTC to
2733 get local time.</p>
2734 </dd>
2735 </li>
2736 <dt><strong><a name="item_octal_number__3e_037777777777_non_2dportable">Octal number &gt; 037777777777 non-portable</a></strong>
2738 <dd>
2739 <p>(W portable) The octal number you specified is larger than 2**32-1 (4294967295)
2740 and therefore non-portable between systems. See <a href="file://C|\msysgit\mingw\html/pod/perlport.html">the perlport manpage</a> for more
2741 on portability concerns.</p>
2742 </dd>
2743 <dd>
2744 <p>See also <a href="file://C|\msysgit\mingw\html/pod/perlport.html">the perlport manpage</a> for writing portable code.</p>
2745 </dd>
2746 </li>
2747 <dt><strong><a name="item_panic_3a_del_backref">panic: del_backref</a></strong>
2749 <dd>
2750 <p>(P) Failed an internal consistency check while trying to reset a weak
2751 reference.</p>
2752 </dd>
2753 </li>
2754 <dt><strong><a name="item_panic_3a_kid_popen_errno_read">panic: kid popen errno read</a></strong>
2756 <dd>
2757 <p>(F) forked child returned an incomprehensible message about its errno.</p>
2758 </dd>
2759 </li>
2760 <dt><strong><a name="item_panic_3a_magic_killbackrefs">panic: magic_killbackrefs</a></strong>
2762 <dd>
2763 <p>(P) Failed an internal consistency check while trying to reset all weak
2764 references to an object.</p>
2765 </dd>
2766 </li>
2767 <dt><strong><a name="item_parentheses_missing_around__22_25s_22_list">Parentheses missing around ``%s'' list</a></strong>
2769 <dd>
2770 <p>(W parenthesis) You said something like</p>
2771 </dd>
2772 <dd>
2773 <pre>
2774 my $foo, $bar = @_;</pre>
2775 </dd>
2776 <dd>
2777 <p>when you meant</p>
2778 </dd>
2779 <dd>
2780 <pre>
2781 my ($foo, $bar) = @_;</pre>
2782 </dd>
2783 <dd>
2784 <p>Remember that ``my'', ``our'', and ``local'' bind tighter than comma.</p>
2785 </dd>
2786 </li>
2787 <dt><strong><a name="item_possible_unintended_interpolation_of__25s_in_strin">Possible unintended interpolation of %s in string</a></strong>
2789 <dd>
2790 <p>(W ambiguous) It used to be that Perl would try to guess whether you
2791 wanted an array interpolated or a literal @. It no longer does this;
2792 arrays are now <em>always</em> interpolated into strings. This means that
2793 if you try something like:</p>
2794 </dd>
2795 <dd>
2796 <pre>
2797 print &quot;fred@example.com&quot;;</pre>
2798 </dd>
2799 <dd>
2800 <p>and the array <code>@example</code> doesn't exist, Perl is going to print
2801 <code>fred.com</code>, which is probably not what you wanted. To get a literal
2802 <code>@</code> sign in a string, put a backslash before it, just as you would
2803 to get a literal <code>$</code> sign.</p>
2804 </dd>
2805 </li>
2806 <dt><strong><a name="item_possible_y2k_bug_3a__25s">Possible Y2K bug: %s</a></strong>
2808 <dd>
2809 <p>(W y2k) You are concatenating the number 19 with another number, which
2810 could be a potential Year 2000 problem.</p>
2811 </dd>
2812 </li>
2813 <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>
2815 <dd>
2816 <p>(W deprecated) You have written something like this:</p>
2817 </dd>
2818 <dd>
2819 <pre>
2820 sub doit
2822 use attrs qw(locked);
2823 }</pre>
2824 </dd>
2825 <dd>
2826 <p>You should use the new declaration syntax instead.</p>
2827 </dd>
2828 <dd>
2829 <pre>
2830 sub doit : locked
2832 ...</pre>
2833 </dd>
2834 <dd>
2835 <p>The <code>use attrs</code> pragma is now obsolete, and is only provided for
2836 backward-compatibility. See <a href="file://C|\msysgit\mingw\html/pod/perlsub.html#subroutine_attributes">Subroutine Attributes in the perlsub manpage</a>.</p>
2837 </dd>
2838 </li>
2839 <dt><strong><a name="item_premature_end_of_script_headers">Premature end of script headers</a></strong>
2841 <dd>
2842 <p>See Server error.</p>
2843 </dd>
2844 </li>
2845 <dt><strong><a name="item_repeat_count_in_pack_overflows">Repeat count in pack overflows</a></strong>
2847 <dd>
2848 <p>(F) You can't specify a repeat count so large that it overflows
2849 your signed integers. See <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#pack">pack in the perlfunc manpage</a>.</p>
2850 </dd>
2851 </li>
2852 <dt><strong><a name="item_repeat_count_in_unpack_overflows">Repeat count in unpack overflows</a></strong>
2854 <dd>
2855 <p>(F) You can't specify a repeat count so large that it overflows
2856 your signed integers. See <a href="file://C|\msysgit\mingw\html/pod/perlfunc.html#unpack">unpack in the perlfunc manpage</a>.</p>
2857 </dd>
2858 </li>
2859 <dt><strong><code>realloc()</code> of freed memory ignored</strong>
2861 <dd>
2862 <p>(S) An internal routine called <a href="#item_realloc"><code>realloc()</code></a> on something that had already
2863 been freed.</p>
2864 </dd>
2865 </li>
2866 <dt><strong><a name="item_reference_is_already_weak">Reference is already weak</a></strong>
2868 <dd>
2869 <p>(W misc) You have attempted to weaken a reference that is already weak.
2870 Doing so has no effect.</p>
2871 </dd>
2872 </li>
2873 <dt><strong><a name="item_setpgrp_can_27t_take_arguments">setpgrp can't take arguments</a></strong>
2875 <dd>
2876 <p>(F) Your system has the <code>setpgrp()</code> from BSD 4.2, which takes no arguments,
2877 unlike POSIX setpgid(), which takes a process ID and process group ID.</p>
2878 </dd>
2879 </li>
2880 <dt><strong><a name="item_strange__2a_2b_3f_7b_7d_on_zero_2dlength_expressio">Strange *+?{} on zero-length expression</a></strong>
2882 <dd>
2883 <p>(W regexp) You applied a regular expression quantifier in a place where it
2884 makes no sense, such as on a zero-width assertion.
2885 Try putting the quantifier inside the assertion instead. For example,
2886 the way to match ``abc'' provided that it is followed by three
2887 repetitions of ``xyz'' is <code>/abc(?=(?:xyz){3})/</code>, not <code>/abc(?=xyz){3}/</code>.</p>
2888 </dd>
2889 </li>
2890 <dt><strong><a name="item_switching_effective__25s_is_not_implemented">switching effective %s is not implemented</a></strong>
2892 <dd>
2893 <p>(F) While under the <code>use filetest</code> pragma, we cannot switch the
2894 real and effective uids or gids.</p>
2895 </dd>
2896 </li>
2897 <dt><strong><a name="item_elements">This Perl can't reset CRTL environ elements (%s)</a></strong>
2899 <dt><strong>This Perl can't set CRTL environ elements (%s=%s)</strong>
2901 <dd>
2902 <p>(W internal) Warnings peculiar to VMS. You tried to change or delete an element
2903 of the CRTL's internal environ array, but your copy of Perl wasn't
2904 built with a CRTL that contained the <code>setenv()</code> function. You'll need to
2905 rebuild Perl with a CRTL that does, or redefine <em>PERL_ENV_TABLES</em> (see
2906 <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
2907 %ENV which produced the warning.</p>
2908 </dd>
2909 </li>
2910 <dt><strong><a name="item_too_late_to_run__25s_block">Too late to run %s block</a></strong>
2912 <dd>
2913 <p>(W void) A CHECK or INIT block is being defined during run time proper,
2914 when the opportunity to run them has already passed. Perhaps you are
2915 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
2916 <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>
2917 inside a BEGIN block.</p>
2918 </dd>
2919 </li>
2920 <dt><strong><a name="item_open">Unknown <code>open()</code> mode '%s'</a></strong>
2922 <dd>
2923 <p>(F) The second argument of 3-argument <a href="#item_open"><code>open()</code></a> is not among the list
2924 of valid modes: <code>&lt;</code>, <code>&gt;</code>, <code>&gt;&gt;</code>, <code>+&lt;</code>,
2925 <code>+&gt;</code>, <code>+&gt;&gt;</code>, <code>-|</code>, <code>|-</code>.</p>
2926 </dd>
2927 </li>
2928 <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>
2930 <dd>
2931 <p>(P) An error peculiar to VMS. Perl was reading values for %ENV before
2932 iterating over it, and someone else stuck a message in the stream of
2933 data Perl expected. Someone's very confused, or perhaps trying to
2934 subvert Perl's population of %ENV for nefarious purposes.</p>
2935 </dd>
2936 </li>
2937 <dt><strong><a name="item_unrecognized_escape__5c_5c_25c_passed_through">Unrecognized escape \\%c passed through</a></strong>
2939 <dd>
2940 <p>(W misc) You used a backslash-character combination which is not recognized
2941 by Perl. The character was understood literally.</p>
2942 </dd>
2943 </li>
2944 <dt><strong><a name="item_unterminated_attribute_parameter_in_attribute_list">Unterminated attribute parameter in attribute list</a></strong>
2946 <dd>
2947 <p>(F) The lexer saw an opening (left) parenthesis character while parsing an
2948 attribute list, but the matching closing (right) parenthesis
2949 character was not found. You may need to add (or remove) a backslash
2950 character to get your parentheses to balance. See <a href="file://C|\msysgit\mingw\html/lib/attributes.html">the attributes manpage</a>.</p>
2951 </dd>
2952 </li>
2953 <dt><strong><a name="item_unterminated_attribute_list">Unterminated attribute list</a></strong>
2955 <dd>
2956 <p>(F) The lexer found something other than a simple identifier at the start
2957 of an attribute, and it wasn't a semicolon or the start of a
2958 block. Perhaps you terminated the parameter list of the previous attribute
2959 too soon. See <a href="file://C|\msysgit\mingw\html/lib/attributes.html">the attributes manpage</a>.</p>
2960 </dd>
2961 </li>
2962 <dt><strong><a name="item_unterminated_attribute_parameter_in_subroutine_att">Unterminated attribute parameter in subroutine attribute list</a></strong>
2964 <dd>
2965 <p>(F) The lexer saw an opening (left) parenthesis character while parsing a
2966 subroutine attribute list, but the matching closing (right) parenthesis
2967 character was not found. You may need to add (or remove) a backslash
2968 character to get your parentheses to balance.</p>
2969 </dd>
2970 </li>
2971 <dt><strong><a name="item_unterminated_subroutine_attribute_list">Unterminated subroutine attribute list</a></strong>
2973 <dd>
2974 <p>(F) The lexer found something other than a simple identifier at the start
2975 of a subroutine attribute, and it wasn't a semicolon or the start of a
2976 block. Perhaps you terminated the parameter list of the previous attribute
2977 too soon.</p>
2978 </dd>
2979 </li>
2980 <dt><strong><a name="item_value_of_cli_symbol__22_25s_22_too_long">Value of CLI symbol ``%s'' too long</a></strong>
2982 <dd>
2983 <p>(W misc) A warning peculiar to VMS. Perl tried to read the value of an %ENV
2984 element from a CLI symbol table, and found a resultant string longer
2985 than 1024 characters. The return value has been truncated to 1024
2986 characters.</p>
2987 </dd>
2988 </li>
2989 <dt><strong><a name="item_version_number_must_be_a_constant_number">Version number must be a constant number</a></strong>
2991 <dd>
2992 <p>(P) The attempt to translate a <code>use Module n.n LIST</code> statement into
2993 its equivalent <code>BEGIN</code> block found an internal inconsistency with
2994 the version number.</p>
2995 </dd>
2996 </li>
2997 </dl>
2999 </p>
3000 <hr />
3001 <h1><a name="new_tests">New tests</a></h1>
3002 <dl>
3003 <dt><strong><a name="item_lib_2fattrs">lib/attrs</a></strong>
3005 <dd>
3006 <p>Compatibility tests for <code>sub : attrs</code> vs the older <code>use attrs</code>.</p>
3007 </dd>
3008 </li>
3009 <dt><strong><a name="item_lib_2fenv">lib/env</a></strong>
3011 <dd>
3012 <p>Tests for new environment scalar capability (e.g., <code>use Env qw($BAR);</code>).</p>
3013 </dd>
3014 </li>
3015 <dt><strong><a name="item_lib_2fenv_2darray">lib/env-array</a></strong>
3017 <dd>
3018 <p>Tests for new environment array capability (e.g., <code>use Env qw(@PATH);</code>).</p>
3019 </dd>
3020 </li>
3021 <dt><strong><a name="item_lib_2fio_const">lib/io_const</a></strong>
3023 <dd>
3024 <p>IO constants (SEEK_*, _IO*).</p>
3025 </dd>
3026 </li>
3027 <dt><strong><a name="item_lib_2fio_dir">lib/io_dir</a></strong>
3029 <dd>
3030 <p>Directory-related IO methods (new, read, close, rewind, tied delete).</p>
3031 </dd>
3032 </li>
3033 <dt><strong><a name="item_lib_2fio_multihomed">lib/io_multihomed</a></strong>
3035 <dd>
3036 <p>INET sockets with multi-homed hosts.</p>
3037 </dd>
3038 </li>
3039 <dt><strong><a name="item_lib_2fio_poll">lib/io_poll</a></strong>
3041 <dd>
3042 <p>IO poll().</p>
3043 </dd>
3044 </li>
3045 <dt><strong><a name="item_lib_2fio_unix">lib/io_unix</a></strong>
3047 <dd>
3048 <p>UNIX sockets.</p>
3049 </dd>
3050 </li>
3051 <dt><strong><a name="item_op_2fattrs">op/attrs</a></strong>
3053 <dd>
3054 <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>
3055 </dd>
3056 </li>
3057 <dt><strong><a name="item_op_2ffiletest">op/filetest</a></strong>
3059 <dd>
3060 <p>File test operators.</p>
3061 </dd>
3062 </li>
3063 <dt><strong><a name="item_op_2flex_assign">op/lex_assign</a></strong>
3065 <dd>
3066 <p>Verify operations that access pad objects (lexicals and temporaries).</p>
3067 </dd>
3068 </li>
3069 <dt><strong><a name="item_op_2fexists_sub">op/exists_sub</a></strong>
3071 <dd>
3072 <p>Verify <code>exists &amp;sub</code> operations.</p>
3073 </dd>
3074 </li>
3075 </dl>
3077 </p>
3078 <hr />
3079 <h1><a name="incompatible_changes">Incompatible Changes</a></h1>
3081 </p>
3082 <h2><a name="perl_source_incompatibilities">Perl Source Incompatibilities</a></h2>
3083 <p>Beware that any new warnings that have been added or old ones
3084 that have been enhanced are <strong>not</strong> considered incompatible changes.</p>
3085 <p>Since all new warnings must be explicitly requested via the <code>-w</code>
3086 switch or the <code>warnings</code> pragma, it is ultimately the programmer's
3087 responsibility to ensure that warnings are enabled judiciously.</p>
3088 <dl>
3089 <dt><strong><a name="item_check_is_a_new_keyword">CHECK is a new keyword</a></strong>
3091 <dd>
3092 <p>All subroutine definitions named CHECK are now special. See
3093 <code>/&quot;Support for CHECK blocks&quot;</code> for more information.</p>
3094 </dd>
3095 </li>
3096 <dt><strong><a name="item_treatment_of_list_slices_of_undef_has_changed">Treatment of list slices of undef has changed</a></strong>
3098 <dd>
3099 <p>There is a potential incompatibility in the behavior of list slices
3100 that are comprised entirely of undefined values.
3101 See <a href="#behavior_of_list_slices_is_more_consistent">Behavior of list slices is more consistent</a>.</p>
3102 </dd>
3103 </li>
3104 <dt><strong><a name="item_format_of__24english_3a_3aperl_version_is_differen">Format of $English::PERL_VERSION is different</a></strong>
3106 <dd>
3107 <p>The English module now sets $PERL_VERSION to $^V (a string value) rather
3108 than <a href="file://C|\msysgit\mingw\html/pod/perlvar.html#item___"><code>$]</code></a> (a numeric value). This is a potential incompatibility.
3109 Send us a report via perlbug if you are affected by this.</p>
3110 </dd>
3111 <dd>
3112 <p>See <a href="#improved_perl_version_numbering_system">Improved Perl version numbering system</a> for the reasons for
3113 this change.</p>
3114 </dd>
3115 </li>
3116 <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>
3118 <dd>
3119 <p>Previously, numeric literals with more than one dot in them were
3120 interpreted as a floating point number concatenated with one or more
3121 numbers. Such ``numbers'' are now parsed as strings composed of the
3122 specified ordinals.</p>
3123 </dd>
3124 <dd>
3125 <p>For example, <code>print 97.98.99</code> used to output <code>97.9899</code> in earlier
3126 versions, but now prints <code>abc</code>.</p>
3127 </dd>
3128 <dd>
3129 <p>See <a href="#support_for_strings_represented_as_a_vector_of_ordinals">Support for strings represented as a vector of ordinals</a>.</p>
3130 </dd>
3131 </li>
3132 <dt><strong><a name="item_possibly_changed_pseudo_2drandom_number_generator">Possibly changed pseudo-random number generator</a></strong>
3134 <dd>
3135 <p>Perl programs that depend on reproducing a specific set of pseudo-random
3136 numbers may now produce different output due to improvements made to the
3137 <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
3138 the old behavior.</p>
3139 </dd>
3140 <dd>
3141 <p>See <a href="#better_pseudorandom_number_generator">Better pseudo-random number generator</a>.</p>
3142 </dd>
3143 </li>
3144 <dt><strong><a name="item_hashing_function_for_hash_keys_has_changed">Hashing function for hash keys has changed</a></strong>
3146 <dd>
3147 <p>Even though Perl hashes are not order preserving, the apparently
3148 random order encountered when iterating on the contents of a hash
3149 is actually determined by the hashing algorithm used. Improvements
3150 in the algorithm may yield a random order that is <strong>different</strong> from
3151 that of previous versions, especially when iterating on hashes.</p>
3152 </dd>
3153 <dd>
3154 <p>See <a href="#better_worstcase_behavior_of_hashes">Better worst-case behavior of hashes</a> for additional
3155 information.</p>
3156 </dd>
3157 </li>
3158 <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>
3160 <dd>
3161 <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
3162 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
3163 throws an exception.</p>
3164 </dd>
3165 </li>
3166 <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>
3168 <dd>
3169 <p>Pipe and socket handles are also now subject to the close-on-exec
3170 behavior determined by the special variable $^F.</p>
3171 </dd>
3172 <dd>
3173 <p>See <a href="#more_consistent_closeonexec_behavior">More consistent close-on-exec behavior</a>.</p>
3174 </dd>
3175 </li>
3176 <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>
3178 <dd>
3179 <p>Perl 5.004 deprecated the interpretation of <code>$$1</code> and
3180 similar within interpolated strings to mean <a href="file://C|\msysgit\mingw\html/pod/perlvar.html#item___"><code>$$ . &quot;1&quot;</code></a>,
3181 but still allowed it.</p>
3182 </dd>
3183 <dd>
3184 <p>In Perl 5.6.0 and later, <code>&quot;$$1&quot;</code> always means <code>&quot;${$1}&quot;</code>.</p>
3185 </dd>
3186 </li>
3187 <dt><strong><a name="item_delete">delete(), each(), <code>values()</code> and <code>\(%h)</code></a></strong>
3189 <dd>
3190 <p>operate on aliases to values, not copies</p>
3191 </dd>
3192 <dd>
3193 <p>delete(), each(), <code>values()</code> and hashes (e.g. <code>\(%h)</code>)
3194 in a list context return the actual
3195 values in the hash, instead of copies (as they used to in earlier
3196 versions). Typical idioms for using these constructs copy the
3197 returned values, but this can make a significant difference when
3198 creating references to the returned values. Keys in the hash are still
3199 returned as copies when iterating on a hash.</p>
3200 </dd>
3201 <dd>
3202 <p>See also <a href="#item_delete">delete(), each(), values() and hash iteration are faster</a>.</p>
3203 </dd>
3204 </li>
3205 <dt><strong><a name="item_vec"><code>vec(EXPR,OFFSET,BITS)</code> enforces powers-of-two BITS</a></strong>
3207 <dd>
3208 <p><a href="#item_vec"><code>vec()</code></a> generates a run-time error if the BITS argument is not
3209 a valid power-of-two integer.</p>
3210 </dd>
3211 </li>
3212 <dt><strong><a name="item_text_of_some_diagnostic_output_has_changed">Text of some diagnostic output has changed</a></strong>
3214 <dd>
3215 <p>Most references to internal Perl operations in diagnostics
3216 have been changed to be more descriptive. This may be an
3217 issue for programs that may incorrectly rely on the exact
3218 text of diagnostics for proper functioning.</p>
3219 </dd>
3220 </li>
3221 <dt><strong><a name="item___"><code>%@</code> has been removed</a></strong>
3223 <dd>
3224 <p>The undocumented special variable <a href="#item___"><code>%@</code></a> that used to accumulate
3225 ``background'' errors (such as those that happen in <code>DESTROY())</code>
3226 has been removed, because it could potentially result in memory
3227 leaks.</p>
3228 </dd>
3229 </li>
3230 <dt><strong><a name="item_not">Parenthesized <code>not()</code> behaves like a list operator</a></strong>
3232 <dd>
3233 <p>The <a href="#item_not"><code>not</code></a> operator now falls under the ``if it looks like a function,
3234 it behaves like a function'' rule.</p>
3235 </dd>
3236 <dd>
3237 <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="file://C|\msysgit\mingw\html/pod/perlfunc.html#item_map"><code>map</code></a>.
3238 The following construct used to be a syntax error before, but it works
3239 as expected now:</p>
3240 </dd>
3241 <dd>
3242 <pre>
3243 grep not($_), @things;</pre>
3244 </dd>
3245 <dd>
3246 <p>On the other hand, using <a href="#item_not"><code>not</code></a> with a literal list slice may not
3247 work. The following previously allowed construct:</p>
3248 </dd>
3249 <dd>
3250 <pre>
3251 print not (1,2,3)[0];</pre>
3252 </dd>
3253 <dd>
3254 <p>needs to be written with additional parentheses now:</p>
3255 </dd>
3256 <dd>
3257 <pre>
3258 print not((1,2,3)[0]);</pre>
3259 </dd>
3260 <dd>
3261 <p>The behavior remains unaffected when <a href="#item_not"><code>not</code></a> is not followed by parentheses.</p>
3262 </dd>
3263 </li>
3264 <dt><strong><a name="item_prototype">Semantics of bareword prototype <code>(*)</code> have changed</a></strong>
3266 <dd>
3267 <p>The semantics of the bareword prototype <code>*</code> have changed. Perl 5.005
3268 always coerced simple scalar arguments to a typeglob, which wasn't useful
3269 in situations where the subroutine must distinguish between a simple
3270 scalar and a typeglob. The new behavior is to not coerce bareword
3271 arguments to a typeglob. The value will always be visible as either
3272 a simple scalar or as a reference to a typeglob.</p>
3273 </dd>
3274 <dd>
3275 <p>See <a href="#item_prototype">More functional bareword prototype (*)</a>.</p>
3276 </dd>
3277 </li>
3278 <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>
3280 <dd>
3281 <p>If your platform is either natively 64-bit or if Perl has been
3282 configured to used 64-bit integers, i.e., $Config{ivsize} is 8,
3283 there may be a potential incompatibility in the behavior of bitwise
3284 numeric operators (&amp; | ^ ~ &lt;&lt; &gt;&gt;). These operators used to strictly
3285 operate on the lower 32 bits of integers in previous versions, but now
3286 operate over the entire native integral width. In particular, note
3287 that unary <code>~</code> will produce different results on platforms that have
3288 different $Config{ivsize}. For portability, be sure to mask off
3289 the excess bits in the result of unary <code>~</code>, e.g., <code>~$x &amp; 0xffffffff</code>.</p>
3290 </dd>
3291 <dd>
3292 <p>See <a href="#bit_operators_support_full_native_integer_width">Bit operators support full native integer width</a>.</p>
3293 </dd>
3294 </li>
3295 <dt><strong><a name="item_more_builtins_taint_their_results">More builtins taint their results</a></strong>
3297 <dd>
3298 <p>As described in <a href="#improved_security_features">Improved security features</a>, there may be more
3299 sources of taint in a Perl program.</p>
3300 </dd>
3301 <dd>
3302 <p>To avoid these new tainting behaviors, you can build Perl with the
3303 Configure option <code>-Accflags=-DINCOMPLETE_TAINTS</code>. Beware that the
3304 ensuing perl binary may be insecure.</p>
3305 </dd>
3306 </li>
3307 </dl>
3309 </p>
3310 <h2><a name="c_source_incompatibilities">C Source Incompatibilities</a></h2>
3311 <dl>
3312 <dt><strong><a name="item_perl_pollute"><code>PERL_POLLUTE</code></a></strong>
3314 <dd>
3315 <p>Release 5.005 grandfathered old global symbol names by providing preprocessor
3316 macros for extension source compatibility. As of release 5.6.0, these
3317 preprocessor definitions are not available by default. You need to explicitly
3318 compile perl with <code>-DPERL_POLLUTE</code> to get these definitions. For
3319 extensions still using the old symbols, this option can be
3320 specified via MakeMaker:</p>
3321 </dd>
3322 <dd>
3323 <pre>
3324 perl Makefile.PL POLLUTE=1</pre>
3325 </dd>
3326 </li>
3327 <dt><strong><a name="item_perl_implicit_context"><code>PERL_IMPLICIT_CONTEXT</code></a></strong>
3329 <dd>
3330 <p>This new build option provides a set of macros for all API functions
3331 such that an implicit interpreter/thread context argument is passed to
3332 every API function. As a result of this, something like <code>sv_setsv(foo,bar)</code>
3333 amounts to a macro invocation that actually translates to something like
3334 <code>Perl_sv_setsv(my_perl,foo,bar)</code>. While this is generally expected
3335 to not have any significant source compatibility issues, the difference
3336 between a macro and a real function call will need to be considered.</p>
3337 </dd>
3338 <dd>
3339 <p>This means that there <strong>is</strong> a source compatibility issue as a result of
3340 this if your extensions attempt to use pointers to any of the Perl API
3341 functions.</p>
3342 </dd>
3343 <dd>
3344 <p>Note that the above issue is not relevant to the default build of
3345 Perl, whose interfaces continue to match those of prior versions
3346 (but subject to the other options described here).</p>
3347 </dd>
3348 <dd>
3349 <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
3350 ramifications of building Perl with this option.</p>
3351 </dd>
3352 <dd>
3353 <pre>
3354 NOTE: PERL_IMPLICIT_CONTEXT is automatically enabled whenever Perl is built
3355 with one of -Dusethreads, -Dusemultiplicity, or both. It is not
3356 intended to be enabled by users at this time.</pre>
3357 </dd>
3358 </li>
3359 <dt><strong><a name="item_perl_pollute_malloc"><code>PERL_POLLUTE_MALLOC</code></a></strong>
3361 <dd>
3362 <p>Enabling Perl's malloc in release 5.005 and earlier caused the namespace of
3363 the system's malloc family of functions to be usurped by the Perl versions,
3364 since by default they used the same names. Besides causing problems on
3365 platforms that do not allow these functions to be cleanly replaced, this
3366 also meant that the system versions could not be called in programs that
3367 used Perl's malloc. Previous versions of Perl have allowed this behaviour
3368 to be suppressed with the HIDEMYMALLOC and EMBEDMYMALLOC preprocessor
3369 definitions.</p>
3370 </dd>
3371 <dd>
3372 <p>As of release 5.6.0, Perl's malloc family of functions have default names
3373 distinct from the system versions. You need to explicitly compile perl with
3374 <code>-DPERL_POLLUTE_MALLOC</code> to get the older behaviour. HIDEMYMALLOC
3375 and EMBEDMYMALLOC have no effect, since the behaviour they enabled is now
3376 the default.</p>
3377 </dd>
3378 <dd>
3379 <p>Note that these functions do <strong>not</strong> constitute Perl's memory allocation API.
3380 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>
3381 </dd>
3382 </li>
3383 </dl>
3385 </p>
3386 <h2><a name="compatible_c_source_api_changes">Compatible C Source API Changes</a></h2>
3387 <dl>
3388 <dt><strong><a name="item_patchlevel_is_now_perl_version"><code>PATCHLEVEL</code> is now <code>PERL_VERSION</code></a></strong>
3390 <dd>
3391 <p>The cpp macros <code>PERL_REVISION</code>, <code>PERL_VERSION</code>, and <code>PERL_SUBVERSION</code>
3392 are now available by default from perl.h, and reflect the base revision,
3393 patchlevel, and subversion respectively. <code>PERL_REVISION</code> had no
3394 prior equivalent, while <code>PERL_VERSION</code> and <code>PERL_SUBVERSION</code> were
3395 previously available as <code>PATCHLEVEL</code> and <code>SUBVERSION</code>.</p>
3396 </dd>
3397 <dd>
3398 <p>The new names cause less pollution of the <strong>cpp</strong> namespace and reflect what
3399 the numbers have come to stand for in common practice. For compatibility,
3400 the old names are still supported when <em>patchlevel.h</em> is explicitly
3401 included (as required before), so there is no source incompatibility
3402 from the change.</p>
3403 </dd>
3404 </li>
3405 </dl>
3407 </p>
3408 <h2><a name="binary_incompatibilities">Binary Incompatibilities</a></h2>
3409 <p>In general, the default build of this release is expected to be binary
3410 compatible for extensions built with the 5.005 release or its maintenance
3411 versions. However, specific platforms may have broken binary compatibility
3412 due to changes in the defaults used in hints files. Therefore, please be
3413 sure to always check the platform-specific README files for any notes to
3414 the contrary.</p>
3415 <p>The usethreads or usemultiplicity builds are <strong>not</strong> binary compatible
3416 with the corresponding builds in 5.005.</p>
3417 <p>On platforms that require an explicit list of exports (AIX, OS/2 and Windows,
3418 among others), purely internal symbols such as parser functions and the
3419 run time opcodes are not exported by default. Perl 5.005 used to export
3420 all functions irrespective of whether they were considered part of the
3421 public API or not.</p>
3422 <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>
3424 </p>
3425 <hr />
3426 <h1><a name="known_problems">Known Problems</a></h1>
3428 </p>
3429 <h2><a name="thread_test_failures">Thread test failures</a></h2>
3430 <p>The subtests 19 and 20 of lib/thr5005.t test are known to fail due to
3431 fundamental problems in the 5.005 threading implementation. These are
3432 not new failures--Perl 5.005_0x has the same bugs, but didn't have these
3433 tests.</p>
3435 </p>
3436 <h2><a name="ebcdic_platforms_not_supported">EBCDIC platforms not supported</a></h2>
3437 <p>In earlier releases of Perl, EBCDIC environments like OS390 (also
3438 known as Open Edition MVS) and VM-ESA were supported. Due to changes
3439 required by the UTF-8 (Unicode) support, the EBCDIC platforms are not
3440 supported in Perl 5.6.0.</p>
3442 </p>
3443 <h2><a name="in_64bit_hpux_the_lib_io_multihomed_test_may_hang">In 64-bit HP-UX the lib/io_multihomed test may hang</a></h2>
3444 <p>The lib/io_multihomed test may hang in HP-UX if Perl has been
3445 configured to be 64-bit. Because other 64-bit platforms do not
3446 hang in this test, HP-UX is suspect. All other tests pass
3447 in 64-bit HP-UX. The test attempts to create and connect to
3448 ``multihomed'' sockets (sockets which have multiple IP addresses).</p>
3450 </p>
3451 <h2><a name="nextstep_3_3_posix_test_failure">NEXTSTEP 3.3 POSIX test failure</a></h2>
3452 <p>In NEXTSTEP 3.3p2 the implementation of the <code>strftime(3)</code> in the
3453 operating system libraries is buggy: the %j format numbers the days of
3454 a month starting from zero, which, while being logical to programmers,
3455 will cause the subtests 19 to 27 of the lib/posix test may fail.</p>
3457 </p>
3458 <h2><a name="tru64__aka_digital_unix__aka_dec_osf_1__lib_sdbm_test_failure_with_gcc">Tru64 (aka Digital UNIX, aka DEC OSF/1) lib/sdbm test failure with gcc</a></h2>
3459 <p>If compiled with gcc 2.95 the lib/sdbm test will fail (dump core).
3460 The cure is to use the vendor cc, it comes with the operating system
3461 and produces good code.</p>
3463 </p>
3464 <h2><a name="unicos_mk_cc_failures_during_configure_run">UNICOS/mk CC failures during Configure run</a></h2>
3465 <p>In UNICOS/mk the following errors may appear during the Configure run:</p>
3466 <pre>
3467 Guessing which symbols your C compiler and preprocessor define...
3468 CC-20 cc: ERROR File = try.c, Line = 3
3470 bad switch yylook 79bad switch yylook 79bad switch yylook 79bad switch yylook 79#ifdef A29K
3472 4 errors detected in the compilation of &quot;try.c&quot;.</pre>
3473 <p>The culprit is the broken awk of UNICOS/mk. The effect is fortunately
3474 rather mild: Perl itself is not adversely affected by the error, only
3475 the h2ph utility coming with Perl, and that is rather rarely needed
3476 these days.</p>
3478 </p>
3479 <h2><a name="arrow_operator_and_arrays">Arrow operator and arrays</a></h2>
3480 <p>When the left argument to the arrow operator <code>-&gt;</code> is an array, or
3481 the <code>scalar</code> operator operating on an array, the result of the
3482 operation must be considered erroneous. For example:</p>
3483 <pre>
3484 @x-&gt;[2]
3485 scalar(@x)-&gt;[2]</pre>
3486 <p>These expressions will get run-time errors in some future release of
3487 Perl.</p>
3489 </p>
3490 <h2><a name="experimental_features">Experimental features</a></h2>
3491 <p>As discussed above, many features are still experimental. Interfaces and
3492 implementation of these features are subject to change, and in extreme cases,
3493 even subject to removal in some future release of Perl. These features
3494 include the following:</p>
3495 <dl>
3496 <dt><strong><a name="item_threads">Threads</a></strong>
3498 <dt><strong><a name="item_unicode">Unicode</a></strong>
3500 <li><strong><a name="item__2dbit_support">-bit support</a></strong>
3502 <dt><strong><a name="item_lvalue_subroutines">Lvalue subroutines</a></strong>
3504 <dt><strong><a name="item_weak_references">Weak references</a></strong>
3506 <dt><strong><a name="item_the_pseudo_2dhash_data_type">The pseudo-hash data type</a></strong>
3508 <dt><strong><a name="item_the_compiler_suite">The Compiler suite</a></strong>
3510 <dt><strong><a name="item_internal_implementation_of_file_globbing">Internal implementation of file globbing</a></strong>
3512 <dt><strong><a name="item_the_db_module">The DB module</a></strong>
3514 <dt><strong><a name="item_the_regular_expression_code_constructs_3a">The regular expression code constructs:</a></strong>
3516 <dd>
3517 <p><code>(?{ code })</code> and <code>(??{ code })</code></p>
3518 </dd>
3519 </li>
3520 </dl>
3522 </p>
3523 <hr />
3524 <h1><a name="obsolete_diagnostics">Obsolete Diagnostics</a></h1>
3525 <dl>
3526 <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>
3528 <dd>
3529 <p>(W) Within regular expression character classes ([]) the syntax beginning
3530 with ``[:'' and ending with ``:]'' is reserved for future extensions.
3531 If you need to represent those character sequences inside a regular
3532 expression character class, just quote the square brackets with the
3533 backslash: ``\[:'' and ``:\]''.</p>
3534 </dd>
3535 </li>
3536 <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>
3538 <dd>
3539 <p>(W) A warning peculiar to VMS. A logical name was encountered when preparing
3540 to iterate over %ENV which violates the syntactic rules governing logical
3541 names. Because it cannot be translated normally, it is skipped, and will not
3542 appear in %ENV. This may be a benign occurrence, as some software packages
3543 might directly modify logical name tables and introduce nonstandard names,
3544 or it may indicate that a logical name table has been corrupted.</p>
3545 </dd>
3546 </li>
3547 <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>
3549 <dd>
3550 <p>The description of this error used to say:</p>
3551 </dd>
3552 <dd>
3553 <pre>
3554 (Someday it will simply assume that an unbackslashed @
3555 interpolates an array.)</pre>
3556 </dd>
3557 <dd>
3558 <p>That day has come, and this fatal error has been removed. It has been
3559 replaced by a non-fatal warning instead.
3560 See <a href="#arrays_now_always_interpolate_into_doublequoted_strings">Arrays now always interpolate into double-quoted strings</a> for
3561 details.</p>
3562 </dd>
3563 </li>
3564 <dt><strong><a name="item_probable_precedence_problem_on__25s">Probable precedence problem on %s</a></strong>
3566 <dd>
3567 <p>(W) The compiler found a bareword where it expected a conditional,
3568 which often indicates that an || or &amp;&amp; was parsed as part of the
3569 last argument of the previous construct, for example:</p>
3570 </dd>
3571 <dd>
3572 <pre>
3573 open FOO || die;</pre>
3574 </dd>
3575 </li>
3576 <dt><strong><a name="item_regexp_too_big">regexp too big</a></strong>
3578 <dd>
3579 <p>(F) The current implementation of regular expressions uses shorts as
3580 address offsets within a string. Unfortunately this means that if
3581 the regular expression compiles to longer than 32767, it'll blow up.
3582 Usually when you want a regular expression this big, there is a better
3583 way to do it with multiple statements. See <a href="file://C|\msysgit\mingw\html/pod/perlre.html">the perlre manpage</a>.</p>
3584 </dd>
3585 </li>
3586 <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>
3588 <dd>
3589 <p>(D) Perl versions before 5.004 misinterpreted any type marker followed
3590 by ``$'' and a digit. For example, ``$$0'' was incorrectly taken to mean
3591 ``${$}0'' instead of ``${$0}''. This bug is (mostly) fixed in Perl 5.004.</p>
3592 </dd>
3593 <dd>
3594 <p>However, the developers of Perl 5.004 could not fix this bug completely,
3595 because at least two widely-used modules depend on the old meaning of
3596 ``$$0'' in a string. So Perl 5.004 still interprets ``$$&lt;digit&gt;'' in the
3597 old (broken) way inside strings; but it generates this message as a
3598 warning. And in Perl 5.005, this special treatment will cease.</p>
3599 </dd>
3600 </li>
3601 </dl>
3603 </p>
3604 <hr />
3605 <h1><a name="reporting_bugs">Reporting Bugs</a></h1>
3606 <p>If you find what you think is a bug, you might check the
3607 articles recently posted to the comp.lang.perl.misc newsgroup.
3608 There may also be information at <a href="http://www.perl.com/perl/">http://www.perl.com/perl/</a> , the Perl
3609 Home Page.</p>
3610 <p>If you believe you have an unreported bug, please run the <strong>perlbug</strong>
3611 program included with your release. Be sure to trim your bug down
3612 to a tiny but sufficient test case. Your bug report, along with the
3613 output of <code>perl -V</code>, will be sent off to <a href="mailto:perlbug@perl.org">perlbug@perl.org</a> to be
3614 analysed by the Perl porting team.</p>
3616 </p>
3617 <hr />
3618 <h1><a name="see_also">SEE ALSO</a></h1>
3619 <p>The <em>Changes</em> file for exhaustive details on what changed.</p>
3620 <p>The <em>INSTALL</em> file for how to build Perl.</p>
3621 <p>The <em>README</em> file for general stuff.</p>
3622 <p>The <em>Artistic</em> and <em>Copying</em> files for copyright information.</p>
3624 </p>
3625 <hr />
3626 <h1><a name="history">HISTORY</a></h1>
3627 <p>Written by Gurusamy Sarathy &lt;<em><a href="mailto:gsar@activestate.com">gsar@activestate.com</a></em>&gt;, with many
3628 contributions from The Perl Porters.</p>
3629 <p>Send omissions or corrections to &lt;<em><a href="mailto:perlbug@perl.org">perlbug@perl.org</a></em>&gt;.</p>
3630 <table border="0" width="100%" cellspacing="0" cellpadding="3">
3631 <tr><td class="block" style="background-color: #cccccc" valign="middle">
3632 <big><strong><span class="block">&nbsp;perl56delta - what's new for perl v5.6.0</span></strong></big>
3633 </td></tr>
3634 </table>
3636 </body>
3638 </html>