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">
5 <title>perl5005delta - what's new for perl5.005
</title>
6 <meta http-equiv=
"content-type" content=
"text/html; charset=utf-8" />
7 <link rev=
"made" href=
"mailto:" />
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"> perl5005delta - what's new for perl5.005
</span></strong></big>
17 <p><a name=
"__index__"></a></p>
22 <li><a href=
"#name">NAME
</a></li>
23 <li><a href=
"#description">DESCRIPTION
</a></li>
24 <li><a href=
"#about_the_new_versioning_system">About the new versioning system
</a></li>
25 <li><a href=
"#incompatible_changes">Incompatible Changes
</a></li>
28 <li><a href=
"#warning__this_version_is_not_binary_compatible_with_perl_5_004_">WARNING: This version is not binary compatible with Perl
5.004.
</a></li>
29 <li><a href=
"#default_installation_structure_has_changed">Default installation structure has changed
</a></li>
30 <li><a href=
"#perl_source_compatibility">Perl Source Compatibility
</a></li>
31 <li><a href=
"#c_source_compatibility">C Source Compatibility
</a></li>
32 <li><a href=
"#binary_compatibility">Binary Compatibility
</a></li>
33 <li><a href=
"#security_fixes_may_affect_compatibility">Security fixes may affect compatibility
</a></li>
34 <li><a href=
"#relaxed_new_mandatory_warnings_introduced_in_5_004">Relaxed new mandatory warnings introduced in
5.004</a></li>
35 <li><a href=
"#licensing">Licensing
</a></li>
38 <li><a href=
"#core_changes">Core Changes
</a></li>
41 <li><a href=
"#threads">Threads
</a></li>
42 <li><a href=
"#compiler">Compiler
</a></li>
43 <li><a href=
"#regular_expressions">Regular Expressions
</a></li>
44 <li><a href=
"#improved_malloc__">Improved
<code>malloc()
</code></a></li>
45 <li><a href=
"#quicksort_is_internally_implemented">Quicksort is internally implemented
</a></li>
46 <li><a href=
"#reliable_signals">Reliable signals
</a></li>
47 <li><a href=
"#reliable_stack_pointers">Reliable stack pointers
</a></li>
48 <li><a href=
"#more_generous_treatment_of_carriage_returns">More generous treatment of carriage returns
</a></li>
49 <li><a href=
"#memory_leaks">Memory leaks
</a></li>
50 <li><a href=
"#better_support_for_multiple_interpreters">Better support for multiple interpreters
</a></li>
51 <li><a href=
"#behavior_of_local___on_array_and_hash_elements_is_now_welldefined">Behavior of
<code>local()
</code> on array and hash elements is now well-defined
</a></li>
52 <li><a href=
"#___is_transparently_tied_to_the_errno_module"><a href=
"file://C|\msysgit\mingw\html/pod/perlvar.html#item___"><code>%!
</code></a> is transparently tied to the
<a href=
"file://C|\msysgit\mingw\html/lib/Errno.html">the Errno manpage
</a> module
</a></li>
53 <li><a href=
"#pseudohashes_are_supported">Pseudo-hashes are supported
</a></li>
54 <li><a href=
"#expr_foreach_expr_is_supported"><code>EXPR foreach EXPR
</code> is supported
</a></li>
55 <li><a href=
"#keywords_can_be_globally_overridden">Keywords can be globally overridden
</a></li>
56 <li><a href=
"#__e_is_meaningful_on_win32"><a href=
"file://C|\msysgit\mingw\html/pod/perlvar.html#item___e"><code>$^E
</code></a> is meaningful on Win32
</a></li>
57 <li><a href=
"#foreach__1__1000000__optimized"><code>foreach (
1.
.1000000)
</code> optimized
</a></li>
58 <li><a href=
"#foo___can_be_used_as_implicitly_quoted_package_name"><code>Foo::
</code> can be used as implicitly quoted package name
</a></li>
59 <li><a href=
"#exists__foo___bar____tests_existence_of_a_package"><code>exists $Foo::{Bar::}
</code> tests existence of a package
</a></li>
60 <li><a href=
"#better_locale_support">Better locale support
</a></li>
61 <li><a href=
"#experimental_support_for_64bit_platforms">Experimental support for
64-bit platforms
</a></li>
62 <li><a href=
"#prototype___returns_useful_results_on_builtins"><code>prototype()
</code> returns useful results on builtins
</a></li>
63 <li><a href=
"#extended_support_for_exception_handling">Extended support for exception handling
</a></li>
64 <li><a href=
"#reblessing_in_destroy___supported_for_chaining_destroy___methods">Re-blessing in
<code>DESTROY()
</code> supported for chaining
<code>DESTROY()
</code> methods
</a></li>
65 <li><a href=
"#all_printf_format_conversions_are_handled_internally">All
<a href=
"file://C|\msysgit\mingw\html/pod/perlfunc.html#item_printf"><code>printf
</code></a> format conversions are handled internally
</a></li>
66 <li><a href=
"#new_init_keyword">New
<code>INIT
</code> keyword
</a></li>
67 <li><a href=
"#new_lock_keyword">New
<code>lock
</code> keyword
</a></li>
68 <li><a href=
"#new_qr___operator">New
<a href=
"file://C|\msysgit\mingw\html/pod/perlfunc.html#item_qr_"><code>qr//
</code></a> operator
</a></li>
69 <li><a href=
"#our_is_now_a_reserved_word"><a href=
"file://C|\msysgit\mingw\html/pod/perlfunc.html#item_our"><code>our
</code></a> is now a reserved word
</a></li>
70 <li><a href=
"#tied_arrays_are_now_fully_supported">Tied arrays are now fully supported
</a></li>
71 <li><a href=
"#tied_handles_support_is_better">Tied handles support is better
</a></li>
72 <li><a href=
"#4th_argument_to_substr">4th argument to substr
</a></li>
73 <li><a href=
"#negative_length_argument_to_splice">Negative LENGTH argument to splice
</a></li>
74 <li><a href=
"#magic_lvalues_are_now_more_magical">Magic lvalues are now more magical
</a></li>
75 <li><a href=
"#___now_reads_in_records"><> now reads in records
</a></li>
78 <li><a href=
"#supported_platforms">Supported Platforms
</a></li>
81 <li><a href=
"#new_platforms">New Platforms
</a></li>
82 <li><a href=
"#changes_in_existing_support">Changes in existing support
</a></li>
85 <li><a href=
"#modules_and_pragmata">Modules and Pragmata
</a></li>
88 <li><a href=
"#new_modules">New Modules
</a></li>
89 <li><a href=
"#changes_in_existing_modules">Changes in existing modules
</a></li>
92 <li><a href=
"#utility_changes">Utility Changes
</a></li>
93 <li><a href=
"#documentation_changes">Documentation Changes
</a></li>
94 <li><a href=
"#new_diagnostics">New Diagnostics
</a></li>
95 <li><a href=
"#obsolete_diagnostics">Obsolete Diagnostics
</a></li>
96 <li><a href=
"#configuration_changes">Configuration Changes
</a></li>
97 <li><a href=
"#bugs">BUGS
</a></li>
98 <li><a href=
"#see_also">SEE ALSO
</a></li>
99 <li><a href=
"#history">HISTORY
</a></li>
106 <h1><a name=
"name">NAME
</a></h1>
107 <p>perl5005delta - what's new for perl5.005
</p>
111 <h1><a name=
"description">DESCRIPTION
</a></h1>
112 <p>This document describes differences between the
5.004 release and this one.
</p>
116 <h1><a name=
"about_the_new_versioning_system">About the new versioning system
</a></h1>
117 <p>Perl is now developed on two tracks: a maintenance track that makes
118 small, safe updates to released production versions with emphasis on
119 compatibility; and a development track that pursues more aggressive
120 evolution. Maintenance releases (which should be considered production
121 quality) have subversion numbers that run from
<code>1</code> to
<code>49</code>, and
122 development releases (which should be considered ``alpha'' quality) run
123 from
<code>50</code> to
<code>99</code>.
</p>
124 <p>Perl
5.005 is the combined product of the new dual-track development
129 <h1><a name=
"incompatible_changes">Incompatible Changes
</a></h1>
132 <h2><a name=
"warning__this_version_is_not_binary_compatible_with_perl_5_004_">WARNING: This version is not binary compatible with Perl
5.004.
</a></h2>
133 <p>Starting with Perl
5.004_50 there were many deep and far-reaching changes
134 to the language internals. If you have dynamically loaded extensions
135 that you built under perl
5.003 or
5.004, you can continue to use them
136 with
5.004, but you will need to rebuild and reinstall those extensions
137 to use them
5.005. See
<em>INSTALL
</em> for detailed instructions on how to
141 <h2><a name=
"default_installation_structure_has_changed">Default installation structure has changed
</a></h2>
142 <p>The new Configure defaults are designed to allow a smooth upgrade from
143 5.004 to
5.005, but you should read
<em>INSTALL
</em> for a detailed
144 discussion of the changes in order to adapt them to your system.
</p>
147 <h2><a name=
"perl_source_compatibility">Perl Source Compatibility
</a></h2>
148 <p>When none of the experimental features are enabled, there should be
149 very few user-visible Perl source compatibility issues.
</p>
150 <p>If threads are enabled, then some caveats apply.
<a href=
"file://C|\msysgit\mingw\html/pod/perlvar.html#item___"><code>@_
</code></a> and
<a href=
"file://C|\msysgit\mingw\html/pod/perlvar.html#item___"><code>$_
</code></a> become
151 lexical variables. The effect of this should be largely transparent to
152 the user, but there are some boundary conditions under which user will
153 need to be aware of the issues. For example,
<code>local(@_)
</code> results in
154 a ``Can't localize lexical variable @_ ...'' message. This may be enabled
155 in a future version.
</p>
156 <p>Some new keywords have been introduced. These are generally expected to
157 have very little impact on compatibility. See
<a href=
"#new_c_init__keyword">New
<code>INIT
</code> keyword
</a>,
158 <a href=
"#new_c_lock__keyword">New
<code>lock
</code> keyword
</a>, and
<a href=
"#new_c_qre_sol_e_sol___operator">New
<a href=
"file://C|\msysgit\mingw\html/pod/perlfunc.html#item_qr_"><code>qr//
</code></a> operator
</a>.
</p>
159 <p>Certain barewords are now reserved. Use of these will provoke a warning
160 if you have asked for them with the
<code>-w
</code> switch.
161 See
<a href=
"#c_our__is_now_a_reserved_word"><a href=
"file://C|\msysgit\mingw\html/pod/perlfunc.html#item_our"><code>our
</code></a> is now a reserved word
</a>.
</p>
164 <h2><a name=
"c_source_compatibility">C Source Compatibility
</a></h2>
165 <p>There have been a large number of changes in the internals to support
166 the new features in this release.
</p>
169 <p>Core sources now require ANSI C compiler
</p>
170 <p>An ANSI C compiler is now
<strong>required
</strong> to build perl. See
<em>INSTALL
</em>.
</p>
173 <p>All Perl global variables must now be referenced with an explicit prefix
</p>
174 <p>All Perl global variables that are visible for use by extensions now
175 have a
<code>PL_
</code> prefix. New extensions should
<code>not
</code> refer to perl globals
176 by their unqualified names. To preserve sanity, we provide limited
177 backward compatibility for globals that are being widely used like
178 <code>sv_undef
</code> and
<code>na
</code> (which should now be written as
<code>PL_sv_undef
</code>,
179 <code>PL_na
</code> etc.)
</p>
180 <p>If you find that your XS extension does not compile anymore because a
181 perl global is not visible, try adding a
<code>PL_
</code> prefix to the global
183 <p>It is strongly recommended that all functions in the Perl API that don't
184 begin with
<code>perl
</code> be referenced with a
<code>Perl_
</code> prefix. The bare function
185 names without the
<code>Perl_
</code> prefix are supported with macros, but this
186 support may cease in a future release.
</p>
187 <p>See
<a href=
"file://C|\msysgit\mingw\html/pod/perlapi.html">the perlapi manpage
</a>.
</p>
190 <p>Enabling threads has source compatibility issues
</p>
191 <p>Perl built with threading enabled requires extensions to use the new
192 <code>dTHR
</code> macro to initialize the handle to access per-thread data.
193 If you see a compiler error that talks about the variable
<code>thr
</code> not
194 being declared (when building a module that has XS code), you need
195 to add
<code>dTHR;
</code> at the beginning of the block that elicited the error.
</p>
196 <p>The API function
<code>perl_get_sv(
"@
",FALSE)
</code> should be used instead of
197 directly accessing perl globals as
<code>GvSV(errgv)
</code>. The API call is
198 backward compatible with existing perls and provides source compatibility
199 with threading is enabled.
</p>
200 <p>See
<a href=
"#c_source_compatibility">C Source Compatibility
</a> for more information.
</p>
205 <h2><a name=
"binary_compatibility">Binary Compatibility
</a></h2>
206 <p>This version is NOT binary compatible with older versions. All extensions
207 will need to be recompiled. Further binaries built with threads enabled
208 are incompatible with binaries built without. This should largely be
209 transparent to the user, as all binary incompatible configurations have
210 their own unique architecture name, and extension binaries get installed at
211 unique locations. This allows coexistence of several configurations in
212 the same directory hierarchy. See
<em>INSTALL
</em>.
</p>
215 <h2><a name=
"security_fixes_may_affect_compatibility">Security fixes may affect compatibility
</a></h2>
216 <p>A few taint leaks and taint omissions have been corrected. This may lead
217 to ``failure'' of scripts that used to work with older versions. Compiling
218 with -DINCOMPLETE_TAINTS provides a perl with minimal amounts of changes
219 to the tainting behavior. But note that the resulting perl will have
220 known insecurities.
</p>
221 <p>Oneliners with the
<code>-e
</code> switch do not create temporary files anymore.
</p>
224 <h2><a name=
"relaxed_new_mandatory_warnings_introduced_in_5_004">Relaxed new mandatory warnings introduced in
5.004</a></h2>
225 <p>Many new warnings that were introduced in
5.004 have been made
226 optional. Some of these warnings are still present, but perl's new
227 features make them less often a problem. See
<a href=
"#new_diagnostics">New Diagnostics
</a>.
</p>
230 <h2><a name=
"licensing">Licensing
</a></h2>
231 <p>Perl has a new Social Contract for contributors. See
<em>Porting/Contract
</em>.
</p>
232 <p>The license included in much of the Perl documentation has changed.
233 Most of the Perl documentation was previously under the implicit GNU
234 General Public License or the Artistic License (at the user's choice).
235 Now much of the documentation unambiguously states the terms under which
236 it may be distributed. Those terms are in general much less restrictive
237 than the GNU GPL. See
<a href=
"file://C|\msysgit\mingw\html/pod/perl.html">the perl manpage
</a> and the individual perl manpages listed
242 <h1><a name=
"core_changes">Core Changes
</a></h1>
245 <h2><a name=
"threads">Threads
</a></h2>
246 <p>WARNING: Threading is considered an
<strong>experimental
</strong> feature. Details of the
247 implementation may change without notice. There are known limitations
248 and some bugs. These are expected to be fixed in future versions.
</p>
249 <p>See
<em>README.threads
</em>.
</p>
252 <h2><a name=
"compiler">Compiler
</a></h2>
253 <p>WARNING: The Compiler and related tools are considered
<strong>experimental
</strong>.
254 Features may change without notice, and there are known limitations
255 and bugs. Since the compiler is fully external to perl, the default
256 configuration will build and install it.
</p>
257 <p>The Compiler produces three different types of transformations of a
258 perl program. The C backend generates C code that captures perl's state
259 just before execution begins. It eliminates the compile-time overheads
260 of the regular perl interpreter, but the run-time performance remains
261 comparatively the same. The CC backend generates optimized C code
262 equivalent to the code path at run-time. The CC backend has greater
263 potential for big optimizations, but only a few optimizations are
264 implemented currently. The Bytecode backend generates a platform
265 independent bytecode representation of the interpreter's state
266 just before execution. Thus, the Bytecode back end also eliminates
267 much of the compilation overhead of the interpreter.
</p>
268 <p>The compiler comes with several valuable utilities.
</p>
269 <p><code>B::Lint
</code> is an experimental module to detect and warn about suspicious
270 code, especially the cases that the
<code>-w
</code> switch does not detect.
</p>
271 <p><code>B::Deparse
</code> can be used to demystify perl code, and understand
272 how perl optimizes certain constructs.
</p>
273 <p><code>B::Xref
</code> generates cross reference reports of all definition and use
274 of variables, subroutines and formats in a program.
</p>
275 <p><code>B::Showlex
</code> show the lexical variables used by a subroutine or file
277 <p><code>perlcc
</code> is a simple frontend for compiling perl.
</p>
278 <p>See
<code>ext/B/README
</code>,
<a href=
"file://C|\msysgit\mingw\html/lib/B.html">the B manpage
</a>, and the respective compiler modules.
</p>
281 <h2><a name=
"regular_expressions">Regular Expressions
</a></h2>
282 <p>Perl's regular expression engine has been seriously overhauled, and
283 many new constructs are supported. Several bugs have been fixed.
</p>
284 <p>Here is an itemized summary:
</p>
286 <dt><strong><a name=
"item_many_new_and_improved_optimizations">Many new and improved optimizations
</a></strong>
289 <p>Changes in the RE engine:
</p>
293 Unneeded nodes removed;
294 Substrings merged together;
295 New types of nodes to process (SUBEXPR)* and similar expressions
296 quickly, used if the SUBEXPR has no side effects and matches
297 strings of the same length;
298 Better optimizations by lookup for constant substrings;
299 Better search for constants substrings anchored by $ ;
</pre>
302 <p>Changes in Perl code using RE engine:
</p>
306 More optimizations to s/longer/short/;
307 study() was not working;
308 /blah/ may be optimized to an analogue of index() if $
& $` $' not seen;
309 Unneeded copying of matched-against string removed;
310 Only matched part of the string is copying if $` $' were not seen;
</pre>
313 <dt><strong><a name=
"item_many_bug_fixes">Many bug fixes
</a></strong>
316 <p>Note that only the major bug fixes are listed here. See
<em>Changes
</em> for others.
</p>
320 Backtracking might not restore start of $
3.
321 No feedback if max count for * or + on
"complex
" subexpression
322 was reached, similarly (but at compile time) for {
3,
34567}
323 Primitive restrictions on max count introduced to decrease a
324 possibility of a segfault;
325 (ZERO-LENGTH)* could segfault;
326 (ZERO-LENGTH)* was prohibited;
327 Long REs were not allowed;
328 /RE/g could skip matches at the same position after a
329 zero-length match;
</pre>
332 <dt><strong><a name=
"item_new_regular_expression_constructs">New regular expression constructs
</a></strong>
335 <p>The following new syntax elements are supported:
</p>
344 (?(COND)YES_RE|NO_RE)
349 <dt><strong><a name=
"item_new_operator_for_precompiled_regular_expressions">New operator for precompiled regular expressions
</a></strong>
352 <p>See
<a href=
"#new_c_qre_sol_e_sol___operator">New
<a href=
"file://C|\msysgit\mingw\html/pod/perlfunc.html#item_qr_"><code>qr//
</code></a> operator
</a>.
</p>
355 <dt><strong><a name=
"item_other_improvements">Other improvements
</a></strong>
359 Better debugging output (possibly with colors),
360 even from non-debugging Perl;
361 RE engine code now looks like C, not like assembler;
362 Behaviour of RE modifiable by `use re' directive;
363 Improved documentation;
364 Test suite significantly extended;
365 Syntax [:^upper:] etc., reserved inside character classes;
</pre>
367 <dt><strong><a name=
"item_incompatible_changes">Incompatible changes
</a></strong>
371 (?i) localized inside enclosing group;
372 $( is not interpolated into RE any more;
373 /RE/g may match at the same position (with non-zero length)
374 after a zero-length match (bug fix).
</pre>
377 <p>See
<a href=
"file://C|\msysgit\mingw\html/pod/perlre.html">the perlre manpage
</a> and
<a href=
"file://C|\msysgit\mingw\html/pod/perlop.html">the perlop manpage
</a>.
</p>
380 <h2><a name=
"improved_malloc__">Improved
<code>malloc()
</code></a></h2>
381 <p>See banner at the beginning of
<code>malloc.c
</code> for details.
</p>
384 <h2><a name=
"quicksort_is_internally_implemented">Quicksort is internally implemented
</a></h2>
385 <p>Perl now contains its own highly optimized
<code>qsort()
</code> routine. The new
<code>qsort()
</code>
386 is resistant to inconsistent comparison functions, so Perl's
<a href=
"file://C|\msysgit\mingw\html/pod/perlfunc.html#item_sort"><code>sort()
</code></a> will
387 not provoke coredumps any more when given poorly written sort subroutines.
388 (Some C library
<code>qsort()
</code>s that were being used before used to have this
389 problem.) In our testing, the new
<code>qsort()
</code> required the minimal number
390 of pair-wise compares on average, among all known
<code>qsort()
</code> implementations.
</p>
391 <p>See
<code>perlfunc/sort
</code>.
</p>
394 <h2><a name=
"reliable_signals">Reliable signals
</a></h2>
395 <p>Perl's signal handling is susceptible to random crashes, because signals
396 arrive asynchronously, and the Perl runtime is not reentrant at arbitrary
398 <p>However, one experimental implementation of reliable signals is available
399 when threads are enabled. See
<code>Thread::Signal
</code>. Also see
<em>INSTALL
</em> for
400 how to build a Perl capable of threads.
</p>
403 <h2><a name=
"reliable_stack_pointers">Reliable stack pointers
</a></h2>
404 <p>The internals now reallocate the perl stack only at predictable times.
405 In particular, magic calls never trigger reallocations of the stack,
406 because all reentrancy of the runtime is handled using a ``stack of stacks''.
407 This should improve reliability of cached stack pointers in the internals
411 <h2><a name=
"more_generous_treatment_of_carriage_returns">More generous treatment of carriage returns
</a></h2>
412 <p>Perl used to complain if it encountered literal carriage returns in
413 scripts. Now they are mostly treated like whitespace within program text.
414 Inside string literals and here documents, literal carriage returns are
415 ignored if they occur paired with linefeeds, or get interpreted as whitespace
416 if they stand alone. This behavior means that literal carriage returns
417 in files should be avoided. You can get the older, more compatible (but
418 less generous) behavior by defining the preprocessor symbol
419 <code>PERL_STRICT_CR
</code> when building perl. Of course, all this has nothing
420 whatever to do with how escapes like
<code>\r
</code> are handled within strings.
</p>
421 <p>Note that this doesn't somehow magically allow you to keep all text files
422 in DOS format. The generous treatment only applies to files that perl
423 itself parses. If your C compiler doesn't allow carriage returns in
424 files, you may still be unable to build modules that need a C compiler.
</p>
427 <h2><a name=
"memory_leaks">Memory leaks
</a></h2>
428 <p><a href=
"file://C|\msysgit\mingw\html/pod/perlvar.html#item_substr"><code>substr
</code></a>,
<a href=
"file://C|\msysgit\mingw\html/pod/perlfunc.html#item_pos"><code>pos
</code></a> and
<code>vec
</code> don't leak memory anymore when used in lvalue
429 context. Many small leaks that impacted applications that embed multiple
430 interpreters have been fixed.
</p>
433 <h2><a name=
"better_support_for_multiple_interpreters">Better support for multiple interpreters
</a></h2>
434 <p>The build-time option
<code>-DMULTIPLICITY
</code> has had many of the details
435 reworked. Some previously global variables that should have been
436 per-interpreter now are. With care, this allows interpreters to call
437 each other. See the
<code>PerlInterp
</code> extension on CPAN.
</p>
440 <h2><a name=
"behavior_of_local___on_array_and_hash_elements_is_now_welldefined">Behavior of
<code>local()
</code> on array and hash elements is now well-defined
</a></h2>
441 <p>See
<a href=
"file://C|\msysgit\mingw\html/pod/perlsub.html#temporary_values_via_local__">Temporary Values via local() in the perlsub manpage
</a>.
</p>
444 <h2><a name=
"___is_transparently_tied_to_the_errno_module"><a href=
"file://C|\msysgit\mingw\html/pod/perlvar.html#item___"><code>%!
</code></a> is transparently tied to the
<a href=
"file://C|\msysgit\mingw\html/lib/Errno.html">the Errno manpage
</a> module
</a></h2>
445 <p>See
<a href=
"file://C|\msysgit\mingw\html/pod/perlvar.html">the perlvar manpage
</a>, and
<a href=
"file://C|\msysgit\mingw\html/lib/Errno.html">the Errno manpage
</a>.
</p>
448 <h2><a name=
"pseudohashes_are_supported">Pseudo-hashes are supported
</a></h2>
449 <p>See
<a href=
"file://C|\msysgit\mingw\html/pod/perlref.html">the perlref manpage
</a>.
</p>
452 <h2><a name=
"expr_foreach_expr_is_supported"><code>EXPR foreach EXPR
</code> is supported
</a></h2>
453 <p>See
<a href=
"file://C|\msysgit\mingw\html/pod/perlsyn.html">the perlsyn manpage
</a>.
</p>
456 <h2><a name=
"keywords_can_be_globally_overridden">Keywords can be globally overridden
</a></h2>
457 <p>See
<a href=
"file://C|\msysgit\mingw\html/pod/perlsub.html">the perlsub manpage
</a>.
</p>
460 <h2><a name=
"__e_is_meaningful_on_win32"><a href=
"file://C|\msysgit\mingw\html/pod/perlvar.html#item___e"><code>$^E
</code></a> is meaningful on Win32
</a></h2>
461 <p>See
<a href=
"file://C|\msysgit\mingw\html/pod/perlvar.html">the perlvar manpage
</a>.
</p>
464 <h2><a name=
"foreach__1__1000000__optimized"><code>foreach (
1.
.1000000)
</code> optimized
</a></h2>
465 <p><code>foreach (
1.
.1000000)
</code> is now optimized into a counting loop. It does
466 not try to allocate a
1000000-size list anymore.
</p>
469 <h2><a name=
"foo___can_be_used_as_implicitly_quoted_package_name"><code>Foo::
</code> can be used as implicitly quoted package name
</a></h2>
470 <p>Barewords caused unintuitive behavior when a subroutine with the same
471 name as a package happened to be defined. Thus,
<code>new Foo @args
</code>,
472 use the result of the call to
<code>Foo()
</code> instead of
<code>Foo
</code> being treated
473 as a literal. The recommended way to write barewords in the indirect
474 object slot is
<code>new Foo:: @args
</code>. Note that the method
<code>new()
</code> is
475 called with a first argument of
<code>Foo
</code>, not
<code>Foo::
</code> when you do that.
</p>
478 <h2><a name=
"exists__foo___bar____tests_existence_of_a_package"><code>exists $Foo::{Bar::}
</code> tests existence of a package
</a></h2>
479 <p>It was impossible to test for the existence of a package without
480 actually creating it before. Now
<code>exists $Foo::{Bar::}
</code> can be
481 used to test if the
<code>Foo::Bar
</code> namespace has been created.
</p>
484 <h2><a name=
"better_locale_support">Better locale support
</a></h2>
485 <p>See
<a href=
"file://C|\msysgit\mingw\html/pod/perllocale.html">the perllocale manpage
</a>.
</p>
488 <h2><a name=
"experimental_support_for_64bit_platforms">Experimental support for
64-bit platforms
</a></h2>
489 <p>Perl5 has always had
64-bit support on systems with
64-bit longs.
490 Starting with
5.005, the beginnings of experimental support for systems
491 with
32-bit long and
64-bit 'long long' integers has been added.
492 If you add -DUSE_LONG_LONG to your ccflags in config.sh (or manually
493 define it in perl.h) then perl will be built with 'long long' support.
494 There will be many compiler warnings, and the resultant perl may not
495 work on all systems. There are many other issues related to
496 third-party extensions and libraries. This option exists to allow
497 people to work on those issues.
</p>
500 <h2><a name=
"prototype___returns_useful_results_on_builtins"><code>prototype()
</code> returns useful results on builtins
</a></h2>
501 <p>See
<a href=
"file://C|\msysgit\mingw\html/pod/perlfunc.html#prototype">prototype in the perlfunc manpage
</a>.
</p>
504 <h2><a name=
"extended_support_for_exception_handling">Extended support for exception handling
</a></h2>
505 <p><code>die()
</code> now accepts a reference value, and
<a href=
"file://C|\msysgit\mingw\html/pod/perlvar.html#item___"><code>$@
</code></a> gets set to that
506 value in exception traps. This makes it possible to propagate
507 exception objects. This is an undocumented
<strong>experimental
</strong> feature.
</p>
510 <h2><a name=
"reblessing_in_destroy___supported_for_chaining_destroy___methods">Re-blessing in
<code>DESTROY()
</code> supported for chaining
<code>DESTROY()
</code> methods
</a></h2>
511 <p>See
<a href=
"file://C|\msysgit\mingw\html/pod/perlobj.html#destructors">Destructors in the perlobj manpage
</a>.
</p>
514 <h2><a name=
"all_printf_format_conversions_are_handled_internally">All
<a href=
"file://C|\msysgit\mingw\html/pod/perlfunc.html#item_printf"><code>printf
</code></a> format conversions are handled internally
</a></h2>
515 <p>See
<a href=
"file://C|\msysgit\mingw\html/pod/perlfunc.html#item_printf">printf in the perlfunc manpage
</a>.
</p>
518 <h2><a name=
"new_init_keyword">New
<code>INIT
</code> keyword
</a></h2>
519 <p><code>INIT
</code> subs are like
<code>BEGIN
</code> and
<code>END
</code>, but they get run just before
520 the perl runtime begins execution. e.g., the Perl Compiler makes use of
521 <code>INIT
</code> blocks to initialize and resolve pointers to XSUBs.
</p>
524 <h2><a name=
"new_lock_keyword">New
<code>lock
</code> keyword
</a></h2>
525 <p>The
<code>lock
</code> keyword is the fundamental synchronization primitive
526 in threaded perl. When threads are not enabled, it is currently a noop.
</p>
527 <p>To minimize impact on source compatibility this keyword is ``weak'', i.e., any
528 user-defined subroutine of the same name overrides it, unless a
<code>use Thread
</code>
532 <h2><a name=
"new_qr___operator">New
<a href=
"file://C|\msysgit\mingw\html/pod/perlfunc.html#item_qr_"><code>qr//
</code></a> operator
</a></h2>
533 <p>The
<a href=
"file://C|\msysgit\mingw\html/pod/perlfunc.html#item_qr_"><code>qr//
</code></a> operator, which is syntactically similar to the other quote-like
534 operators, is used to create precompiled regular expressions. This compiled
535 form can now be explicitly passed around in variables, and interpolated in
536 other regular expressions. See
<a href=
"file://C|\msysgit\mingw\html/pod/perlop.html">the perlop manpage
</a>.
</p>
539 <h2><a name=
"our_is_now_a_reserved_word"><a href=
"file://C|\msysgit\mingw\html/pod/perlfunc.html#item_our"><code>our
</code></a> is now a reserved word
</a></h2>
540 <p>Calling a subroutine with the name
<a href=
"file://C|\msysgit\mingw\html/pod/perlfunc.html#item_our"><code>our
</code></a> will now provoke a warning when
541 using the
<code>-w
</code> switch.
</p>
544 <h2><a name=
"tied_arrays_are_now_fully_supported">Tied arrays are now fully supported
</a></h2>
545 <p>See
<a href=
"file://C|\msysgit\mingw\html/lib/Tie/Array.html">the Tie::Array manpage
</a>.
</p>
548 <h2><a name=
"tied_handles_support_is_better">Tied handles support is better
</a></h2>
549 <p>Several missing hooks have been added. There is also a new base class for
550 TIEARRAY implementations. See
<a href=
"file://C|\msysgit\mingw\html/lib/Tie/Array.html">the Tie::Array manpage
</a>.
</p>
553 <h2><a name=
"4th_argument_to_substr">4th argument to substr
</a></h2>
554 <p><a href=
"file://C|\msysgit\mingw\html/pod/perlvar.html#item_substr"><code>substr()
</code></a> can now both return and replace in one operation. The optional
555 4th argument is the replacement string. See
<a href=
"file://C|\msysgit\mingw\html/pod/perlfunc.html#substr">substr in the perlfunc manpage
</a>.
</p>
558 <h2><a name=
"negative_length_argument_to_splice">Negative LENGTH argument to splice
</a></h2>
559 <p><a href=
"file://C|\msysgit\mingw\html/pod/perlfunc.html#item_splice"><code>splice()
</code></a> with a negative LENGTH argument now work similar to what the
560 LENGTH did for substr(). Previously a negative LENGTH was treated as
561 0. See
<a href=
"file://C|\msysgit\mingw\html/pod/perlfunc.html#item_splice">splice in the perlfunc manpage
</a>.
</p>
564 <h2><a name=
"magic_lvalues_are_now_more_magical">Magic lvalues are now more magical
</a></h2>
565 <p>When you say something like
<a href=
"file://C|\msysgit\mingw\html/pod/perlvar.html#item_substr"><code>substr($x,
5) =
"hi
"</code></a>, the scalar returned
566 by
<a href=
"file://C|\msysgit\mingw\html/pod/perlvar.html#item_substr"><code>substr()
</code></a> is special, in that any modifications to it affect $x.
567 (This is called a 'magic lvalue' because an 'lvalue' is something on
568 the left side of an assignment.) Normally, this is exactly what you
569 would expect to happen, but Perl uses the same magic if you use substr(),
570 pos(), or
<code>vec()
</code> in a context where they might be modified, like taking
571 a reference with
<code>\
</code> or as an argument to a sub that modifies
<a href=
"file://C|\msysgit\mingw\html/pod/perlvar.html#item___"><code>@_
</code></a>.
572 In previous versions, this 'magic' only went one way, but now changes
573 to the scalar the magic refers to ($x in the above example) affect the
574 magic lvalue too. For instance, this code now acts differently:
</p>
576 $x =
"hello
";
578 $x =
"g'bye
";
579 print $_[
0],
"\n
";
581 printit(substr($x,
0,
5));
</pre>
582 <p>In previous versions, this would print ``hello'', but it now prints ``g'bye''.
</p>
585 <h2><a name=
"___now_reads_in_records"><> now reads in records
</a></h2>
586 <p>If
<a href=
"file://C|\msysgit\mingw\html/pod/perlvar.html#item___"><code>$/
</code></a> is a reference to an integer, or a scalar that holds an integer,
587 <> will read in records instead of lines. For more info, see
588 <a href=
"file://C|\msysgit\mingw\html/pod/perlvar.html#_e_sol_">$
/ in the perlvar manpage
</a>.
</p>
592 <h1><a name=
"supported_platforms">Supported Platforms
</a></h1>
593 <p>Configure has many incremental improvements. Site-wide policy for building
594 perl can now be made persistent, via Policy.sh. Configure also records
595 the command-line arguments used in
<em>config.sh
</em>.
</p>
598 <h2><a name=
"new_platforms">New Platforms
</a></h2>
599 <p>BeOS is now supported. See
<em>README.beos
</em>.
</p>
600 <p>DOS is now supported under the DJGPP tools. See
<em>README.dos
</em> (installed
601 as
<a href=
"file://C|\msysgit\mingw\html/pod/perldos.html">the perldos manpage
</a> on some systems).
</p>
602 <p>MiNT is now supported. See
<em>README.mint
</em>.
</p>
603 <p>MPE/iX is now supported. See
<em>README.mpeix
</em>.
</p>
604 <p>MVS (aka OS390, aka Open Edition) is now supported. See
<em>README.os390
</em>
605 (installed as
<a href=
"file://C|\msysgit\mingw\html/pod/perlos390.html">the perlos390 manpage
</a> on some systems).
</p>
606 <p>Stratus VOS is now supported. See
<em>README.vos
</em>.
</p>
609 <h2><a name=
"changes_in_existing_support">Changes in existing support
</a></h2>
610 <p>Win32 support has been vastly enhanced. Support for Perl Object, a C++
611 encapsulation of Perl. GCC and EGCS are now supported on Win32.
612 See
<em>README.win32
</em>, aka
<a href=
"file://C|\msysgit\mingw\html/pod/perlwin32.html">the perlwin32 manpage
</a>.
</p>
613 <p>VMS configuration system has been rewritten. See
<em>README.vms
</em> (installed
614 as
<em>README_vms
</em> on some systems).
</p>
615 <p>The hints files for most Unix platforms have seen incremental improvements.
</p>
619 <h1><a name=
"modules_and_pragmata">Modules and Pragmata
</a></h1>
622 <h2><a name=
"new_modules">New Modules
</a></h2>
624 <dt><strong><a name=
"item_b">B
</a></strong>
627 <p>Perl compiler and tools. See
<a href=
"file://C|\msysgit\mingw\html/lib/B.html">the B manpage
</a>.
</p>
630 <dt><strong><a name=
"item_data_3a_3adumper">Data::Dumper
</a></strong>
633 <p>A module to pretty print Perl data. See
<a href=
"file://C|\msysgit\mingw\html/lib/Data/Dumper.html">the Data::Dumper manpage
</a>.
</p>
636 <dt><strong><a name=
"item_dumpvalue">Dumpvalue
</a></strong>
639 <p>A module to dump perl values to the screen. See
<a href=
"file://C|\msysgit\mingw\html/lib/Dumpvalue.html">the Dumpvalue manpage
</a>.
</p>
642 <dt><strong><a name=
"item_errno">Errno
</a></strong>
645 <p>A module to look up errors more conveniently. See
<a href=
"file://C|\msysgit\mingw\html/lib/Errno.html">the Errno manpage
</a>.
</p>
648 <dt><strong><a name=
"item_file_3a_3aspec">File::Spec
</a></strong>
651 <p>A portable API for file operations.
</p>
654 <dt><strong><a name=
"item_extutils_3a_3ainstalled">ExtUtils::Installed
</a></strong>
657 <p>Query and manage installed modules.
</p>
660 <dt><strong><a name=
"item_extutils_3a_3apacklist">ExtUtils::Packlist
</a></strong>
663 <p>Manipulate .packlist files.
</p>
666 <dt><strong><a name=
"item_fatal">Fatal
</a></strong>
669 <p>Make functions/builtins succeed or die.
</p>
672 <dt><strong><a name=
"item_ipc_3a_3asysv">IPC::SysV
</a></strong>
675 <p>Constants and other support infrastructure for System V IPC operations
679 <dt><strong><a name=
"item_test">Test
</a></strong>
682 <p>A framework for writing testsuites.
</p>
685 <dt><strong><a name=
"item_tie_3a_3aarray">Tie::Array
</a></strong>
688 <p>Base class for tied arrays.
</p>
691 <dt><strong><a name=
"item_tie_3a_3ahandle">Tie::Handle
</a></strong>
694 <p>Base class for tied handles.
</p>
697 <dt><strong><a name=
"item_thread">Thread
</a></strong>
700 <p>Perl thread creation, manipulation, and support.
</p>
703 <dt><strong><a name=
"item_attrs">attrs
</a></strong>
706 <p>Set subroutine attributes.
</p>
709 <dt><strong><a name=
"item_fields">fields
</a></strong>
712 <p>Compile-time class fields.
</p>
715 <dt><strong><a name=
"item_re">re
</a></strong>
718 <p>Various pragmata to control behavior of regular expressions.
</p>
724 <h2><a name=
"changes_in_existing_modules">Changes in existing modules
</a></h2>
726 <dt><strong><a name=
"item_benchmark">Benchmark
</a></strong>
729 <p>You can now run tests for
<em>x
</em> seconds instead of guessing the right
730 number of tests to run.
</p>
733 <p>Keeps better time.
</p>
736 <dt><strong><a name=
"item_carp">Carp
</a></strong>
739 <p>Carp has a new function cluck().
<code>cluck()
</code> warns, like carp(), but also adds
740 a stack backtrace to the error message, like confess().
</p>
743 <dt><strong><a name=
"item_cgi">CGI
</a></strong>
746 <p>CGI has been updated to version
2.42.
</p>
749 <dt><strong><a name=
"item_fcntl">Fcntl
</a></strong>
752 <p>More Fcntl constants added: F_SETLK64, F_SETLKW64, O_LARGEFILE for
753 large (more than
4G) file access (the
64-bit support is not yet
754 working, though, so no need to get overly excited), Free/Net/OpenBSD
755 locking behaviour flags F_FLOCK, F_POSIX, Linux F_SHLCK, and
756 O_ACCMODE: the mask of O_RDONLY, O_WRONLY, and O_RDWR.
</p>
759 <dt><strong><a name=
"item_math_3a_3acomplex">Math::Complex
</a></strong>
762 <p>The accessors methods Re, Im, arg, abs, rho, theta, methods can
763 ($z-
><code>Re())
</code> now also act as mutators ($z-
>Re(
3)).
</p>
766 <dt><strong><a name=
"item_math_3a_3atrig">Math::Trig
</a></strong>
769 <p>A little bit of radial trigonometry (cylindrical and spherical) added,
770 for example the great circle distance.
</p>
773 <dt><strong><a name=
"item_posix">POSIX
</a></strong>
776 <p>POSIX now has its own platform-specific hints files.
</p>
779 <dt><strong><a name=
"item_db_file">DB_File
</a></strong>
782 <p>DB_File supports version
2.x of Berkeley DB. See
<code>ext/DB_File/Changes
</code>.
</p>
785 <dt><strong><a name=
"item_makemaker">MakeMaker
</a></strong>
788 <p>MakeMaker now supports writing empty makefiles, provides a way to
789 specify that site
<a href=
"file://C|\msysgit\mingw\html/pod/perlfunc.html#item_umask"><code>umask()
</code></a> policy should be honored. There is also
790 better support for manipulation of .packlist files, and getting
791 information about installed modules.
</p>
794 <p>Extensions that have both architecture-dependent and
795 architecture-independent files are now always installed completely in
796 the architecture-dependent locations. Previously, the shareable parts
797 were shared both across architectures and across perl versions and were
798 therefore liable to be overwritten with newer versions that might have
799 subtle incompatibilities.
</p>
802 <dt><strong><a name=
"item_cpan">CPAN
</a></strong>
805 <p>See
<a href=
"file://C|\msysgit\mingw\html/pod/perlmodinstall.html">the perlmodinstall manpage
</a> and
<a href=
"file://C|\msysgit\mingw\html/lib/CPAN.html">the CPAN manpage
</a>.
</p>
808 <dt><strong><a name=
"item_cwd">Cwd
</a></strong>
811 <p>Cwd::cwd is faster on most platforms.
</p>
818 <h1><a name=
"utility_changes">Utility Changes
</a></h1>
819 <p><code>h2ph
</code> and related utilities have been vastly overhauled.
</p>
820 <p><code>perlcc
</code>, a new experimental front end for the compiler is available.
</p>
821 <p>The crude GNU
<code>configure
</code> emulator is now called
<code>configure.gnu
</code> to
822 avoid trampling on
<code>Configure
</code> under case-insensitive filesystems.
</p>
823 <p><code>perldoc
</code> used to be rather slow. The slower features are now optional.
824 In particular, case-insensitive searches need the
<code>-i
</code> switch, and
825 recursive searches need
<code>-r
</code>. You can set these switches in the
826 <code>PERLDOC
</code> environment variable to get the old behavior.
</p>
830 <h1><a name=
"documentation_changes">Documentation Changes
</a></h1>
831 <p>Config.pm now has a glossary of variables.
</p>
832 <p><em>Porting/patching.pod
</em> has detailed instructions on how to create and
833 submit patches for perl.
</p>
834 <p><a href=
"file://C|\msysgit\mingw\html/pod/perlport.html">the perlport manpage
</a> specifies guidelines on how to write portably.
</p>
835 <p><a href=
"file://C|\msysgit\mingw\html/pod/perlmodinstall.html">the perlmodinstall manpage
</a> describes how to fetch and install modules from
<a href=
"#item_cpan"><code>CPAN
</code></a>
837 <p>Some more Perl traps are documented now. See
<a href=
"file://C|\msysgit\mingw\html/pod/perltrap.html">the perltrap manpage
</a>.
</p>
838 <p><a href=
"file://C|\msysgit\mingw\html/pod/perlopentut.html">the perlopentut manpage
</a> gives a tutorial on using open().
</p>
839 <p><a href=
"file://C|\msysgit\mingw\html/pod/perlreftut.html">the perlreftut manpage
</a> gives a tutorial on references.
</p>
840 <p><a href=
"file://C|\msysgit\mingw\html/pod/perlthrtut.html">the perlthrtut manpage
</a> gives a tutorial on threads.
</p>
844 <h1><a name=
"new_diagnostics">New Diagnostics
</a></h1>
846 <dt><strong><a name=
"item_s">Ambiguous call resolved as CORE::%s(), qualify as such or use
&</a></strong>
849 <p>(W) A subroutine you have declared has the same name as a Perl keyword,
850 and you have used the name without qualification for calling one or the
851 other. Perl decided to call the builtin because the subroutine is
855 <p>To force interpretation as a subroutine call, either put an ampersand
856 before the subroutine name, or qualify the name with its package.
857 Alternatively, you can import the subroutine (or pretend that it's
858 imported with the
<code>use subs
</code> pragma).
</p>
861 <p>To silently interpret it as the Perl operator, use the
<code>CORE::
</code> prefix
862 on the operator (e.g.
<a href=
"file://C|\msysgit\mingw\html/pod/perlfunc.html#item_log"><code>CORE::log($x)
</code></a>) or by declaring the subroutine
863 to be an object method (see
<a href=
"file://C|\msysgit\mingw\html/lib/attrs.html">the attrs manpage
</a>).
</p>
866 <dt><strong><a name=
"item_bad_index_while_coercing_array_into_hash">Bad index while coercing array into hash
</a></strong>
869 <p>(F) The index looked up in the hash found as the
0'th element of a
870 pseudo-hash is not legal. Index values must be at
1 or greater.
871 See
<a href=
"file://C|\msysgit\mingw\html/pod/perlref.html">the perlref manpage
</a>.
</p>
874 <dt><strong><a name=
"item_bareword__22_25s_22_refers_to_nonexistent_package">Bareword ``%s'' refers to nonexistent package
</a></strong>
877 <p>(W) You used a qualified bareword of the form
<code>Foo::
</code>, but
878 the compiler saw no other uses of that namespace before that point.
879 Perhaps you need to predeclare a package?
</p>
882 <dt><strong><a name=
"item_can_27t_call_method__22_25s_22_on_an_undefined_val">Can't call method ``%s'' on an undefined value
</a></strong>
885 <p>(F) You used the syntax of a method call, but the slot filled by the
886 object reference or package name contains an undefined value.
887 Something like this will reproduce the error:
</p>
892 process $BADREF
1,
2,
3;
893 $BADREF-
>process(
1,
2,
3);
</pre>
896 <dt><strong><a name=
"item_can_27t_check_filesystem_of_script__22_25s_22_for_">Can't check filesystem of script ``%s'' for nosuid
</a></strong>
899 <p>(P) For some reason you can't check the filesystem of the script for nosuid.
</p>
902 <dt><strong><a name=
"item_can_27t_coerce_array_into_hash">Can't coerce array into hash
</a></strong>
905 <p>(F) You used an array where a hash was expected, but the array has no
906 information on how to map from keys to array indices. You can do that
907 only with arrays that have a hash reference at index
0.
</p>
910 <dt><strong><a name=
"item_can_27t_goto_subroutine_from_an_eval_2dstring">Can't goto subroutine from an eval-string
</a></strong>
913 <p>(F) The ``goto subroutine'' call can't be used to jump out of an eval ``string''.
914 (You can use it to jump out of an eval {BLOCK}, but you probably don't want to.)
</p>
917 <dt><strong><a name=
"item_can_27t_localize_pseudo_2dhash_element">Can't localize pseudo-hash element
</a></strong>
920 <p>(F) You said something like
<code>local $ar-
>{'key'}
</code>, where $ar is
921 a reference to a pseudo-hash. That hasn't been implemented yet, but
922 you can get a similar effect by localizing the corresponding array
923 element directly --
<code>local $ar-
>[$ar-
>[
0]{'key'}]
</code>.
</p>
926 <dt><strong><a name=
"item_can_27t_use__25_25_21_because_errno_2epm_is_not_av">Can't use %%! because Errno.pm is not available
</a></strong>
929 <p>(F) The first time the %! hash is used, perl automatically loads the
930 Errno.pm module. The Errno module is expected to tie the %! hash to
931 provide symbolic names for
<a href=
"file://C|\msysgit\mingw\html/pod/perlvar.html#item___"><code>$!
</code></a> errno values.
</p>
934 <dt><strong><a name=
"item_cannot_find_an_opnumber_for__22_25s_22">Cannot find an opnumber for ``%s''
</a></strong>
937 <p>(F) A string of a form
<code>CORE::word
</code> was given to prototype(), but
938 there is no builtin with the name
<code>word
</code>.
</p>
941 <dt><strong><a name=
"item_character_class_syntax__5b_2e__2e_5d_is_reserved_f">Character class syntax [. .] is reserved for future extensions
</a></strong>
944 <p>(W) Within regular expression character classes ([]) the syntax beginning
945 with ``[.'' and ending with ``.]'' is reserved for future extensions.
946 If you need to represent those character sequences inside a regular
947 expression character class, just quote the square brackets with the
948 backslash: ``\[.'' and ``.\]''.
</p>
951 <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>
954 <p>(W) Within regular expression character classes ([]) the syntax beginning
955 with ``[:'' and ending with ``:]'' is reserved for future extensions.
956 If you need to represent those character sequences inside a regular
957 expression character class, just quote the square brackets with the
958 backslash: ``\[:'' and ``:\]''.
</p>
961 <dt><strong><a name=
"item_character_class_syntax__5b_3d__3d_5d_is_reserved_f">Character class syntax [= =] is reserved for future extensions
</a></strong>
964 <p>(W) Within regular expression character classes ([]) the syntax
965 beginning with ``[='' and ending with ``=]'' is reserved for future extensions.
966 If you need to represent those character sequences inside a regular
967 expression character class, just quote the square brackets with the
968 backslash: ``\[='' and ``=\]''.
</p>
971 <dt><strong><a name=
"item__s_">%s: Eval-group in insecure regular expression
</a></strong>
974 <p>(F) Perl detected tainted data when trying to compile a regular expression
975 that contains the
<code>(?{ ... })
</code> zero-width assertion, which is unsafe.
976 See
<a href=
"file://C|\msysgit\mingw\html/pod/perlre.html#___code___">(?{ code }) in the perlre manpage
</a>, and
<a href=
"file://C|\msysgit\mingw\html/pod/perlsec.html">the perlsec manpage
</a>.
</p>
979 <dt><strong>%s: Eval-group not allowed, use re 'eval'
</strong>
982 <p>(F) A regular expression contained the
<code>(?{ ... })
</code> zero-width assertion,
983 but that construct is only allowed when the
<code>use re 'eval'
</code> pragma is
984 in effect. See
<a href=
"file://C|\msysgit\mingw\html/pod/perlre.html#___code___">(?{ code }) in the perlre manpage
</a>.
</p>
987 <dt><strong>%s: Eval-group not allowed at run time
</strong>
990 <p>(F) Perl tried to compile a regular expression containing the
<code>(?{ ... })
</code>
991 zero-width assertion at run time, as it would when the pattern contains
992 interpolated values. Since that is a security risk, it is not allowed.
993 If you insist, you may still do this by explicitly building the pattern
994 from an interpolated string at run time and using that in an eval().
995 See
<a href=
"file://C|\msysgit\mingw\html/pod/perlre.html#___code___">(?{ code }) in the perlre manpage
</a>.
</p>
998 <dt><strong><a name=
"item_explicit_blessing_to__27_27__28assuming_package_ma">Explicit blessing to '' (assuming package main)
</a></strong>
1001 <p>(W) You are blessing a reference to a zero length string. This has
1002 the effect of blessing the reference into the package main. This is
1003 usually not what you want. Consider providing a default target
1004 package, e.g. bless($ref, $p || 'MyPackage');
</p>
1007 <dt><strong><a name=
"item_illegal_hex_digit_ignored">Illegal hex digit ignored
</a></strong>
1010 <p>(W) You may have tried to use a character other than
0 -
9 or A - F in a
1011 hexadecimal number. Interpretation of the hexadecimal number stopped
1012 before the illegal character.
</p>
1015 <dt><strong><a name=
"item_no_such_array_field">No such array field
</a></strong>
1018 <p>(F) You tried to access an array as a hash, but the field name used is
1019 not defined. The hash at index
0 should map all valid field names to
1020 array indices for that to work.
</p>
1023 <dt><strong><a name=
"item_no_such_field__22_25s_22_in_variable__25s_of_type_">No such field ``%s'' in variable %s of type %s
</a></strong>
1026 <p>(F) You tried to access a field of a typed variable where the type
1027 does not know about the field name. The field names are looked up in
1028 the %FIELDS hash in the type package at compile time. The %FIELDS hash
1029 is usually set up with the 'fields' pragma.
</p>
1032 <dt><strong><a name=
"item_out_of_memory_during_ridiculously_large_request">Out of memory during ridiculously large request
</a></strong>
1035 <p>(F) You can't allocate more than
2^
31+``small amount'' bytes. This error
1036 is most likely to be caused by a typo in the Perl program. e.g.,
<code>$arr[time]
</code>
1037 instead of
<code>$arr[$time]
</code>.
</p>
1040 <dt><strong><a name=
"item_range_iterator_outside_integer_range">Range iterator outside integer range
</a></strong>
1043 <p>(F) One (or both) of the numeric arguments to the range operator ``..''
1044 are outside the range which can be represented by integers internally.
1045 One possible workaround is to force Perl to use magical string
1046 increment by prepending ``
0'' to your numbers.
</p>
1049 <dt><strong><a name=
"item_recursive_inheritance_detected_while_looking_for_m">Recursive inheritance detected while looking for method '%s' %s
</a></strong>
1052 <p>(F) More than
100 levels of inheritance were encountered while invoking a
1053 method. Probably indicates an unintended loop in your inheritance hierarchy.
</p>
1056 <dt><strong><a name=
"item_reference_found_where_even_2dsized_list_expected">Reference found where even-sized list expected
</a></strong>
1059 <p>(W) You gave a single reference where Perl was expecting a list with
1060 an even number of elements (for assignment to a hash). This
1061 usually means that you used the anon hash constructor when you meant
1062 to use parens. In any case, a hash requires key/value
<strong>pairs
</strong>.
</p>
1066 %hash = { one =
> 1, two =
> 2, }; # WRONG
1067 %hash = [ qw/ an anon array / ]; # WRONG
1068 %hash = ( one =
> 1, two =
> 2, ); # right
1069 %hash = qw( one
1 two
2 ); # also fine
</pre>
1072 <dt><strong><a name=
"item_undefined_value_assigned_to_typeglob">Undefined value assigned to typeglob
</a></strong>
1075 <p>(W) An undefined value was assigned to a typeglob, a la
<code>*foo = undef
</code>.
1076 This does nothing. It's possible that you really mean
<code>undef *foo
</code>.
</p>
1079 <dt><strong><a name=
"item_use_of_reserved_word__22_25s_22_is_deprecated">Use of reserved word ``%s'' is deprecated
</a></strong>
1082 <p>(D) The indicated bareword is a reserved word. Future versions of perl
1083 may use it as a keyword, so you're better off either explicitly quoting
1084 the word in a manner appropriate for its context of use, or using a
1085 different name altogether. The warning can be suppressed for subroutine
1086 names by either adding a
<code>&</code> prefix, or using a package qualifier,
1087 e.g.
<a href=
"file://C|\msysgit\mingw\html/pod/perlfunc.html#item_our"><code>&our()
</code></a>, or
<a href=
"file://C|\msysgit\mingw\html/pod/perlfunc.html#item_our"><code>Foo::our()
</code></a>.
</p>
1090 <dt><strong><a name=
"item_perl_3a_warning_3a_setting_locale_failed_2e">perl: warning: Setting locale failed.
</a></strong>
1093 <p>(S) The whole warning message will look something like:
</p>
1097 perl: warning: Setting locale failed.
1098 perl: warning: Please check that your locale settings:
1099 LC_ALL =
"En_US
",
1101 are supported and installed on your system.
1102 perl: warning: Falling back to the standard locale (
"C
").
</pre>
1105 <p>Exactly what were the failed locale settings varies. In the above the
1106 settings were that the LC_ALL was ``En_US'' and the LANG had no value.
1107 This error means that Perl detected that you and/or your system
1108 administrator have set up the so-called variable system but Perl could
1109 not use those settings. This was not dead serious, fortunately: there
1110 is a ``default locale'' called ``C'' that Perl can and will use, the
1111 script will be run. Before you really fix the problem, however, you
1112 will get the same error message each time you run Perl. How to really
1113 fix the problem can be found in
<a href=
"file://C|\msysgit\mingw\html/pod/perllocale.html#locale_problems">LOCALE PROBLEMS in the perllocale manpage
</a>.
</p>
1120 <h1><a name=
"obsolete_diagnostics">Obsolete Diagnostics
</a></h1>
1122 <dt><strong><a name=
"item_mktemp">Can't
<code>mktemp()
</code></a></strong>
1125 <p>(F) The
<a href=
"#item_mktemp"><code>mktemp()
</code></a> routine failed for some reason while trying to process
1126 a
<strong>-e
</strong> switch. Maybe your /tmp partition is full, or clobbered.
</p>
1129 <p>Removed because
<strong>-e
</strong> doesn't use temporary files any more.
</p>
1132 <dt><strong><a name=
"item_can_27t_write_to_temp_file_for__2de_3a__25s">Can't write to temp file for
<strong>-e
</strong>: %s
</a></strong>
1135 <p>(F) The write routine failed for some reason while trying to process
1136 a
<strong>-e
</strong> switch. Maybe your /tmp partition is full, or clobbered.
</p>
1139 <p>Removed because
<strong>-e
</strong> doesn't use temporary files any more.
</p>
1142 <dt><strong><a name=
"item_cannot_open_temporary_file">Cannot open temporary file
</a></strong>
1145 <p>(F) The create routine failed for some reason while trying to process
1146 a
<strong>-e
</strong> switch. Maybe your /tmp partition is full, or clobbered.
</p>
1149 <p>Removed because
<strong>-e
</strong> doesn't use temporary files any more.
</p>
1152 <dt><strong><a name=
"item_regexp_too_big">regexp too big
</a></strong>
1155 <p>(F) The current implementation of regular expressions uses shorts as
1156 address offsets within a string. Unfortunately this means that if
1157 the regular expression compiles to longer than
32767, it'll blow up.
1158 Usually when you want a regular expression this big, there is a better
1159 way to do it with multiple statements. See
<a href=
"file://C|\msysgit\mingw\html/pod/perlre.html">the perlre manpage
</a>.
</p>
1166 <h1><a name=
"configuration_changes">Configuration Changes
</a></h1>
1167 <p>You can use ``Configure -Uinstallusrbinperl'' which causes installperl
1168 to skip installing perl also as /usr/bin/perl. This is useful if you
1169 prefer not to modify /usr/bin for some reason or another but harmful
1170 because many scripts assume to find Perl in /usr/bin/perl.
</p>
1174 <h1><a name=
"bugs">BUGS
</a></h1>
1175 <p>If you find what you think is a bug, you might check the headers of
1176 recently posted articles in the comp.lang.perl.misc newsgroup.
1177 There may also be information at
<a href=
"http://www.perl.com/perl/">http://www.perl.com/perl/
</a> , the Perl
1179 <p>If you believe you have an unreported bug, please run the
<strong>perlbug
</strong>
1180 program included with your release. Make sure you trim your bug down
1181 to a tiny but sufficient test case. Your bug report, along with the
1182 output of
<code>perl -V
</code>, will be sent off to
<<em><a href=
"mailto:perlbug@perl.com">perlbug@perl.com
</a></em>> to be
1183 analysed by the Perl porting team.
</p>
1187 <h1><a name=
"see_also">SEE ALSO
</a></h1>
1188 <p>The
<em>Changes
</em> file for exhaustive details on what changed.
</p>
1189 <p>The
<em>INSTALL
</em> file for how to build Perl.
</p>
1190 <p>The
<em>README
</em> file for general stuff.
</p>
1191 <p>The
<em>Artistic
</em> and
<em>Copying
</em> files for copyright information.
</p>
1195 <h1><a name=
"history">HISTORY
</a></h1>
1196 <p>Written by Gurusamy Sarathy
<<em><a href=
"mailto:gsar@activestate.com">gsar@activestate.com
</a></em>>, with many contributions
1197 from The Perl Porters.
</p>
1198 <p>Send omissions or corrections to
<<em><a href=
"mailto:perlbug@perl.com">perlbug@perl.com
</a></em>>.
</p>
1199 <table border=
"0" width=
"100%" cellspacing=
"0" cellpadding=
"3">
1200 <tr><td class=
"block" style=
"background-color: #cccccc" valign=
"middle">
1201 <big><strong><span class=
"block"> perl5005delta - what's new for perl5.005
</span></strong></big>