Debian Codegraph @

upstream/opensuse-tumbleweed/man1/perl56delta.1

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man v6.0.2 (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 .\" Required to disable full justification in groff 1.23.0.
57 .if n .ds AD l
58 .\" ========================================================================
59 .\"
60 .IX Title "PERL56DELTA 1"
61 .TH PERL56DELTA 1 2026-03-09 "perl v5.42.1" "Perl Programmers Reference Guide"
62 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
63 .\" way too many mistakes in technical documents.
64 .if n .ad l
65 .nh
66 .SH NAME
67 perl56delta \- what\*(Aqs new for perl v5.6.0
68 .SH DESCRIPTION
69 .IX Header "DESCRIPTION"
70 This document describes differences between the 5.005 release and the 5.6.0
71 release.
72 .SH "Core Enhancements"
73 .IX Header "Core Enhancements"
74 .SS "Interpreter cloning, threads, and concurrency"
75 .IX Subsection "Interpreter cloning, threads, and concurrency"
76 Perl 5.6.0 introduces the beginnings of support for running multiple
77 interpreters concurrently in different threads. In conjunction with
78 the \fBperl_clone()\fR API call, which can be used to selectively duplicate
79 the state of any given interpreter, it is possible to compile a
80 piece of code once in an interpreter, clone that interpreter
81 one or more times, and run all the resulting interpreters in distinct
82 threads.
83 .PP
84 On the Windows platform, this feature is used to emulate \fBfork()\fR at the
85 interpreter level. See perlfork for details about that.
86 .PP
87 This feature is still in evolution. It is eventually meant to be used
88 to selectively clone a subroutine and data reachable from that
89 subroutine in a separate interpreter and run the cloned subroutine
90 in a separate thread. Since there is no shared data between the
91 interpreters, little or no locking will be needed (unless parts of
92 the symbol table are explicitly shared). This is obviously intended
93 to be an easy\-to\-use replacement for the existing threads support.
94 .PP
95 Support for cloning interpreters and interpreter concurrency can be
96 enabled using the \-Dusethreads Configure option (see win32/Makefile for
97 how to enable it on Windows.) The resulting perl executable will be
98 functionally identical to one that was built with \-Dmultiplicity, but
99 the \fBperl_clone()\fR API call will only be available in the former.
100 .PP
101 \&\-Dusethreads enables the cpp macro USE_ITHREADS by default, which in turn
102 enables Perl source code changes that provide a clear separation between
103 the op tree and the data it operates with. The former is immutable, and
104 can therefore be shared between an interpreter and all of its clones,
105 while the latter is considered local to each interpreter, and is therefore
106 copied for each clone.
107 .PP
108 Note that building Perl with the \-Dusemultiplicity Configure option
109 is adequate if you wish to run multiple \fBindependent\fR interpreters
110 concurrently in different threads. \-Dusethreads only provides the
111 additional functionality of the \fBperl_clone()\fR API call and other
112 support for running \fBcloned\fR interpreters concurrently.
113 .PP
114 .Vb 2
115 \& NOTE: This is an experimental feature. Implementation details are
116 \& subject to change.
117 .Ve
118 .SS "Lexically scoped warning categories"
119 .IX Subsection "Lexically scoped warning categories"
120 You can now control the granularity of warnings emitted by perl at a finer
121 level using the \f(CW\*(C`use warnings\*(C'\fR pragma. warnings and perllexwarn
122 have copious documentation on this feature.
123 .SS "Unicode and UTF\-8 support"
124 .IX Subsection "Unicode and UTF-8 support"
125 Perl now uses UTF\-8 as its internal representation for character
126 strings. The \f(CW\*(C`utf8\*(C'\fR and \f(CW\*(C`bytes\*(C'\fR pragmas are used to control this support
127 in the current lexical scope. See perlunicode, utf8 and bytes for
128 more information.
129 .PP
130 This feature is expected to evolve quickly to support some form of I/O
131 disciplines that can be used to specify the kind of input and output data
132 (bytes or characters). Until that happens, additional modules from CPAN
133 will be needed to complete the toolkit for dealing with Unicode.
134 .PP
135 .Vb 2
136 \& NOTE: This should be considered an experimental feature. Implementation
137 \& details are subject to change.
138 .Ve
139 .SS "Support for interpolating named characters"
140 .IX Subsection "Support for interpolating named characters"
141 The new \f(CW\*(C`\eN\*(C'\fR escape interpolates named characters within strings.
142 For example, \f(CW"Hi! \eN{WHITE SMILING FACE}"\fR evaluates to a string
143 with a Unicode smiley face at the end.
144 .SS """our"" declarations"
145 .IX Subsection """our"" declarations"
146 An "our" declaration introduces a value that can be best understood
147 as a lexically scoped symbolic alias to a global variable in the
148 package that was current where the variable was declared. This is
149 mostly useful as an alternative to the \f(CW\*(C`vars\*(C'\fR pragma, but also provides
150 the opportunity to introduce typing and other attributes for such
151 variables. See "our" in perlfunc.
152 .SS "Support for strings represented as a vector of ordinals"
153 .IX Subsection "Support for strings represented as a vector of ordinals"
154 Literals of the form \f(CW\*(C`v1.2.3.4\*(C'\fR are now parsed as a string composed
155 of characters with the specified ordinals. This is an alternative, more
156 readable way to construct (possibly Unicode) strings instead of
157 interpolating characters, as in \f(CW"\ex{1}\ex{2}\ex{3}\ex{4}"\fR. The leading
158 \&\f(CW\*(C`v\*(C'\fR may be omitted if there are more than two ordinals, so \f(CW1.2.3\fR is
159 parsed the same as \f(CW\*(C`v1.2.3\*(C'\fR.
160 .PP
161 Strings written in this form are also useful to represent version "numbers".
162 It is easy to compare such version "numbers" (which are really just plain
163 strings) using any of the usual string comparison operators \f(CW\*(C`eq\*(C'\fR, \f(CW\*(C`ne\*(C'\fR,
164 \&\f(CW\*(C`lt\*(C'\fR, \f(CW\*(C`gt\*(C'\fR, etc., or perform bitwise string operations on them using \f(CW\*(C`|\*(C'\fR,
165 \&\f(CW\*(C`&\*(C'\fR, etc.
166 .PP
167 In conjunction with the new \f(CW$^V\fR magic variable (which contains
168 the perl version as a string), such literals can be used as a readable way
169 to check if you\*(Aqre running a particular version of Perl:
170 .PP
171 .Vb 4
172 \& # this will parse in older versions of Perl also
173 \& if ($^V and $^V gt v5.6.0) {
174 \& # new features supported
175 \& }
176 .Ve
177 .PP
178 \&\f(CW\*(C`require\*(C'\fR and \f(CW\*(C`use\*(C'\fR also have some special magic to support such
179 literals, but this particular usage should be avoided because it leads to
180 misleading error messages under versions of Perl which don\*(Aqt support vector
181 strings. Using a true version number will ensure correct behavior in all
182 versions of Perl:
183 .PP
184 .Vb 2
185 \& require 5.006; # run time check for v5.6
186 \& use 5.006_001; # compile time check for v5.6.1
187 .Ve
188 .PP
189 Also, \f(CW\*(C`sprintf\*(C'\fR and \f(CW\*(C`printf\*(C'\fR support the Perl\-specific format flag \f(CW%v\fR
190 to print ordinals of characters in arbitrary strings:
191 .PP
192 .Vb 3
193 \& printf "v%vd", $^V; # prints current version, such as "v5.5.650"
194 \& printf "%*vX", ":", $addr; # formats IPv6 address
195 \& printf "%*vb", " ", $bits; # displays bitstring
196 .Ve
197 .PP
198 See "Scalar value constructors" in perldata for additional information.
199 .SS "Improved Perl version numbering system"
200 .IX Subsection "Improved Perl version numbering system"
201 Beginning with Perl version 5.6.0, the version number convention has been
202 changed to a "dotted integer" scheme that is more commonly found in open
203 source projects.
204 .PP
205 Maintenance versions of v5.6.0 will be released as v5.6.1, v5.6.2 etc.
206 The next development series following v5.6.0 will be numbered v5.7.x,
207 beginning with v5.7.0, and the next major production release following
208 v5.6.0 will be v5.8.0.
209 .PP
210 The English module now sets \f(CW$PERL_VERSION\fR to $^V (a string value) rather
211 than \f(CW$]\fR (a numeric value). (This is a potential incompatibility.
212 Send us a report via perlbug if you are affected by this.)
213 .PP
214 The v1.2.3 syntax is also now legal in Perl.
215 See "Support for strings represented as a vector of ordinals" for more on that.
216 .PP
217 To cope with the new versioning system\*(Aqs use of at least three significant
218 digits for each version component, the method used for incrementing the
219 subversion number has also changed slightly. We assume that versions older
220 than v5.6.0 have been incrementing the subversion component in multiples of
221 10. Versions after v5.6.0 will increment them by 1. Thus, using the new
222 notation, 5.005_03 is the "same" as v5.5.30, and the first maintenance
223 version following v5.6.0 will be v5.6.1 (which should be read as being
224 equivalent to a floating point value of 5.006_001 in the older format,
225 stored in \f(CW$]\fR).
226 .SS "New syntax for declaring subroutine attributes"
227 .IX Subsection "New syntax for declaring subroutine attributes"
228 Formerly, if you wanted to mark a subroutine as being a method call or
229 as requiring an automatic \fBlock()\fR when it is entered, you had to declare
230 that with a \f(CW\*(C`use attrs\*(C'\fR pragma in the body of the subroutine.
231 That can now be accomplished with declaration syntax, like this:
232 .PP
233 .Vb 5
234 \& sub mymethod : locked method;
235 \& ...
236 \& sub mymethod : locked method {
237 \& ...
238 \& }
239 \&
240 \& sub othermethod :locked :method;
241 \& ...
242 \& sub othermethod :locked :method {
243 \& ...
244 \& }
245 .Ve
246 .PP
247 (Note how only the first \f(CW\*(C`:\*(C'\fR is mandatory, and whitespace surrounding
248 the \f(CW\*(C`:\*(C'\fR is optional.)
249 .PP
250 \&\fIAutoSplit.pm\fR and \fISelfLoader.pm\fR have been updated to keep the attributes
251 with the stubs they provide. See attributes.
252 .SS "File and directory handles can be autovivified"
253 .IX Subsection "File and directory handles can be autovivified"
254 Similar to how constructs such as \f(CW\*(C`$x\->[0]\*(C'\fR autovivify a reference,
255 handle constructors (\fBopen()\fR, \fBopendir()\fR, \fBpipe()\fR, \fBsocketpair()\fR, \fBsysopen()\fR,
256 \&\fBsocket()\fR, and \fBaccept()\fR) now autovivify a file or directory handle
257 if the handle passed to them is an uninitialized scalar variable. This
258 allows the constructs such as \f(CW\*(C`open(my $fh, ...)\*(C'\fR and \f(CW\*(C`open(local $fh,...)\*(C'\fR
259 to be used to create filehandles that will conveniently be closed
260 automatically when the scope ends, provided there are no other references
261 to them. This largely eliminates the need for typeglobs when opening
262 filehandles that must be passed around, as in the following example:
263 .PP
264 .Vb 5
265 \& sub myopen {
266 \& open my $fh, "@_"
267 \& or die "Can\*(Aqt open \*(Aq@_\*(Aq: $!";
268 \& return $fh;
269 \& }
270 \&
271 \& {
272 \& my $f = myopen("</etc/motd");
273 \& print <$f>;
274 \& # $f implicitly closed here
275 \& }
276 .Ve
277 .SS "\fBopen()\fP with more than two arguments"
278 .IX Subsection "open() with more than two arguments"
279 If \fBopen()\fR is passed three arguments instead of two, the second argument
280 is used as the mode and the third argument is taken to be the file name.
281 This is primarily useful for protecting against unintended magic behavior
282 of the traditional two\-argument form. See "open" in perlfunc.
283 .SS "64\-bit support"
284 .IX Subsection "64-bit support"
285 Any platform that has 64\-bit integers either
286 .PP
287 .Vb 3
288 \& (1) natively as longs or ints
289 \& (2) via special compiler flags
290 \& (3) using long long or int64_t
291 .Ve
292 .PP
293 is able to use "quads" (64\-bit integers) as follows:
294 .IP \(bu 4
295 constants (decimal, hexadecimal, octal, binary) in the code
296 .IP \(bu 4
297 arguments to \fBoct()\fR and \fBhex()\fR
298 .IP \(bu 4
299 arguments to \fBprint()\fR, \fBprintf()\fR and \fBsprintf()\fR (flag prefixes ll, L, q)
300 .IP \(bu 4
301 printed as such
302 .IP \(bu 4
303 \&\fBpack()\fR and \fBunpack()\fR "q" and "Q" formats
304 .IP \(bu 4
305 in basic arithmetics: + \- * / % (NOTE: operating close to the limits
306 of the integer values may produce surprising results)
307 .IP \(bu 4
308 in bit arithmetics: & | ^ ~ << >> (NOTE: these used to be forced
309 to be 32 bits wide but now operate on the full native width.)
310 .IP \(bu 4
311 \&\fBvec()\fR
312 .PP
313 Note that unless you have the case (a) you will have to configure
314 and compile Perl using the \-Duse64bitint Configure flag.
315 .PP
316 .Vb 2
317 \& NOTE: The Configure flags \-Duselonglong and \-Duse64bits have been
318 \& deprecated. Use \-Duse64bitint instead.
319 .Ve
320 .PP
321 There are actually two modes of 64\-bitness: the first one is achieved
322 using Configure \-Duse64bitint and the second one using Configure
323 \&\-Duse64bitall. The difference is that the first one is minimal and
324 the second one maximal. The first works in more places than the second.
325 .PP
326 The \f(CW\*(C`use64bitint\*(C'\fR does only as much as is required to get 64\-bit
327 integers into Perl (this may mean, for example, using "long longs")
328 while your memory may still be limited to 2 gigabytes (because your
329 pointers could still be 32\-bit). Note that the name \f(CW\*(C`64bitint\*(C'\fR does
330 not imply that your C compiler will be using 64\-bit \f(CW\*(C`int\*(C'\fRs (it might,
331 but it doesn\*(Aqt have to): the \f(CW\*(C`use64bitint\*(C'\fR means that you will be
332 able to have 64 bits wide scalar values.
333 .PP
334 The \f(CW\*(C`use64bitall\*(C'\fR goes all the way by attempting to switch also
335 integers (if it can), longs (and pointers) to being 64\-bit. This may
336 create an even more binary incompatible Perl than \-Duse64bitint: the
337 resulting executable may not run at all in a 32\-bit box, or you may
338 have to reboot/reconfigure/rebuild your operating system to be 64\-bit
339 aware.
340 .PP
341 Natively 64\-bit systems like Alpha and Cray need neither \-Duse64bitint
342 nor \-Duse64bitall.
343 .PP
344 Last but not least: note that due to Perl\*(Aqs habit of always using
345 floating point numbers, the quads are still not true integers.
346 When quads overflow their limits (0...18_446_744_073_709_551_615 unsigned,
347 \&\-9_223_372_036_854_775_808...9_223_372_036_854_775_807 signed), they
348 are silently promoted to floating point numbers, after which they will
349 start losing precision (in their lower digits).
350 .PP
351 .Vb 4
352 \& NOTE: 64\-bit support is still experimental on most platforms.
353 \& Existing support only covers the LP64 data model. In particular, the
354 \& LLP64 data model is not yet supported. 64\-bit libraries and system
355 \& APIs on many platforms have not stabilized\-\-your mileage may vary.
356 .Ve
357 .SS "Large file support"
358 .IX Subsection "Large file support"
359 If you have filesystems that support "large files" (files larger than
360 2 gigabytes), you may now also be able to create and access them from
361 Perl.
362 .PP
363 .Vb 2
364 \& NOTE: The default action is to enable large file support, if
365 \& available on the platform.
366 .Ve
367 .PP
368 If the large file support is on, and you have a Fcntl constant
369 O_LARGEFILE, the O_LARGEFILE is automatically added to the flags
370 of \fBsysopen()\fR.
371 .PP
372 Beware that unless your filesystem also supports "sparse files" seeking
373 to umpteen petabytes may be inadvisable.
374 .PP
375 Note that in addition to requiring a proper file system to do large
376 files you may also need to adjust your per\-process (or your
377 per\-system, or per\-process\-group, or per\-user\-group) maximum filesize
378 limits before running Perl scripts that try to handle large files,
379 especially if you intend to write such files.
380 .PP
381 Finally, in addition to your process/process group maximum filesize
382 limits, you may have quota limits on your filesystems that stop you
383 (your user id or your user group id) from using large files.
384 .PP
385 Adjusting your process/user/group/file system/operating system limits
386 is outside the scope of Perl core language. For process limits, you
387 may try increasing the limits using your shell\*(Aqs limits/limit/ulimit
388 command before running Perl. The BSD::Resource extension (not
389 included with the standard Perl distribution) may also be of use, it
390 offers the getrlimit/setrlimit interface that can be used to adjust
391 process resource usage limits, including the maximum filesize limit.
392 .SS "Long doubles"
393 .IX Subsection "Long doubles"
394 In some systems you may be able to use long doubles to enhance the
395 range and precision of your double precision floating point numbers
396 (that is, Perl\*(Aqs numbers). Use Configure \-Duselongdouble to enable
397 this support (if it is available).
398 .SS """more bits"""
399 .IX Subsection """more bits"""
400 You can "Configure \-Dusemorebits" to turn on both the 64\-bit support
401 and the long double support.
402 .SS "Enhanced support for \fBsort()\fP subroutines"
403 .IX Subsection "Enhanced support for sort() subroutines"
404 Perl subroutines with a prototype of \f(CW\*(C`($$)\*(C'\fR, and XSUBs in general, can
405 now be used as sort subroutines. In either case, the two elements to
406 be compared are passed as normal parameters in \f(CW@_\fR. See "sort" in perlfunc.
407 .PP
408 For unprototyped sort subroutines, the historical behavior of passing
409 the elements to be compared as the global variables \f(CW$a\fR and \f(CW$b\fR remains
410 unchanged.
411 .ie n .SS """sort $coderef @foo"" allowed"
412 .el .SS "\f(CWsort $coderef @foo\fP allowed"
413 .IX Subsection "sort $coderef @foo allowed"
414 \&\fBsort()\fR did not accept a subroutine reference as the comparison
415 function in earlier versions. This is now permitted.
416 .SS "File globbing implemented internally"
417 .IX Subsection "File globbing implemented internally"
418 Perl now uses the File::Glob implementation of the \fBglob()\fR operator
419 automatically. This avoids using an external csh process and the
420 problems associated with it.
421 .PP
422 .Vb 2
423 \& NOTE: This is currently an experimental feature. Interfaces and
424 \& implementation are subject to change.
425 .Ve
426 .SS "Support for CHECK blocks"
427 .IX Subsection "Support for CHECK blocks"
428 In addition to \f(CW\*(C`BEGIN\*(C'\fR, \f(CW\*(C`INIT\*(C'\fR, \f(CW\*(C`END\*(C'\fR, \f(CW\*(C`DESTROY\*(C'\fR and \f(CW\*(C`AUTOLOAD\*(C'\fR,
429 subroutines named \f(CW\*(C`CHECK\*(C'\fR are now special. These are queued up during
430 compilation and behave similar to END blocks, except they are called at
431 the end of compilation rather than at the end of execution. They cannot
432 be called directly.
433 .SS "POSIX character class syntax [: :] supported"
434 .IX Subsection "POSIX character class syntax [: :] supported"
435 For example to match alphabetic characters use /[[:alpha:]]/.
436 See perlre for details.
437 .SS "Better pseudo\-random number generator"
438 .IX Subsection "Better pseudo-random number generator"
439 In 5.005_0x and earlier, perl\*(Aqs \fBrand()\fR function used the C library
440 \&\fBrand\fR\|(3) function. As of 5.005_52, Configure tests for \fBdrand48()\fR,
441 \&\fBrandom()\fR, and \fBrand()\fR (in that order) and picks the first one it finds.
442 .PP
443 These changes should result in better random numbers from \fBrand()\fR.
444 .ie n .SS "Improved ""qw//"" operator"
445 .el .SS "Improved \f(CWqw//\fP operator"
446 .IX Subsection "Improved qw// operator"
447 The \f(CW\*(C`qw//\*(C'\fR operator is now evaluated at compile time into a true list
448 instead of being replaced with a run time call to \f(CWsplit()\fR. This
449 removes the confusing misbehaviour of \f(CW\*(C`qw//\*(C'\fR in scalar context, which
450 had inherited that behaviour from \fBsplit()\fR.
451 .PP
452 Thus:
453 .PP
454 .Vb 1
455 \& $foo = ($bar) = qw(a b c); print "$foo|$bar\en";
456 .Ve
457 .PP
458 now correctly prints "3|a", instead of "2|a".
459 .SS "Better worst\-case behavior of hashes"
460 .IX Subsection "Better worst-case behavior of hashes"
461 Small changes in the hashing algorithm have been implemented in
462 order to improve the distribution of lower order bits in the
463 hashed value. This is expected to yield better performance on
464 keys that are repeated sequences.
465 .SS "\fBpack()\fP format \*(AqZ\*(Aq supported"
466 .IX Subsection "pack() format 'Z' supported"
467 The new format type \*(AqZ\*(Aq is useful for packing and unpacking null\-terminated
468 strings. See "pack" in perlfunc.
469 .SS "\fBpack()\fP format modifier \*(Aq!\*(Aq supported"
470 .IX Subsection "pack() format modifier '!' supported"
471 The new format type modifier \*(Aq!\*(Aq is useful for packing and unpacking
472 native shorts, ints, and longs. See "pack" in perlfunc.
473 .SS "\fBpack()\fP and \fBunpack()\fP support counted strings"
474 .IX Subsection "pack() and unpack() support counted strings"
475 The template character \*(Aq/\*(Aq can be used to specify a counted string
476 type to be packed or unpacked. See "pack" in perlfunc.
477 .SS "Comments in \fBpack()\fP templates"
478 .IX Subsection "Comments in pack() templates"
479 The \*(Aq#\*(Aq character in a template introduces a comment up to
480 end of the line. This facilitates documentation of \fBpack()\fR
481 templates.
482 .SS "Weak references"
483 .IX Subsection "Weak references"
484 In previous versions of Perl, you couldn\*(Aqt cache objects so as
485 to allow them to be deleted if the last reference from outside
486 the cache is deleted. The reference in the cache would hold a
487 reference count on the object and the objects would never be
488 destroyed.
489 .PP
490 Another familiar problem is with circular references. When an
491 object references itself, its reference count would never go
492 down to zero, and it would not get destroyed until the program
493 is about to exit.
494 .PP
495 Weak references solve this by allowing you to "weaken" any
496 reference, that is, make it not count towards the reference count.
497 When the last non\-weak reference to an object is deleted, the object
498 is destroyed and all the weak references to the object are
499 automatically undef\-ed.
500 .PP
501 To use this feature, you need the Devel::WeakRef package from CPAN, which
502 contains additional documentation.
503 .PP
504 .Vb 1
505 \& NOTE: This is an experimental feature. Details are subject to change.
506 .Ve
507 .SS "Binary numbers supported"
508 .IX Subsection "Binary numbers supported"
509 Binary numbers are now supported as literals, in s?printf formats, and
510 \&\f(CWoct()\fR:
511 .PP
512 .Vb 2
513 \& $answer = 0b101010;
514 \& printf "The answer is: %b\en", oct("0b101010");
515 .Ve
516 .SS "Lvalue subroutines"
517 .IX Subsection "Lvalue subroutines"
518 Subroutines can now return modifiable lvalues.
519 See "Lvalue subroutines" in perlsub.
520 .PP
521 .Vb 1
522 \& NOTE: This is an experimental feature. Details are subject to change.
523 .Ve
524 .SS "Some arrows may be omitted in calls through references"
525 .IX Subsection "Some arrows may be omitted in calls through references"
526 Perl now allows the arrow to be omitted in many constructs
527 involving subroutine calls through references. For example,
528 \&\f(CW\*(C`$foo[10]\->(\*(Aqfoo\*(Aq)\*(C'\fR may now be written \f(CW\*(C`$foo[10](\*(Aqfoo\*(Aq)\*(C'\fR.
529 This is rather similar to how the arrow may be omitted from
530 \&\f(CW\*(C`$foo[10]\->{\*(Aqfoo\*(Aq}\*(C'\fR. Note however, that the arrow is still
531 required for \f(CW\*(C`foo(10)\->(\*(Aqbar\*(Aq)\*(C'\fR.
532 .SS "Boolean assignment operators are legal lvalues"
533 .IX Subsection "Boolean assignment operators are legal lvalues"
534 Constructs such as \f(CW\*(C`($a ||= 2) += 1\*(C'\fR are now allowed.
535 .SS "\fBexists()\fP is supported on subroutine names"
536 .IX Subsection "exists() is supported on subroutine names"
537 The \fBexists()\fR builtin now works on subroutine names. A subroutine
538 is considered to exist if it has been declared (even if implicitly).
539 See "exists" in perlfunc for examples.
540 .SS "\fBexists()\fP and \fBdelete()\fP are supported on array elements"
541 .IX Subsection "exists() and delete() are supported on array elements"
542 The \fBexists()\fR and \fBdelete()\fR builtins now work on simple arrays as well.
543 The behavior is similar to that on hash elements.
544 .PP
545 \&\fBexists()\fR can be used to check whether an array element has been
546 initialized. This avoids autovivifying array elements that don\*(Aqt exist.
547 If the array is tied, the \fBEXISTS()\fR method in the corresponding tied
548 package will be invoked.
549 .PP
550 \&\fBdelete()\fR may be used to remove an element from the array and return
551 it. The array element at that position returns to its uninitialized
552 state, so that testing for the same element with \fBexists()\fR will return
553 false. If the element happens to be the one at the end, the size of
554 the array also shrinks up to the highest element that tests true for
555 \&\fBexists()\fR, or 0 if none such is found. If the array is tied, the \fBDELETE()\fR
556 method in the corresponding tied package will be invoked.
557 .PP
558 See "exists" in perlfunc and "delete" in perlfunc for examples.
559 .SS "Pseudo\-hashes work better"
560 .IX Subsection "Pseudo-hashes work better"
561 Dereferencing some types of reference values in a pseudo\-hash,
562 such as \f(CW\*(C`$ph\->{foo}[1]\*(C'\fR, was accidentally disallowed. This has
563 been corrected.
564 .PP
565 When applied to a pseudo\-hash element, \fBexists()\fR now reports whether
566 the specified value exists, not merely if the key is valid.
567 .PP
568 \&\fBdelete()\fR now works on pseudo\-hashes. When given a pseudo\-hash element
569 or slice it deletes the values corresponding to the keys (but not the keys
570 themselves). See "Pseudo\-hashes: Using an array as a hash" in perlref.
571 .PP
572 Pseudo\-hash slices with constant keys are now optimized to array lookups
573 at compile\-time.
574 .PP
575 List assignments to pseudo\-hash slices are now supported.
576 .PP
577 The \f(CW\*(C`fields\*(C'\fR pragma now provides ways to create pseudo\-hashes, via
578 \&\fBfields::new()\fR and \fBfields::phash()\fR. See fields.
579 .PP
580 .Vb 3
581 \& NOTE: The pseudo\-hash data type continues to be experimental.
582 \& Limiting oneself to the interface elements provided by the
583 \& fields pragma will provide protection from any future changes.
584 .Ve
585 .SS "Automatic flushing of output buffers"
586 .IX Subsection "Automatic flushing of output buffers"
587 \&\fBfork()\fR, \fBexec()\fR, \fBsystem()\fR, qx//, and pipe \fBopen()\fRs now flush buffers
588 of all files opened for output when the operation was attempted. This
589 mostly eliminates confusing buffering mishaps suffered by users unaware
590 of how Perl internally handles I/O.
591 .PP
592 This is not supported on some platforms like Solaris where a suitably
593 correct implementation of fflush(NULL) isn\*(Aqt available.
594 .SS "Better diagnostics on meaningless filehandle operations"
595 .IX Subsection "Better diagnostics on meaningless filehandle operations"
596 Constructs such as \f(CWopen(<FH>)\fR and \f(CWclose(<FH>)\fR
597 are compile time errors. Attempting to read from filehandles that
598 were opened only for writing will now produce warnings (just as
599 writing to read\-only filehandles does).
600 .SS "Where possible, buffered data discarded from duped input filehandle"
601 .IX Subsection "Where possible, buffered data discarded from duped input filehandle"
602 \&\f(CW\*(C`open(NEW, "<&OLD")\*(C'\fR now attempts to discard any data that
603 was previously read and buffered in \f(CW\*(C`OLD\*(C'\fR before duping the handle.
604 On platforms where doing this is allowed, the next read operation
605 on \f(CW\*(C`NEW\*(C'\fR will return the same data as the corresponding operation
606 on \f(CW\*(C`OLD\*(C'\fR. Formerly, it would have returned the data from the start
607 of the following disk block instead.
608 .SS "\fBeof()\fP has the same old magic as <>"
609 .IX Subsection "eof() has the same old magic as <>"
610 \&\f(CWeof()\fR would return true if no attempt to read from \f(CW\*(C`<>\*(C'\fR had
611 yet been made. \f(CWeof()\fR has been changed to have a little magic of its
612 own, it now opens the \f(CW\*(C`<>\*(C'\fR files.
613 .SS "\fBbinmode()\fP can be used to set :crlf and :raw modes"
614 .IX Subsection "binmode() can be used to set :crlf and :raw modes"
615 \&\fBbinmode()\fR now accepts a second argument that specifies a discipline
616 for the handle in question. The two pseudo\-disciplines ":raw" and
617 ":crlf" are currently supported on DOS\-derivative platforms.
618 See "binmode" in perlfunc and open.
619 .ie n .SS """\-T"" filetest recognizes UTF\-8 encoded files as ""text"""
620 .el .SS "\f(CW\-T\fP filetest recognizes UTF\-8 encoded files as ""text"""
621 .IX Subsection "-T filetest recognizes UTF-8 encoded files as ""text"""
622 The algorithm used for the \f(CW\*(C`\-T\*(C'\fR filetest has been enhanced to
623 correctly identify UTF\-8 content as "text".
624 .SS "\fBsystem()\fP, backticks and pipe open now reflect \fBexec()\fP failure"
625 .IX Subsection "system(), backticks and pipe open now reflect exec() failure"
626 On Unix and similar platforms, \fBsystem()\fR, \fBqx()\fR and open(FOO, "cmd |")
627 etc., are implemented via \fBfork()\fR and \fBexec()\fR. When the underlying
628 \&\fBexec()\fR fails, earlier versions did not report the error properly,
629 since the \fBexec()\fR happened to be in a different process.
630 .PP
631 The child process now communicates with the parent about the
632 error in launching the external command, which allows these
633 constructs to return with their usual error value and set $!.
634 .SS "Improved diagnostics"
635 .IX Subsection "Improved diagnostics"
636 Line numbers are no longer suppressed (under most likely circumstances)
637 during the global destruction phase.
638 .PP
639 Diagnostics emitted from code running in threads other than the main
640 thread are now accompanied by the thread ID.
641 .PP
642 Embedded null characters in diagnostics now actually show up. They
643 used to truncate the message in prior versions.
644 .PP
645 \&\f(CW$foo::a\fR and \f(CW$foo::b\fR are now exempt from "possible typo" warnings only
646 if \fBsort()\fR is encountered in package \f(CW\*(C`foo\*(C'\fR.
647 .PP
648 Unrecognized alphabetic escapes encountered when parsing quote
649 constructs now generate a warning, since they may take on new
650 semantics in later versions of Perl.
651 .PP
652 Many diagnostics now report the internal operation in which the warning
653 was provoked, like so:
654 .PP
655 .Vb 2
656 \& Use of uninitialized value in concatenation (.) at (eval 1) line 1.
657 \& Use of uninitialized value in print at (eval 1) line 1.
658 .Ve
659 .PP
660 Diagnostics that occur within eval may also report the file and line
661 number where the eval is located, in addition to the eval sequence
662 number and the line number within the evaluated text itself. For
663 example:
664 .PP
665 .Vb 1
666 \& Not enough arguments for scalar at (eval 4)[newlib/perl5db.pl:1411] line 2, at EOF
667 .Ve
668 .SS "Diagnostics follow STDERR"
669 .IX Subsection "Diagnostics follow STDERR"
670 Diagnostic output now goes to whichever file the \f(CW\*(C`STDERR\*(C'\fR handle
671 is pointing at, instead of always going to the underlying C runtime
672 library\*(Aqs \f(CW\*(C`stderr\*(C'\fR.
673 .SS "More consistent close\-on\-exec behavior"
674 .IX Subsection "More consistent close-on-exec behavior"
675 On systems that support a close\-on\-exec flag on filehandles, the
676 flag is now set for any handles created by \fBpipe()\fR, \fBsocketpair()\fR,
677 \&\fBsocket()\fR, and \fBaccept()\fR, if that is warranted by the value of $^F
678 that may be in effect. Earlier versions neglected to set the flag
679 for handles created with these operators. See "pipe" in perlfunc,
680 "socketpair" in perlfunc, "socket" in perlfunc, "accept" in perlfunc,
681 and "$^F" in perlvar.
682 .SS "\fBsyswrite()\fP ease\-of\-use"
683 .IX Subsection "syswrite() ease-of-use"
684 The length argument of \f(CWsyswrite()\fR has become optional.
685 .SS "Better syntax checks on parenthesized unary operators"
686 .IX Subsection "Better syntax checks on parenthesized unary operators"
687 Expressions such as:
688 .PP
689 .Vb 3
690 \& print defined(&foo,&bar,&baz);
691 \& print uc("foo","bar","baz");
692 \& undef($foo,&bar);
693 .Ve
694 .PP
695 used to be accidentally allowed in earlier versions, and produced
696 unpredictable behaviour. Some produced ancillary warnings
697 when used in this way; others silently did the wrong thing.
698 .PP
699 The parenthesized forms of most unary operators that expect a single
700 argument now ensure that they are not called with more than one
701 argument, making the cases shown above syntax errors. The usual
702 behaviour of:
703 .PP
704 .Vb 3
705 \& print defined &foo, &bar, &baz;
706 \& print uc "foo", "bar", "baz";
707 \& undef $foo, &bar;
708 .Ve
709 .PP
710 remains unchanged. See perlop.
711 .SS "Bit operators support full native integer width"
712 .IX Subsection "Bit operators support full native integer width"
713 The bit operators (& | ^ ~ << >>) now operate on the full native
714 integral width (the exact size of which is available in \f(CW$Config\fR{ivsize}).
715 For example, if your platform is either natively 64\-bit or if Perl
716 has been configured to use 64\-bit integers, these operations apply
717 to 8 bytes (as opposed to 4 bytes on 32\-bit platforms).
718 For portability, be sure to mask off the excess bits in the result of
719 unary \f(CW\*(C`~\*(C'\fR, e.g., \f(CW\*(C`~$x & 0xffffffff\*(C'\fR.
720 .SS "Improved security features"
721 .IX Subsection "Improved security features"
722 More potentially unsafe operations taint their results for improved
723 security.
724 .PP
725 The \f(CW\*(C`passwd\*(C'\fR and \f(CW\*(C`shell\*(C'\fR fields returned by the \fBgetpwent()\fR, \fBgetpwnam()\fR,
726 and \fBgetpwuid()\fR are now tainted, because the user can affect their own
727 encrypted password and login shell.
728 .PP
729 The variable modified by \fBshmread()\fR, and messages returned by \fBmsgrcv()\fR
730 (and its object\-oriented interface IPC::SysV::Msg::rcv) are also tainted,
731 because other untrusted processes can modify messages and shared memory
732 segments for their own nefarious purposes.
733 .SS "More functional bareword prototype (*)"
734 .IX Subsection "More functional bareword prototype (*)"
735 Bareword prototypes have been rationalized to enable them to be used
736 to override builtins that accept barewords and interpret them in
737 a special way, such as \f(CW\*(C`require\*(C'\fR or \f(CW\*(C`do\*(C'\fR.
738 .PP
739 Arguments prototyped as \f(CW\*(C`*\*(C'\fR will now be visible within the subroutine
740 as either a simple scalar or as a reference to a typeglob.
741 See "Prototypes" in perlsub.
742 .ie n .SS """require"" and ""do"" may be overridden"
743 .el .SS "\f(CWrequire\fP and \f(CWdo\fP may be overridden"
744 .IX Subsection "require and do may be overridden"
745 \&\f(CW\*(C`require\*(C'\fR and \f(CW\*(C`do \*(Aqfile\*(Aq\*(C'\fR operations may be overridden locally
746 by importing subroutines of the same name into the current package
747 (or globally by importing them into the CORE::GLOBAL:: namespace).
748 Overriding \f(CW\*(C`require\*(C'\fR will also affect \f(CW\*(C`use\*(C'\fR, provided the override
749 is visible at compile\-time.
750 See "Overriding Built\-in Functions" in perlsub.
751 .SS "$^X variables may now have names longer than one character"
752 .IX Subsection "$^X variables may now have names longer than one character"
753 Formerly, $^X was synonymous with ${"\ecX"}, but $^XY was a syntax
754 error. Now variable names that begin with a control character may be
755 arbitrarily long. However, for compatibility reasons, these variables
756 \&\fImust\fR be written with explicit braces, as \f(CW\*(C`${^XY}\*(C'\fR for example.
757 \&\f(CW\*(C`${^XYZ}\*(C'\fR is synonymous with ${"\ecXYZ"}. Variable names with more
758 than one control character, such as \f(CW\*(C`${^XY^Z}\*(C'\fR, are illegal.
759 .PP
760 The old syntax has not changed. As before, \`^X\*(Aq may be either a
761 literal control\-X character or the two\-character sequence \`caret\*(Aq plus
762 \&\`X\*(Aq. When braces are omitted, the variable name stops after the
763 control character. Thus \f(CW"$^XYZ"\fR continues to be synonymous with
764 \&\f(CW\*(C`$^X . "YZ"\*(C'\fR as before.
765 .PP
766 As before, lexical variables may not have names beginning with control
767 characters. As before, variables whose names begin with a control
768 character are always forced to be in package \`main\*(Aq. All such variables
769 are reserved for future extensions, except those that begin with
770 \&\f(CW\*(C`^_\*(C'\fR, which may be used by user programs and are guaranteed not to
771 acquire special meaning in any future version of Perl.
772 .ie n .SS "New variable $^C reflects ""\-c"" switch"
773 .el .SS "New variable $^C reflects \f(CW\-c\fP switch"
774 .IX Subsection "New variable $^C reflects -c switch"
775 \&\f(CW$^C\fR has a boolean value that reflects whether perl is being run
776 in compile\-only mode (i.e. via the \f(CW\*(C`\-c\*(C'\fR switch). Since
777 BEGIN blocks are executed under such conditions, this variable
778 enables perl code to determine whether actions that make sense
779 only during normal running are warranted. See perlvar.
780 .SS "New variable $^V contains Perl version as a string"
781 .IX Subsection "New variable $^V contains Perl version as a string"
782 \&\f(CW$^V\fR contains the Perl version number as a string composed of
783 characters whose ordinals match the version numbers, i.e. v5.6.0.
784 This may be used in string comparisons.
785 .PP
786 See \f(CW\*(C`Support for strings represented as a vector of ordinals\*(C'\fR for an
787 example.
788 .SS "Optional Y2K warnings"
789 .IX Subsection "Optional Y2K warnings"
790 If Perl is built with the cpp macro \f(CW\*(C`PERL_Y2KWARN\*(C'\fR defined,
791 it emits optional warnings when concatenating the number 19
792 with another number.
793 .PP
794 This behavior must be specifically enabled when running Configure.
795 See \fIINSTALL\fR and \fIREADME.Y2K\fR.
796 .SS "Arrays now always interpolate into double\-quoted strings"
797 .IX Subsection "Arrays now always interpolate into double-quoted strings"
798 In double\-quoted strings, arrays now interpolate, no matter what. The
799 behavior in earlier versions of perl 5 was that arrays would interpolate
800 into strings if the array had been mentioned before the string was
801 compiled, and otherwise Perl would raise a fatal compile\-time error.
802 In versions 5.000 through 5.003, the error was
803 .PP
804 .Vb 1
805 \& Literal @example now requires backslash
806 .Ve
807 .PP
808 In versions 5.004_01 through 5.6.0, the error was
809 .PP
810 .Vb 1
811 \& In string, @example now must be written as \e@example
812 .Ve
813 .PP
814 The idea here was to get people into the habit of writing
815 \&\f(CW"fred\[email protected]"\fR when they wanted a literal \f(CW\*(C`@\*(C'\fR sign, just as
816 they have always written \f(CW"Give me back my \e$5"\fR when they wanted a
817 literal \f(CW\*(C`$\*(C'\fR sign.
818 .PP
819 Starting with 5.6.1, when Perl now sees an \f(CW\*(C`@\*(C'\fR sign in a
820 double\-quoted string, it \fIalways\fR attempts to interpolate an array,
821 regardless of whether or not the array has been used or declared
822 already. The fatal error has been downgraded to an optional warning:
823 .PP
824 .Vb 1
825 \& Possible unintended interpolation of @example in string
826 .Ve
827 .PP
828 This warns you that \f(CW"[email protected]"\fR is going to turn into
829 \&\f(CW\*(C`fred.com\*(C'\fR if you don\*(Aqt backslash the \f(CW\*(C`@\*(C'\fR.
830 See http://perl.plover.com/at\-error.html for more details
831 about the history here.
832 .SS "@\- and @+ provide starting/ending offsets of regex matches"
833 .IX Subsection "@- and @+ provide starting/ending offsets of regex matches"
834 The new magic variables @\- and @+ provide the starting and ending
835 offsets, respectively, of $&, \f(CW$1\fR, \f(CW$2\fR, etc. See perlvar for
836 details.
837 .SH "Modules and Pragmata"
838 .IX Header "Modules and Pragmata"
839 .SS Modules
840 .IX Subsection "Modules"
841 .IP attributes 4
842 .IX Item "attributes"
843 While used internally by Perl as a pragma, this module also
844 provides a way to fetch subroutine and variable attributes.
845 See attributes.
846 .IP B 4
847 .IX Item "B"
848 The Perl Compiler suite has been extensively reworked for this
849 release. More of the standard Perl test suite passes when run
850 under the Compiler, but there is still a significant way to
851 go to achieve production quality compiled executables.
852 .Sp
853 .Vb 3
854 \& NOTE: The Compiler suite remains highly experimental. The
855 \& generated code may not be correct, even when it manages to execute
856 \& without errors.
857 .Ve
858 .IP Benchmark 4
859 .IX Item "Benchmark"
860 Overall, Benchmark results exhibit lower average error and better timing
861 accuracy.
862 .Sp
863 You can now run tests for \fIn\fR seconds instead of guessing the right
864 number of tests to run: e.g., timethese(\-5, ...) will run each
865 code for at least 5 CPU seconds. Zero as the "number of repetitions"
866 means "for at least 3 CPU seconds". The output format has also
867 changed. For example:
868 .Sp
869 .Vb 1
870 \& use Benchmark;$x=3;timethese(\-5,{a=>sub{$x*$x},b=>sub{$x**2}})
871 .Ve
872 .Sp
873 will now output something like this:
874 .Sp
875 .Vb 3
876 \& Benchmark: running a, b, each for at least 5 CPU seconds...
877 \& a: 5 wallclock secs ( 5.77 usr + 0.00 sys = 5.77 CPU) @ 200551.91/s (n=1156516)
878 \& b: 4 wallclock secs ( 5.00 usr + 0.02 sys = 5.02 CPU) @ 159605.18/s (n=800686)
879 .Ve
880 .Sp
881 New features: "each for at least N CPU seconds...", "wallclock secs",
882 and the "@ operations/CPU second (n=operations)".
883 .Sp
884 \&\fBtimethese()\fR now returns a reference to a hash of Benchmark objects containing
885 the test results, keyed on the names of the tests.
886 .Sp
887 \&\fBtimethis()\fR now returns the iterations field in the Benchmark result object
888 instead of 0.
889 .Sp
890 \&\fBtimethese()\fR, \fBtimethis()\fR, and the new \fBcmpthese()\fR (see below) can also take
891 a format specifier of \*(Aqnone\*(Aq to suppress output.
892 .Sp
893 A new function \fBcountit()\fR is just like \fBtimeit()\fR except that it takes a
894 TIME instead of a COUNT.
895 .Sp
896 A new function \fBcmpthese()\fR prints a chart comparing the results of each test
897 returned from a \fBtimethese()\fR call. For each possible pair of tests, the
898 percentage speed difference (iters/sec or seconds/iter) is shown.
899 .Sp
900 For other details, see Benchmark.
901 .IP ByteLoader 4
902 .IX Item "ByteLoader"
903 The ByteLoader is a dedicated extension to generate and run
904 Perl bytecode. See ByteLoader.
905 .IP constant 4
906 .IX Item "constant"
907 References can now be used.
908 .Sp
909 The new version also allows a leading underscore in constant names, but
910 disallows a double leading underscore (as in "_\|_LINE_\|_"). Some other names
911 are disallowed or warned against, including BEGIN, END, etc. Some names
912 which were forced into main:: used to fail silently in some cases; now they\*(Aqre
913 fatal (outside of main::) and an optional warning (inside of main::).
914 The ability to detect whether a constant had been set with a given name has
915 been added.
916 .Sp
917 See constant.
918 .IP charnames 4
919 .IX Item "charnames"
920 This pragma implements the \f(CW\*(C`\eN\*(C'\fR string escape. See charnames.
921 .IP Data::Dumper 4
922 .IX Item "Data::Dumper"
923 A \f(CW\*(C`Maxdepth\*(C'\fR setting can be specified to avoid venturing
924 too deeply into deep data structures. See Data::Dumper.
925 .Sp
926 The XSUB implementation of \fBDump()\fR is now automatically called if the
927 \&\f(CW\*(C`Useqq\*(C'\fR setting is not in use.
928 .Sp
929 Dumping \f(CW\*(C`qr//\*(C'\fR objects works correctly.
930 .IP DB 4
931 .IX Item "DB"
932 \&\f(CW\*(C`DB\*(C'\fR is an experimental module that exposes a clean abstraction
933 to Perl\*(Aqs debugging API.
934 .IP DB_File 4
935 .IX Item "DB_File"
936 DB_File can now be built with Berkeley DB versions 1, 2 or 3.
937 See \f(CW\*(C`ext/DB_File/Changes\*(C'\fR.
938 .IP Devel::DProf 4
939 .IX Item "Devel::DProf"
940 Devel::DProf, a Perl source code profiler has been added. See
941 Devel::DProf and dprofpp.
942 .IP Devel::Peek 4
943 .IX Item "Devel::Peek"
944 The Devel::Peek module provides access to the internal representation
945 of Perl variables and data. It is a data debugging tool for the XS programmer.
946 .IP Dumpvalue 4
947 .IX Item "Dumpvalue"
948 The Dumpvalue module provides screen dumps of Perl data.
949 .IP DynaLoader 4
950 .IX Item "DynaLoader"
951 DynaLoader now supports a \fBdl_unload_file()\fR function on platforms that
952 support unloading shared objects using \fBdlclose()\fR.
953 .Sp
954 Perl can also optionally arrange to unload all extension shared objects
955 loaded by Perl. To enable this, build Perl with the Configure option
956 \&\f(CW\*(C`\-Accflags=\-DDL_UNLOAD_ALL_AT_EXIT\*(C'\fR. (This maybe useful if you are
957 using Apache with mod_perl.)
958 .IP English 4
959 .IX Item "English"
960 \&\f(CW$PERL_VERSION\fR now stands for \f(CW$^V\fR (a string value) rather than for \f(CW$]\fR
961 (a numeric value).
962 .IP Env 4
963 .IX Item "Env"
964 Env now supports accessing environment variables like PATH as array
965 variables.
966 .IP Fcntl 4
967 .IX Item "Fcntl"
968 More Fcntl constants added: F_SETLK64, F_SETLKW64, O_LARGEFILE for
969 large file (more than 4GB) access (NOTE: the O_LARGEFILE is
970 automatically added to \fBsysopen()\fR flags if large file support has been
971 configured, as is the default), Free/Net/OpenBSD locking behaviour
972 flags F_FLOCK, F_POSIX, Linux F_SHLCK, and O_ACCMODE: the combined
973 mask of O_RDONLY, O_WRONLY, and O_RDWR. The \fBseek()\fR/\fBsysseek()\fR
974 constants SEEK_SET, SEEK_CUR, and SEEK_END are available via the
975 \&\f(CW\*(C`:seek\*(C'\fR tag. The \fBchmod()\fR/\fBstat()\fR S_IF* constants and S_IS* functions
976 are available via the \f(CW\*(C`:mode\*(C'\fR tag.
977 .IP File::Compare 4
978 .IX Item "File::Compare"
979 A \fBcompare_text()\fR function has been added, which allows custom
980 comparison functions. See File::Compare.
981 .IP File::Find 4
982 .IX Item "File::Find"
983 File::Find now works correctly when the \fBwanted()\fR function is either
984 autoloaded or is a symbolic reference.
985 .Sp
986 A bug that caused File::Find to lose track of the working directory
987 when pruning top\-level directories has been fixed.
988 .Sp
989 File::Find now also supports several other options to control its
990 behavior. It can follow symbolic links if the \f(CW\*(C`follow\*(C'\fR option is
991 specified. Enabling the \f(CW\*(C`no_chdir\*(C'\fR option will make File::Find skip
992 changing the current directory when walking directories. The \f(CW\*(C`untaint\*(C'\fR
993 flag can be useful when running with taint checks enabled.
994 .Sp
995 See File::Find.
996 .IP File::Glob 4
997 .IX Item "File::Glob"
998 This extension implements BSD\-style file globbing. By default,
999 it will also be used for the internal implementation of the \fBglob()\fR
1000 operator. See File::Glob.
1001 .IP File::Spec 4
1002 .IX Item "File::Spec"
1003 New methods have been added to the File::Spec module: \fBdevnull()\fR returns
1004 the name of the null device (/dev/null on Unix) and \fBtmpdir()\fR the name of
1005 the temp directory (normally /tmp on Unix). There are now also methods
1006 to convert between absolute and relative filenames: \fBabs2rel()\fR and
1007 \&\fBrel2abs()\fR. For compatibility with operating systems that specify volume
1008 names in file paths, the \fBsplitpath()\fR, \fBsplitdir()\fR, and \fBcatdir()\fR methods
1009 have been added.
1010 .IP File::Spec::Functions 4
1011 .IX Item "File::Spec::Functions"
1012 The new File::Spec::Functions modules provides a function interface
1013 to the File::Spec module. Allows shorthand
1014 .Sp
1015 .Vb 1
1016 \& $fullname = catfile($dir1, $dir2, $file);
1017 .Ve
1018 .Sp
1019 instead of
1020 .Sp
1021 .Vb 1
1022 \& $fullname = File::Spec\->catfile($dir1, $dir2, $file);
1023 .Ve
1024 .IP Getopt::Long 4
1025 .IX Item "Getopt::Long"
1026 Getopt::Long licensing has changed to allow the Perl Artistic License
1027 as well as the GPL. It used to be GPL only, which got in the way of
1028 non\-GPL applications that wanted to use Getopt::Long.
1029 .Sp
1030 Getopt::Long encourages the use of Pod::Usage to produce help
1031 messages. For example:
1032 .Sp
1033 .Vb 7
1034 \& use Getopt::Long;
1035 \& use Pod::Usage;
1036 \& my $man = 0;
1037 \& my $help = 0;
1038 \& GetOptions(\*(Aqhelp|?\*(Aq => \e$help, man => \e$man) or pod2usage(2);
1039 \& pod2usage(1) if $help;
1040 \& pod2usage(\-exitstatus => 0, \-verbose => 2) if $man;
1041 \&
1042 \& _\|_END_\|_
1043 \&
1044 \& =head1 NAME
1045 \&
1046 \& sample \- Using Getopt::Long and Pod::Usage
1047 \&
1048 \& =head1 SYNOPSIS
1049 \&
1050 \& sample [options] [file ...]
1051 \&
1052 \& Options:
1053 \& \-help brief help message
1054 \& \-man full documentation
1055 \&
1056 \& =head1 OPTIONS
1057 \&
1058 \& =over 8
1059 \&
1060 \& =item B<\-help>
1061 \&
1062 \& Print a brief help message and exits.
1063 \&
1064 \& =item B<\-man>
1065 \&
1066 \& Prints the manual page and exits.
1067 \&
1068 \& =back
1069 \&
1070 \& =head1 DESCRIPTION
1071 \&
1072 \& B<This program> will read the given input file(s) and do something
1073 \& useful with the contents thereof.
1074 \&
1075 \& =cut
1076 .Ve
1077 .Sp
1078 See Pod::Usage for details.
1079 .Sp
1080 A bug that prevented the non\-option call\-back <> from being
1081 specified as the first argument has been fixed.
1082 .Sp
1083 To specify the characters < and > as option starters, use ><. Note,
1084 however, that changing option starters is strongly deprecated.
1085 .IP IO 4
1086 .IX Item "IO"
1087 \&\fBwrite()\fR and \fBsyswrite()\fR will now accept a single\-argument
1088 form of the call, for consistency with Perl\*(Aqs \fBsyswrite()\fR.
1089 .Sp
1090 You can now create a TCP\-based IO::Socket::INET without forcing
1091 a connect attempt. This allows you to configure its options
1092 (like making it non\-blocking) and then call \fBconnect()\fR manually.
1093 .Sp
1094 A bug that prevented the \fBIO::Socket::protocol()\fR accessor
1095 from ever returning the correct value has been corrected.
1096 .Sp
1097 IO::Socket::connect now uses non\-blocking IO instead of \fBalarm()\fR
1098 to do connect timeouts.
1099 .Sp
1100 IO::Socket::accept now uses \fBselect()\fR instead of \fBalarm()\fR for doing
1101 timeouts.
1102 .Sp
1103 IO::Socket::INET\->new now sets $! correctly on failure. $@ is
1104 still set for backwards compatibility.
1105 .IP JPL 4
1106 .IX Item "JPL"
1107 Java Perl Lingo is now distributed with Perl. See jpl/README
1108 for more information.
1109 .IP lib 4
1110 .IX Item "lib"
1111 \&\f(CW\*(C`use lib\*(C'\fR now weeds out any trailing duplicate entries.
1112 \&\f(CW\*(C`no lib\*(C'\fR removes all named entries.
1113 .IP Math::BigInt 4
1114 .IX Item "Math::BigInt"
1115 The bitwise operations \f(CW\*(C`<<\*(C'\fR, \f(CW\*(C`>>\*(C'\fR, \f(CW\*(C`&\*(C'\fR, \f(CW\*(C`|\*(C'\fR,
1116 and \f(CW\*(C`~\*(C'\fR are now supported on bigints.
1117 .IP Math::Complex 4
1118 .IX Item "Math::Complex"
1119 The accessor methods Re, Im, arg, abs, rho, and theta can now also
1120 act as mutators (accessor \f(CW$z\fR\->\fBRe()\fR, mutator \f(CW$z\fR\->\fBRe\fR\|(3)).
1121 .Sp
1122 The class method \f(CW\*(C`display_format\*(C'\fR and the corresponding object method
1123 \&\f(CW\*(C`display_format\*(C'\fR, in addition to accepting just one argument, now can
1124 also accept a parameter hash. Recognized keys of a parameter hash are
1125 \&\f(CW"style"\fR, which corresponds to the old one parameter case, and two
1126 new parameters: \f(CW"format"\fR, which is a \fBprintf()\fR\-style format string
1127 (defaults usually to \f(CW"%.15g"\fR, you can revert to the default by
1128 setting the format string to \f(CW\*(C`undef\*(C'\fR) used for both parts of a
1129 complex number, and \f(CW"polar_pretty_print"\fR (defaults to true),
1130 which controls whether an attempt is made to try to recognize small
1131 multiples and rationals of pi (2pi, pi/2) at the argument (angle) of a
1132 polar complex number.
1133 .Sp
1134 The potentially disruptive change is that in list context both methods
1135 now \fIreturn the parameter hash\fR, instead of only the value of the
1136 \&\f(CW"style"\fR parameter.
1137 .IP Math::Trig 4
1138 .IX Item "Math::Trig"
1139 A little bit of radial trigonometry (cylindrical and spherical),
1140 radial coordinate conversions, and the great circle distance were added.
1141 .IP "Pod::Parser, Pod::InputObjects" 4
1142 .IX Item "Pod::Parser, Pod::InputObjects"
1143 Pod::Parser is a base class for parsing and selecting sections of
1144 pod documentation from an input stream. This module takes care of
1145 identifying pod paragraphs and commands in the input and hands off the
1146 parsed paragraphs and commands to user\-defined methods which are free
1147 to interpret or translate them as they see fit.
1148 .Sp
1149 Pod::InputObjects defines some input objects needed by Pod::Parser, and
1150 for advanced users of Pod::Parser that need more about a command besides
1151 its name and text.
1152 .Sp
1153 As of release 5.6.0 of Perl, Pod::Parser is now the officially sanctioned
1154 "base parser code" recommended for use by all pod2xxx translators.
1155 Pod::Text (pod2text) and Pod::Man (pod2man) have already been converted
1156 to use Pod::Parser and efforts to convert Pod::HTML (pod2html) are already
1157 underway. For any questions or comments about pod parsing and translating
1158 issues and utilities, please use the pod\[email protected] mailing list.
1159 .Sp
1160 For further information, please see Pod::Parser and Pod::InputObjects.
1161 .IP "Pod::Checker, podchecker" 4
1162 .IX Item "Pod::Checker, podchecker"
1163 This utility checks pod files for correct syntax, according to
1164 perlpod. Obvious errors are flagged as such, while warnings are
1165 printed for mistakes that can be handled gracefully. The checklist is
1166 not complete yet. See Pod::Checker.
1167 .IP "Pod::ParseUtils, Pod::Find" 4
1168 .IX Item "Pod::ParseUtils, Pod::Find"
1169 These modules provide a set of gizmos that are useful mainly for pod
1170 translators. Pod::Find traverses directory structures and
1171 returns found pod files, along with their canonical names (like
1172 \&\f(CW\*(C`File::Spec::Unix\*(C'\fR). Pod::ParseUtils contains
1173 \&\fBPod::List\fR (useful for storing pod list information), \fBPod::Hyperlink\fR
1174 (for parsing the contents of \f(CW\*(C`L<>\*(C'\fR sequences) and \fBPod::Cache\fR
1175 (for caching information about pod files, e.g., link nodes).
1176 .IP "Pod::Select, podselect" 4
1177 .IX Item "Pod::Select, podselect"
1178 Pod::Select is a subclass of Pod::Parser which provides a function
1179 named "\fBpodselect()\fR" to filter out user\-specified sections of raw pod
1180 documentation from an input stream. podselect is a script that provides
1181 access to Pod::Select from other scripts to be used as a filter.
1182 See Pod::Select.
1183 .IP "Pod::Usage, pod2usage" 4
1184 .IX Item "Pod::Usage, pod2usage"
1185 Pod::Usage provides the function "\fBpod2usage()\fR" to print usage messages for
1186 a Perl script based on its embedded pod documentation. The \fBpod2usage()\fR
1187 function is generally useful to all script authors since it lets them
1188 write and maintain a single source (the pods) for documentation, thus
1189 removing the need to create and maintain redundant usage message text
1190 consisting of information already in the pods.
1191 .Sp
1192 There is also a pod2usage script which can be used from other kinds of
1193 scripts to print usage messages from pods (even for non\-Perl scripts
1194 with pods embedded in comments).
1195 .Sp
1196 For details and examples, please see Pod::Usage.
1197 .IP "Pod::Text and Pod::Man" 4
1198 .IX Item "Pod::Text and Pod::Man"
1199 Pod::Text has been rewritten to use Pod::Parser. While \fBpod2text()\fR is
1200 still available for backwards compatibility, the module now has a new
1201 preferred interface. See Pod::Text for the details. The new Pod::Text
1202 module is easily subclassed for tweaks to the output, and two such
1203 subclasses (Pod::Text::Termcap for man\-page\-style bold and underlining
1204 using termcap information, and Pod::Text::Color for markup with ANSI color
1205 sequences) are now standard.
1206 .Sp
1207 pod2man has been turned into a module, Pod::Man, which also uses
1208 Pod::Parser. In the process, several outstanding bugs related to quotes
1209 in section headers, quoting of code escapes, and nested lists have been
1210 fixed. pod2man is now a wrapper script around this module.
1211 .IP SDBM_File 4
1212 .IX Item "SDBM_File"
1213 An EXISTS method has been added to this module (and \fBsdbm_exists()\fR has
1214 been added to the underlying sdbm library), so one can now call exists
1215 on an SDBM_File tied hash and get the correct result, rather than a
1216 runtime error.
1217 .Sp
1218 A bug that may have caused data loss when more than one disk block
1219 happens to be read from the database in a single \fBFETCH()\fR has been
1220 fixed.
1221 .IP Sys::Syslog 4
1222 .IX Item "Sys::Syslog"
1223 Sys::Syslog now uses XSUBs to access facilities from syslog.h so it
1224 no longer requires syslog.ph to exist.
1225 .IP Sys::Hostname 4
1226 .IX Item "Sys::Hostname"
1227 Sys::Hostname now uses XSUBs to call the C library\*(Aqs \fBgethostname()\fR or
1228 \&\fBuname()\fR if they exist.
1229 .IP Term::ANSIColor 4
1230 .IX Item "Term::ANSIColor"
1231 Term::ANSIColor is a very simple module to provide easy and readable
1232 access to the ANSI color and highlighting escape sequences, supported by
1233 most ANSI terminal emulators. It is now included standard.
1234 .IP Time::Local 4
1235 .IX Item "Time::Local"
1236 The \fBtimelocal()\fR and \fBtimegm()\fR functions used to silently return bogus
1237 results when the date fell outside the machine\*(Aqs integer range. They
1238 now consistently \fBcroak()\fR if the date falls in an unsupported range.
1239 .IP Win32 4
1240 .IX Item "Win32"
1241 The error return value in list context has been changed for all functions
1242 that return a list of values. Previously these functions returned a list
1243 with a single element \f(CW\*(C`undef\*(C'\fR if an error occurred. Now these functions
1244 return the empty list in these situations. This applies to the following
1245 functions:
1246 .Sp
1247 .Vb 2
1248 \& Win32::FsType
1249 \& Win32::GetOSVersion
1250 .Ve
1251 .Sp
1252 The remaining functions are unchanged and continue to return \f(CW\*(C`undef\*(C'\fR on
1253 error even in list context.
1254 .Sp
1255 The Win32::SetLastError(ERROR) function has been added as a complement
1256 to the \fBWin32::GetLastError()\fR function.
1257 .Sp
1258 The new Win32::GetFullPathName(FILENAME) returns the full absolute
1259 pathname for FILENAME in scalar context. In list context it returns
1260 a two\-element list containing the fully qualified directory name and
1261 the filename. See Win32.
1262 .IP XSLoader 4
1263 .IX Item "XSLoader"
1264 The XSLoader extension is a simpler alternative to DynaLoader.
1265 See XSLoader.
1266 .IP "DBM Filters" 4
1267 .IX Item "DBM Filters"
1268 A new feature called "DBM Filters" has been added to all the
1269 DBM modules\-\-DB_File, GDBM_File, NDBM_File, ODBM_File, and SDBM_File.
1270 DBM Filters add four new methods to each DBM module:
1271 .Sp
1272 .Vb 4
1273 \& filter_store_key
1274 \& filter_store_value
1275 \& filter_fetch_key
1276 \& filter_fetch_value
1277 .Ve
1278 .Sp
1279 These can be used to filter key\-value pairs before the pairs are
1280 written to the database or just after they are read from the database.
1281 See perldbmfilter for further information.
1282 .SS Pragmata
1283 .IX Subsection "Pragmata"
1284 \&\f(CW\*(C`use attrs\*(C'\fR is now obsolete, and is only provided for
1285 backward\-compatibility. It\*(Aqs been replaced by the \f(CW\*(C`sub : attributes\*(C'\fR
1286 syntax. See "Subroutine Attributes" in perlsub and attributes.
1287 .PP
1288 Lexical warnings pragma, \f(CW\*(C`use warnings;\*(C'\fR, to control optional warnings.
1289 See perllexwarn.
1290 .PP
1291 \&\f(CW\*(C`use filetest\*(C'\fR to control the behaviour of filetests (\f(CW\*(C`\-r\*(C'\fR \f(CW\*(C`\-w\*(C'\fR
1292 \&...). Currently only one subpragma implemented, "use filetest
1293 \&\*(Aqaccess\*(Aq;", that uses \fBaccess\fR\|(2) or equivalent to check permissions
1294 instead of using \fBstat\fR\|(2) as usual. This matters in filesystems
1295 where there are ACLs (access control lists): the \fBstat\fR\|(2) might lie,
1296 but \fBaccess\fR\|(2) knows better.
1297 .PP
1298 The \f(CW\*(C`open\*(C'\fR pragma can be used to specify default disciplines for
1299 handle constructors (e.g. \fBopen()\fR) and for qx//. The two
1300 pseudo\-disciplines \f(CW\*(C`:raw\*(C'\fR and \f(CW\*(C`:crlf\*(C'\fR are currently supported on
1301 DOS\-derivative platforms (i.e. where binmode is not a no\-op).
1302 See also "\fBbinmode()\fR can be used to set :crlf and :raw modes".
1303 .SH "Utility Changes"
1304 .IX Header "Utility Changes"
1305 .SS dprofpp
1306 .IX Subsection "dprofpp"
1307 \&\f(CW\*(C`dprofpp\*(C'\fR is used to display profile data generated using \f(CW\*(C`Devel::DProf\*(C'\fR.
1308 See dprofpp.
1309 .SS find2perl
1310 .IX Subsection "find2perl"
1311 The \f(CW\*(C`find2perl\*(C'\fR utility now uses the enhanced features of the File::Find
1312 module. The \-depth and \-follow options are supported. Pod documentation
1313 is also included in the script.
1314 .SS h2xs
1315 .IX Subsection "h2xs"
1316 The \f(CW\*(C`h2xs\*(C'\fR tool can now work in conjunction with \f(CW\*(C`C::Scan\*(C'\fR (available
1317 from CPAN) to automatically parse real\-life header files. The \f(CW\*(C`\-M\*(C'\fR,
1318 \&\f(CW\*(C`\-a\*(C'\fR, \f(CW\*(C`\-k\*(C'\fR, and \f(CW\*(C`\-o\*(C'\fR options are new.
1319 .SS perlcc
1320 .IX Subsection "perlcc"
1321 \&\f(CW\*(C`perlcc\*(C'\fR now supports the C and Bytecode backends. By default,
1322 it generates output from the simple C backend rather than the
1323 optimized C backend.
1324 .PP
1325 Support for non\-Unix platforms has been improved.
1326 .SS perldoc
1327 .IX Subsection "perldoc"
1328 \&\f(CW\*(C`perldoc\*(C'\fR has been reworked to avoid possible security holes.
1329 It will not by default let itself be run as the superuser, but you
1330 may still use the \fB\-U\fR switch to try to make it drop privileges
1331 first.
1332 .SS "The Perl Debugger"
1333 .IX Subsection "The Perl Debugger"
1334 Many bug fixes and enhancements were added to \fIperl5db.pl\fR, the
1335 Perl debugger. The help documentation was rearranged. New commands
1336 include \f(CW\*(C`< ?\*(C'\fR, \f(CW\*(C`> ?\*(C'\fR, and \f(CW\*(C`{ ?\*(C'\fR to list out current
1337 actions, \f(CW\*(C`man \fR\f(CIdocpage\fR\f(CW\*(C'\fR to run your doc viewer on some perl
1338 docset, and support for quoted options. The help information was
1339 rearranged, and should be viewable once again if you\*(Aqre using \fBless\fR
1340 as your pager. A serious security hole was plugged\-\-you should
1341 immediately remove all older versions of the Perl debugger as
1342 installed in previous releases, all the way back to perl3, from
1343 your system to avoid being bitten by this.
1344 .SH "Improved Documentation"
1345 .IX Header "Improved Documentation"
1346 Many of the platform\-specific README files are now part of the perl
1347 installation. See perl for the complete list.
1348 .IP perlapi.pod 4
1349 .IX Item "perlapi.pod"
1350 The official list of public Perl API functions.
1351 .IP perlboot.pod 4
1352 .IX Item "perlboot.pod"
1353 A tutorial for beginners on object\-oriented Perl.
1354 .IP perlcompile.pod 4
1355 .IX Item "perlcompile.pod"
1356 An introduction to using the Perl Compiler suite.
1357 .IP perldbmfilter.pod 4
1358 .IX Item "perldbmfilter.pod"
1359 A howto document on using the DBM filter facility.
1360 .IP perldebug.pod 4
1361 .IX Item "perldebug.pod"
1362 All material unrelated to running the Perl debugger, plus all
1363 low\-level guts\-like details that risked crushing the casual user
1364 of the debugger, have been relocated from the old manpage to the
1365 next entry below.
1366 .IP perldebguts.pod 4
1367 .IX Item "perldebguts.pod"
1368 This new manpage contains excessively low\-level material not related
1369 to the Perl debugger, but slightly related to debugging Perl itself.
1370 It also contains some arcane internal details of how the debugging
1371 process works that may only be of interest to developers of Perl
1372 debuggers.
1373 .IP perlfork.pod 4
1374 .IX Item "perlfork.pod"
1375 Notes on the \fBfork()\fR emulation currently available for the Windows platform.
1376 .IP perlfilter.pod 4
1377 .IX Item "perlfilter.pod"
1378 An introduction to writing Perl source filters.
1379 .IP perlhack.pod 4
1380 .IX Item "perlhack.pod"
1381 Some guidelines for hacking the Perl source code.
1382 .IP perlintern.pod 4
1383 .IX Item "perlintern.pod"
1384 A list of internal functions in the Perl source code.
1385 (List is currently empty.)
1386 .IP perllexwarn.pod 4
1387 .IX Item "perllexwarn.pod"
1388 Introduction and reference information about lexically scoped
1389 warning categories.
1390 .IP perlnumber.pod 4
1391 .IX Item "perlnumber.pod"
1392 Detailed information about numbers as they are represented in Perl.
1393 .IP perlopentut.pod 4
1394 .IX Item "perlopentut.pod"
1395 A tutorial on using \fBopen()\fR effectively.
1396 .IP perlreftut.pod 4
1397 .IX Item "perlreftut.pod"
1398 A tutorial that introduces the essentials of references.
1399 .IP perltootc.pod 4
1400 .IX Item "perltootc.pod"
1401 A tutorial on managing class data for object modules.
1402 .IP perltodo.pod 4
1403 .IX Item "perltodo.pod"
1404 Discussion of the most often wanted features that may someday be
1405 supported in Perl.
1406 .IP perlunicode.pod 4
1407 .IX Item "perlunicode.pod"
1408 An introduction to Unicode support features in Perl.
1409 .SH "Performance enhancements"
1410 .IX Header "Performance enhancements"
1411 .ie n .SS "Simple \fBsort()\fP using { $a <=> $b } and the like are optimized"
1412 .el .SS "Simple \fBsort()\fP using { \f(CW$a\fP <=> \f(CW$b\fP } and the like are optimized"
1413 .IX Subsection "Simple sort() using { $a <=> $b } and the like are optimized"
1414 Many common \fBsort()\fR operations using a simple inlined block are now
1415 optimized for faster performance.
1416 .SS "Optimized assignments to lexical variables"
1417 .IX Subsection "Optimized assignments to lexical variables"
1418 Certain operations in the RHS of assignment statements have been
1419 optimized to directly set the lexical variable on the LHS,
1420 eliminating redundant copying overheads.
1421 .SS "Faster subroutine calls"
1422 .IX Subsection "Faster subroutine calls"
1423 Minor changes in how subroutine calls are handled internally
1424 provide marginal improvements in performance.
1425 .SS "\fBdelete()\fP, \fBeach()\fP, \fBvalues()\fP and hash iteration are faster"
1426 .IX Subsection "delete(), each(), values() and hash iteration are faster"
1427 The hash values returned by \fBdelete()\fR, \fBeach()\fR, \fBvalues()\fR and hashes in a
1428 list context are the actual values in the hash, instead of copies.
1429 This results in significantly better performance, because it eliminates
1430 needless copying in most situations.
1431 .SH "Installation and Configuration Improvements"
1432 .IX Header "Installation and Configuration Improvements"
1433 .SS "\-Dusethreads means something different"
1434 .IX Subsection "-Dusethreads means something different"
1435 The \-Dusethreads flag now enables the experimental interpreter\-based thread
1436 support by default. To get the flavor of experimental threads that was in
1437 5.005 instead, you need to run Configure with "\-Dusethreads \-Duse5005threads".
1438 .PP
1439 As of v5.6.0, interpreter\-threads support is still lacking a way to
1440 create new threads from Perl (i.e., \f(CW\*(C`use Thread;\*(C'\fR will not work with
1441 interpreter threads). \f(CW\*(C`use Thread;\*(C'\fR continues to be available when you
1442 specify the \-Duse5005threads option to Configure, bugs and all.
1443 .PP
1444 .Vb 2
1445 \& NOTE: Support for threads continues to be an experimental feature.
1446 \& Interfaces and implementation are subject to sudden and drastic changes.
1447 .Ve
1448 .SS "New Configure flags"
1449 .IX Subsection "New Configure flags"
1450 The following new flags may be enabled on the Configure command line
1451 by running Configure with \f(CW\*(C`\-Dflag\*(C'\fR.
1452 .PP
1453 .Vb 3
1454 \& usemultiplicity
1455 \& usethreads useithreads (new interpreter threads: no Perl API yet)
1456 \& usethreads use5005threads (threads as they were in 5.005)
1457 \&
1458 \& use64bitint (equal to now deprecated \*(Aquse64bits\*(Aq)
1459 \& use64bitall
1460 \&
1461 \& uselongdouble
1462 \& usemorebits
1463 \& uselargefiles
1464 \& usesocks (only SOCKS v5 supported)
1465 .Ve
1466 .SS "Threadedness and 64\-bitness now more daring"
1467 .IX Subsection "Threadedness and 64-bitness now more daring"
1468 The Configure options enabling the use of threads and the use of
1469 64\-bitness are now more daring in the sense that they no more have an
1470 explicit list of operating systems of known threads/64\-bit
1471 capabilities. In other words: if your operating system has the
1472 necessary APIs and datatypes, you should be able just to go ahead and
1473 use them, for threads by Configure \-Dusethreads, and for 64 bits
1474 either explicitly by Configure \-Duse64bitint or implicitly if your
1475 system has 64\-bit wide datatypes. See also "64\-bit support".
1476 .SS "Long Doubles"
1477 .IX Subsection "Long Doubles"
1478 Some platforms have "long doubles", floating point numbers of even
1479 larger range than ordinary "doubles". To enable using long doubles for
1480 Perl\*(Aqs scalars, use \-Duselongdouble.
1481 .SS \-Dusemorebits
1482 .IX Subsection "-Dusemorebits"
1483 You can enable both \-Duse64bitint and \-Duselongdouble with \-Dusemorebits.
1484 See also "64\-bit support".
1485 .SS \-Duselargefiles
1486 .IX Subsection "-Duselargefiles"
1487 Some platforms support system APIs that are capable of handling large files
1488 (typically, files larger than two gigabytes). Perl will try to use these
1489 APIs if you ask for \-Duselargefiles.
1490 .PP
1491 See "Large file support" for more information.
1492 .SS installusrbinperl
1493 .IX Subsection "installusrbinperl"
1494 You can use "Configure \-Uinstallusrbinperl" which causes installperl
1495 to skip installing perl also as /usr/bin/perl. This is useful if you
1496 prefer not to modify /usr/bin for some reason or another but harmful
1497 because many scripts assume to find Perl in /usr/bin/perl.
1498 .SS "SOCKS support"
1499 .IX Subsection "SOCKS support"
1500 You can use "Configure \-Dusesocks" which causes Perl to probe
1501 for the SOCKS proxy protocol library (v5, not v4). For more information
1502 on SOCKS, see:
1503 .PP
1504 .Vb 1
1505 \& http://www.socks.nec.com/
1506 .Ve
1507 .ie n .SS """\-A"" flag"
1508 .el .SS "\f(CW\-A\fP flag"
1509 .IX Subsection "-A flag"
1510 You can "post\-edit" the Configure variables using the Configure \f(CW\*(C`\-A\*(C'\fR
1511 switch. The editing happens immediately after the platform specific
1512 hints files have been processed but before the actual configuration
1513 process starts. Run \f(CW\*(C`Configure \-h\*(C'\fR to find out the full \f(CW\*(C`\-A\*(C'\fR syntax.
1514 .SS "Enhanced Installation Directories"
1515 .IX Subsection "Enhanced Installation Directories"
1516 The installation structure has been enriched to improve the support
1517 for maintaining multiple versions of perl, to provide locations for
1518 vendor\-supplied modules, scripts, and manpages, and to ease maintenance
1519 of locally\-added modules, scripts, and manpages. See the section on
1520 Installation Directories in the INSTALL file for complete details.
1521 For most users building and installing from source, the defaults should
1522 be fine.
1523 .PP
1524 If you previously used \f(CW\*(C`Configure \-Dsitelib\*(C'\fR or \f(CW\*(C`\-Dsitearch\*(C'\fR to set
1525 special values for library directories, you might wish to consider using
1526 the new \f(CW\*(C`\-Dsiteprefix\*(C'\fR setting instead. Also, if you wish to re\-use a
1527 config.sh file from an earlier version of perl, you should be sure to
1528 check that Configure makes sensible choices for the new directories.
1529 See INSTALL for complete details.
1530 .SH "Platform specific changes"
1531 .IX Header "Platform specific changes"
1532 .SS "Supported platforms"
1533 .IX Subsection "Supported platforms"
1534 .IP \(bu 4
1535 The Mach CThreads (NEXTSTEP, OPENSTEP) are now supported by the Thread
1536 extension.
1537 .IP \(bu 4
1538 GNU/Hurd is now supported.
1539 .IP \(bu 4
1540 Rhapsody/Darwin is now supported.
1541 .IP \(bu 4
1542 EPOC is now supported (on Psion 5).
1543 .IP \(bu 4
1544 The cygwin port (formerly cygwin32) has been greatly improved.
1545 .SS DOS
1546 .IX Subsection "DOS"
1547 .IP \(bu 4
1548 Perl now works with djgpp 2.02 (and 2.03 alpha).
1549 .IP \(bu 4
1550 Environment variable names are not converted to uppercase any more.
1551 .IP \(bu 4
1552 Incorrect exit codes from backticks have been fixed.
1553 .IP \(bu 4
1554 This port continues to use its own builtin globbing (not File::Glob).
1555 .SS "OS390 (OpenEdition MVS)"
1556 .IX Subsection "OS390 (OpenEdition MVS)"
1557 Support for this EBCDIC platform has not been renewed in this release.
1558 There are difficulties in reconciling Perl\*(Aqs standardization on UTF\-8
1559 as its internal representation for characters with the EBCDIC character
1560 set, because the two are incompatible.
1561 .PP
1562 It is unclear whether future versions will renew support for this
1563 platform, but the possibility exists.
1564 .SS VMS
1565 .IX Subsection "VMS"
1566 Numerous revisions and extensions to configuration, build, testing, and
1567 installation process to accommodate core changes and VMS\-specific options.
1568 .PP
1569 Expand \f(CW%ENV\fR\-handling code to allow runtime mapping to logical names,
1570 CLI symbols, and CRTL environ array.
1571 .PP
1572 Extension of subprocess invocation code to accept filespecs as command
1573 "verbs".
1574 .PP
1575 Add to Perl command line processing the ability to use default file types and
1576 to recognize Unix\-style \f(CW\*(C`2>&1\*(C'\fR.
1577 .PP
1578 Expansion of File::Spec::VMS routines, and integration into ExtUtils::MM_VMS.
1579 .PP
1580 Extension of ExtUtils::MM_VMS to handle complex extensions more flexibly.
1581 .PP
1582 Barewords at start of Unix\-syntax paths may be treated as text rather than
1583 only as logical names.
1584 .PP
1585 Optional secure translation of several logical names used internally by Perl.
1586 .PP
1587 Miscellaneous bugfixing and porting of new core code to VMS.
1588 .PP
1589 Thanks are gladly extended to the many people who have contributed VMS
1590 patches, testing, and ideas.
1591 .SS Win32
1592 .IX Subsection "Win32"
1593 Perl can now emulate \fBfork()\fR internally, using multiple interpreters running
1594 in different concurrent threads. This support must be enabled at build
1595 time. See perlfork for detailed information.
1596 .PP
1597 When given a pathname that consists only of a drivename, such as \f(CW\*(C`A:\*(C'\fR,
1598 \&\fBopendir()\fR and \fBstat()\fR now use the current working directory for the drive
1599 rather than the drive root.
1600 .PP
1601 The builtin XSUB functions in the Win32:: namespace are documented. See
1602 Win32.
1603 .PP
1604 $^X now contains the full path name of the running executable.
1605 .PP
1606 A \fBWin32::GetLongPathName()\fR function is provided to complement
1607 \&\fBWin32::GetFullPathName()\fR and \fBWin32::GetShortPathName()\fR. See Win32.
1608 .PP
1609 \&\fBPOSIX::uname()\fR is supported.
1610 .PP
1611 system(1,...) now returns true process IDs rather than process
1612 handles. \fBkill()\fR accepts any real process id, rather than strictly
1613 return values from system(1,...).
1614 .PP
1615 For better compatibility with Unix, \f(CW\*(C`kill(0, $pid)\*(C'\fR can now be used to
1616 test whether a process exists.
1617 .PP
1618 The \f(CW\*(C`Shell\*(C'\fR module is supported.
1619 .PP
1620 Better support for building Perl under command.com in Windows 95
1621 has been added.
1622 .PP
1623 Scripts are read in binary mode by default to allow ByteLoader (and
1624 the filter mechanism in general) to work properly. For compatibility,
1625 the DATA filehandle will be set to text mode if a carriage return is
1626 detected at the end of the line containing the _\|_END_\|_ or _\|_DATA_\|_
1627 token; if not, the DATA filehandle will be left open in binary mode.
1628 Earlier versions always opened the DATA filehandle in text mode.
1629 .PP
1630 The \fBglob()\fR operator is implemented via the \f(CW\*(C`File::Glob\*(C'\fR extension,
1631 which supports glob syntax of the C shell. This increases the flexibility
1632 of the \fBglob()\fR operator, but there may be compatibility issues for
1633 programs that relied on the older globbing syntax. If you want to
1634 preserve compatibility with the older syntax, you might want to run
1635 perl with \f(CW\*(C`\-MFile::DosGlob\*(C'\fR. For details and compatibility information,
1636 see File::Glob.
1637 .SH "Significant bug fixes"
1638 .IX Header "Significant bug fixes"
1639 .SS "<HANDLE> on empty files"
1640 .IX Subsection "<HANDLE> on empty files"
1641 With \f(CW$/\fR set to \f(CW\*(C`undef\*(C'\fR, "slurping" an empty file returns a string of
1642 zero length (instead of \f(CW\*(C`undef\*(C'\fR, as it used to) the first time the
1643 HANDLE is read after \f(CW$/\fR is set to \f(CW\*(C`undef\*(C'\fR. Further reads yield
1644 \&\f(CW\*(C`undef\*(C'\fR.
1645 .PP
1646 This means that the following will append "foo" to an empty file (it used
1647 to do nothing):
1648 .PP
1649 .Vb 1
1650 \& perl \-0777 \-pi \-e \*(Aqs/^/foo/\*(Aq empty_file
1651 .Ve
1652 .PP
1653 The behaviour of:
1654 .PP
1655 .Vb 1
1656 \& perl \-pi \-e \*(Aqs/^/foo/\*(Aq empty_file
1657 .Ve
1658 .PP
1659 is unchanged (it continues to leave the file empty).
1660 .ie n .SS """eval \*(Aq...\*(Aq"" improvements"
1661 .el .SS "\f(CWeval \*(Aq...\*(Aq\fP improvements"
1662 .IX Subsection "eval '...' improvements"
1663 Line numbers (as reflected by \fBcaller()\fR and most diagnostics) within
1664 \&\f(CW\*(C`eval \*(Aq...\*(Aq\*(C'\fR were often incorrect where here documents were involved.
1665 This has been corrected.
1666 .PP
1667 Lexical lookups for variables appearing in \f(CW\*(C`eval \*(Aq...\*(Aq\*(C'\fR within
1668 functions that were themselves called within an \f(CW\*(C`eval \*(Aq...\*(Aq\*(C'\fR were
1669 searching the wrong place for lexicals. The lexical search now
1670 correctly ends at the subroutine\*(Aqs block boundary.
1671 .PP
1672 The use of \f(CW\*(C`return\*(C'\fR within \f(CW\*(C`eval {...}\*(C'\fR caused $@ not to be reset
1673 correctly when no exception occurred within the eval. This has
1674 been fixed.
1675 .PP
1676 Parsing of here documents used to be flawed when they appeared as
1677 the replacement expression in \f(CW\*(C`eval \*(Aqs/.../.../e\*(Aq\*(C'\fR. This has
1678 been fixed.
1679 .SS "All compilation errors are true errors"
1680 .IX Subsection "All compilation errors are true errors"
1681 Some "errors" encountered at compile time were by necessity
1682 generated as warnings followed by eventual termination of the
1683 program. This enabled more such errors to be reported in a
1684 single run, rather than causing a hard stop at the first error
1685 that was encountered.
1686 .PP
1687 The mechanism for reporting such errors has been reimplemented
1688 to queue compile\-time errors and report them at the end of the
1689 compilation as true errors rather than as warnings. This fixes
1690 cases where error messages leaked through in the form of warnings
1691 when code was compiled at run time using \f(CW\*(C`eval STRING\*(C'\fR, and
1692 also allows such errors to be reliably trapped using \f(CW\*(C`eval "..."\*(C'\fR.
1693 .SS "Implicitly closed filehandles are safer"
1694 .IX Subsection "Implicitly closed filehandles are safer"
1695 Sometimes implicitly closed filehandles (as when they are localized,
1696 and Perl automatically closes them on exiting the scope) could
1697 inadvertently set $? or $!. This has been corrected.
1698 .SS "Behavior of list slices is more consistent"
1699 .IX Subsection "Behavior of list slices is more consistent"
1700 When taking a slice of a literal list (as opposed to a slice of
1701 an array or hash), Perl used to return an empty list if the
1702 result happened to be composed of all undef values.
1703 .PP
1704 The new behavior is to produce an empty list if (and only if)
1705 the original list was empty. Consider the following example:
1706 .PP
1707 .Vb 1
1708 \& @a = (1,undef,undef,2)[2,1,2];
1709 .Ve
1710 .PP
1711 The old behavior would have resulted in \f(CW@a\fR having no elements.
1712 The new behavior ensures it has three undefined elements.
1713 .PP
1714 Note in particular that the behavior of slices of the following
1715 cases remains unchanged:
1716 .PP
1717 .Vb 5
1718 \& @a = ()[1,2];
1719 \& @a = (getpwent)[7,0];
1720 \& @a = (anything_returning_empty_list())[2,1,2];
1721 \& @a = @b[2,1,2];
1722 \& @a = @c{\*(Aqa\*(Aq,\*(Aqb\*(Aq,\*(Aqc\*(Aq};
1723 .Ve
1724 .PP
1725 See perldata.
1726 .ie n .SS """(\e$)"" prototype and $foo{a}"
1727 .el .SS "\f(CW(\e$)\fP prototype and \f(CW$foo{a}\fP"
1728 .IX Subsection "($) prototype and $foo{a}"
1729 A scalar reference prototype now correctly allows a hash or
1730 array element in that slot.
1731 .ie n .SS """goto &sub"" and AUTOLOAD"
1732 .el .SS "\f(CWgoto &sub\fP and AUTOLOAD"
1733 .IX Subsection "goto &sub and AUTOLOAD"
1734 The \f(CW\*(C`goto &sub\*(C'\fR construct works correctly when \f(CW&sub\fR happens
1735 to be autoloaded.
1736 .ie n .SS """\-bareword"" allowed under ""use integer"""
1737 .el .SS "\f(CW\-bareword\fP allowed under \f(CWuse integer\fP"
1738 .IX Subsection "-bareword allowed under use integer"
1739 The autoquoting of barewords preceded by \f(CW\*(C`\-\*(C'\fR did not work
1740 in prior versions when the \f(CW\*(C`integer\*(C'\fR pragma was enabled.
1741 This has been fixed.
1742 .SS "Failures in \fBDESTROY()\fP"
1743 .IX Subsection "Failures in DESTROY()"
1744 When code in a destructor threw an exception, it went unnoticed
1745 in earlier versions of Perl, unless someone happened to be
1746 looking in $@ just after the point the destructor happened to
1747 run. Such failures are now visible as warnings when warnings are
1748 enabled.
1749 .SS "Locale bugs fixed"
1750 .IX Subsection "Locale bugs fixed"
1751 \&\fBprintf()\fR and \fBsprintf()\fR previously reset the numeric locale
1752 back to the default "C" locale. This has been fixed.
1753 .PP
1754 Numbers formatted according to the local numeric locale
1755 (such as using a decimal comma instead of a decimal dot) caused
1756 "isn\*(Aqt numeric" warnings, even while the operations accessing
1757 those numbers produced correct results. These warnings have been
1758 discontinued.
1759 .SS "Memory leaks"
1760 .IX Subsection "Memory leaks"
1761 The \f(CW\*(C`eval \*(Aqreturn sub {...}\*(Aq\*(C'\fR construct could sometimes leak
1762 memory. This has been fixed.
1763 .PP
1764 Operations that aren\*(Aqt filehandle constructors used to leak memory
1765 when used on invalid filehandles. This has been fixed.
1766 .PP
1767 Constructs that modified \f(CW@_\fR could fail to deallocate values
1768 in \f(CW@_\fR and thus leak memory. This has been corrected.
1769 .SS "Spurious subroutine stubs after failed subroutine calls"
1770 .IX Subsection "Spurious subroutine stubs after failed subroutine calls"
1771 Perl could sometimes create empty subroutine stubs when a
1772 subroutine was not found in the package. Such cases stopped
1773 later method lookups from progressing into base packages.
1774 This has been corrected.
1775 .ie n .SS "Taint failures under ""\-U"""
1776 .el .SS "Taint failures under \f(CW\-U\fP"
1777 .IX Subsection "Taint failures under -U"
1778 When running in unsafe mode, taint violations could sometimes
1779 cause silent failures. This has been fixed.
1780 .ie n .SS "END blocks and the ""\-c"" switch"
1781 .el .SS "END blocks and the \f(CW\-c\fP switch"
1782 .IX Subsection "END blocks and the -c switch"
1783 Prior versions used to run BEGIN \fBand\fR END blocks when Perl was
1784 run in compile\-only mode. Since this is typically not the expected
1785 behavior, END blocks are not executed anymore when the \f(CW\*(C`\-c\*(C'\fR switch
1786 is used, or if compilation fails.
1787 .PP
1788 See "Support for CHECK blocks" for how to run things when the compile
1789 phase ends.
1790 .SS "Potential to leak DATA filehandles"
1791 .IX Subsection "Potential to leak DATA filehandles"
1792 Using the \f(CW\*(C`_\|_DATA_\|_\*(C'\fR token creates an implicit filehandle to
1793 the file that contains the token. It is the program\*(Aqs
1794 responsibility to close it when it is done reading from it.
1795 .PP
1796 This caveat is now better explained in the documentation.
1797 See perldata.
1798 .SH "New or Changed Diagnostics"
1799 .IX Header "New or Changed Diagnostics"
1800 .ie n .IP """%s"" variable %s masks earlier declaration in same %s" 4
1801 .el .IP """%s"" variable \f(CW%s\fR masks earlier declaration in same \f(CW%s\fR" 4
1802 .IX Item """%s"" variable %s masks earlier declaration in same %s"
1803 (W misc) A "my" or "our" variable has been redeclared in the current scope or statement,
1804 effectively eliminating all access to the previous instance. This is almost
1805 always a typographical error. Note that the earlier variable will still exist
1806 until the end of the scope or until all closure referents to it are
1807 destroyed.
1808 .IP """my sub"" not yet implemented" 4
1809 .IX Item """my sub"" not yet implemented"
1810 (F) Lexically scoped subroutines are not yet implemented. Don\*(Aqt try that
1811 yet.
1812 .ie n .IP """our"" variable %s redeclared" 4
1813 .el .IP """our"" variable \f(CW%s\fR redeclared" 4
1814 .IX Item """our"" variable %s redeclared"
1815 (W misc) You seem to have already declared the same global once before in the
1816 current lexical scope.
1817 .ie n .IP "\*(Aq!\*(Aq allowed only after types %s" 4
1818 .el .IP "\*(Aq!\*(Aq allowed only after types \f(CW%s\fR" 4
1819 .IX Item "'!' allowed only after types %s"
1820 (F) The \*(Aq!\*(Aq is allowed in \fBpack()\fR and \fBunpack()\fR only after certain types.
1821 See "pack" in perlfunc.
1822 .IP "/ cannot take a count" 4
1823 .IX Item "/ cannot take a count"
1824 (F) You had an unpack template indicating a counted\-length string,
1825 but you have also specified an explicit size for the string.
1826 See "pack" in perlfunc.
1827 .IP "/ must be followed by a, A or Z" 4
1828 .IX Item "/ must be followed by a, A or Z"
1829 (F) You had an unpack template indicating a counted\-length string,
1830 which must be followed by one of the letters a, A or Z
1831 to indicate what sort of string is to be unpacked.
1832 See "pack" in perlfunc.
1833 .IP "/ must be followed by a*, A* or Z*" 4
1834 .IX Item "/ must be followed by a*, A* or Z*"
1835 (F) You had a pack template indicating a counted\-length string,
1836 Currently the only things that can have their length counted are a*, A* or Z*.
1837 See "pack" in perlfunc.
1838 .IP "/ must follow a numeric type" 4
1839 .IX Item "/ must follow a numeric type"
1840 (F) You had an unpack template that contained a \*(Aq#\*(Aq,
1841 but this did not follow some numeric unpack specification.
1842 See "pack" in perlfunc.
1843 .IP "/%s/: Unrecognized escape \e\e%c passed through" 4
1844 .IX Item "/%s/: Unrecognized escape %c passed through"
1845 (W regexp) You used a backslash\-character combination which is not recognized
1846 by Perl. This combination appears in an interpolated variable or a
1847 \&\f(CW\*(C`\*(Aq\*(C'\fR\-delimited regular expression. The character was understood literally.
1848 .IP "/%s/: Unrecognized escape \e\e%c in character class passed through" 4
1849 .IX Item "/%s/: Unrecognized escape %c in character class passed through"
1850 (W regexp) You used a backslash\-character combination which is not recognized
1851 by Perl inside character classes. The character was understood literally.
1852 .IP "/%s/ should probably be written as ""%s""" 4
1853 .IX Item "/%s/ should probably be written as ""%s"""
1854 (W syntax) You have used a pattern where Perl expected to find a string,
1855 as in the first argument to \f(CW\*(C`join\*(C'\fR. Perl will treat the true
1856 or false result of matching the pattern against \f(CW$_\fR as the string,
1857 which is probably not what you had in mind.
1858 .IP "%s() called too early to check prototype" 4
1859 .IX Item "%s() called too early to check prototype"
1860 (W prototype) You\*(Aqve called a function that has a prototype before the parser saw a
1861 definition or declaration for it, and Perl could not check that the call
1862 conforms to the prototype. You need to either add an early prototype
1863 declaration for the subroutine in question, or move the subroutine
1864 definition ahead of the call to get proper prototype checking. Alternatively,
1865 if you are certain that you\*(Aqre calling the function correctly, you may put
1866 an ampersand before the name to avoid the warning. See perlsub.
1867 .ie n .IP "%s argument is not a HASH or ARRAY element" 4
1868 .el .IP "\f(CW%s\fR argument is not a HASH or ARRAY element" 4
1869 .IX Item "%s argument is not a HASH or ARRAY element"
1870 (F) The argument to \fBexists()\fR must be a hash or array element, such as:
1871 .Sp
1872 .Vb 2
1873 \& $foo{$bar}
1874 \& $ref\->{"susie"}[12]
1875 .Ve
1876 .ie n .IP "%s argument is not a HASH or ARRAY element or slice" 4
1877 .el .IP "\f(CW%s\fR argument is not a HASH or ARRAY element or slice" 4
1878 .IX Item "%s argument is not a HASH or ARRAY element or slice"
1879 (F) The argument to \fBdelete()\fR must be either a hash or array element, such as:
1880 .Sp
1881 .Vb 2
1882 \& $foo{$bar}
1883 \& $ref\->{"susie"}[12]
1884 .Ve
1885 .Sp
1886 or a hash or array slice, such as:
1887 .Sp
1888 .Vb 2
1889 \& @foo[$bar, $baz, $xyzzy]
1890 \& @{$ref\->[12]}{"susie", "queue"}
1891 .Ve
1892 .ie n .IP "%s argument is not a subroutine name" 4
1893 .el .IP "\f(CW%s\fR argument is not a subroutine name" 4
1894 .IX Item "%s argument is not a subroutine name"
1895 (F) The argument to \fBexists()\fR for \f(CW\*(C`exists &sub\*(C'\fR must be a subroutine
1896 name, and not a subroutine call. \f(CW\*(C`exists &sub()\*(C'\fR will generate this error.
1897 .ie n .IP "%s package attribute may clash with future reserved word: %s" 4
1898 .el .IP "\f(CW%s\fR package attribute may clash with future reserved word: \f(CW%s\fR" 4
1899 .IX Item "%s package attribute may clash with future reserved word: %s"
1900 (W reserved) A lowercase attribute name was used that had a package\-specific handler.
1901 That name might have a meaning to Perl itself some day, even though it
1902 doesn\*(Aqt yet. Perhaps you should use a mixed\-case attribute name, instead.
1903 See attributes.
1904 .ie n .IP "(in cleanup) %s" 4
1905 .el .IP "(in cleanup) \f(CW%s\fR" 4
1906 .IX Item "(in cleanup) %s"
1907 (W misc) This prefix usually indicates that a \fBDESTROY()\fR method raised
1908 the indicated exception. Since destructors are usually called by
1909 the system at arbitrary points during execution, and often a vast
1910 number of times, the warning is issued only once for any number
1911 of failures that would otherwise result in the same message being
1912 repeated.
1913 .Sp
1914 Failure of user callbacks dispatched using the \f(CW\*(C`G_KEEPERR\*(C'\fR flag
1915 could also result in this warning. See "G_KEEPERR" in perlcall.
1916 .IP "<> should be quotes" 4
1917 .IX Item "<> should be quotes"
1918 (F) You wrote \f(CW\*(C`require <file>\*(C'\fR when you should have written
1919 \&\f(CW\*(C`require \*(Aqfile\*(Aq\*(C'\fR.
1920 .IP "Attempt to join self" 4
1921 .IX Item "Attempt to join self"
1922 (F) You tried to join a thread from within itself, which is an
1923 impossible task. You may be joining the wrong thread, or you may
1924 need to move the \fBjoin()\fR to some other thread.
1925 .IP "Bad evalled substitution pattern" 4
1926 .IX Item "Bad evalled substitution pattern"
1927 (F) You\*(Aqve used the /e switch to evaluate the replacement for a
1928 substitution, but perl found a syntax error in the code to evaluate,
1929 most likely an unexpected right brace \*(Aq}\*(Aq.
1930 .IP "Bad \fBrealloc()\fR ignored" 4
1931 .IX Item "Bad realloc() ignored"
1932 (S) An internal routine called \fBrealloc()\fR on something that had never been
1933 \&\fBmalloc()\fRed in the first place. Mandatory, but can be disabled by
1934 setting environment variable \f(CW\*(C`PERL_BADFREE\*(C'\fR to 1.
1935 .IP "Bareword found in conditional" 4
1936 .IX Item "Bareword found in conditional"
1937 (W bareword) The compiler found a bareword where it expected a conditional,
1938 which often indicates that an || or && was parsed as part of the
1939 last argument of the previous construct, for example:
1940 .Sp
1941 .Vb 1
1942 \& open FOO || die;
1943 .Ve
1944 .Sp
1945 It may also indicate a misspelled constant that has been interpreted
1946 as a bareword:
1947 .Sp
1948 .Vb 2
1949 \& use constant TYPO => 1;
1950 \& if (TYOP) { print "foo" }
1951 .Ve
1952 .Sp
1953 The \f(CW\*(C`strict\*(C'\fR pragma is useful in avoiding such errors.
1954 .IP "Binary number > 0b11111111111111111111111111111111 non\-portable" 4
1955 .IX Item "Binary number > 0b11111111111111111111111111111111 non-portable"
1956 (W portable) The binary number you specified is larger than 2**32\-1
1957 (4294967295) and therefore non\-portable between systems. See
1958 perlport for more on portability concerns.
1959 .IP "Bit vector size > 32 non\-portable" 4
1960 .IX Item "Bit vector size > 32 non-portable"
1961 (W portable) Using bit vector sizes larger than 32 is non\-portable.
1962 .ie n .IP "Buffer overflow in prime_env_iter: %s" 4
1963 .el .IP "Buffer overflow in prime_env_iter: \f(CW%s\fR" 4
1964 .IX Item "Buffer overflow in prime_env_iter: %s"
1965 (W internal) A warning peculiar to VMS. While Perl was preparing to iterate over
1966 \&\f(CW%ENV\fR, it encountered a logical name or symbol definition which was too long,
1967 so it was truncated to the string shown.
1968 .IP "Can\*(Aqt check filesystem of script ""%s""" 4
1969 .IX Item "Can't check filesystem of script ""%s"""
1970 (P) For some reason you can\*(Aqt check the filesystem of the script for nosuid.
1971 .ie n .IP "Can\*(Aqt declare class for non\-scalar %s in ""%s""" 4
1972 .el .IP "Can\*(Aqt declare class for non\-scalar \f(CW%s\fR in ""%s""" 4
1973 .IX Item "Can't declare class for non-scalar %s in ""%s"""
1974 (S) Currently, only scalar variables can be declared with a specific class
1975 qualifier in a "my" or "our" declaration. The semantics may be extended
1976 for other types of variables in future.
1977 .ie n .IP "Can\*(Aqt declare %s in ""%s""" 4
1978 .el .IP "Can\*(Aqt declare \f(CW%s\fR in ""%s""" 4
1979 .IX Item "Can't declare %s in ""%s"""
1980 (F) Only scalar, array, and hash variables may be declared as "my" or
1981 "our" variables. They must have ordinary identifiers as names.
1982 .IP "Can\*(Aqt ignore signal CHLD, forcing to default" 4
1983 .IX Item "Can't ignore signal CHLD, forcing to default"
1984 (W signal) Perl has detected that it is being run with the SIGCHLD signal
1985 (sometimes known as SIGCLD) disabled. Since disabling this signal
1986 will interfere with proper determination of exit status of child
1987 processes, Perl has reset the signal to its default value.
1988 This situation typically indicates that the parent program under
1989 which Perl may be running (e.g., cron) is being very careless.
1990 .IP "Can\*(Aqt modify non\-lvalue subroutine call" 4
1991 .IX Item "Can't modify non-lvalue subroutine call"
1992 (F) Subroutines meant to be used in lvalue context should be declared as
1993 such, see "Lvalue subroutines" in perlsub.
1994 .IP "Can\*(Aqt read CRTL environ" 4
1995 .IX Item "Can't read CRTL environ"
1996 (S) A warning peculiar to VMS. Perl tried to read an element of \f(CW%ENV\fR
1997 from the CRTL\*(Aqs internal environment array and discovered the array was
1998 missing. You need to figure out where your CRTL misplaced its environ
1999 or define \fIPERL_ENV_TABLES\fR (see perlvms) so that environ is not searched.
2000 .ie n .IP "Can\*(Aqt remove %s: %s, skipping file" 4
2001 .el .IP "Can\*(Aqt remove \f(CW%s:\fR \f(CW%s\fR, skipping file" 4
2002 .IX Item "Can't remove %s: %s, skipping file"
2003 (S) You requested an inplace edit without creating a backup file. Perl
2004 was unable to remove the original file to replace it with the modified
2005 file. The file was left unmodified.
2006 .ie n .IP "Can\*(Aqt return %s from lvalue subroutine" 4
2007 .el .IP "Can\*(Aqt return \f(CW%s\fR from lvalue subroutine" 4
2008 .IX Item "Can't return %s from lvalue subroutine"
2009 (F) Perl detected an attempt to return illegal lvalues (such
2010 as temporary or readonly values) from a subroutine used as an lvalue.
2011 This is not allowed.
2012 .IP "Can\*(Aqt weaken a nonreference" 4
2013 .IX Item "Can't weaken a nonreference"
2014 (F) You attempted to weaken something that was not a reference. Only
2015 references can be weakened.
2016 .IP "Character class [:%s:] unknown" 4
2017 .IX Item "Character class [:%s:] unknown"
2018 (F) The class in the character class [: :] syntax is unknown.
2019 See perlre.
2020 .IP "Character class syntax [%s] belongs inside character classes" 4
2021 .IX Item "Character class syntax [%s] belongs inside character classes"
2022 (W unsafe) The character class constructs [: :], [= =], and [. .] go
2023 \&\fIinside\fR character classes, the [] are part of the construct,
2024 for example: /[012[:alpha:]345]/. Note that [= =] and [. .]
2025 are not currently implemented; they are simply placeholders for
2026 future extensions.
2027 .ie n .IP "Constant is not %s reference" 4
2028 .el .IP "Constant is not \f(CW%s\fR reference" 4
2029 .IX Item "Constant is not %s reference"
2030 (F) A constant value (perhaps declared using the \f(CW\*(C`use constant\*(C'\fR pragma)
2031 is being dereferenced, but it amounts to the wrong type of reference. The
2032 message indicates the type of reference that was expected. This usually
2033 indicates a syntax error in dereferencing the constant value.
2034 See "Constant Functions" in perlsub and constant.
2035 .ie n .IP "constant(%s): %s" 4
2036 .el .IP "constant(%s): \f(CW%s\fR" 4
2037 .IX Item "constant(%s): %s"
2038 (F) The parser found inconsistencies either while attempting to define an
2039 overloaded constant, or when trying to find the character name specified
2040 in the \f(CW\*(C`\eN{...}\*(C'\fR escape. Perhaps you forgot to load the corresponding
2041 \&\f(CW\*(C`overload\*(C'\fR or \f(CW\*(C`charnames\*(C'\fR pragma? See charnames and overload.
2042 .IP "CORE::%s is not a keyword" 4
2043 .IX Item "CORE::%s is not a keyword"
2044 (F) The CORE:: namespace is reserved for Perl keywords.
2045 .IP "defined(@array) is deprecated" 4
2046 .IX Item "defined(@array) is deprecated"
2047 (D) \fBdefined()\fR is not usually useful on arrays because it checks for an
2048 undefined \fIscalar\fR value. If you want to see if the array is empty,
2049 just use \f(CW\*(C`if (@array) { # not empty }\*(C'\fR for example.
2050 .IP "defined(%hash) is deprecated" 4
2051 .IX Item "defined(%hash) is deprecated"
2052 (D) \fBdefined()\fR is not usually useful on hashes because it checks for an
2053 undefined \fIscalar\fR value. If you want to see if the hash is empty,
2054 just use \f(CW\*(C`if (%hash) { # not empty }\*(C'\fR for example.
2055 .IP "Did not produce a valid header" 4
2056 .IX Item "Did not produce a valid header"
2057 See Server error.
2058 .IP "(Did you mean ""local"" instead of ""our""?)" 4
2059 .IX Item "(Did you mean ""local"" instead of ""our""?)"
2060 (W misc) Remember that "our" does not localize the declared global variable.
2061 You have declared it again in the same lexical scope, which seems superfluous.
2062 .IP "Document contains no data" 4
2063 .IX Item "Document contains no data"
2064 See Server error.
2065 .ie n .IP "entering effective %s failed" 4
2066 .el .IP "entering effective \f(CW%s\fR failed" 4
2067 .IX Item "entering effective %s failed"
2068 (F) While under the \f(CW\*(C`use filetest\*(C'\fR pragma, switching the real and
2069 effective uids or gids failed.
2070 .IP "false [] range ""%s"" in regexp" 4
2071 .IX Item "false [] range ""%s"" in regexp"
2072 (W regexp) A character class range must start and end at a literal character, not
2073 another character class like \f(CW\*(C`\ed\*(C'\fR or \f(CW\*(C`[:alpha:]\*(C'\fR. The "\-" in your false
2074 range is interpreted as a literal "\-". Consider quoting the "\-", "\e\-".
2075 See perlre.
2076 .ie n .IP "Filehandle %s opened only for output" 4
2077 .el .IP "Filehandle \f(CW%s\fR opened only for output" 4
2078 .IX Item "Filehandle %s opened only for output"
2079 (W io) You tried to read from a filehandle opened only for writing. If you
2080 intended it to be a read/write filehandle, you needed to open it with
2081 "+<" or "+>" or "+>>" instead of with "<" or nothing. If
2082 you intended only to read from the file, use "<". See
2083 "open" in perlfunc.
2084 .ie n .IP "\fBflock()\fR on closed filehandle %s" 4
2085 .el .IP "\fBflock()\fR on closed filehandle \f(CW%s\fR" 4
2086 .IX Item "flock() on closed filehandle %s"
2087 (W closed) The filehandle you\*(Aqre attempting to \fBflock()\fR got itself closed some
2088 time before now. Check your logic flow. \fBflock()\fR operates on filehandles.
2089 Are you attempting to call \fBflock()\fR on a dirhandle by the same name?
2090 .IP "Global symbol ""%s"" requires explicit package name" 4
2091 .IX Item "Global symbol ""%s"" requires explicit package name"
2092 (F) You\*(Aqve said "use strict vars", which indicates that all variables
2093 must either be lexically scoped (using "my"), declared beforehand using
2094 "our", or explicitly qualified to say which package the global variable
2095 is in (using "::").
2096 .IP "Hexadecimal number > 0xffffffff non\-portable" 4
2097 .IX Item "Hexadecimal number > 0xffffffff non-portable"
2098 (W portable) The hexadecimal number you specified is larger than 2**32\-1
2099 (4294967295) and therefore non\-portable between systems. See
2100 perlport for more on portability concerns.
2101 .IP "Ill\-formed CRTL environ value ""%s""" 4
2102 .IX Item "Ill-formed CRTL environ value ""%s"""
2103 (W internal) A warning peculiar to VMS. Perl tried to read the CRTL\*(Aqs internal
2104 environ array, and encountered an element without the \f(CW\*(C`=\*(C'\fR delimiter
2105 used to separate keys from values. The element is ignored.
2106 .IP "Ill\-formed message in prime_env_iter: |%s|" 4
2107 .IX Item "Ill-formed message in prime_env_iter: |%s|"
2108 (W internal) A warning peculiar to VMS. Perl tried to read a logical name
2109 or CLI symbol definition when preparing to iterate over \f(CW%ENV\fR, and
2110 didn\*(Aqt see the expected delimiter between key and value, so the
2111 line was ignored.
2112 .ie n .IP "Illegal binary digit %s" 4
2113 .el .IP "Illegal binary digit \f(CW%s\fR" 4
2114 .IX Item "Illegal binary digit %s"
2115 (F) You used a digit other than 0 or 1 in a binary number.
2116 .ie n .IP "Illegal binary digit %s ignored" 4
2117 .el .IP "Illegal binary digit \f(CW%s\fR ignored" 4
2118 .IX Item "Illegal binary digit %s ignored"
2119 (W digit) You may have tried to use a digit other than 0 or 1 in a binary number.
2120 Interpretation of the binary number stopped before the offending digit.
2121 .IP "Illegal number of bits in vec" 4
2122 .IX Item "Illegal number of bits in vec"
2123 (F) The number of bits in \fBvec()\fR (the third argument) must be a power of
2124 two from 1 to 32 (or 64, if your platform supports that).
2125 .ie n .IP "Integer overflow in %s number" 4
2126 .el .IP "Integer overflow in \f(CW%s\fR number" 4
2127 .IX Item "Integer overflow in %s number"
2128 (W overflow) The hexadecimal, octal or binary number you have specified either
2129 as a literal or as an argument to \fBhex()\fR or \fBoct()\fR is too big for your
2130 architecture, and has been converted to a floating point number. On a
2131 32\-bit architecture the largest hexadecimal, octal or binary number
2132 representable without overflow is 0xFFFFFFFF, 037777777777, or
2133 0b11111111111111111111111111111111 respectively. Note that Perl
2134 transparently promotes all numbers to a floating point representation
2135 internally\-\-subject to loss of precision errors in subsequent
2136 operations.
2137 .ie n .IP "Invalid %s attribute: %s" 4
2138 .el .IP "Invalid \f(CW%s\fR attribute: \f(CW%s\fR" 4
2139 .IX Item "Invalid %s attribute: %s"
2140 The indicated attribute for a subroutine or variable was not recognized
2141 by Perl or by a user\-supplied handler. See attributes.
2142 .ie n .IP "Invalid %s attributes: %s" 4
2143 .el .IP "Invalid \f(CW%s\fR attributes: \f(CW%s\fR" 4
2144 .IX Item "Invalid %s attributes: %s"
2145 The indicated attributes for a subroutine or variable were not recognized
2146 by Perl or by a user\-supplied handler. See attributes.
2147 .IP "invalid [] range ""%s"" in regexp" 4
2148 .IX Item "invalid [] range ""%s"" in regexp"
2149 The offending range is now explicitly displayed.
2150 .ie n .IP "Invalid separator character %s in attribute list" 4
2151 .el .IP "Invalid separator character \f(CW%s\fR in attribute list" 4
2152 .IX Item "Invalid separator character %s in attribute list"
2153 (F) Something other than a colon or whitespace was seen between the
2154 elements of an attribute list. If the previous attribute
2155 had a parenthesised parameter list, perhaps that list was terminated
2156 too soon. See attributes.
2157 .ie n .IP "Invalid separator character %s in subroutine attribute list" 4
2158 .el .IP "Invalid separator character \f(CW%s\fR in subroutine attribute list" 4
2159 .IX Item "Invalid separator character %s in subroutine attribute list"
2160 (F) Something other than a colon or whitespace was seen between the
2161 elements of a subroutine attribute list. If the previous attribute
2162 had a parenthesised parameter list, perhaps that list was terminated
2163 too soon.
2164 .ie n .IP "leaving effective %s failed" 4
2165 .el .IP "leaving effective \f(CW%s\fR failed" 4
2166 .IX Item "leaving effective %s failed"
2167 (F) While under the \f(CW\*(C`use filetest\*(C'\fR pragma, switching the real and
2168 effective uids or gids failed.
2169 .ie n .IP "Lvalue subs returning %s not implemented yet" 4
2170 .el .IP "Lvalue subs returning \f(CW%s\fR not implemented yet" 4
2171 .IX Item "Lvalue subs returning %s not implemented yet"
2172 (F) Due to limitations in the current implementation, array and hash
2173 values cannot be returned in subroutines used in lvalue context.
2174 See "Lvalue subroutines" in perlsub.
2175 .ie n .IP "Method %s not permitted" 4
2176 .el .IP "Method \f(CW%s\fR not permitted" 4
2177 .IX Item "Method %s not permitted"
2178 See Server error.
2179 .ie n .IP "Missing %sbrace%s on \eN{}" 4
2180 .el .IP "Missing \f(CW%sbrace\fR%s on \eN{}" 4
2181 .IX Item "Missing %sbrace%s on N{}"
2182 (F) Wrong syntax of character name literal \f(CW\*(C`\eN{charname}\*(C'\fR within
2183 double\-quotish context.
2184 .IP "Missing command in piped open" 4
2185 .IX Item "Missing command in piped open"
2186 (W pipe) You used the \f(CW\*(C`open(FH, "| command")\*(C'\fR or \f(CW\*(C`open(FH, "command |")\*(C'\fR
2187 construction, but the command was missing or blank.
2188 .IP "Missing name in ""my sub""" 4
2189 .IX Item "Missing name in ""my sub"""
2190 (F) The reserved syntax for lexically scoped subroutines requires that they
2191 have a name with which they can be found.
2192 .ie n .IP "No %s specified for \-%c" 4
2193 .el .IP "No \f(CW%s\fR specified for \-%c" 4
2194 .IX Item "No %s specified for -%c"
2195 (F) The indicated command line switch needs a mandatory argument, but
2196 you haven\*(Aqt specified one.
2197 .ie n .IP "No package name allowed for variable %s in ""our""" 4
2198 .el .IP "No package name allowed for variable \f(CW%s\fR in ""our""" 4
2199 .IX Item "No package name allowed for variable %s in ""our"""
2200 (F) Fully qualified variable names are not allowed in "our" declarations,
2201 because that doesn\*(Aqt make much sense under existing semantics. Such
2202 syntax is reserved for future extensions.
2203 .IP "No space allowed after \-%c" 4
2204 .IX Item "No space allowed after -%c"
2205 (F) The argument to the indicated command line switch must follow immediately
2206 after the switch, without intervening spaces.
2207 .IP "no UTC offset information; assuming local time is UTC" 4
2208 .IX Item "no UTC offset information; assuming local time is UTC"
2209 (S) A warning peculiar to VMS. Perl was unable to find the local
2210 timezone offset, so it\*(Aqs assuming that local system time is equivalent
2211 to UTC. If it\*(Aqs not, define the logical name \fISYS$TIMEZONE_DIFFERENTIAL\fR
2212 to translate to the number of seconds which need to be added to UTC to
2213 get local time.
2214 .IP "Octal number > 037777777777 non\-portable" 4
2215 .IX Item "Octal number > 037777777777 non-portable"
2216 (W portable) The octal number you specified is larger than 2**32\-1 (4294967295)
2217 and therefore non\-portable between systems. See perlport for more
2218 on portability concerns.
2219 .Sp
2220 See also perlport for writing portable code.
2221 .IP "panic: del_backref" 4
2222 .IX Item "panic: del_backref"
2223 (P) Failed an internal consistency check while trying to reset a weak
2224 reference.
2225 .IP "panic: kid popen errno read" 4
2226 .IX Item "panic: kid popen errno read"
2227 (F) forked child returned an incomprehensible message about its errno.
2228 .IP "panic: magic_killbackrefs" 4
2229 .IX Item "panic: magic_killbackrefs"
2230 (P) Failed an internal consistency check while trying to reset all weak
2231 references to an object.
2232 .IP "Parentheses missing around ""%s"" list" 4
2233 .IX Item "Parentheses missing around ""%s"" list"
2234 (W parenthesis) You said something like
2235 .Sp
2236 .Vb 1
2237 \& my $foo, $bar = @_;
2238 .Ve
2239 .Sp
2240 when you meant
2241 .Sp
2242 .Vb 1
2243 \& my ($foo, $bar) = @_;
2244 .Ve
2245 .Sp
2246 Remember that "my", "our", and "local" bind tighter than comma.
2247 .ie n .IP "Possible unintended interpolation of %s in string" 4
2248 .el .IP "Possible unintended interpolation of \f(CW%s\fR in string" 4
2249 .IX Item "Possible unintended interpolation of %s in string"
2250 (W ambiguous) It used to be that Perl would try to guess whether you
2251 wanted an array interpolated or a literal @. It no longer does this;
2252 arrays are now \fIalways\fR interpolated into strings. This means that
2253 if you try something like:
2254 .Sp
2255 .Vb 1
2256 \& print "[email protected]";
2257 .Ve
2258 .Sp
2259 and the array \f(CW@example\fR doesn\*(Aqt exist, Perl is going to print
2260 \&\f(CW\*(C`fred.com\*(C'\fR, which is probably not what you wanted. To get a literal
2261 \&\f(CW\*(C`@\*(C'\fR sign in a string, put a backslash before it, just as you would
2262 to get a literal \f(CW\*(C`$\*(C'\fR sign.
2263 .ie n .IP "Possible Y2K bug: %s" 4
2264 .el .IP "Possible Y2K bug: \f(CW%s\fR" 4
2265 .IX Item "Possible Y2K bug: %s"
2266 (W y2k) You are concatenating the number 19 with another number, which
2267 could be a potential Year 2000 problem.
2268 .IP "pragma ""attrs"" is deprecated, use ""sub NAME : ATTRS"" instead" 4
2269 .IX Item "pragma ""attrs"" is deprecated, use ""sub NAME : ATTRS"" instead"
2270 (W deprecated) You have written something like this:
2271 .Sp
2272 .Vb 4
2273 \& sub doit
2274 \& {
2275 \& use attrs qw(locked);
2276 \& }
2277 .Ve
2278 .Sp
2279 You should use the new declaration syntax instead.
2280 .Sp
2281 .Vb 3
2282 \& sub doit : locked
2283 \& {
2284 \& ...
2285 .Ve
2286 .Sp
2287 The \f(CW\*(C`use attrs\*(C'\fR pragma is now obsolete, and is only provided for
2288 backward\-compatibility. See "Subroutine Attributes" in perlsub.
2289 .IP "Premature end of script headers" 4
2290 .IX Item "Premature end of script headers"
2291 See Server error.
2292 .IP "Repeat count in pack overflows" 4
2293 .IX Item "Repeat count in pack overflows"
2294 (F) You can\*(Aqt specify a repeat count so large that it overflows
2295 your signed integers. See "pack" in perlfunc.
2296 .IP "Repeat count in unpack overflows" 4
2297 .IX Item "Repeat count in unpack overflows"
2298 (F) You can\*(Aqt specify a repeat count so large that it overflows
2299 your signed integers. See "unpack" in perlfunc.
2300 .IP "\fBrealloc()\fR of freed memory ignored" 4
2301 .IX Item "realloc() of freed memory ignored"
2302 (S) An internal routine called \fBrealloc()\fR on something that had already
2303 been freed.
2304 .IP "Reference is already weak" 4
2305 .IX Item "Reference is already weak"
2306 (W misc) You have attempted to weaken a reference that is already weak.
2307 Doing so has no effect.
2308 .IP "setpgrp can\*(Aqt take arguments" 4
2309 .IX Item "setpgrp can't take arguments"
2310 (F) Your system has the \fBsetpgrp()\fR from BSD 4.2, which takes no arguments,
2311 unlike POSIX \fBsetpgid()\fR, which takes a process ID and process group ID.
2312 .IP "Strange *+?{} on zero\-length expression" 4
2313 .IX Item "Strange *+?{} on zero-length expression"
2314 (W regexp) You applied a regular expression quantifier in a place where it
2315 makes no sense, such as on a zero\-width assertion.
2316 Try putting the quantifier inside the assertion instead. For example,
2317 the way to match "abc" provided that it is followed by three
2318 repetitions of "xyz" is \f(CW\*(C`/abc(?=(?:xyz){3})/\*(C'\fR, not \f(CW\*(C`/abc(?=xyz){3}/\*(C'\fR.
2319 .ie n .IP "switching effective %s is not implemented" 4
2320 .el .IP "switching effective \f(CW%s\fR is not implemented" 4
2321 .IX Item "switching effective %s is not implemented"
2322 (F) While under the \f(CW\*(C`use filetest\*(C'\fR pragma, we cannot switch the
2323 real and effective uids or gids.
2324 .IP "This Perl can\*(Aqt reset CRTL environ elements (%s)" 4
2325 .IX Item "This Perl can't reset CRTL environ elements (%s)"
2326 .PD 0
2327 .IP "This Perl can\*(Aqt set CRTL environ elements (%s=%s)" 4
2328 .IX Item "This Perl can't set CRTL environ elements (%s=%s)"
2329 .PD
2330 (W internal) Warnings peculiar to VMS. You tried to change or delete an element
2331 of the CRTL\*(Aqs internal environ array, but your copy of Perl wasn\*(Aqt
2332 built with a CRTL that contained the \fBsetenv()\fR function. You\*(Aqll need to
2333 rebuild Perl with a CRTL that does, or redefine \fIPERL_ENV_TABLES\fR (see
2334 perlvms) so that the environ array isn\*(Aqt the target of the change to
2335 \&\f(CW%ENV\fR which produced the warning.
2336 .ie n .IP "Too late to run %s block" 4
2337 .el .IP "Too late to run \f(CW%s\fR block" 4
2338 .IX Item "Too late to run %s block"
2339 (W void) A CHECK or INIT block is being defined during run time proper,
2340 when the opportunity to run them has already passed. Perhaps you are
2341 loading a file with \f(CW\*(C`require\*(C'\fR or \f(CW\*(C`do\*(C'\fR when you should be using
2342 \&\f(CW\*(C`use\*(C'\fR instead. Or perhaps you should put the \f(CW\*(C`require\*(C'\fR or \f(CW\*(C`do\*(C'\fR
2343 inside a BEGIN block.
2344 .IP "Unknown \fBopen()\fR mode \*(Aq%s\*(Aq" 4
2345 .IX Item "Unknown open() mode '%s'"
2346 (F) The second argument of 3\-argument \fBopen()\fR is not among the list
2347 of valid modes: \f(CW\*(C`<\*(C'\fR, \f(CW\*(C`>\*(C'\fR, \f(CW\*(C`>>\*(C'\fR, \f(CW\*(C`+<\*(C'\fR,
2348 \&\f(CW\*(C`+>\*(C'\fR, \f(CW\*(C`+>>\*(C'\fR, \f(CW\*(C`\-|\*(C'\fR, \f(CW\*(C`|\-\*(C'\fR.
2349 .ie n .IP "Unknown process %x sent message to prime_env_iter: %s" 4
2350 .el .IP "Unknown process \f(CW%x\fR sent message to prime_env_iter: \f(CW%s\fR" 4
2351 .IX Item "Unknown process %x sent message to prime_env_iter: %s"
2352 (P) An error peculiar to VMS. Perl was reading values for \f(CW%ENV\fR before
2353 iterating over it, and someone else stuck a message in the stream of
2354 data Perl expected. Someone\*(Aqs very confused, or perhaps trying to
2355 subvert Perl\*(Aqs population of \f(CW%ENV\fR for nefarious purposes.
2356 .IP "Unrecognized escape \e\e%c passed through" 4
2357 .IX Item "Unrecognized escape %c passed through"
2358 (W misc) You used a backslash\-character combination which is not recognized
2359 by Perl. The character was understood literally.
2360 .IP "Unterminated attribute parameter in attribute list" 4
2361 .IX Item "Unterminated attribute parameter in attribute list"
2362 (F) The lexer saw an opening (left) parenthesis character while parsing an
2363 attribute list, but the matching closing (right) parenthesis
2364 character was not found. You may need to add (or remove) a backslash
2365 character to get your parentheses to balance. See attributes.
2366 .IP "Unterminated attribute list" 4
2367 .IX Item "Unterminated attribute list"
2368 (F) The lexer found something other than a simple identifier at the start
2369 of an attribute, and it wasn\*(Aqt a semicolon or the start of a
2370 block. Perhaps you terminated the parameter list of the previous attribute
2371 too soon. See attributes.
2372 .IP "Unterminated attribute parameter in subroutine attribute list" 4
2373 .IX Item "Unterminated attribute parameter in subroutine attribute list"
2374 (F) The lexer saw an opening (left) parenthesis character while parsing a
2375 subroutine attribute list, but the matching closing (right) parenthesis
2376 character was not found. You may need to add (or remove) a backslash
2377 character to get your parentheses to balance.
2378 .IP "Unterminated subroutine attribute list" 4
2379 .IX Item "Unterminated subroutine attribute list"
2380 (F) The lexer found something other than a simple identifier at the start
2381 of a subroutine attribute, and it wasn\*(Aqt a semicolon or the start of a
2382 block. Perhaps you terminated the parameter list of the previous attribute
2383 too soon.
2384 .IP "Value of CLI symbol ""%s"" too long" 4
2385 .IX Item "Value of CLI symbol ""%s"" too long"
2386 (W misc) A warning peculiar to VMS. Perl tried to read the value of an \f(CW%ENV\fR
2387 element from a CLI symbol table, and found a resultant string longer
2388 than 1024 characters. The return value has been truncated to 1024
2389 characters.
2390 .IP "Version number must be a constant number" 4
2391 .IX Item "Version number must be a constant number"
2392 (P) The attempt to translate a \f(CW\*(C`use Module n.n LIST\*(C'\fR statement into
2393 its equivalent \f(CW\*(C`BEGIN\*(C'\fR block found an internal inconsistency with
2394 the version number.
2395 .SH "New tests"
2396 .IX Header "New tests"
2397 .IP lib/attrs 4
2398 .IX Item "lib/attrs"
2399 Compatibility tests for \f(CW\*(C`sub : attrs\*(C'\fR vs the older \f(CW\*(C`use attrs\*(C'\fR.
2400 .IP lib/env 4
2401 .IX Item "lib/env"
2402 Tests for new environment scalar capability (e.g., \f(CW\*(C`use Env qw($BAR);\*(C'\fR).
2403 .IP lib/env\-array 4
2404 .IX Item "lib/env-array"
2405 Tests for new environment array capability (e.g., \f(CW\*(C`use Env qw(@PATH);\*(C'\fR).
2406 .IP lib/io_const 4
2407 .IX Item "lib/io_const"
2408 IO constants (SEEK_*, _IO*).
2409 .IP lib/io_dir 4
2410 .IX Item "lib/io_dir"
2411 Directory\-related IO methods (new, read, close, rewind, tied delete).
2412 .IP lib/io_multihomed 4
2413 .IX Item "lib/io_multihomed"
2414 INET sockets with multi\-homed hosts.
2415 .IP lib/io_poll 4
2416 .IX Item "lib/io_poll"
2417 IO \fBpoll()\fR.
2418 .IP lib/io_unix 4
2419 .IX Item "lib/io_unix"
2420 UNIX sockets.
2421 .IP op/attrs 4
2422 .IX Item "op/attrs"
2423 Regression tests for \f(CW\*(C`my ($x,@y,%z) : attrs\*(C'\fR and <sub : attrs>.
2424 .IP op/filetest 4
2425 .IX Item "op/filetest"
2426 File test operators.
2427 .IP op/lex_assign 4
2428 .IX Item "op/lex_assign"
2429 Verify operations that access pad objects (lexicals and temporaries).
2430 .IP op/exists_sub 4
2431 .IX Item "op/exists_sub"
2432 Verify \f(CW\*(C`exists &sub\*(C'\fR operations.
2433 .SH "Incompatible Changes"
2434 .IX Header "Incompatible Changes"
2435 .SS "Perl Source Incompatibilities"
2436 .IX Subsection "Perl Source Incompatibilities"
2437 Beware that any new warnings that have been added or old ones
2438 that have been enhanced are \fBnot\fR considered incompatible changes.
2439 .PP
2440 Since all new warnings must be explicitly requested via the \f(CW\*(C`\-w\*(C'\fR
2441 switch or the \f(CW\*(C`warnings\*(C'\fR pragma, it is ultimately the programmer\*(Aqs
2442 responsibility to ensure that warnings are enabled judiciously.
2443 .IP "CHECK is a new keyword" 4
2444 .IX Item "CHECK is a new keyword"
2445 All subroutine definitions named CHECK are now special. See
2446 \&\f(CW\*(C`/"Support for CHECK blocks"\*(C'\fR for more information.
2447 .IP "Treatment of list slices of undef has changed" 4
2448 .IX Item "Treatment of list slices of undef has changed"
2449 There is a potential incompatibility in the behavior of list slices
2450 that consist entirely of undefined values.
2451 See "Behavior of list slices is more consistent".
2452 .ie n .IP "Format of $English::PERL_VERSION is different" 4
2453 .el .IP "Format of \f(CW$English::PERL_VERSION\fR is different" 4
2454 .IX Item "Format of $English::PERL_VERSION is different"
2455 The English module now sets \f(CW$PERL_VERSION\fR to $^V (a string value) rather
2456 than \f(CW$]\fR (a numeric value). This is a potential incompatibility.
2457 Send us a report via perlbug if you are affected by this.
2458 .Sp
2459 See "Improved Perl version numbering system" for the reasons for
2460 this change.
2461 .ie n .IP "Literals of the form 1.2.3 parse differently" 4
2462 .el .IP "Literals of the form \f(CW1.2.3\fR parse differently" 4
2463 .IX Item "Literals of the form 1.2.3 parse differently"
2464 Previously, numeric literals with more than one dot in them were
2465 interpreted as a floating point number concatenated with one or more
2466 numbers. Such "numbers" are now parsed as strings composed of the
2467 specified ordinals.
2468 .Sp
2469 For example, \f(CW\*(C`print 97.98.99\*(C'\fR used to output \f(CW97.9899\fR in earlier
2470 versions, but now prints \f(CW\*(C`abc\*(C'\fR.
2471 .Sp
2472 See "Support for strings represented as a vector of ordinals".
2473 .IP "Possibly changed pseudo\-random number generator" 4
2474 .IX Item "Possibly changed pseudo-random number generator"
2475 Perl programs that depend on reproducing a specific set of pseudo\-random
2476 numbers may now produce different output due to improvements made to the
2477 \&\fBrand()\fR builtin. You can use \f(CW\*(C`sh Configure \-Drandfunc=rand\*(C'\fR to obtain
2478 the old behavior.
2479 .Sp
2480 See "Better pseudo\-random number generator".
2481 .IP "Hashing function for hash keys has changed" 4
2482 .IX Item "Hashing function for hash keys has changed"
2483 Even though Perl hashes are not order preserving, the apparently
2484 random order encountered when iterating on the contents of a hash
2485 is actually determined by the hashing algorithm used. Improvements
2486 in the algorithm may yield a random order that is \fBdifferent\fR from
2487 that of previous versions, especially when iterating on hashes.
2488 .Sp
2489 See "Better worst\-case behavior of hashes" for additional
2490 information.
2491 .ie n .IP """undef"" fails on read only values" 4
2492 .el .IP "\f(CWundef\fR fails on read only values" 4
2493 .IX Item "undef fails on read only values"
2494 Using the \f(CW\*(C`undef\*(C'\fR operator on a readonly value (such as \f(CW$1\fR) has
2495 the same effect as assigning \f(CW\*(C`undef\*(C'\fR to the readonly value\-\-it
2496 throws an exception.
2497 .IP "Close\-on\-exec bit may be set on pipe and socket handles" 4
2498 .IX Item "Close-on-exec bit may be set on pipe and socket handles"
2499 Pipe and socket handles are also now subject to the close\-on\-exec
2500 behavior determined by the special variable $^F.
2501 .Sp
2502 See "More consistent close\-on\-exec behavior".
2503 .ie n .IP "Writing ""$$1"" to mean ""${$}1"" is unsupported" 4
2504 .el .IP "Writing \f(CW""$$1""\fR to mean \f(CW""${$}1""\fR is unsupported" 4
2505 .IX Item "Writing ""$$1"" to mean ""${$}1"" is unsupported"
2506 Perl 5.004 deprecated the interpretation of \f(CW$$1\fR and
2507 similar within interpolated strings to mean \f(CW\*(C`$$ . "1"\*(C'\fR,
2508 but still allowed it.
2509 .Sp
2510 In Perl 5.6.0 and later, \f(CW"$$1"\fR always means \f(CW"${$1}"\fR.
2511 .ie n .IP "\fBdelete()\fR, \fBeach()\fR, \fBvalues()\fR and ""\e(%h)""" 4
2512 .el .IP "\fBdelete()\fR, \fBeach()\fR, \fBvalues()\fR and \f(CW\e(%h)\fR" 4
2513 .IX Item "delete(), each(), values() and )"
2514 operate on aliases to values, not copies
2515 .Sp
2516 \&\fBdelete()\fR, \fBeach()\fR, \fBvalues()\fR and hashes (e.g. \f(CW\*(C`\e(%h)\*(C'\fR)
2517 in a list context return the actual
2518 values in the hash, instead of copies (as they used to in earlier
2519 versions). Typical idioms for using these constructs copy the
2520 returned values, but this can make a significant difference when
2521 creating references to the returned values. Keys in the hash are still
2522 returned as copies when iterating on a hash.
2523 .Sp
2524 See also "\fBdelete()\fR, \fBeach()\fR, \fBvalues()\fR and hash iteration are faster".
2525 .IP "vec(EXPR,OFFSET,BITS) enforces powers\-of\-two BITS" 4
2526 .IX Item "vec(EXPR,OFFSET,BITS) enforces powers-of-two BITS"
2527 \&\fBvec()\fR generates a run\-time error if the BITS argument is not
2528 a valid power\-of\-two integer.
2529 .IP "Text of some diagnostic output has changed" 4
2530 .IX Item "Text of some diagnostic output has changed"
2531 Most references to internal Perl operations in diagnostics
2532 have been changed to be more descriptive. This may be an
2533 issue for programs that may incorrectly rely on the exact
2534 text of diagnostics for proper functioning.
2535 .ie n .IP """%@"" has been removed" 4
2536 .el .IP "\f(CW%@\fR has been removed" 4
2537 .IX Item "%@ has been removed"
2538 The undocumented special variable \f(CW\*(C`%@\*(C'\fR that used to accumulate
2539 "background" errors (such as those that happen in \fBDESTROY()\fR)
2540 has been removed, because it could potentially result in memory
2541 leaks.
2542 .IP "Parenthesized \fBnot()\fR behaves like a list operator" 4
2543 .IX Item "Parenthesized not() behaves like a list operator"
2544 The \f(CW\*(C`not\*(C'\fR operator now falls under the "if it looks like a function,
2545 it behaves like a function" rule.
2546 .Sp
2547 As a result, the parenthesized form can be used with \f(CW\*(C`grep\*(C'\fR and \f(CW\*(C`map\*(C'\fR.
2548 The following construct used to be a syntax error before, but it works
2549 as expected now:
2550 .Sp
2551 .Vb 1
2552 \& grep not($_), @things;
2553 .Ve
2554 .Sp
2555 On the other hand, using \f(CW\*(C`not\*(C'\fR with a literal list slice may not
2556 work. The following previously allowed construct:
2557 .Sp
2558 .Vb 1
2559 \& print not (1,2,3)[0];
2560 .Ve
2561 .Sp
2562 needs to be written with additional parentheses now:
2563 .Sp
2564 .Vb 1
2565 \& print not((1,2,3)[0]);
2566 .Ve
2567 .Sp
2568 The behavior remains unaffected when \f(CW\*(C`not\*(C'\fR is not followed by parentheses.
2569 .ie n .IP "Semantics of bareword prototype ""(*)"" have changed" 4
2570 .el .IP "Semantics of bareword prototype \f(CW(*)\fR have changed" 4
2571 .IX Item "Semantics of bareword prototype (*) have changed"
2572 The semantics of the bareword prototype \f(CW\*(C`*\*(C'\fR have changed. Perl 5.005
2573 always coerced simple scalar arguments to a typeglob, which wasn\*(Aqt useful
2574 in situations where the subroutine must distinguish between a simple
2575 scalar and a typeglob. The new behavior is to not coerce bareword
2576 arguments to a typeglob. The value will always be visible as either
2577 a simple scalar or as a reference to a typeglob.
2578 .Sp
2579 See "More functional bareword prototype (*)".
2580 .IP "Semantics of bit operators may have changed on 64\-bit platforms" 4
2581 .IX Item "Semantics of bit operators may have changed on 64-bit platforms"
2582 If your platform is either natively 64\-bit or if Perl has been
2583 configured to used 64\-bit integers, i.e., \f(CW$Config\fR{ivsize} is 8,
2584 there may be a potential incompatibility in the behavior of bitwise
2585 numeric operators (& | ^ ~ << >>). These operators used to strictly
2586 operate on the lower 32 bits of integers in previous versions, but now
2587 operate over the entire native integral width. In particular, note
2588 that unary \f(CW\*(C`~\*(C'\fR will produce different results on platforms that have
2589 different \f(CW$Config\fR{ivsize}. For portability, be sure to mask off
2590 the excess bits in the result of unary \f(CW\*(C`~\*(C'\fR, e.g., \f(CW\*(C`~$x & 0xffffffff\*(C'\fR.
2591 .Sp
2592 See "Bit operators support full native integer width".
2593 .IP "More builtins taint their results" 4
2594 .IX Item "More builtins taint their results"
2595 As described in "Improved security features", there may be more
2596 sources of taint in a Perl program.
2597 .Sp
2598 To avoid these new tainting behaviors, you can build Perl with the
2599 Configure option \f(CW\*(C`\-Accflags=\-DINCOMPLETE_TAINTS\*(C'\fR. Beware that the
2600 ensuing perl binary may be insecure.
2601 .SS "C Source Incompatibilities"
2602 .IX Subsection "C Source Incompatibilities"
2603 .ie n .IP """PERL_POLLUTE""" 4
2604 .el .IP \f(CWPERL_POLLUTE\fR 4
2605 .IX Item "PERL_POLLUTE"
2606 Release 5.005 grandfathered old global symbol names by providing preprocessor
2607 macros for extension source compatibility. As of release 5.6.0, these
2608 preprocessor definitions are not available by default. You need to explicitly
2609 compile perl with \f(CW\*(C`\-DPERL_POLLUTE\*(C'\fR to get these definitions. For
2610 extensions still using the old symbols, this option can be
2611 specified via MakeMaker:
2612 .Sp
2613 .Vb 1
2614 \& perl Makefile.PL POLLUTE=1
2615 .Ve
2616 .ie n .IP """PERL_IMPLICIT_CONTEXT""" 4
2617 .el .IP \f(CWPERL_IMPLICIT_CONTEXT\fR 4
2618 .IX Item "PERL_IMPLICIT_CONTEXT"
2619 This new build option provides a set of macros for all API functions
2620 such that an implicit interpreter/thread context argument is passed to
2621 every API function. As a result of this, something like \f(CW\*(C`sv_setsv(foo,bar)\*(C'\fR
2622 amounts to a macro invocation that actually translates to something like
2623 \&\f(CW\*(C`Perl_sv_setsv(my_perl,foo,bar)\*(C'\fR. While this is generally expected
2624 to not have any significant source compatibility issues, the difference
2625 between a macro and a real function call will need to be considered.
2626 .Sp
2627 This means that there \fBis\fR a source compatibility issue as a result of
2628 this if your extensions attempt to use pointers to any of the Perl API
2629 functions.
2630 .Sp
2631 Note that the above issue is not relevant to the default build of
2632 Perl, whose interfaces continue to match those of prior versions
2633 (but subject to the other options described here).
2634 .Sp
2635 See "Background and PERL_IMPLICIT_CONTEXT" in perlguts for detailed information on the
2636 ramifications of building Perl with this option.
2637 .Sp
2638 .Vb 3
2639 \& NOTE: PERL_IMPLICIT_CONTEXT is automatically enabled whenever Perl is built
2640 \& with one of \-Dusethreads, \-Dusemultiplicity, or both. It is not
2641 \& intended to be enabled by users at this time.
2642 .Ve
2643 .ie n .IP """PERL_POLLUTE_MALLOC""" 4
2644 .el .IP \f(CWPERL_POLLUTE_MALLOC\fR 4
2645 .IX Item "PERL_POLLUTE_MALLOC"
2646 Enabling Perl\*(Aqs malloc in release 5.005 and earlier caused the namespace of
2647 the system\*(Aqs malloc family of functions to be usurped by the Perl versions,
2648 since by default they used the same names. Besides causing problems on
2649 platforms that do not allow these functions to be cleanly replaced, this
2650 also meant that the system versions could not be called in programs that
2651 used Perl\*(Aqs malloc. Previous versions of Perl have allowed this behaviour
2652 to be suppressed with the HIDEMYMALLOC and EMBEDMYMALLOC preprocessor
2653 definitions.
2654 .Sp
2655 As of release 5.6.0, Perl\*(Aqs malloc family of functions have default names
2656 distinct from the system versions. You need to explicitly compile perl with
2657 \&\f(CW\*(C`\-DPERL_POLLUTE_MALLOC\*(C'\fR to get the older behaviour. HIDEMYMALLOC
2658 and EMBEDMYMALLOC have no effect, since the behaviour they enabled is now
2659 the default.
2660 .Sp
2661 Note that these functions do \fBnot\fR constitute Perl\*(Aqs memory allocation API.
2662 See "Memory Allocation" in perlguts for further information about that.
2663 .SS "Compatible C Source API Changes"
2664 .IX Subsection "Compatible C Source API Changes"
2665 .ie n .IP """PATCHLEVEL"" is now ""PERL_VERSION""" 4
2666 .el .IP "\f(CWPATCHLEVEL\fR is now \f(CWPERL_VERSION\fR" 4
2667 .IX Item "PATCHLEVEL is now PERL_VERSION"
2668 The cpp macros \f(CW\*(C`PERL_REVISION\*(C'\fR, \f(CW\*(C`PERL_VERSION\*(C'\fR, and \f(CW\*(C`PERL_SUBVERSION\*(C'\fR
2669 are now available by default from perl.h, and reflect the base revision,
2670 patchlevel, and subversion respectively. \f(CW\*(C`PERL_REVISION\*(C'\fR had no
2671 prior equivalent, while \f(CW\*(C`PERL_VERSION\*(C'\fR and \f(CW\*(C`PERL_SUBVERSION\*(C'\fR were
2672 previously available as \f(CW\*(C`PATCHLEVEL\*(C'\fR and \f(CW\*(C`SUBVERSION\*(C'\fR.
2673 .Sp
2674 The new names cause less pollution of the \fBcpp\fR namespace and reflect what
2675 the numbers have come to stand for in common practice. For compatibility,
2676 the old names are still supported when \fIpatchlevel.h\fR is explicitly
2677 included (as required before), so there is no source incompatibility
2678 from the change.
2679 .SS "Binary Incompatibilities"
2680 .IX Subsection "Binary Incompatibilities"
2681 In general, the default build of this release is expected to be binary
2682 compatible for extensions built with the 5.005 release or its maintenance
2683 versions. However, specific platforms may have broken binary compatibility
2684 due to changes in the defaults used in hints files. Therefore, please be
2685 sure to always check the platform\-specific README files for any notes to
2686 the contrary.
2687 .PP
2688 The usethreads or usemultiplicity builds are \fBnot\fR binary compatible
2689 with the corresponding builds in 5.005.
2690 .PP
2691 On platforms that require an explicit list of exports (AIX, OS/2 and Windows,
2692 among others), purely internal symbols such as parser functions and the
2693 run time opcodes are not exported by default. Perl 5.005 used to export
2694 all functions irrespective of whether they were considered part of the
2695 public API or not.
2696 .PP
2697 For the full list of public API functions, see perlapi.
2698 .SH "Known Problems"
2699 .IX Header "Known Problems"
2700 .SS "Thread test failures"
2701 .IX Subsection "Thread test failures"
2702 The subtests 19 and 20 of lib/thr5005.t test are known to fail due to
2703 fundamental problems in the 5.005 threading implementation. These are
2704 not new failures\-\-Perl 5.005_0x has the same bugs, but didn\*(Aqt have these
2705 tests.
2706 .SS "EBCDIC platforms not supported"
2707 .IX Subsection "EBCDIC platforms not supported"
2708 In earlier releases of Perl, EBCDIC environments like OS390 (also
2709 known as Open Edition MVS) and VM\-ESA were supported. Due to changes
2710 required by the UTF\-8 (Unicode) support, the EBCDIC platforms are not
2711 supported in Perl 5.6.0.
2712 .SS "In 64\-bit HP\-UX the lib/io_multihomed test may hang"
2713 .IX Subsection "In 64-bit HP-UX the lib/io_multihomed test may hang"
2714 The lib/io_multihomed test may hang in HP\-UX if Perl has been
2715 configured to be 64\-bit. Because other 64\-bit platforms do not
2716 hang in this test, HP\-UX is suspect. All other tests pass
2717 in 64\-bit HP\-UX. The test attempts to create and connect to
2718 "multihomed" sockets (sockets which have multiple IP addresses).
2719 .SS "NEXTSTEP 3.3 POSIX test failure"
2720 .IX Subsection "NEXTSTEP 3.3 POSIX test failure"
2721 In NEXTSTEP 3.3p2 the implementation of the \fBstrftime\fR\|(3) in the
2722 operating system libraries is buggy: the \f(CW%j\fR format numbers the days of
2723 a month starting from zero, which, while being logical to programmers,
2724 will cause the subtests 19 to 27 of the lib/posix test may fail.
2725 .SS "Tru64 (aka Digital UNIX, aka DEC OSF/1) lib/sdbm test failure with gcc"
2726 .IX Subsection "Tru64 (aka Digital UNIX, aka DEC OSF/1) lib/sdbm test failure with gcc"
2727 If compiled with gcc 2.95 the lib/sdbm test will fail (dump core).
2728 The cure is to use the vendor cc, it comes with the operating system
2729 and produces good code.
2730 .SS "UNICOS/mk CC failures during Configure run"
2731 .IX Subsection "UNICOS/mk CC failures during Configure run"
2732 In UNICOS/mk the following errors may appear during the Configure run:
2733 .PP
2734 .Vb 6
2735 \& Guessing which symbols your C compiler and preprocessor define...
2736 \& CC\-20 cc: ERROR File = try.c, Line = 3
2737 \& ...
2738 \& bad switch yylook 79bad switch yylook 79bad switch yylook 79bad switch yylook 79#ifdef A29K
2739 \& ...
2740 \& 4 errors detected in the compilation of "try.c".
2741 .Ve
2742 .PP
2743 The culprit is the broken awk of UNICOS/mk. The effect is fortunately
2744 rather mild: Perl itself is not adversely affected by the error, only
2745 the h2ph utility coming with Perl, and that is rather rarely needed
2746 these days.
2747 .SS "Arrow operator and arrays"
2748 .IX Subsection "Arrow operator and arrays"
2749 When the left argument to the arrow operator \f(CW\*(C`\->\*(C'\fR is an array, or
2750 the \f(CW\*(C`scalar\*(C'\fR operator operating on an array, the result of the
2751 operation must be considered erroneous. For example:
2752 .PP
2753 .Vb 2
2754 \& @x\->[2]
2755 \& scalar(@x)\->[2]
2756 .Ve
2757 .PP
2758 These expressions will get run\-time errors in some future release of
2759 Perl.
2760 .SS "Experimental features"
2761 .IX Subsection "Experimental features"
2762 As discussed above, many features are still experimental. Interfaces and
2763 implementation of these features are subject to change, and in extreme cases,
2764 even subject to removal in some future release of Perl. These features
2765 include the following:
2766 .IP Threads 4
2767 .IX Item "Threads"
2768 .PD 0
2769 .IP Unicode 4
2770 .IX Item "Unicode"
2771 .IP "64\-bit support" 4
2772 .IX Item "64-bit support"
2773 .IP "Lvalue subroutines" 4
2774 .IX Item "Lvalue subroutines"
2775 .IP "Weak references" 4
2776 .IX Item "Weak references"
2777 .IP "The pseudo\-hash data type" 4
2778 .IX Item "The pseudo-hash data type"
2779 .IP "The Compiler suite" 4
2780 .IX Item "The Compiler suite"
2781 .IP "Internal implementation of file globbing" 4
2782 .IX Item "Internal implementation of file globbing"
2783 .IP "The DB module" 4
2784 .IX Item "The DB module"
2785 .IP "The regular expression code constructs:" 4
2786 .IX Item "The regular expression code constructs:"
2787 .PD
2788 \&\f(CW\*(C`(?{ code })\*(C'\fR and \f(CW\*(C`(??{ code })\*(C'\fR
2789 .SH "Obsolete Diagnostics"
2790 .IX Header "Obsolete Diagnostics"
2791 .IP "Character class syntax [: :] is reserved for future extensions" 4
2792 .IX Item "Character class syntax [: :] is reserved for future extensions"
2793 (W) Within regular expression character classes ([]) the syntax beginning
2794 with "[:" and ending with ":]" is reserved for future extensions.
2795 If you need to represent those character sequences inside a regular
2796 expression character class, just quote the square brackets with the
2797 backslash: "\e[:" and ":\e]".
2798 .IP "Ill\-formed logical name |%s| in prime_env_iter" 4
2799 .IX Item "Ill-formed logical name |%s| in prime_env_iter"
2800 (W) A warning peculiar to VMS. A logical name was encountered when preparing
2801 to iterate over \f(CW%ENV\fR which violates the syntactic rules governing logical
2802 names. Because it cannot be translated normally, it is skipped, and will not
2803 appear in \f(CW%ENV\fR. This may be a benign occurrence, as some software packages
2804 might directly modify logical name tables and introduce nonstandard names,
2805 or it may indicate that a logical name table has been corrupted.
2806 .IP "In string, @%s now must be written as \e@%s" 4
2807 .IX Item "In string, @%s now must be written as @%s"
2808 The description of this error used to say:
2809 .Sp
2810 .Vb 2
2811 \& (Someday it will simply assume that an unbackslashed @
2812 \& interpolates an array.)
2813 .Ve
2814 .Sp
2815 That day has come, and this fatal error has been removed. It has been
2816 replaced by a non\-fatal warning instead.
2817 See "Arrays now always interpolate into double\-quoted strings" for
2818 details.
2819 .ie n .IP "Probable precedence problem on %s" 4
2820 .el .IP "Probable precedence problem on \f(CW%s\fR" 4
2821 .IX Item "Probable precedence problem on %s"
2822 (W) The compiler found a bareword where it expected a conditional,
2823 which often indicates that an || or && was parsed as part of the
2824 last argument of the previous construct, for example:
2825 .Sp
2826 .Vb 1
2827 \& open FOO || die;
2828 .Ve
2829 .IP "regexp too big" 4
2830 .IX Item "regexp too big"
2831 (F) The current implementation of regular expressions uses shorts as
2832 address offsets within a string. Unfortunately this means that if
2833 the regular expression compiles to longer than 32767, it\*(Aqll blow up.
2834 Usually when you want a regular expression this big, there is a better
2835 way to do it with multiple statements. See perlre.
2836 .IP "Use of ""$$<digit>"" to mean ""${$}<digit>"" is deprecated" 4
2837 .IX Item "Use of ""$$<digit>"" to mean ""${$}<digit>"" is deprecated"
2838 (D) Perl versions before 5.004 misinterpreted any type marker followed
2839 by "$" and a digit. For example, "$$0" was incorrectly taken to mean
2840 "${$}0" instead of "${$0}". This bug is (mostly) fixed in Perl 5.004.
2841 .Sp
2842 However, the developers of Perl 5.004 could not fix this bug completely,
2843 because at least two widely\-used modules depend on the old meaning of
2844 "$$0" in a string. So Perl 5.004 still interprets "$$<digit>" in the
2845 old (broken) way inside strings; but it generates this message as a
2846 warning. And in Perl 5.005, this special treatment will cease.
2847 .SH "Reporting Bugs"
2848 .IX Header "Reporting Bugs"
2849 If you find what you think is a bug, you might check the
2850 articles recently posted to the comp.lang.perl.misc newsgroup.
2851 There may also be information at http://www.perl.com/perl/ , the Perl
2852 Home Page.
2853 .PP
2854 If you believe you have an unreported bug, please run the \fBperlbug\fR
2855 program included with your release. Be sure to trim your bug down
2856 to a tiny but sufficient test case. Your bug report, along with the
2857 output of \f(CW\*(C`perl \-V\*(C'\fR, will be sent off to [email protected] to be
2858 analysed by the Perl porting team.
2859 .SH "SEE ALSO"
2860 .IX Header "SEE ALSO"
2861 The \fIChanges\fR file for exhaustive details on what changed.
2862 .PP
2863 The \fIINSTALL\fR file for how to build Perl.
2864 .PP
2865 The \fIREADME\fR file for general stuff.
2866 .PP
2867 The \fIArtistic\fR and \fICopying\fR files for copyright information.
2868 .SH HISTORY
2869 .IX Header "HISTORY"
2870 Written by Gurusamy Sarathy <\[email protected]\fR>, with many
2871 contributions from The Perl Porters.
2872 .PP
2873 Send omissions or corrections to <\[email protected]\fR>.