Debian Codegraph @

upstream/fedora-44/man1/perl561delta.1

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