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