Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | .\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13 |
2 | .\" | |
3 | .\" Standard preamble: | |
4 | .\" ======================================================================== | |
5 | .de Sh \" Subsection heading | |
6 | .br | |
7 | .if t .Sp | |
8 | .ne 5 | |
9 | .PP | |
10 | \fB\\$1\fR | |
11 | .PP | |
12 | .. | |
13 | .de Sp \" Vertical space (when we can't use .PP) | |
14 | .if t .sp .5v | |
15 | .if n .sp | |
16 | .. | |
17 | .de Vb \" Begin verbatim text | |
18 | .ft CW | |
19 | .nf | |
20 | .ne \\$1 | |
21 | .. | |
22 | .de Ve \" End verbatim text | |
23 | .ft R | |
24 | .fi | |
25 | .. | |
26 | .\" Set up some character translations and predefined strings. \*(-- will | |
27 | .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left | |
28 | .\" double quote, and \*(R" will give a right double quote. | will give a | |
29 | .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to | |
30 | .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' | |
31 | .\" expand to `' in nroff, nothing in troff, for use with C<>. | |
32 | .tr \(*W-|\(bv\*(Tr | |
33 | .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' | |
34 | .ie n \{\ | |
35 | . ds -- \(*W- | |
36 | . ds PI pi | |
37 | . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch | |
38 | . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch | |
39 | . ds L" "" | |
40 | . ds R" "" | |
41 | . ds C` "" | |
42 | . ds C' "" | |
43 | 'br\} | |
44 | .el\{\ | |
45 | . ds -- \|\(em\| | |
46 | . ds PI \(*p | |
47 | . ds L" `` | |
48 | . ds R" '' | |
49 | 'br\} | |
50 | .\" | |
51 | .\" If the F register is turned on, we'll generate index entries on stderr for | |
52 | .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index | |
53 | .\" entries marked with X<> in POD. Of course, you'll have to process the | |
54 | .\" output yourself in some meaningful fashion. | |
55 | .if \nF \{\ | |
56 | . de IX | |
57 | . tm Index:\\$1\t\\n%\t"\\$2" | |
58 | .. | |
59 | . nr % 0 | |
60 | . rr F | |
61 | .\} | |
62 | .\" | |
63 | .\" For nroff, turn off justification. Always turn off hyphenation; it makes | |
64 | .\" way too many mistakes in technical documents. | |
65 | .hy 0 | |
66 | .if n .na | |
67 | .\" | |
68 | .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). | |
69 | .\" Fear. Run. Save yourself. No user-serviceable parts. | |
70 | . \" fudge factors for nroff and troff | |
71 | .if n \{\ | |
72 | . ds #H 0 | |
73 | . ds #V .8m | |
74 | . ds #F .3m | |
75 | . ds #[ \f1 | |
76 | . ds #] \fP | |
77 | .\} | |
78 | .if t \{\ | |
79 | . ds #H ((1u-(\\\\n(.fu%2u))*.13m) | |
80 | . ds #V .6m | |
81 | . ds #F 0 | |
82 | . ds #[ \& | |
83 | . ds #] \& | |
84 | .\} | |
85 | . \" simple accents for nroff and troff | |
86 | .if n \{\ | |
87 | . ds ' \& | |
88 | . ds ` \& | |
89 | . ds ^ \& | |
90 | . ds , \& | |
91 | . ds ~ ~ | |
92 | . ds / | |
93 | .\} | |
94 | .if t \{\ | |
95 | . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" | |
96 | . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' | |
97 | . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' | |
98 | . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' | |
99 | . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' | |
100 | . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' | |
101 | .\} | |
102 | . \" troff and (daisy-wheel) nroff accents | |
103 | .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' | |
104 | .ds 8 \h'\*(#H'\(*b\h'-\*(#H' | |
105 | .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] | |
106 | .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' | |
107 | .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' | |
108 | .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] | |
109 | .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] | |
110 | .ds ae a\h'-(\w'a'u*4/10)'e | |
111 | .ds Ae A\h'-(\w'A'u*4/10)'E | |
112 | . \" corrections for vroff | |
113 | .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' | |
114 | .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' | |
115 | . \" for low resolution devices (crt and lpr) | |
116 | .if \n(.H>23 .if \n(.V>19 \ | |
117 | \{\ | |
118 | . ds : e | |
119 | . ds 8 ss | |
120 | . ds o a | |
121 | . ds d- d\h'-1'\(ga | |
122 | . ds D- D\h'-1'\(hy | |
123 | . ds th \o'bp' | |
124 | . ds Th \o'LP' | |
125 | . ds ae ae | |
126 | . ds Ae AE | |
127 | .\} | |
128 | .rm #[ #] #H #V #F C | |
129 | .\" ======================================================================== | |
130 | .\" | |
131 | .IX Title "PERL5005DELTA 1" | |
132 | .TH PERL5005DELTA 1 "2002-06-08" "perl v5.8.0" "Perl Programmers Reference Guide" | |
133 | .SH "NAME" | |
134 | perl5005delta \- what's new for perl5.005 | |
135 | .SH "DESCRIPTION" | |
136 | .IX Header "DESCRIPTION" | |
137 | This document describes differences between the 5.004 release and this one. | |
138 | .SH "About the new versioning system" | |
139 | .IX Header "About the new versioning system" | |
140 | Perl is now developed on two tracks: a maintenance track that makes | |
141 | small, safe updates to released production versions with emphasis on | |
142 | compatibility; and a development track that pursues more aggressive | |
143 | evolution. Maintenance releases (which should be considered production | |
144 | quality) have subversion numbers that run from \f(CW1\fR to \f(CW49\fR, and | |
145 | development releases (which should be considered \*(L"alpha\*(R" quality) run | |
146 | from \f(CW50\fR to \f(CW99\fR. | |
147 | .PP | |
148 | Perl 5.005 is the combined product of the new dual-track development | |
149 | scheme. | |
150 | .SH "Incompatible Changes" | |
151 | .IX Header "Incompatible Changes" | |
152 | .Sh "\s-1WARNING:\s0 This version is not binary compatible with Perl 5.004." | |
153 | .IX Subsection "WARNING: This version is not binary compatible with Perl 5.004." | |
154 | Starting with Perl 5.004_50 there were many deep and far-reaching changes | |
155 | to the language internals. If you have dynamically loaded extensions | |
156 | that you built under perl 5.003 or 5.004, you can continue to use them | |
157 | with 5.004, but you will need to rebuild and reinstall those extensions | |
158 | to use them 5.005. See \fI\s-1INSTALL\s0\fR for detailed instructions on how to | |
159 | upgrade. | |
160 | .Sh "Default installation structure has changed" | |
161 | .IX Subsection "Default installation structure has changed" | |
162 | The new Configure defaults are designed to allow a smooth upgrade from | |
163 | 5.004 to 5.005, but you should read \fI\s-1INSTALL\s0\fR for a detailed | |
164 | discussion of the changes in order to adapt them to your system. | |
165 | .Sh "Perl Source Compatibility" | |
166 | .IX Subsection "Perl Source Compatibility" | |
167 | When none of the experimental features are enabled, there should be | |
168 | very few user-visible Perl source compatibility issues. | |
169 | .PP | |
170 | If threads are enabled, then some caveats apply. \f(CW@_\fR and \f(CW$_\fR become | |
171 | lexical variables. The effect of this should be largely transparent to | |
172 | the user, but there are some boundary conditions under which user will | |
173 | need to be aware of the issues. For example, \f(CW\*(C`local(@_)\*(C'\fR results in | |
174 | a \*(L"Can't localize lexical variable \f(CW@_\fR ...\*(R" message. This may be enabled | |
175 | in a future version. | |
176 | .PP | |
177 | Some new keywords have been introduced. These are generally expected to | |
178 | have very little impact on compatibility. See "New \f(CW\*(C`INIT\*(C'\fR keyword", | |
179 | "New \f(CW\*(C`lock\*(C'\fR keyword", and "New \f(CW\*(C`qr//\*(C'\fR operator". | |
180 | .PP | |
181 | Certain barewords are now reserved. Use of these will provoke a warning | |
182 | if you have asked for them with the \f(CW\*(C`\-w\*(C'\fR switch. | |
183 | See "\f(CW\*(C`our\*(C'\fR is now a reserved word". | |
184 | .Sh "C Source Compatibility" | |
185 | .IX Subsection "C Source Compatibility" | |
186 | There have been a large number of changes in the internals to support | |
187 | the new features in this release. | |
188 | .IP "\(bu" 4 | |
189 | Core sources now require \s-1ANSI\s0 C compiler | |
190 | .Sp | |
191 | An \s-1ANSI\s0 C compiler is now \fBrequired\fR to build perl. See \fI\s-1INSTALL\s0\fR. | |
192 | .IP "\(bu" 4 | |
193 | All Perl global variables must now be referenced with an explicit prefix | |
194 | .Sp | |
195 | All Perl global variables that are visible for use by extensions now | |
196 | have a \f(CW\*(C`PL_\*(C'\fR prefix. New extensions should \f(CW\*(C`not\*(C'\fR refer to perl globals | |
197 | by their unqualified names. To preserve sanity, we provide limited | |
198 | backward compatibility for globals that are being widely used like | |
199 | \&\f(CW\*(C`sv_undef\*(C'\fR and \f(CW\*(C`na\*(C'\fR (which should now be written as \f(CW\*(C`PL_sv_undef\*(C'\fR, | |
200 | \&\f(CW\*(C`PL_na\*(C'\fR etc.) | |
201 | .Sp | |
202 | If you find that your \s-1XS\s0 extension does not compile anymore because a | |
203 | perl global is not visible, try adding a \f(CW\*(C`PL_\*(C'\fR prefix to the global | |
204 | and rebuild. | |
205 | .Sp | |
206 | It is strongly recommended that all functions in the Perl \s-1API\s0 that don't | |
207 | begin with \f(CW\*(C`perl\*(C'\fR be referenced with a \f(CW\*(C`Perl_\*(C'\fR prefix. The bare function | |
208 | names without the \f(CW\*(C`Perl_\*(C'\fR prefix are supported with macros, but this | |
209 | support may cease in a future release. | |
210 | .Sp | |
211 | See \*(L"\s-1API\s0 \s-1LISTING\s0\*(R" in perlguts. | |
212 | .IP "\(bu" 4 | |
213 | Enabling threads has source compatibility issues | |
214 | .Sp | |
215 | Perl built with threading enabled requires extensions to use the new | |
216 | \&\f(CW\*(C`dTHR\*(C'\fR macro to initialize the handle to access per-thread data. | |
217 | If you see a compiler error that talks about the variable \f(CW\*(C`thr\*(C'\fR not | |
218 | being declared (when building a module that has \s-1XS\s0 code), you need | |
219 | to add \f(CW\*(C`dTHR;\*(C'\fR at the beginning of the block that elicited the error. | |
220 | .Sp | |
221 | The \s-1API\s0 function \f(CW\*(C`perl_get_sv("@",FALSE)\*(C'\fR should be used instead of | |
222 | directly accessing perl globals as \f(CW\*(C`GvSV(errgv)\*(C'\fR. The \s-1API\s0 call is | |
223 | backward compatible with existing perls and provides source compatibility | |
224 | with threading is enabled. | |
225 | .Sp | |
226 | See \*(L"C Source Compatibility\*(R" for more information. | |
227 | .Sh "Binary Compatibility" | |
228 | .IX Subsection "Binary Compatibility" | |
229 | This version is \s-1NOT\s0 binary compatible with older versions. All extensions | |
230 | will need to be recompiled. Further binaries built with threads enabled | |
231 | are incompatible with binaries built without. This should largely be | |
232 | transparent to the user, as all binary incompatible configurations have | |
233 | their own unique architecture name, and extension binaries get installed at | |
234 | unique locations. This allows coexistence of several configurations in | |
235 | the same directory hierarchy. See \fI\s-1INSTALL\s0\fR. | |
236 | .Sh "Security fixes may affect compatibility" | |
237 | .IX Subsection "Security fixes may affect compatibility" | |
238 | A few taint leaks and taint omissions have been corrected. This may lead | |
239 | to \*(L"failure\*(R" of scripts that used to work with older versions. Compiling | |
240 | with \-DINCOMPLETE_TAINTS provides a perl with minimal amounts of changes | |
241 | to the tainting behavior. But note that the resulting perl will have | |
242 | known insecurities. | |
243 | .PP | |
244 | Oneliners with the \f(CW\*(C`\-e\*(C'\fR switch do not create temporary files anymore. | |
245 | .Sh "Relaxed new mandatory warnings introduced in 5.004" | |
246 | .IX Subsection "Relaxed new mandatory warnings introduced in 5.004" | |
247 | Many new warnings that were introduced in 5.004 have been made | |
248 | optional. Some of these warnings are still present, but perl's new | |
249 | features make them less often a problem. See \*(L"New Diagnostics\*(R". | |
250 | .Sh "Licensing" | |
251 | .IX Subsection "Licensing" | |
252 | Perl has a new Social Contract for contributors. See \fIPorting/Contract\fR. | |
253 | .PP | |
254 | The license included in much of the Perl documentation has changed. | |
255 | Most of the Perl documentation was previously under the implicit \s-1GNU\s0 | |
256 | General Public License or the Artistic License (at the user's choice). | |
257 | Now much of the documentation unambiguously states the terms under which | |
258 | it may be distributed. Those terms are in general much less restrictive | |
259 | than the \s-1GNU\s0 \s-1GPL\s0. See perl and the individual perl manpages listed | |
260 | therein. | |
261 | .SH "Core Changes" | |
262 | .IX Header "Core Changes" | |
263 | .Sh "Threads" | |
264 | .IX Subsection "Threads" | |
265 | \&\s-1WARNING:\s0 Threading is considered an \fBexperimental\fR feature. Details of the | |
266 | implementation may change without notice. There are known limitations | |
267 | and some bugs. These are expected to be fixed in future versions. | |
268 | .PP | |
269 | See \fI\s-1README\s0.threads\fR. | |
270 | .Sh "Compiler" | |
271 | .IX Subsection "Compiler" | |
272 | \&\s-1WARNING:\s0 The Compiler and related tools are considered \fBexperimental\fR. | |
273 | Features may change without notice, and there are known limitations | |
274 | and bugs. Since the compiler is fully external to perl, the default | |
275 | configuration will build and install it. | |
276 | .PP | |
277 | The Compiler produces three different types of transformations of a | |
278 | perl program. The C backend generates C code that captures perl's state | |
279 | just before execution begins. It eliminates the compile-time overheads | |
280 | of the regular perl interpreter, but the run-time performance remains | |
281 | comparatively the same. The \s-1CC\s0 backend generates optimized C code | |
282 | equivalent to the code path at run\-time. The \s-1CC\s0 backend has greater | |
283 | potential for big optimizations, but only a few optimizations are | |
284 | implemented currently. The Bytecode backend generates a platform | |
285 | independent bytecode representation of the interpreter's state | |
286 | just before execution. Thus, the Bytecode back end also eliminates | |
287 | much of the compilation overhead of the interpreter. | |
288 | .PP | |
289 | The compiler comes with several valuable utilities. | |
290 | .PP | |
291 | \&\f(CW\*(C`B::Lint\*(C'\fR is an experimental module to detect and warn about suspicious | |
292 | code, especially the cases that the \f(CW\*(C`\-w\*(C'\fR switch does not detect. | |
293 | .PP | |
294 | \&\f(CW\*(C`B::Deparse\*(C'\fR can be used to demystify perl code, and understand | |
295 | how perl optimizes certain constructs. | |
296 | .PP | |
297 | \&\f(CW\*(C`B::Xref\*(C'\fR generates cross reference reports of all definition and use | |
298 | of variables, subroutines and formats in a program. | |
299 | .PP | |
300 | \&\f(CW\*(C`B::Showlex\*(C'\fR show the lexical variables used by a subroutine or file | |
301 | at a glance. | |
302 | .PP | |
303 | \&\f(CW\*(C`perlcc\*(C'\fR is a simple frontend for compiling perl. | |
304 | .PP | |
305 | See \f(CW\*(C`ext/B/README\*(C'\fR, B, and the respective compiler modules. | |
306 | .Sh "Regular Expressions" | |
307 | .IX Subsection "Regular Expressions" | |
308 | Perl's regular expression engine has been seriously overhauled, and | |
309 | many new constructs are supported. Several bugs have been fixed. | |
310 | .PP | |
311 | Here is an itemized summary: | |
312 | .IP "Many new and improved optimizations" 4 | |
313 | .IX Item "Many new and improved optimizations" | |
314 | Changes in the \s-1RE\s0 engine: | |
315 | .Sp | |
316 | .Vb 7 | |
317 | \& Unneeded nodes removed; | |
318 | \& Substrings merged together; | |
319 | \& New types of nodes to process (SUBEXPR)* and similar expressions | |
320 | \& quickly, used if the SUBEXPR has no side effects and matches | |
321 | \& strings of the same length; | |
322 | \& Better optimizations by lookup for constant substrings; | |
323 | \& Better search for constants substrings anchored by $ ; | |
324 | .Ve | |
325 | .Sp | |
326 | Changes in Perl code using \s-1RE\s0 engine: | |
327 | .Sp | |
328 | .Vb 5 | |
329 | \& More optimizations to s/longer/short/; | |
330 | \& study() was not working; | |
331 | \& /blah/ may be optimized to an analogue of index() if $& $` $' not seen; | |
332 | \& Unneeded copying of matched-against string removed; | |
333 | \& Only matched part of the string is copying if $` $' were not seen; | |
334 | .Ve | |
335 | .IP "Many bug fixes" 4 | |
336 | .IX Item "Many bug fixes" | |
337 | Note that only the major bug fixes are listed here. See \fIChanges\fR for others. | |
338 | .Sp | |
339 | .Vb 10 | |
340 | \& Backtracking might not restore start of $3. | |
341 | \& No feedback if max count for * or + on "complex" subexpression | |
342 | \& was reached, similarly (but at compile time) for {3,34567} | |
343 | \& Primitive restrictions on max count introduced to decrease a | |
344 | \& possibility of a segfault; | |
345 | \& (ZERO-LENGTH)* could segfault; | |
346 | \& (ZERO-LENGTH)* was prohibited; | |
347 | \& Long REs were not allowed; | |
348 | \& /RE/g could skip matches at the same position after a | |
349 | \& zero-length match; | |
350 | .Ve | |
351 | .IP "New regular expression constructs" 4 | |
352 | .IX Item "New regular expression constructs" | |
353 | The following new syntax elements are supported: | |
354 | .Sp | |
355 | .Vb 8 | |
356 | \& (?<=RE) | |
357 | \& (?<!RE) | |
358 | \& (?{ CODE }) | |
359 | \& (?i-x) | |
360 | \& (?i:RE) | |
361 | \& (?(COND)YES_RE|NO_RE) | |
362 | \& (?>RE) | |
363 | \& \ez | |
364 | .Ve | |
365 | .IP "New operator for precompiled regular expressions" 4 | |
366 | .IX Item "New operator for precompiled regular expressions" | |
367 | See "New \f(CW\*(C`qr//\*(C'\fR operator". | |
368 | .IP "Other improvements" 4 | |
369 | .IX Item "Other improvements" | |
370 | .Vb 7 | |
371 | \& Better debugging output (possibly with colors), | |
372 | \& even from non-debugging Perl; | |
373 | \& RE engine code now looks like C, not like assembler; | |
374 | \& Behaviour of RE modifiable by `use re' directive; | |
375 | \& Improved documentation; | |
376 | \& Test suite significantly extended; | |
377 | \& Syntax [:^upper:] etc., reserved inside character classes; | |
378 | .Ve | |
379 | .IP "Incompatible changes" 4 | |
380 | .IX Item "Incompatible changes" | |
381 | .Vb 4 | |
382 | \& (?i) localized inside enclosing group; | |
383 | \& $( is not interpolated into RE any more; | |
384 | \& /RE/g may match at the same position (with non-zero length) | |
385 | \& after a zero-length match (bug fix). | |
386 | .Ve | |
387 | .PP | |
388 | See perlre and perlop. | |
389 | .Sh "Improved \fImalloc()\fP" | |
390 | .IX Subsection "Improved malloc()" | |
391 | See banner at the beginning of \f(CW\*(C`malloc.c\*(C'\fR for details. | |
392 | .Sh "Quicksort is internally implemented" | |
393 | .IX Subsection "Quicksort is internally implemented" | |
394 | Perl now contains its own highly optimized \fIqsort()\fR routine. The new \fIqsort()\fR | |
395 | is resistant to inconsistent comparison functions, so Perl's \f(CW\*(C`sort()\*(C'\fR will | |
396 | not provoke coredumps any more when given poorly written sort subroutines. | |
397 | (Some C library \f(CW\*(C`qsort()\*(C'\fRs that were being used before used to have this | |
398 | problem.) In our testing, the new \f(CW\*(C`qsort()\*(C'\fR required the minimal number | |
399 | of pair-wise compares on average, among all known \f(CW\*(C`qsort()\*(C'\fR implementations. | |
400 | .PP | |
401 | See \f(CW\*(C`perlfunc/sort\*(C'\fR. | |
402 | .Sh "Reliable signals" | |
403 | .IX Subsection "Reliable signals" | |
404 | Perl's signal handling is susceptible to random crashes, because signals | |
405 | arrive asynchronously, and the Perl runtime is not reentrant at arbitrary | |
406 | times. | |
407 | .PP | |
408 | However, one experimental implementation of reliable signals is available | |
409 | when threads are enabled. See \f(CW\*(C`Thread::Signal\*(C'\fR. Also see \fI\s-1INSTALL\s0\fR for | |
410 | how to build a Perl capable of threads. | |
411 | .Sh "Reliable stack pointers" | |
412 | .IX Subsection "Reliable stack pointers" | |
413 | The internals now reallocate the perl stack only at predictable times. | |
414 | In particular, magic calls never trigger reallocations of the stack, | |
415 | because all reentrancy of the runtime is handled using a \*(L"stack of stacks\*(R". | |
416 | This should improve reliability of cached stack pointers in the internals | |
417 | and in XSUBs. | |
418 | .Sh "More generous treatment of carriage returns" | |
419 | .IX Subsection "More generous treatment of carriage returns" | |
420 | Perl used to complain if it encountered literal carriage returns in | |
421 | scripts. Now they are mostly treated like whitespace within program text. | |
422 | Inside string literals and here documents, literal carriage returns are | |
423 | ignored if they occur paired with linefeeds, or get interpreted as whitespace | |
424 | if they stand alone. This behavior means that literal carriage returns | |
425 | in files should be avoided. You can get the older, more compatible (but | |
426 | less generous) behavior by defining the preprocessor symbol | |
427 | \&\f(CW\*(C`PERL_STRICT_CR\*(C'\fR when building perl. Of course, all this has nothing | |
428 | whatever to do with how escapes like \f(CW\*(C`\er\*(C'\fR are handled within strings. | |
429 | .PP | |
430 | Note that this doesn't somehow magically allow you to keep all text files | |
431 | in \s-1DOS\s0 format. The generous treatment only applies to files that perl | |
432 | itself parses. If your C compiler doesn't allow carriage returns in | |
433 | files, you may still be unable to build modules that need a C compiler. | |
434 | .Sh "Memory leaks" | |
435 | .IX Subsection "Memory leaks" | |
436 | \&\f(CW\*(C`substr\*(C'\fR, \f(CW\*(C`pos\*(C'\fR and \f(CW\*(C`vec\*(C'\fR don't leak memory anymore when used in lvalue | |
437 | context. Many small leaks that impacted applications that embed multiple | |
438 | interpreters have been fixed. | |
439 | .Sh "Better support for multiple interpreters" | |
440 | .IX Subsection "Better support for multiple interpreters" | |
441 | The build-time option \f(CW\*(C`\-DMULTIPLICITY\*(C'\fR has had many of the details | |
442 | reworked. Some previously global variables that should have been | |
443 | per-interpreter now are. With care, this allows interpreters to call | |
444 | each other. See the \f(CW\*(C`PerlInterp\*(C'\fR extension on \s-1CPAN\s0. | |
445 | .Sh "Behavior of \fIlocal()\fP on array and hash elements is now well-defined" | |
446 | .IX Subsection "Behavior of local() on array and hash elements is now well-defined" | |
447 | See \*(L"Temporary Values via \fIlocal()\fR\*(R" in perlsub. | |
448 | .ie n .Sh """%!"" is transparently tied to the Errno module" | |
449 | .el .Sh "\f(CW%!\fP is transparently tied to the Errno module" | |
450 | .IX Subsection "%! is transparently tied to the Errno module" | |
451 | See perlvar, and Errno. | |
452 | .Sh "Pseudo-hashes are supported" | |
453 | .IX Subsection "Pseudo-hashes are supported" | |
454 | See perlref. | |
455 | .ie n .Sh """EXPR foreach EXPR"" is supported" | |
456 | .el .Sh "\f(CWEXPR foreach EXPR\fP is supported" | |
457 | .IX Subsection "EXPR foreach EXPR is supported" | |
458 | See perlsyn. | |
459 | .Sh "Keywords can be globally overridden" | |
460 | .IX Subsection "Keywords can be globally overridden" | |
461 | See perlsub. | |
462 | .ie n .Sh "$^E is meaningful on Win32" | |
463 | .el .Sh "\f(CW$^E\fP is meaningful on Win32" | |
464 | .IX Subsection "$^E is meaningful on Win32" | |
465 | See perlvar. | |
466 | .ie n .Sh """foreach (1..1000000)"" optimized" | |
467 | .el .Sh "\f(CWforeach (1..1000000)\fP optimized" | |
468 | .IX Subsection "foreach (1..1000000) optimized" | |
469 | \&\f(CW\*(C`foreach (1..1000000)\*(C'\fR is now optimized into a counting loop. It does | |
470 | not try to allocate a 1000000\-size list anymore. | |
471 | .ie n .Sh """Foo::"" can be used as implicitly quoted package name" | |
472 | .el .Sh "\f(CWFoo::\fP can be used as implicitly quoted package name" | |
473 | .IX Subsection "Foo:: can be used as implicitly quoted package name" | |
474 | Barewords caused unintuitive behavior when a subroutine with the same | |
475 | name as a package happened to be defined. Thus, \f(CW\*(C`new Foo @args\*(C'\fR, | |
476 | use the result of the call to \f(CW\*(C`Foo()\*(C'\fR instead of \f(CW\*(C`Foo\*(C'\fR being treated | |
477 | as a literal. The recommended way to write barewords in the indirect | |
478 | object slot is \f(CW\*(C`new Foo:: @args\*(C'\fR. Note that the method \f(CW\*(C`new()\*(C'\fR is | |
479 | called with a first argument of \f(CW\*(C`Foo\*(C'\fR, not \f(CW\*(C`Foo::\*(C'\fR when you do that. | |
480 | .ie n .Sh """exists $Foo::{Bar::}"" tests existence of a package" | |
481 | .el .Sh "\f(CWexists $Foo::{Bar::}\fP tests existence of a package" | |
482 | .IX Subsection "exists $Foo::{Bar::} tests existence of a package" | |
483 | It was impossible to test for the existence of a package without | |
484 | actually creating it before. Now \f(CW\*(C`exists $Foo::{Bar::}\*(C'\fR can be | |
485 | used to test if the \f(CW\*(C`Foo::Bar\*(C'\fR namespace has been created. | |
486 | .Sh "Better locale support" | |
487 | .IX Subsection "Better locale support" | |
488 | See perllocale. | |
489 | .Sh "Experimental support for 64\-bit platforms" | |
490 | .IX Subsection "Experimental support for 64-bit platforms" | |
491 | Perl5 has always had 64\-bit support on systems with 64\-bit longs. | |
492 | Starting with 5.005, the beginnings of experimental support for systems | |
493 | with 32\-bit long and 64\-bit 'long long' integers has been added. | |
494 | If you add \-DUSE_LONG_LONG to your ccflags in config.sh (or manually | |
495 | define it in perl.h) then perl will be built with 'long long' support. | |
496 | There will be many compiler warnings, and the resultant perl may not | |
497 | work on all systems. There are many other issues related to | |
498 | third-party extensions and libraries. This option exists to allow | |
499 | people to work on those issues. | |
500 | .Sh "\fIprototype()\fP returns useful results on builtins" | |
501 | .IX Subsection "prototype() returns useful results on builtins" | |
502 | See \*(L"prototype\*(R" in perlfunc. | |
503 | .Sh "Extended support for exception handling" | |
504 | .IX Subsection "Extended support for exception handling" | |
505 | \&\f(CW\*(C`die()\*(C'\fR now accepts a reference value, and \f(CW$@\fR gets set to that | |
506 | value in exception traps. This makes it possible to propagate | |
507 | exception objects. This is an undocumented \fBexperimental\fR feature. | |
508 | .Sh "Re-blessing in \s-1\fIDESTROY\s0()\fP supported for chaining \s-1\fIDESTROY\s0()\fP methods" | |
509 | .IX Subsection "Re-blessing in DESTROY() supported for chaining DESTROY() methods" | |
510 | See \*(L"Destructors\*(R" in perlobj. | |
511 | .ie n .Sh "All ""printf"" format conversions are handled internally" | |
512 | .el .Sh "All \f(CWprintf\fP format conversions are handled internally" | |
513 | .IX Subsection "All printf format conversions are handled internally" | |
514 | See \*(L"printf\*(R" in perlfunc. | |
515 | .ie n .Sh "New ""INIT"" keyword" | |
516 | .el .Sh "New \f(CWINIT\fP keyword" | |
517 | .IX Subsection "New INIT keyword" | |
518 | \&\f(CW\*(C`INIT\*(C'\fR subs are like \f(CW\*(C`BEGIN\*(C'\fR and \f(CW\*(C`END\*(C'\fR, but they get run just before | |
519 | the perl runtime begins execution. e.g., the Perl Compiler makes use of | |
520 | \&\f(CW\*(C`INIT\*(C'\fR blocks to initialize and resolve pointers to XSUBs. | |
521 | .ie n .Sh "New ""lock"" keyword" | |
522 | .el .Sh "New \f(CWlock\fP keyword" | |
523 | .IX Subsection "New lock keyword" | |
524 | The \f(CW\*(C`lock\*(C'\fR keyword is the fundamental synchronization primitive | |
525 | in threaded perl. When threads are not enabled, it is currently a noop. | |
526 | .PP | |
527 | To minimize impact on source compatibility this keyword is \*(L"weak\*(R", i.e., any | |
528 | user-defined subroutine of the same name overrides it, unless a \f(CW\*(C`use Thread\*(C'\fR | |
529 | has been seen. | |
530 | .ie n .Sh "New ""qr//"" operator" | |
531 | .el .Sh "New \f(CWqr//\fP operator" | |
532 | .IX Subsection "New qr// operator" | |
533 | The \f(CW\*(C`qr//\*(C'\fR 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 perlop. | |
537 | .ie n .Sh """our"" is now a reserved word" | |
538 | .el .Sh "\f(CWour\fP is now a reserved word" | |
539 | .IX Subsection "our is now a reserved word" | |
540 | Calling a subroutine with the name \f(CW\*(C`our\*(C'\fR will now provoke a warning when | |
541 | using the \f(CW\*(C`\-w\*(C'\fR switch. | |
542 | .Sh "Tied arrays are now fully supported" | |
543 | .IX Subsection "Tied arrays are now fully supported" | |
544 | See Tie::Array. | |
545 | .Sh "Tied handles support is better" | |
546 | .IX Subsection "Tied handles support is better" | |
547 | Several missing hooks have been added. There is also a new base class for | |
548 | \&\s-1TIEARRAY\s0 implementations. See Tie::Array. | |
549 | .Sh "4th argument to substr" | |
550 | .IX Subsection "4th argument to substr" | |
551 | \&\fIsubstr()\fR can now both return and replace in one operation. The optional | |
552 | 4th argument is the replacement string. See \*(L"substr\*(R" in perlfunc. | |
553 | .Sh "Negative \s-1LENGTH\s0 argument to splice" | |
554 | .IX Subsection "Negative LENGTH argument to splice" | |
555 | \&\fIsplice()\fR with a negative \s-1LENGTH\s0 argument now work similar to what the | |
556 | \&\s-1LENGTH\s0 did for \fIsubstr()\fR. Previously a negative \s-1LENGTH\s0 was treated as | |
557 | 0. See \*(L"splice\*(R" in perlfunc. | |
558 | .Sh "Magic lvalues are now more magical" | |
559 | .IX Subsection "Magic lvalues are now more magical" | |
560 | When you say something like \f(CW\*(C`substr($x, 5) = "hi"\*(C'\fR, the scalar returned | |
561 | by \fIsubstr()\fR is special, in that any modifications to it affect \f(CW$x\fR. | |
562 | (This is called a 'magic lvalue' because an 'lvalue' is something on | |
563 | the left side of an assignment.) Normally, this is exactly what you | |
564 | would expect to happen, but Perl uses the same magic if you use \fIsubstr()\fR, | |
565 | \&\fIpos()\fR, or \fIvec()\fR in a context where they might be modified, like taking | |
566 | a reference with \f(CW\*(C`\e\*(C'\fR or as an argument to a sub that modifies \f(CW@_\fR. | |
567 | In previous versions, this 'magic' only went one way, but now changes | |
568 | to the scalar the magic refers to ($x in the above example) affect the | |
569 | magic lvalue too. For instance, this code now acts differently: | |
570 | .PP | |
571 | .Vb 6 | |
572 | \& $x = "hello"; | |
573 | \& sub printit { | |
574 | \& $x = "g'bye"; | |
575 | \& print $_[0], "\en"; | |
576 | \& } | |
577 | \& printit(substr($x, 0, 5)); | |
578 | .Ve | |
579 | .PP | |
580 | In previous versions, this would print \*(L"hello\*(R", but it now prints \*(L"g'bye\*(R". | |
581 | .Sh "<> now reads in records" | |
582 | .IX Subsection "<> now reads in records" | |
583 | If \f(CW$/\fR is a reference to an integer, or a scalar that holds an integer, | |
584 | <> will read in records instead of lines. For more info, see | |
585 | \&\*(L"$/\*(R" in perlvar. | |
586 | .SH "Supported Platforms" | |
587 | .IX Header "Supported Platforms" | |
588 | Configure has many incremental improvements. Site-wide policy for building | |
589 | perl can now be made persistent, via Policy.sh. Configure also records | |
590 | the command-line arguments used in \fIconfig.sh\fR. | |
591 | .Sh "New Platforms" | |
592 | .IX Subsection "New Platforms" | |
593 | BeOS is now supported. See \fI\s-1README\s0.beos\fR. | |
594 | .PP | |
595 | \&\s-1DOS\s0 is now supported under the \s-1DJGPP\s0 tools. See \fI\s-1README\s0.dos\fR (installed | |
596 | as perldos on some systems). | |
597 | .PP | |
598 | MiNT is now supported. See \fI\s-1README\s0.mint\fR. | |
599 | .PP | |
600 | MPE/iX is now supported. See \fI\s-1README\s0.mpeix\fR. | |
601 | .PP | |
602 | \&\s-1MVS\s0 (aka \s-1OS390\s0, aka Open Edition) is now supported. See \fI\s-1README\s0.os390\fR | |
603 | (installed as perlos390 on some systems). | |
604 | .PP | |
605 | Stratus \s-1VOS\s0 is now supported. See \fI\s-1README\s0.vos\fR. | |
606 | .Sh "Changes in existing support" | |
607 | .IX Subsection "Changes in existing support" | |
608 | Win32 support has been vastly enhanced. Support for Perl Object, a \*(C+ | |
609 | encapsulation of Perl. \s-1GCC\s0 and \s-1EGCS\s0 are now supported on Win32. | |
610 | See \fI\s-1README\s0.win32\fR, aka perlwin32. | |
611 | .PP | |
612 | \&\s-1VMS\s0 configuration system has been rewritten. See \fI\s-1README\s0.vms\fR (installed | |
613 | as README_vms on some systems). | |
614 | .PP | |
615 | The hints files for most Unix platforms have seen incremental improvements. | |
616 | .SH "Modules and Pragmata" | |
617 | .IX Header "Modules and Pragmata" | |
618 | .Sh "New Modules" | |
619 | .IX Subsection "New Modules" | |
620 | .IP "B" 4 | |
621 | .IX Item "B" | |
622 | Perl compiler and tools. See B. | |
623 | .IP "Data::Dumper" 4 | |
624 | .IX Item "Data::Dumper" | |
625 | A module to pretty print Perl data. See Data::Dumper. | |
626 | .IP "Dumpvalue" 4 | |
627 | .IX Item "Dumpvalue" | |
628 | A module to dump perl values to the screen. See Dumpvalue. | |
629 | .IP "Errno" 4 | |
630 | .IX Item "Errno" | |
631 | A module to look up errors more conveniently. See Errno. | |
632 | .IP "File::Spec" 4 | |
633 | .IX Item "File::Spec" | |
634 | A portable \s-1API\s0 for file operations. | |
635 | .IP "ExtUtils::Installed" 4 | |
636 | .IX Item "ExtUtils::Installed" | |
637 | Query and manage installed modules. | |
638 | .IP "ExtUtils::Packlist" 4 | |
639 | .IX Item "ExtUtils::Packlist" | |
640 | Manipulate .packlist files. | |
641 | .IP "Fatal" 4 | |
642 | .IX Item "Fatal" | |
643 | Make functions/builtins succeed or die. | |
644 | .IP "IPC::SysV" 4 | |
645 | .IX Item "IPC::SysV" | |
646 | Constants and other support infrastructure for System V \s-1IPC\s0 operations | |
647 | in perl. | |
648 | .IP "Test" 4 | |
649 | .IX Item "Test" | |
650 | A framework for writing testsuites. | |
651 | .IP "Tie::Array" 4 | |
652 | .IX Item "Tie::Array" | |
653 | Base class for tied arrays. | |
654 | .IP "Tie::Handle" 4 | |
655 | .IX Item "Tie::Handle" | |
656 | Base class for tied handles. | |
657 | .IP "Thread" 4 | |
658 | .IX Item "Thread" | |
659 | Perl thread creation, manipulation, and support. | |
660 | .IP "attrs" 4 | |
661 | .IX Item "attrs" | |
662 | Set subroutine attributes. | |
663 | .IP "fields" 4 | |
664 | .IX Item "fields" | |
665 | Compile-time class fields. | |
666 | .IP "re" 4 | |
667 | .IX Item "re" | |
668 | Various pragmata to control behavior of regular expressions. | |
669 | .Sh "Changes in existing modules" | |
670 | .IX Subsection "Changes in existing modules" | |
671 | .IP "Benchmark" 4 | |
672 | .IX Item "Benchmark" | |
673 | You can now run tests for \fIx\fR seconds instead of guessing the right | |
674 | number of tests to run. | |
675 | .Sp | |
676 | Keeps better time. | |
677 | .IP "Carp" 4 | |
678 | .IX Item "Carp" | |
679 | Carp has a new function \fIcluck()\fR. \fIcluck()\fR warns, like \fIcarp()\fR, but also adds | |
680 | a stack backtrace to the error message, like \fIconfess()\fR. | |
681 | .IP "\s-1CGI\s0" 4 | |
682 | .IX Item "CGI" | |
683 | \&\s-1CGI\s0 has been updated to version 2.42. | |
684 | .IP "Fcntl" 4 | |
685 | .IX Item "Fcntl" | |
686 | More Fcntl constants added: F_SETLK64, F_SETLKW64, O_LARGEFILE for | |
687 | large (more than 4G) file access (the 64\-bit support is not yet | |
688 | working, though, so no need to get overly excited), Free/Net/OpenBSD | |
689 | locking behaviour flags F_FLOCK, F_POSIX, Linux F_SHLCK, and | |
690 | O_ACCMODE: the mask of O_RDONLY, O_WRONLY, and O_RDWR. | |
691 | .IP "Math::Complex" 4 | |
692 | .IX Item "Math::Complex" | |
693 | The accessors methods Re, Im, arg, abs, rho, theta, methods can | |
694 | ($z\->\fIRe()\fR) now also act as mutators ($z\->\fIRe\fR\|(3)). | |
695 | .IP "Math::Trig" 4 | |
696 | .IX Item "Math::Trig" | |
697 | A little bit of radial trigonometry (cylindrical and spherical) added, | |
698 | for example the great circle distance. | |
699 | .IP "\s-1POSIX\s0" 4 | |
700 | .IX Item "POSIX" | |
701 | \&\s-1POSIX\s0 now has its own platform-specific hints files. | |
702 | .IP "DB_File" 4 | |
703 | .IX Item "DB_File" | |
704 | DB_File supports version 2.x of Berkeley \s-1DB\s0. See \f(CW\*(C`ext/DB_File/Changes\*(C'\fR. | |
705 | .IP "MakeMaker" 4 | |
706 | .IX Item "MakeMaker" | |
707 | MakeMaker now supports writing empty makefiles, provides a way to | |
708 | specify that site \fIumask()\fR policy should be honored. There is also | |
709 | better support for manipulation of .packlist files, and getting | |
710 | information about installed modules. | |
711 | .Sp | |
712 | Extensions that have both architecture-dependent and | |
713 | architecture-independent files are now always installed completely in | |
714 | the architecture-dependent locations. Previously, the shareable parts | |
715 | were shared both across architectures and across perl versions and were | |
716 | therefore liable to be overwritten with newer versions that might have | |
717 | subtle incompatibilities. | |
718 | .IP "\s-1CPAN\s0" 4 | |
719 | .IX Item "CPAN" | |
720 | See perlmodinstall and \s-1CPAN\s0. | |
721 | .IP "Cwd" 4 | |
722 | .IX Item "Cwd" | |
723 | Cwd::cwd is faster on most platforms. | |
724 | .SH "Utility Changes" | |
725 | .IX Header "Utility Changes" | |
726 | \&\f(CW\*(C`h2ph\*(C'\fR and related utilities have been vastly overhauled. | |
727 | .PP | |
728 | \&\f(CW\*(C`perlcc\*(C'\fR, a new experimental front end for the compiler is available. | |
729 | .PP | |
730 | The crude \s-1GNU\s0 \f(CW\*(C`configure\*(C'\fR emulator is now called \f(CW\*(C`configure.gnu\*(C'\fR to | |
731 | avoid trampling on \f(CW\*(C`Configure\*(C'\fR under case-insensitive filesystems. | |
732 | .PP | |
733 | \&\f(CW\*(C`perldoc\*(C'\fR used to be rather slow. The slower features are now optional. | |
734 | In particular, case-insensitive searches need the \f(CW\*(C`\-i\*(C'\fR switch, and | |
735 | recursive searches need \f(CW\*(C`\-r\*(C'\fR. You can set these switches in the | |
736 | \&\f(CW\*(C`PERLDOC\*(C'\fR environment variable to get the old behavior. | |
737 | .SH "Documentation Changes" | |
738 | .IX Header "Documentation Changes" | |
739 | Config.pm now has a glossary of variables. | |
740 | .PP | |
741 | \&\fIPorting/patching.pod\fR has detailed instructions on how to create and | |
742 | submit patches for perl. | |
743 | .PP | |
744 | perlport specifies guidelines on how to write portably. | |
745 | .PP | |
746 | perlmodinstall describes how to fetch and install modules from \f(CW\*(C`CPAN\*(C'\fR | |
747 | sites. | |
748 | .PP | |
749 | Some more Perl traps are documented now. See perltrap. | |
750 | .PP | |
751 | perlopentut gives a tutorial on using \fIopen()\fR. | |
752 | .PP | |
753 | perlreftut gives a tutorial on references. | |
754 | .PP | |
755 | perlthrtut gives a tutorial on threads. | |
756 | .SH "New Diagnostics" | |
757 | .IX Header "New Diagnostics" | |
758 | .IP "Ambiguous call resolved as CORE::%s(), qualify as such or use &" 4 | |
759 | .IX Item "Ambiguous call resolved as CORE::%s(), qualify as such or use &" | |
760 | (W) A subroutine you have declared has the same name as a Perl keyword, | |
761 | and you have used the name without qualification for calling one or the | |
762 | other. Perl decided to call the builtin because the subroutine is | |
763 | not imported. | |
764 | .Sp | |
765 | To force interpretation as a subroutine call, either put an ampersand | |
766 | before the subroutine name, or qualify the name with its package. | |
767 | Alternatively, you can import the subroutine (or pretend that it's | |
768 | imported with the \f(CW\*(C`use subs\*(C'\fR pragma). | |
769 | .Sp | |
770 | To silently interpret it as the Perl operator, use the \f(CW\*(C`CORE::\*(C'\fR prefix | |
771 | on the operator (e.g. \f(CW\*(C`CORE::log($x)\*(C'\fR) or by declaring the subroutine | |
772 | to be an object method (see attrs). | |
773 | .IP "Bad index while coercing array into hash" 4 | |
774 | .IX Item "Bad index while coercing array into hash" | |
775 | (F) The index looked up in the hash found as the 0'th element of a | |
776 | pseudo-hash is not legal. Index values must be at 1 or greater. | |
777 | See perlref. | |
778 | .ie n .IP "Bareword ""%s"" refers to nonexistent package" 4 | |
779 | .el .IP "Bareword ``%s'' refers to nonexistent package" 4 | |
780 | .IX Item "Bareword %s refers to nonexistent package" | |
781 | (W) You used a qualified bareword of the form \f(CW\*(C`Foo::\*(C'\fR, but | |
782 | the compiler saw no other uses of that namespace before that point. | |
783 | Perhaps you need to predeclare a package? | |
784 | .ie n .IP "Can't call method ""%s"" on an undefined value" 4 | |
785 | .el .IP "Can't call method ``%s'' on an undefined value" 4 | |
786 | .IX Item "Can't call method %s on an undefined value" | |
787 | (F) You used the syntax of a method call, but the slot filled by the | |
788 | object reference or package name contains an undefined value. | |
789 | Something like this will reproduce the error: | |
790 | .Sp | |
791 | .Vb 3 | |
792 | \& $BADREF = 42; | |
793 | \& process $BADREF 1,2,3; | |
794 | \& $BADREF->process(1,2,3); | |
795 | .Ve | |
796 | .ie n .IP "Can't check filesystem of script ""%s"" for nosuid" 4 | |
797 | .el .IP "Can't check filesystem of script ``%s'' for nosuid" 4 | |
798 | .IX Item "Can't check filesystem of script %s for nosuid" | |
799 | (P) For some reason you can't check the filesystem of the script for nosuid. | |
800 | .IP "Can't coerce array into hash" 4 | |
801 | .IX Item "Can't coerce array into hash" | |
802 | (F) You used an array where a hash was expected, but the array has no | |
803 | information on how to map from keys to array indices. You can do that | |
804 | only with arrays that have a hash reference at index 0. | |
805 | .IP "Can't goto subroutine from an eval-string" 4 | |
806 | .IX Item "Can't goto subroutine from an eval-string" | |
807 | (F) The \*(L"goto subroutine\*(R" call can't be used to jump out of an eval \*(L"string\*(R". | |
808 | (You can use it to jump out of an eval {\s-1BLOCK\s0}, but you probably don't want to.) | |
809 | .IP "Can't localize pseudo-hash element" 4 | |
810 | .IX Item "Can't localize pseudo-hash element" | |
811 | (F) You said something like \f(CW\*(C`local $ar\->{'key'}\*(C'\fR, where \f(CW$ar\fR is | |
812 | a reference to a pseudo\-hash. That hasn't been implemented yet, but | |
813 | you can get a similar effect by localizing the corresponding array | |
814 | element directly \*(-- \f(CW\*(C`local $ar\->[$ar\->[0]{'key'}]\*(C'\fR. | |
815 | .IP "Can't use %%! because Errno.pm is not available" 4 | |
816 | .IX Item "Can't use %%! because Errno.pm is not available" | |
817 | (F) The first time the %! hash is used, perl automatically loads the | |
818 | Errno.pm module. The Errno module is expected to tie the %! hash to | |
819 | provide symbolic names for \f(CW$!\fR errno values. | |
820 | .ie n .IP "Cannot find an opnumber for ""%s""" 4 | |
821 | .el .IP "Cannot find an opnumber for ``%s''" 4 | |
822 | .IX Item "Cannot find an opnumber for %s" | |
823 | (F) A string of a form \f(CW\*(C`CORE::word\*(C'\fR was given to \fIprototype()\fR, but | |
824 | there is no builtin with the name \f(CW\*(C`word\*(C'\fR. | |
825 | .IP "Character class syntax [. .] is reserved for future extensions" 4 | |
826 | .IX Item "Character class syntax [. .] is reserved for future extensions" | |
827 | (W) Within regular expression character classes ([]) the syntax beginning | |
828 | with \*(L"[.\*(R" and ending with \*(L".]\*(R" is reserved for future extensions. | |
829 | If you need to represent those character sequences inside a regular | |
830 | expression character class, just quote the square brackets with the | |
831 | backslash: \*(L"\e[.\*(R" and \*(L".\e]\*(R". | |
832 | .IP "Character class syntax [: :] is reserved for future extensions" 4 | |
833 | .IX Item "Character class syntax [: :] is reserved for future extensions" | |
834 | (W) Within regular expression character classes ([]) the syntax beginning | |
835 | with \*(L"[:\*(R" and ending with \*(L":]\*(R" is reserved for future extensions. | |
836 | If you need to represent those character sequences inside a regular | |
837 | expression character class, just quote the square brackets with the | |
838 | backslash: \*(L"\e[:\*(R" and \*(L":\e]\*(R". | |
839 | .IP "Character class syntax [= =] is reserved for future extensions" 4 | |
840 | .IX Item "Character class syntax [= =] is reserved for future extensions" | |
841 | (W) Within regular expression character classes ([]) the syntax | |
842 | beginning with \*(L"[=\*(R" and ending with \*(L"=]\*(R" is reserved for future extensions. | |
843 | If you need to represent those character sequences inside a regular | |
844 | expression character class, just quote the square brackets with the | |
845 | backslash: \*(L"\e[=\*(R" and \*(L"=\e]\*(R". | |
846 | .IP "%s: Eval-group in insecure regular expression" 4 | |
847 | .IX Item "%s: Eval-group in insecure regular expression" | |
848 | (F) Perl detected tainted data when trying to compile a regular expression | |
849 | that contains the \f(CW\*(C`(?{ ... })\*(C'\fR zero-width assertion, which is unsafe. | |
850 | See \*(L"(?{ code })\*(R" in perlre, and perlsec. | |
851 | .IP "%s: Eval-group not allowed, use re 'eval'" 4 | |
852 | .IX Item "%s: Eval-group not allowed, use re 'eval'" | |
853 | (F) A regular expression contained the \f(CW\*(C`(?{ ... })\*(C'\fR zero-width assertion, | |
854 | but that construct is only allowed when the \f(CW\*(C`use re 'eval'\*(C'\fR pragma is | |
855 | in effect. See \*(L"(?{ code })\*(R" in perlre. | |
856 | .IP "%s: Eval-group not allowed at run time" 4 | |
857 | .IX Item "%s: Eval-group not allowed at run time" | |
858 | (F) Perl tried to compile a regular expression containing the \f(CW\*(C`(?{ ... })\*(C'\fR | |
859 | zero-width assertion at run time, as it would when the pattern contains | |
860 | interpolated values. Since that is a security risk, it is not allowed. | |
861 | If you insist, you may still do this by explicitly building the pattern | |
862 | from an interpolated string at run time and using that in an \fIeval()\fR. | |
863 | See \*(L"(?{ code })\*(R" in perlre. | |
864 | .IP "Explicit blessing to '' (assuming package main)" 4 | |
865 | .IX Item "Explicit blessing to '' (assuming package main)" | |
866 | (W) You are blessing a reference to a zero length string. This has | |
867 | the effect of blessing the reference into the package main. This is | |
868 | usually not what you want. Consider providing a default target | |
869 | package, e.g. bless($ref, \f(CW$p\fR || 'MyPackage'); | |
870 | .IP "Illegal hex digit ignored" 4 | |
871 | .IX Item "Illegal hex digit ignored" | |
872 | (W) You may have tried to use a character other than 0 \- 9 or A \- F in a | |
873 | hexadecimal number. Interpretation of the hexadecimal number stopped | |
874 | before the illegal character. | |
875 | .IP "No such array field" 4 | |
876 | .IX Item "No such array field" | |
877 | (F) You tried to access an array as a hash, but the field name used is | |
878 | not defined. The hash at index 0 should map all valid field names to | |
879 | array indices for that to work. | |
880 | .ie n .IP "No such field ""%s"" in variable %s\fR of type \f(CW%s" 4 | |
881 | .el .IP "No such field ``%s'' in variable \f(CW%s\fR of type \f(CW%s\fR" 4 | |
882 | .IX Item "No such field %s in variable %s of type %s" | |
883 | (F) You tried to access a field of a typed variable where the type | |
884 | does not know about the field name. The field names are looked up in | |
885 | the \f(CW%FIELDS\fR hash in the type package at compile time. The \f(CW%FIELDS\fR hash | |
886 | is usually set up with the 'fields' pragma. | |
887 | .IP "Out of memory during ridiculously large request" 4 | |
888 | .IX Item "Out of memory during ridiculously large request" | |
889 | (F) You can't allocate more than 2^31+\*(L"small amount\*(R" bytes. This error | |
890 | is most likely to be caused by a typo in the Perl program. e.g., \f(CW$arr[time]\fR | |
891 | instead of \f(CW$arr[$time]\fR. | |
892 | .IP "Range iterator outside integer range" 4 | |
893 | .IX Item "Range iterator outside integer range" | |
894 | (F) One (or both) of the numeric arguments to the range operator \*(L"..\*(R" | |
895 | are outside the range which can be represented by integers internally. | |
896 | One possible workaround is to force Perl to use magical string | |
897 | increment by prepending \*(L"0\*(R" to your numbers. | |
898 | .ie n .IP "Recursive inheritance detected while looking for method '%s' %s" 4 | |
899 | .el .IP "Recursive inheritance detected while looking for method '%s' \f(CW%s\fR" 4 | |
900 | .IX Item "Recursive inheritance detected while looking for method '%s' %s" | |
901 | (F) More than 100 levels of inheritance were encountered while invoking a | |
902 | method. Probably indicates an unintended loop in your inheritance hierarchy. | |
903 | .IP "Reference found where even-sized list expected" 4 | |
904 | .IX Item "Reference found where even-sized list expected" | |
905 | (W) You gave a single reference where Perl was expecting a list with | |
906 | an even number of elements (for assignment to a hash). This | |
907 | usually means that you used the anon hash constructor when you meant | |
908 | to use parens. In any case, a hash requires key/value \fBpairs\fR. | |
909 | .Sp | |
910 | .Vb 4 | |
911 | \& %hash = { one => 1, two => 2, }; # WRONG | |
912 | \& %hash = [ qw/ an anon array / ]; # WRONG | |
913 | \& %hash = ( one => 1, two => 2, ); # right | |
914 | \& %hash = qw( one 1 two 2 ); # also fine | |
915 | .Ve | |
916 | .IP "Undefined value assigned to typeglob" 4 | |
917 | .IX Item "Undefined value assigned to typeglob" | |
918 | (W) An undefined value was assigned to a typeglob, a la \f(CW\*(C`*foo = undef\*(C'\fR. | |
919 | This does nothing. It's possible that you really mean \f(CW\*(C`undef *foo\*(C'\fR. | |
920 | .ie n .IP "Use of reserved word ""%s"" is deprecated" 4 | |
921 | .el .IP "Use of reserved word ``%s'' is deprecated" 4 | |
922 | .IX Item "Use of reserved word %s is deprecated" | |
923 | (D) The indicated bareword is a reserved word. Future versions of perl | |
924 | may use it as a keyword, so you're better off either explicitly quoting | |
925 | the word in a manner appropriate for its context of use, or using a | |
926 | different name altogether. The warning can be suppressed for subroutine | |
927 | names by either adding a \f(CW\*(C`&\*(C'\fR prefix, or using a package qualifier, | |
928 | e.g. \f(CW\*(C`&our()\*(C'\fR, or \f(CW\*(C`Foo::our()\*(C'\fR. | |
929 | .IP "perl: warning: Setting locale failed." 4 | |
930 | .IX Item "perl: warning: Setting locale failed." | |
931 | (S) The whole warning message will look something like: | |
932 | .Sp | |
933 | .Vb 6 | |
934 | \& perl: warning: Setting locale failed. | |
935 | \& perl: warning: Please check that your locale settings: | |
936 | \& LC_ALL = "En_US", | |
937 | \& LANG = (unset) | |
938 | \& are supported and installed on your system. | |
939 | \& perl: warning: Falling back to the standard locale ("C"). | |
940 | .Ve | |
941 | .Sp | |
942 | Exactly what were the failed locale settings varies. In the above the | |
943 | settings were that the \s-1LC_ALL\s0 was \*(L"En_US\*(R" and the \s-1LANG\s0 had no value. | |
944 | This error means that Perl detected that you and/or your system | |
945 | administrator have set up the so-called variable system but Perl could | |
946 | not use those settings. This was not dead serious, fortunately: there | |
947 | is a \*(L"default locale\*(R" called \*(L"C\*(R" that Perl can and will use, the | |
948 | script will be run. Before you really fix the problem, however, you | |
949 | will get the same error message each time you run Perl. How to really | |
950 | fix the problem can be found in \*(L"\s-1LOCALE\s0 \s-1PROBLEMS\s0\*(R" in perllocale. | |
951 | .SH "Obsolete Diagnostics" | |
952 | .IX Header "Obsolete Diagnostics" | |
953 | .IP "Can't \fImktemp()\fR" 4 | |
954 | .IX Item "Can't mktemp()" | |
955 | (F) The \fImktemp()\fR routine failed for some reason while trying to process | |
956 | a \fB\-e\fR switch. Maybe your /tmp partition is full, or clobbered. | |
957 | .Sp | |
958 | Removed because \fB\-e\fR doesn't use temporary files any more. | |
959 | .ie n .IP "Can't write to temp file for \fB\-e\fR: %s" 4 | |
960 | .el .IP "Can't write to temp file for \fB\-e\fR: \f(CW%s\fR" 4 | |
961 | .IX Item "Can't write to temp file for -e: %s" | |
962 | (F) The write routine failed for some reason while trying to process | |
963 | a \fB\-e\fR switch. Maybe your /tmp partition is full, or clobbered. | |
964 | .Sp | |
965 | Removed because \fB\-e\fR doesn't use temporary files any more. | |
966 | .IP "Cannot open temporary file" 4 | |
967 | .IX Item "Cannot open temporary file" | |
968 | (F) The create routine failed for some reason while trying to process | |
969 | a \fB\-e\fR switch. Maybe your /tmp partition is full, or clobbered. | |
970 | .Sp | |
971 | Removed because \fB\-e\fR doesn't use temporary files any more. | |
972 | .IP "regexp too big" 4 | |
973 | .IX Item "regexp too big" | |
974 | (F) The current implementation of regular expressions uses shorts as | |
975 | address offsets within a string. Unfortunately this means that if | |
976 | the regular expression compiles to longer than 32767, it'll blow up. | |
977 | Usually when you want a regular expression this big, there is a better | |
978 | way to do it with multiple statements. See perlre. | |
979 | .SH "Configuration Changes" | |
980 | .IX Header "Configuration Changes" | |
981 | You can use \*(L"Configure \-Uinstallusrbinperl\*(R" which causes installperl | |
982 | to skip installing perl also as /usr/bin/perl. This is useful if you | |
983 | prefer not to modify /usr/bin for some reason or another but harmful | |
984 | because many scripts assume to find Perl in /usr/bin/perl. | |
985 | .SH "BUGS" | |
986 | .IX Header "BUGS" | |
987 | If you find what you think is a bug, you might check the headers of | |
988 | recently posted articles in the comp.lang.perl.misc newsgroup. | |
989 | There may also be information at http://www.perl.com/perl/ , the Perl | |
990 | Home Page. | |
991 | .PP | |
992 | If you believe you have an unreported bug, please run the \fBperlbug\fR | |
993 | program included with your release. Make sure you trim your bug down | |
994 | to a tiny but sufficient test case. Your bug report, along with the | |
995 | output of \f(CW\*(C`perl \-V\*(C'\fR, will be sent off to <\fIperlbug@perl.com\fR> to be | |
996 | analysed by the Perl porting team. | |
997 | .SH "SEE ALSO" | |
998 | .IX Header "SEE ALSO" | |
999 | The \fIChanges\fR file for exhaustive details on what changed. | |
1000 | .PP | |
1001 | The \fI\s-1INSTALL\s0\fR file for how to build Perl. | |
1002 | .PP | |
1003 | The \fI\s-1README\s0\fR file for general stuff. | |
1004 | .PP | |
1005 | The \fIArtistic\fR and \fICopying\fR files for copyright information. | |
1006 | .SH "HISTORY" | |
1007 | .IX Header "HISTORY" | |
1008 | Written by Gurusamy Sarathy <\fIgsar@activestate.com\fR>, with many contributions | |
1009 | from The Perl Porters. | |
1010 | .PP | |
1011 | Send omissions or corrections to <\fIperlbug@perl.com\fR>. |