Debian Codegraph @

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