5 perl51311delta - what is new for perl v5.13.11
9 This document describes differences between the 5.13.10 release and
12 If you are upgrading from an earlier release such as 5.13.9, first read
13 L<perl5139delta>, which describes differences between 5.13.9 and
18 =head2 User-defined regular expression properties
20 Perl no longer allows a tainted regular expression to invoke a user-defined
21 property via C<\p{...}> syntax. It simply dies instead [perl #82616].
23 =head1 Incompatible Changes
25 =head2 local($_) will strip all magic from $_
27 local() on scalar variables will give them a new value, but keep all
28 their magic intact. This has proven to be problematic for the default
29 scalar variable $_, where L<perlsub> recommends that any subroutine
30 that assigns to $_ should localize it first. This would throw an
31 exception if $_ is aliased to a read-only variable, and could have
32 various unintentional side-effects in general.
34 Therefore, as an exception to the general rule, local($_) will not
35 only assign a new value to $_, but also remove all existing magic from
38 =head2 Passing references to warn()
40 An earlier Perl 5.13.x release changed C<warn($ref)> to leave the reference
41 unchanged, allowing C<$SIG{__WARN__}> handlers to access the original
42 reference. But this stopped warnings that were references from having the
43 file and line number appended even when there was no C<$SIG{__WARN__}>
46 Now C<warn> checks for the presence of such a handler and, if there is
47 none, proceeds to stringify the reference and append the file and line
48 number. This allows simple uses of C<warn> for debugging to continue to
49 work as they did before.
51 =head2 fork() emulation will not wait for signalled children
53 On Windows parent processes would not terminate until all forked
54 childred had terminated first. However, C<kill('KILL', ...)> is
55 inherently unstable on pseudo-processes, and C<kill('TERM', ...)>
56 might not get delivered if the child if blocked in a system call.
58 To avoid the deadlock and still provide a safe mechanism to terminate
59 the hosting process, Perl will now no longer wait for children that
60 have been sent a SIGTERM signal. It is up to the parent process to
61 waitpid() for these children if child clean-up processing must be
62 allowed to finish. However, it is also the responsibility of the
63 parent then to avoid the deadlock by making sure the child process
64 can't be blocked on I/O either.
66 See L<perlfork> for more information about the fork() emulation on
69 =head2 Perl source code is read in text mode on Windows
71 Perl scripts used to be read in binary mode on Windows for the benefit
72 of the ByteLoader module (which is no longer part of core Perl). This
73 had the side effect of breaking various operations on the DATA filehandle,
74 including seek()/tell(), and even simply reading from DATA after file handles
75 have been flushed by a call to system(), backticks, fork() etc.
77 The default build options for Windows have been changed to read Perl source
78 code on Windows in text mode now. Hopefully ByteLoader will be updated on
79 CPAN to automatically handle this situation.
81 =head1 Performance Enhancements
87 An earlier optimisation to speed up C<my @array = ...> and
88 C<my %hash = ...> assignments caused a bug and was disabled in Perl 5.12.0.
90 Now we have found another way to speed up these assignments [perl #82110].
94 =head1 Modules and Pragmata
96 =head2 Updated Modules and Pragmata
102 C<attributes> has been upgraded from version 0.13 to 0.14.
106 C<base> has been upgraded from version 2.15 to 2.16.
110 C<CPAN> has been upgraded from version 1.94_65 to 1.9600.
114 C<CPANPLUS> has been upgraded from version 0.9101 to 0.9103
118 C<CPANPLUS::Dist::Build> has been upgraded from version 0.52 to 0.54
122 C<Cwd> has been downgraded from version 3.37 to 3.36.
124 An optimisation that recent core changes have rendered unnecessary has been
129 C<Devel::DProf> has been upgraded from version 20110225.01 to 20110228.00.
133 C<Digest::SHA> has been upgraded from version 5.50 to 5.61
135 New SHA-512/224 and SHA-512/256 transforms ref. NIST Draft FIPS 180-4 (February 2011)
139 C<ExtUtils::Command> has been upgraded from version 1.16 to 1.17.
143 C<File::Copy> has been downgraded from version 2.22 to 2.21.
145 An optimisation that recent core changes have rendered unnecessary has been
150 C<File::Glob> has been upgraded from version 1.11 to 1.12.
154 C<GDBM_File> has been upgraded from version 1.13 to 1.14.
158 C<Hash::Util> has been upgraded from version 0.10 to 0.11.
162 C<Hash::Util::FieldHash> has been upgraded from version 1.08 to 1.09.
166 C<HTTP::Tiny> has been upgraded from version 0.010 to 0.011.
170 C<I18N::Langinfo> has been upgraded from version 0.07 to 0.08.
174 C<IO> has been upgraded from version 1.25_03 to 1.25_04.
178 C<JSON::PP> has been upgraded from version 2.27103 to 2.27105
182 C<Locale::Codes> has been upgraded from version 3.15 to 3.16
186 C<Math::BigInt> has been upgraded from version 1.992 to 1.994
190 C<Math::BigInt::FastCalc> has been upgraded from version 0.24_02 to 0.28
194 C<Module::Build> has been upgraded from version 0.37_05 to 0.3800
198 C<Module::CoreList> has been upgraded from version 2.45 to 2.46.
202 C<mro> has been upgraded from version 1.06 to 1.07.
206 C<NDBM_File> has been upgraded from version 1.11 to 1.12.
210 C<parent> has been upgraded from version 0.224 to 0.225
214 C<Pod::Simple> has been upgraded from version 3.15 to 3.16
218 C<Storable> has been upgraded from version 2.26 to 2.27.
222 C<Sys::Hostname> has been upgraded from version 1.15 to 1.16.
226 C<Test::Harness> has been upgraded from version 3.22 to 3.23
230 C<Test::Simple> has been upgraded from version 0.97_01 to 0.98
234 C<Tie::Hash::NamedCapture> has been upgraded from version 0.07 to 0.08.
236 Some of the Perl code has been converted to XS for efficiency's sake.
240 C<Tie::RefHash> has been upgraded from version 1.38 to 1.39.
244 C<Unicode::Collate> has been upgraded from version 0.72 to 0.73
246 DUCET has been updated for Unicode 6.0.0 as Collate/allkeys.txt and
247 the default UCA_Version is 22.
251 C<Unicode::UCD> has been upgraded from version 0.31 to 0.32.
252 This includes a number of bug fixes:
262 It is now updated to Unicode Version 6 with Corrigendum #8, except,
263 as with Perl 5.14, the code point at U+1F514 has no name.
267 The Hangul syllable code points have the correct names, and their
268 decompositions are always output without requiring L<Lingua::KO::Hangul::Util>
273 The CJK (Chinese-Japanese-Korean) code points U+2A700 - U+2B734
274 and U+2B740 - 2B81D are now properly handled.
278 The numeric values are now output for those CJK code points that have them.
282 The names that are output for code points with multiple aliases are now the
289 This now correctly returns "Unknown" instead of C<undef> for the script
290 of a code point that hasn't been assigned another one.
294 This now correctly returns "No_Block" instead of C<undef> for the block
295 of a code point that hasn't been assigned to another one.
301 C<XS::Typemap> has been upgraded from version 0.04 to 0.05.
307 =head2 Changes to Existing Documentation
315 Clarified the order in which to check C<$@> and C<$!> after C<do FILE>.
322 The following additions or changes have been made to diagnostic output,
323 including warnings and fatal error messages. For the complete list of
324 diagnostic messages, see L<perldiag>.
326 =head2 New Diagnostics
332 Regexp modifier "/%c" may not appear twice
334 (F syntax) The regular expression pattern had one of the mutually exclusive
335 modifiers repeated. Remove all but one of the occurrences.
339 Regexp modifiers "/%c" and "/%c" are mutually exclusive
341 (F syntax) The regular expression pattern had more than one of the mutually
342 exclusive modifiers. Retain only the modifier that is supposed to be there.
346 Insecure user-defined property %s
348 (F) Perl detected tainted data when trying to compile a regular
349 expression that contains a call to a user-defined character property
350 function, i.e. C<\p{IsFoo}> or C<\p{InFoo}>.
351 See L<perlunicode/User-Defined Character Properties> and L<perlsec>.
357 Many of the tests have been refactored to use testing libraries more
358 consistently. In some cases test files were created or deleted:
364 The tests for C<split /\s/> and Unicode have been moved from
365 F<t/op/split.t> to the new F<t/op/split_unicode.t>.
369 F<t/re/re.t> has been moved to F<ext/re/t/re_funcs_u.t>.
373 The tests for [perl #72922] have been moved from F<t/re/qr.t> to the new
378 F<t/re/reg_unsafe.t> has been deleted and its only test moved to
379 F<t/re/pat_advanced.t>.
383 =head1 Selected Bug Fixes
389 A fix for a bug in C<length(undef)> in 5.13.4 introduced a regression that
390 meant C<print length undef> did not warn when warnings were enabled. It now
391 correctly warns [perl #85508].
395 The C<(?|...)> regular expression construct no longer crashes if the final
396 branch has more sets of capturing parentheses than any other branch. This
397 was fixed in Perl 5.10.1 for the case of a single branch, but that fix did
398 not take multiple branches into account [perl #84746].
402 Accessing an element of a package array with a hard-coded number (as
403 opposed to an arbitrary expression) would crash if the array did not exist.
404 Usually the array would be autovivified during compilation, but typeglob
405 manipulation could remove it, as in these two cases which used to crash:
407 *d = *a; print $d[0];
408 undef *d; print $d[0];
412 C<#line> directives in string evals were not properly updating the arrays
413 of lines of code (C<< @{"_<..."} >>) that the debugger (or any debugging or
414 profiling module) uses. In threaded builds, they were not being updated at
415 all. In non-threaded builds, the line number was ignored, so any change to
416 the existing line number would cause the lines to be misnumbered
421 C<$AUTOLOAD> used to remain tainted forever if it ever became tainted. Now
422 it is correctly untainted if an autoloaded method is called and the method
423 name was not tainted.
427 A bug has been fixed in the implementation of C<{...}> quantifiers in
428 regular expressions that prevented the code block in
429 C</((\w+)(?{ print $2 })){2}/> from seeing the C<$2> sometimes
434 C<sprintf> now dies when passed a tainted scalar for the format. It did
435 already die for arbitrary expressions, but not for simple scalars
440 DESTROY methods of objects implementing ties are no longer able to crash by
441 accessing the tied variable through a weak reference [perl #86328].
445 On Windows, calling kill(9, $child) on a pseudo-process created by the fork()
446 emulation is inherently unstable. It can also be responsible for overriding
447 the parent process exit code with a value of '9' if the parent terminates
448 right after killing the child. This condition will now happen a lot less
451 See also L</"fork() emulation will not wait for signalled children"> for a
452 better way to terminate child processes that avoids deadlocks altogether.
456 Ensure that the C<exists &Errno::EFOO> idiom continues to work as documented.
458 A change post-5.12 caused the documented idiom not to work if Errno was loaded
459 after the C<exists> code had been compiled, as the compiler implicitly creates
460 typeglobs in the Errno symbol table when it builds the optree for the C<exists
465 =head1 Acknowledgements
467 Perl 5.13.11 represents approximately one month of development since Perl
468 5.13.10 and contains approximately 80,000 lines of changes across 549 files from
469 31 authors and committers:
471 Alastair Douglas, Arvan, Boris Ratner, brian d foy, Chris 'BinGOs' Williams,
472 Craig A. Berry, David Golden, David Leadbeater, David Mitchell, Father
473 Chrysostomos, Florian Ragwitz, Jan Dubois, Karl Williamson, Kevin Ryde, Leon
474 Brocard, Leon Timmermans, Michael Stevens, Michael Witten, Moritz Lenz, Nicholas
475 Clark, Paul Johnson, Peter John Acklam, Reini Urban, Robin Barker, Steve Hay,
476 Sullivan Beck, Tony Cook, Vadim Konovalov, Yves Orton, Zefram and Ævar Arnfjörð
479 =head1 Reporting Bugs
481 If you find what you think is a bug, you might check the articles
482 recently posted to the comp.lang.perl.misc newsgroup and the perl
483 bug database at http://rt.perl.org/perlbug/ . There may also be
484 information at http://www.perl.org/ , the Perl Home Page.
486 If you believe you have an unreported bug, please run the L<perlbug>
487 program included with your release. Be sure to trim your bug down
488 to a tiny but sufficient test case. Your bug report, along with the
489 output of C<perl -V>, will be sent off to perlbug@perl.org to be
490 analysed by the Perl porting team.
492 If the bug you are reporting has security implications, which make it
493 inappropriate to send to a publicly archived mailing list, then please send
494 it to perl5-security-report@perl.org. This points to a closed subscription
495 unarchived mailing list, which includes
496 all the core committers, who will be able
497 to help assess the impact of issues, figure out a resolution, and help
498 co-ordinate the release of patches to mitigate or fix the problem across all
499 platforms on which Perl is supported. Please only use this address for
500 security issues in the Perl core, not for modules independently
505 The F<Changes> file for an explanation of how to view exhaustive details
508 The F<INSTALL> file for how to build Perl.
510 The F<README> file for general stuff.
512 The F<Artistic> and F<Copying> files for copyright information.