5 perl5196delta - what is new for perl v5.19.6
9 This document describes differences between the 5.19.5 release and the 5.19.6
12 If you are upgrading from an earlier release such as 5.19.4, first read
13 L<perl5195delta>, which describes differences between 5.19.4 and 5.19.5.
15 =head1 Core Enhancements
17 =head2 $a and $b warnings exemption
19 The special variables $a and $b, used in C<sort>, are now exempt from "used
20 once" warnings, even where C<sort> is not used. This makes it easier for
21 CPAN modules to provide functions using $a and $b for similar purposes.
26 =head2 Module removals
28 The following modules will be removed from the core distribution in a
29 future release, and will at that time need to be installed from CPAN.
30 Distributions on CPAN which require these modules will need to list them as
33 The core versions of these modules will now issue C<"deprecated">-category
34 warnings to alert you to this fact. To silence these deprecation warnings,
35 install the modules in question from CPAN.
37 Note that these are (with rare exceptions) fine modules that you are encouraged
38 to continue to use. Their disinclusion from core primarily hinges on their
39 necessity to bootstrapping a fully functional, CPAN-capable Perl installation,
40 not usually on concerns over their design.
44 =item L<Package::Constants>
48 =head1 Performance Enhancements
54 Constant hash key lookups (C<$hash{key}> as opposed to C<$hash{$key}>) have
55 long had the internal hash value computed at compile time, to speed up
56 lookup. This optimisation has only now been applied to hash slices as
61 Combined C<and> and C<or> operators in void context, like those
62 generated for C<< unless ($a && $b) >> and C<< if ($a || b) >> now
63 short circuit directly to the end of the statement. [perl #120128]
67 =head1 Modules and Pragmata
69 =head2 Updated Modules and Pragmata
75 L<Archive::Tar> has been upgraded from version 1.92 to 1.96.
79 L<AutoLoader> has been upgraded from version 5.73 to 5.74.
83 L<B> has been upgraded from version 1.46 to 1.47.
85 C<< B::PMOP->precomp >> now preserves the internal UTF8 flag correctly, so
86 chr 256 remains chr 256, instead of turning into "\xc4\x80". This allows
87 L<B::Deparse> to deparse Unicode regular expression correctly.
90 C<< B::HV->ARRAY >> now preserves the UTF8 flag on returned hash keys.
95 L<B::Concise> has been upgraded from version 0.99 to 0.991.
97 B<-debug> output now includes C<op_other> pointers.
101 L<B::Deparse> has been upgraded from version 1.23 to 1.24.
103 C<s//\(3)/e> is now deparsed in a way that does not issue warnings when
104 parsed again. [perl #119807]
106 C<glob(my $x)> is now deparsed correctly, rather than as C<< <my $x> >> or
109 C<CORE::glob> is now deparsed correctly with the CORE:: prefix when there
110 is a subroutine named "glob".
114 L<B::Debug> has been upgraded from version 1.18 to 1.19.
118 L<bignum> has been upgraded from version 0.36 to 0.37.
122 L<Compress::Raw::Bzip2> has been upgraded from version 2.062 to 2.063.
126 L<Compress::Raw::Zlib> has been upgraded from version 2.062 to 2.063.
130 L<constant> has been upgraded from version 1.28 to 1.29.
134 L<DB_File> has been upgraded from version 1.829 to 1.831.
138 L<ExtUtils::MakeMaker> has been upgraded from version 6.80 to 6.82.
142 L<HTTP::Tiny> has been upgraded from version 0.036 to 0.038.
146 L<IO> has been upgraded from version 1.29 to 1.30.
150 L<IO::Select> has been upgraded from version 1.21 to 1.22.
152 Removing a closed file handle from an IO::Select object now correctly
153 updates its internal state and returns the correct value. [perl #75156]
157 L<Locale::Maketext> has been upgraded from version 1.24 to 1.25.
159 An issue with escaped backslashes if the literal is compiled as
160 function argument has been resolved.
164 L<IPC::Cmd> has been upgraded from version 0.84_01 to 0.90.
168 L<Module::Build> has been upgraded from version 0.4007 to 0.4202.
170 NOTE: L<Module::Build> is deprecated and may be removed from a future version of Perl.
174 L<Module::CoreList> has been upgraded from version 3.00 to 3.01.
176 The list of Perl versions covered has been updated.
180 L<Package::Constants> has been upgraded from version 0.02 to 0.04.
182 NOTE: L<Package::Constants> is deprecated and may be removed from a future version of Perl.
186 L<PerlIO::scalar> has been upgraded from version 0.17 to 0.18.
188 A bug fix in 0.17 caused references to be stringified as soon as a handle
189 to it was opened, even if it was opened only for reading. It also croaked
190 on read-only references. This has been fixed. [perl #119529]
194 L<Socket> has been upgraded from version 2.012 to 2.013.
198 L<Term::Cap> has been upgraded from version 1.13 to 1.15.
202 L<Test::Harness> has been upgraded from version 3.29 to 3.30.
206 L<Test::Simple> has been upgraded from version 0.99 to 1.001002.
210 L<Tie::StdHandle> has been upgraded from version 4.3 to 4.4.
212 It no longer prints C<$\> twice. [perl #120202]
214 It no longer ignores the offset passed to C<syswrite>.
218 L<threads> has been upgraded from version 1.89 to 1.90.
222 L<threads::shared> has been upgraded from version 1.44 to 1.45.
226 L<Unicode::Collate> has been upgraded from version 0.99 to 1.02.
232 =head2 Changes to Existing Documentation
238 L<perlhacktips> has been updated to include some more examples of C<gdb> usage.
244 C<each>, clarify hash "modify while iterating".
246 C<pack>, the documentation for verbatim tables has been clarified.
250 L<perlre>, the documentation for C</x> and C<(?# comment)> has been expanded and clarified.
254 L<perllexwarn>, a note has been added to users of C<FATAL> warnings of the risk of upgrades.
260 =head2 Changes to Existing Diagnostics
266 L<%%s[%s] in scalar context better written as $%s[%s]|perldiag/"%%s[%s] in scalar context better written as $%s[%s]">:
268 This warning now occurs for any C<%array[$index]> or C<%hash{key}> known to
269 be in scalar context at compile time. Previously it was worded "Scalar
270 value %%s[%s] better written as $%s[%s]".
274 L<Switch condition not recognized in regex; marked by <-- HERE in mE<sol>%sE<sol>|perldiag/"Switch condition not recognized in regex; marked by <-- HERE in m/%s/">:
276 The description for this diagnostic has been extended to cover all cases where the warning may occur.
277 Issues with the positioning of the arrow indicator have also been resolved.
287 F<ext/File-Find/t/find.t> has been converted from manual C<print>
288 statements to Test::More functions. Each test now has a description.
293 =head1 Platform Support
301 Synology ships its NAS boxes with a lean Linux distribution (DSM) on relative
302 cheap CPU's (like the Marvell Kirkwood mv6282 - ARMv5tel or Freescale QorIQ
303 P1022 ppc - e500v2) not meant for workstations or development. These boxes
304 should build now. The basic problems are the non-standard location for tools.
308 =head2 Platform-Specific Notes
314 Support for building with Visual C++ 2013 has been added. There are currently
315 two possible test failures (see L<perlwin32/"Testing Perl on Windows">) which
316 will hopefully be resolved soon.
318 Experimental support for building with Intel C++ Compiler has been added. Only
319 the nmake makefile (win32/Makefile) can be used. A "nmake test" will not pass
320 at this time due to "cpan/CGI/t/url.t".
324 Perl can now be built in one shot with no user intervention on WinCE by running
325 C<nmake -f Makefile.ce all>.
327 Support for building with EVC (Embedded Visual C++) 4 has been restored. Perl
328 can also be built using Smart Devices for Visual C++ 2005 or 2008.
332 =head1 Internal Changes
338 Compiling with C<-Accflags=-PERL_BOOL_AS_CHAR> now allows C99 and C++
339 compilers to emulate the aliasing of C<bool> to C<char> that perl does for
340 C89 compilers. [perl #120314]
344 =head1 Selected Bug Fixes
350 Perl 5.18.0 accidentally disallowed C<-bareword> under C<use strict> and
351 C<use integer>. This has been fixed. [perl #120288]
355 C<-a> at the start of a line (or a hyphen with any single letter that is
356 not a filetest operator) no longer produces an erroneous 'Use of "-a"
357 without parentheses is ambiguous' warning. [perl #120288]
361 Lvalue context is now properly propagated into bare blocks and C<if> and
362 C<else> blocks in lvalue subroutines. Previously, arrays and hashes would
363 sometimes incorrectly be flattened when returned in lvalue list context, or
364 "Bizarre copy" errors could occur. [perl #119797]
368 Lvalue context is now propagated to the branches of C<||> and C<&&> (and
369 their alphabetic equivalents, C<or> and C<and>). This means
370 C<foreach (pos $x || pos $y) {...}> now allows C<pos> to be modified
375 C<*DB::DB = sub {} if 0> no longer stops Perl's debugging mode from finding
376 C<DB::DB> subs declared thereafter.
380 C<stat> and C<readline> remember the last handle used; the former
381 for the special C<_> filehandle, the latter for C<${^LAST_FH}>.
382 C<eval "*foo if 0"> where *foo was the last handle passed to C<stat>
383 or C<readline> could cause that handle to be forgotten if the
384 handle were not opened yet. This has been fixed.
388 Various cases of C<delete $::{a}>, C<delete $::{ENV}> etc. causing a crash
389 have been fixed. [perl #54044]
393 Assigning another typeglob to C<*^R> no longer makes the regular expression
398 C<%{'_<...'}> hashes now set breakpoints on the corresponding C<@{'_<...'}>
399 rather than whichever array C<@DB::dbline> is aliased to. [perl #119799]
403 Setting C<$!> to EACCESS before calling C<require> could affect
404 C<require>'s behaviour. This has been fixed.
408 The "Can't use \1 to mean $1 in expression" warning message now only occurs
409 on the right-hand (replacement) part of a substitution. Formerly it could
410 happen in code embedded in the left-hand side, or in any other quote-like
415 The C<\N> regular expression escape, when used without the curly braces (to
416 mean C<[^\n]>), was ignoring a following C<*> if followed by whitespace
417 under /x. It had been this way since C<\N> to mean C<[^\n]> was introduced
422 Blessing into a reference (C<bless $thisref, $thatref>) has long been
423 disallowed, but magical scalars for the second like C<$/> and those tied
424 were exempt. They no longer are. [perl #119809]
428 Blessing into a reference was accidentally allowed in 5.18 if the class
429 argument were a blessed reference with stale method caches (i.e., whose
430 class had had subs defined since the last method call). They are
431 disallowed once more, as in 5.16.
435 An undefined lexical sub used as an inherited method no longer crashes.
439 C<< $x->{key} >> where $x was declared as C<my Class $x> no longer crashes
440 if a Class::FIELDS subroutine stub has been declared.
444 C<@$obj{'key'}> and C<${$obj}{key}> used to be exempt from compile-time
445 field checking ("No such class field"; see L<fields>) but no longer are.
449 That compile-time field checking also applies now to the C<%$obj{'key'}>
450 syntax, added recently in Perl 5.19.4.
454 A nonexistent array element with a large index passed to a subroutine that
455 ties the array and then tries to access the element no longer results in a
460 Declaring a subroutine stub named NEGATIVE_INDICES no longer makes negative
461 array indices crash when the current package is a tied array class.
465 Declaring a C<require>, C<glob>, or C<do> subroutine stub in the
466 CORE::GLOBAL:: package no longer makes compilation of calls to the
467 corresponding functions crash.
471 Aliasing CORE::GLOBAL:: functions to constants stopped working in Perl 5.10
472 but has now been fixed.
476 When C<`...`> or C<qx/.../> calls a C<readpipe> override, double-quotish
477 interpolation now happens, as is the case when there is no override.
478 Previously, the presence of an override would make these quote-like
479 operators act like C<q{}>, suppressing interpolation. [perl #115330]
483 C<<<`...`> here-docs (with backticks as the delimiters) now call
484 C<readpipe> overrides. [perl #119827]
488 The presence of a lexical sub named "CORE" no longer stops the CORE::
493 C<&CORE::exit()> and C<&CORE::die()> now respect L<vmsish> hints.
497 Undefining a glob that triggers a DESTROY method that undefines the same
498 glob is now safe. It used to produce "Attempt to free unreferenced glob
499 pointer" warnings and leak memory.
503 If subroutine redefinition (C<eval 'sub foo{}'> or C<newXS> for XS code)
504 triggers a DESTROY method on the sub that is being redefined, and that
505 method assigns a subroutine to the same slot (C<*foo = sub {}>), C<$_[0]>
506 is no longer left pointing to a freed scalar. Now DESTROY is delayed until
507 the new subroutine has been installed.
511 C<s///>, C<tr///> and C<y///> now work when a wide character is used as the
512 delimiter. [perl #120463]
516 On Windows, perl no longer calls CloseHandle() on a socket handle. This makes
517 debugging easier on Windows by removing certain irrelevant bad handle
518 exceptions. It also fixes a race condition that made socket functions randomly
519 fail in a Perl process with multiple OS threads, and possible test failures in
520 F<dist/IO/t/cachepropagate-tcp.t>. [perl #120091/118059]
524 Some cases of unterminated (?...) sequences in regular expressions (e.g.,
525 C</(?</>) have been fixed to produce the proper error message instead of
526 "panic: memory wrap". Other cases (e.g., C</(?(/>) have yet to be fixed.
530 Strange vars like ties, overloads, or stringified refs (and in recent
531 perls, pure NOK vars) would generally do the wrong thing in formats
532 when the var is treated as a string and repeatedly chopped, as in
533 ^<<<~~ and similar. This has now been resolved.
537 =head1 Known Problems
543 C<do CORE()> used to call a sub named "CORE" and treat its return value as
544 a file name to execute. A bug fix inadvertently caused it to be
545 interpreted as the deprecated "do-SUB" construct. (Yes, C<do
546 I<bareword>()> is inconsistent.) This will likely be changed back.
550 =head1 Acknowledgements
552 Perl 5.19.6 represents approximately 4 weeks of development since Perl 5.19.5
553 and contains approximately 88,000 lines of changes across 630 files from 24
556 Perl continues to flourish into its third decade thanks to a vibrant community
557 of users and developers. The following people are known to have contributed the
558 improvements that became Perl 5.19.6:
560 Anno Siegel, Chris 'BinGOs' Williams, Craig A. Berry, Daniel Dragan, David
561 Mitchell, Father Chrysostomos, François Perrad, H.Merijn Brand, James E
562 Keenan, Jerry D. Hedden, Karen Etheridge, Karl Williamson, Kevin Falcone, Lukas
563 Mai, Marc Simpson, Matthew Horsfall, Peter Martini, Petr Písař, Reini Urban,
564 Steve Hay, Tom Hukins, Tony Cook, Victor Efimov, Yves Orton.
566 The list above is almost certainly incomplete as it is automatically generated
567 from version control history. In particular, it does not include the names of
568 the (very much appreciated) contributors who reported issues to the Perl bug
571 Many of the changes included in this version originated in the CPAN modules
572 included in Perl's core. We're grateful to the entire CPAN community for
573 helping Perl to flourish.
575 For a more complete list of all of Perl's historical contributors, please see
576 the F<AUTHORS> file in the Perl source distribution.
578 =head1 Reporting Bugs
580 If you find what you think is a bug, you might check the articles recently
581 posted to the comp.lang.perl.misc newsgroup and the perl bug database at
582 http://rt.perl.org/perlbug/ . There may also be information at
583 http://www.perl.org/ , the Perl Home Page.
585 If you believe you have an unreported bug, please run the L<perlbug> program
586 included with your release. Be sure to trim your bug down to a tiny but
587 sufficient test case. Your bug report, along with the output of C<perl -V>,
588 will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
590 If the bug you are reporting has security implications, which make it
591 inappropriate to send to a publicly archived mailing list, then please send it
592 to perl5-security-report@perl.org. This points to a closed subscription
593 unarchived mailing list, which includes all the core committers, who will be
594 able to help assess the impact of issues, figure out a resolution, and help
595 co-ordinate the release of patches to mitigate or fix the problem across all
596 platforms on which Perl is supported. Please only use this address for
597 security issues in the Perl core, not for modules independently distributed on
602 The F<Changes> file for an explanation of how to view exhaustive details on
605 The F<INSTALL> file for how to build Perl.
607 The F<README> file for general stuff.
609 The F<Artistic> and F<Copying> files for copyright information.