Debian Codegraph @

upstream/debian-unstable/man1/perl56delta.1

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