5 [ this is a template for a new perldelta file. Any text flagged as
6 XXX needs to be processed before release. ]
8 perldelta - what is new for perl v5.13.10
12 This document describes differences between the 5.XXX.XXX release and
13 the 5.XXX.XXX release.
15 If you are upgrading from an earlier release such as 5.YYY.YYY, first read
16 L<perl5YYYdelta>, which describes differences between 5.ZZZ.ZZZ and
21 XXX Any important notices here
23 =head1 Core Enhancements
25 XXX New core language features go here. Summarise user-visible core language
26 enhancements. Particularly prominent performance optimisations could go
27 here, but most should go in the L</Performance Enhancements> section.
29 [ List each enhancement as a =head2 entry ]
31 =head2 Add C<\p{Titlecase}> as a synonym for C<\p{Title}>
33 This synonym is added for symmetry with the Unicode property names
34 C<\p{Uppercase}> and C<\p{Lowercase}>.
36 =head2 New regular expression modifier option C</aa>
38 Doubling the C</a> regular expression modifier increases its effect,
39 so that in case-insensitive matching, no ASCII character will match a
40 non-ASCII character. For example, normally,
42 'k' =~ /\N{KELVIN SIGN}/
44 will match; it won't under C</aa>. Note that like C</a>, C</aa>
45 in 5.14 will not actually be able to be used as a suffix at the end of a
48 =head2 New warnings categories for problematic (non-)Unicode code points.
50 Three new warnings subcategories of <utf8> have been added. These
51 allow you to turn off warnings for their covered events, while allowing
52 the other UTF-8 warnings to remain on. The three categories are:
53 C<surrogate> when UTF-16 surrogates are encountered;
54 C<nonchar> when Unicode non-character code points are encountered;
55 and C<non_unicode> when code points that are above the legal Unicode
56 maximum of 0x10FFFF are encountered.
60 XXX Any security-related notices go here. In particular, any security
61 vulnerabilities closed should be noted here rather than in the
62 L</Selected Bug Fixes> section.
64 [ List each security issue as a =head2 entry ]
66 =head1 Incompatible Changes
68 XXX For a release on a stable branch, this section aspires to be:
70 There are no changes intentionally incompatible with 5.XXX.XXX. If any
71 exist, they are bugs and reports are welcome.
73 [ List each incompatible change as a =head2 entry ]
75 =head2 Most C<\p{}> properties are now immune from case-insensitive matching
77 For most Unicode properties, it doesn't make sense to have them match
78 differently under C</i> case-insensitive matching than not. And doing
79 so leads to unexpected results and potential security holes. For
82 m/\p{ASCII_Hex_Digit}+/i
84 could previously match non-ASCII characters because of the Unicode
85 matching rules. There were a number of bugs in this feature until an
86 earlier release in the 5.13 series. Now this release reverts, and
87 removes the feature completely except for the few properties where
88 people have come to expect it, namely the ones where casing is an
89 integral part of their functionality, such as C<m/\p{Uppercase}/i> and
90 C<m/\p{Lowercase}/i>, both of which match the exact same code points,
91 namely those matched by C<m/\p{Cased}/i>. Details are in
92 L<perlrecharclass/Unicode Properties>.
94 User-defined property handlers that need to match differently under
95 C</i> must change to read the new boolean parameter passed it which is
96 non-zero if case-insensitive matching is in effect; 0 if not. See
97 L<perluniprops/User-Defined Character Properties>.
99 =head2 [perl #82996] Use the user's from address as return-path in perlbug
101 Many systems these days don't have a valid Internet domain name and
102 perlbug@perl.org does not accept email with a return-path that does
103 not resolve. Therefore pass the user's address to sendmail so it's
104 less likely to get stuck in a mail queue somewhere. (019cfd2)
106 =head2 regex: \p{} in pattern implies Unicode semantics
108 Now, a Unicode property match specified in the pattern will indicate
109 that the pattern is meant for matching according to Unicode rules
112 =head2 add GvCV_set() and GvGP_set() macros and change GvGP()
114 This allows a future commit to eliminate some backref magic between GV
115 and CVs, which will require complete control over assignment to the
118 If you've been using GvGP() in lvalue context this change will break
119 your code, you should use GvGP_set() instead. (c43ae56)
121 =head2 _swash_inversion_hash is no longer exported as part of the API
123 This function shouldn't be called from XS code. (4c2e113)
125 =head2 Unreferenced objects in global destruction
127 The fix for [perl #36347], which made sure that destructors were called on
128 unreferenced objects, broke the tests for three CPAN modules, which
129 apparently rely on the bug.
131 To provide more time for fixing them (as this is such a minor bug), we
132 have reverted the fix until after perl 5.14.0.
134 This resolves [perl #82542] and other related tickets.
136 =head2 C<close> on shared pipes
138 The C<close> function no longer waits for the child process to exit if the
139 underlying file descriptor is still in use by another thread, to avoid
140 deadlocks. It returns true in such cases.
144 XXX Any deprecated features, syntax, modules etc. should be listed here.
145 In particular, deprecated modules should be listed here even if they are
146 listed as an updated module in the L</Modules and Pragmata> section.
148 =head2 User-defined case-mapping
150 This feature is being deprecated due to its many issues, as documented in
151 L<perlunicode/User-Defined Case Mappings (for serious hackers only)>.
152 It is planned to remove this feature in Perl 5.16. A CPAN module
153 providing improved functionality is being prepared for release by the
156 [ List each deprecation as a =head2 entry ]
158 =head1 Performance Enhancements
160 XXX Changes which enhance performance without changing behaviour go here. There
161 may well be none in a stable release.
163 [ List each enhancement as a =item entry ]
173 =head1 Modules and Pragmata
175 XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
176 go here. If Module::CoreList is updated, generate an initial draft of the
177 following sections using F<Porting/corelist-perldelta.pl>, which prints stub
178 entries to STDOUT. Results can be pasted in place of the '=head2' entries
179 below. A paragraph summary for important changes should then be added by hand.
180 In an ideal world, dual-life modules would have a F<Changes> file that could be
183 [ Within each section, list entries as a =item entry ]
185 =head2 New Modules and Pragmata
191 C<CPAN::Meta> version 2.110440 has been added as a dual-life module. It
192 provides a standard library to read, interpret and write CPAN distribution
193 metadata files (e.g. META.json and META.yml) which describes a
194 distribution, its contents, and the requirements for building it and
195 installing it. The latest CPAN distribution metadata specification is
196 included as C<CPAN::Meta::Spec> and notes on changes in the specification
197 over time are given in C<CPAN::Meta::History>.
201 C<Version::Requirements> version 0.101020 has been added as a dual-life
202 module. It provides a standard library to model and manipulates module
203 prerequisites and version constraints as defined in the L<CPAN::Meta::Spec>.
207 =head2 Updated Modules and Pragmata
213 C<B> has been upgraded from version 1.27 to 1.28.
217 C<Carp> has been upgraded from version 1.19 to 1.20.
219 [perl #82854] It now avoids using regular expressions that cause perl to
220 load its Unicode tables, in order to avoid the 'BEGIN not safe after
221 errors' error that will ensue if there has been a syntax error.
225 C<CGI> has been upgraded from version 3.51 to 3.52
229 C<CPAN> has been upgraded from version 1.94_64 to 1.94_65
231 Includes support for META.json and MYMETA.json.
235 C<CPANPLUS> has been upgraded from version 0.9011 to 0.9101
237 Includes support for META.json and MYMETA.json and a change to
238 using Digest::SHA for CPAN checksums.
242 C<diagnostics> has been upgraded from version 1.21 to 1.22.
244 It now renders pod links slightly better, and has been taught to find
245 descriptions for messages that share their descriptions with other
250 C<Devel::DProf> has been upgraded from version 20080331.00 to 20110217.00.
252 Merely loading C<Devel::DProf> now no longer triggers profiling to start.
253 C<use Devel::DProf> and C<perl -d:DProf ...> still behave as before and start
258 C<DynaLoader> has been upgraded from version 1.12 to 1.13.
260 [perl #84358] It no longer inherits from AutoLoader; hence it no longer
261 produces weird error messages for unsuccessful method calls on classes that
262 inherit from DynaLoader.
266 C<IO::Select> has been upgraded from version 1.17 to 1.18.
268 It now allows IO::Handle objects (and objects in derived classes) to be
269 removed from an IO::Select set even if the underlying file descriptor is
274 C<IPC::Cmd> has been upgraded from version 0.68 to 0.70
278 C<HTTP::Tiny> has been upgraded from version 0.009 to 0.010
282 C<Math::BigInt> has been upgraded from version 1.99_04 to 1.992.
286 C<Module::Build> has been upgraded from version 0.3607 to 0.37_04.
288 A notable change is the deprecation of several modules.
289 Module::Build::Version has been deprecated and Module::Build now relies
290 directly upon L<version>. Module::Build::ModuleInfo has been deprecated in
291 favor of a standalone copy of it called L<Module::Metadata>.
292 Module::Build::YAML has been deprecated in favor of L<CPAN::Meta::YAML>.
294 Module::Build now also generates META.json and MYMETA.json files
295 in accordance with version 2 of the CPAN distribution metadata specification,
296 L<CPAN::Meta::Spec>. The older format META.yml and MYMETA.yml files are
297 still generated, as well.
301 C<Module::Load::Conditional> has been upgraded from version 0.40 to 0.44
305 C<Module::Metadata> has been upgraded from version 1.000003 to 1.000004.
309 C<overload> has been upgraded from version 1.12 to 1.13.
311 The documentation has greatly improved. See L</Documentation> below.
315 C<Parse::CPAN::Meta> has been upgraded from version 1.40 to 1.4401.
317 The latest Parse::CPAN::Meta can now read YAML or JSON files using
318 L<CPAN::Meta::YAML> and L<JSON::PP>, which are now part of the Perl core.
322 C<re> has been upgraded from version 0.16 to 0.17.
324 It now supports the double-a flag: C<use re '/aa';>
326 The C<regmust> function used to crash when called on a regular expression
327 belonging to a pluggable engine. Now it has been disabled for those.
329 C<regmust> no longer leaks memory.
333 C<Term::UI> has been upgraded from version 0.24 to 0.26
337 C<Unicode::Collate> has been upgraded from version 0.68 to 0.72
339 This also sees the switch from using the pure-perl version of this
340 module to the XS version.`
344 C<VMS::DCLsym> has been upgraded from version 1.04 to 1.05.
346 Two bugs have been fixed [perl #84086]:
348 The symbol table name was lost when tying a hash, due to a thinko in
349 C<TIEHASH>. The result was that all tied hashes interacted with the
352 Unless a symbol table name had been explicitly specified in the call
353 to the constructor, querying the special key ':LOCAL' failed to
354 identify objects connected to the local symbol table.
358 Added new function C<Unicode::UCD::num()>. This function will return the
359 numeric value of the string passed it; C<undef> if the string in its
360 entirety has no safe numeric value.
362 To be safe, a string must be a single character which has a numeric
363 value, or consist entirely of characters that match \d, coming from the
364 same Unicode block of digits. Thus, a mix of Bengali and Western
365 digits would be considered unsafe, as well as a mix of half- and
366 full-width digits, but strings consisting entirely of Devanagari digits
367 or of "Mathematical Bold" digits would would be safe.
371 C<CPAN> has been upgraded from version1.94_63 to 1.94_64.
379 =head2 Removed Modules and Pragmata
391 XXX Changes to files in F<pod/> go here. Consider grouping entries by
392 file and be sure to link to the appropriate page, e.g. L<perlfunc>.
394 =head2 New Documentation
396 XXX Changes which create B<new> files in F<pod/> go here.
400 XXX Description of the purpose of the new file here
402 =head2 Changes to Existing Documentation
404 XXX Changes which significantly change existing files in F<pod/> go here.
405 However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
414 L<overload>'s documentation has practically undergone a rewrite. It
415 is now much more straightforward and clear.
419 =head3 L<perlhack> and perlrepository
425 The L<perlhack> and perlrepository documents have been heavily edited and
426 split up into several new documents.
428 The L<perlhack> document is now much shorter, and focuses on the Perl 5
429 development process and submitting patches to Perl. The technical content has
430 been moved to several new documents, L<perlsource>, L<perlinterp>,
431 L<perlhacktut>, and L<perlhacktips>. This technical content has only been
434 The perlrepository document has been renamed to L<perlgit>. This new document
435 is just a how-to on using git with the Perl source code. Any other content
436 that used to be in perlrepository has been moved to perlhack.
446 The documentation for the C<map> function now contains more examples,
447 see B<perldoc -f map> (f947627)
457 Examples in L<perlfaq4> have been updated to show the use of
458 L<Time::Piece>. (9243591)
468 Many POD related RT bugs and other issues which are too numerous to
469 enumerate have been solved by Michael Stevens.
475 The following additions or changes have been made to diagnostic output,
476 including warnings and fatal error messages. For the complete list of
477 diagnostic messages, see L<perldiag>.
479 XXX New or changed warnings emitted by the core's C<C> code go here. Also
480 include any changes in L<perldiag> that reconcile it to the C<C> code.
482 [ Within each section, list entries as a =item entry ]
484 =head2 New Diagnostics
486 XXX Newly added diagnostic messages go here
490 =item "\b{" is deprecated; use "\b\{" instead
492 =item "\B{" is deprecated; use "\B\{" instead
494 Use of an unescaped "{" immediately following a C<\b> or C<\B> is now
495 deprecated so as to reserve its use for Perl itself in a future release.
497 =item regcomp: Add warning if \p is used under locale. (fb2e24c)
499 C<\p> implies Unicode matching rules, which are likely going to be
500 different than the locale's.
502 =item panic: gp_free failed to free glob pointer - something is repeatedly re-creating entries
504 This new error is triggered if a destructor called on an object in a
505 typeglob that is being freed creates a new typeglob entry containing an
506 object with a destructor that creates a new entry containing an object....
508 =item refcnt: fd %d%s
510 This new error only occurs if a internal consistency check fails when a
511 pipe is about to be closed.
515 =head2 Changes to Existing Diagnostics
517 XXX Changes (i.e. rewording) of diagnostic messages go here
523 The warning message about regex unrecognized escapes passed through is
524 changed to include any literal '{' following the 2-char escape. e.g.,
525 "\q{" will include the { in the message as part of the escape
528 =item * C<binmode $fh, ':scalar'> no longer warns (8250589)
530 Perl will now no longer produce this warning:
532 $ perl -we 'open my $f, ">", \my $x; binmode $f, "scalar"'
533 Use of uninitialized value in binmode at -e line 1.
541 =head1 Utility Changes
543 XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go
544 here. Most of these are built within the directories F<utils> and F<x2p>.
546 [ List utility changes as a =head3 entry for each utility and =item
547 entries for each change
548 Use L<XXX> with program names to get proper documentation linking. ]
560 =head1 Configuration and Compilation
562 XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
563 go here. Any other changes to the Perl build process should be listed here.
564 However, any platform-specific changes should be listed in the
565 L</Platform Support> section, instead.
567 [ List changes as a =item entry ].
571 =item * make reg_eval_scope.t TODOs consistently fail (daaf7ac)
573 Some of the TODO tests in reg_eval_scope.t spuriously passed under
574 non-threaded builds. Make the tests harder so they always fail.
576 Since one of the key bugs in (?{..}) is the trashing of the parent pad,
577 add some extra lexical vars to the parent scope and check they're still
582 Stop EU::CBuilder's tests from failing in parallel (cbf59d5)
584 It used to use the same paths for temporary files in all tests. This
585 blew up randomly when the tests were run in parallel.
595 XXX Any significant changes to the testing of a freshly built perl should be
596 listed here. Changes which create B<new> files in F<t/> go here as do any
597 large changes to the testing harness (e.g. when parallel testing was added).
598 Changes to existing files in F<t/> aren't worth summarising, although the bugs
599 that they represent may be covered elsewhere.
601 [ List each test improvement as a =item entry ]
607 F<porting/FindExt.t> now skips all tests on a static (-Uusedl) build
612 F<porting/FindExt.t> now passes on non-Win32 platforms when some
613 extensions are built statically.
617 =head1 Platform Support
619 XXX Any changes to platform support should be listed in the sections below.
621 [ Within the sections, list each platform as a =item entry with specific
622 changes as paragraphs below it. ]
626 XXX List any platforms that this version of perl compiles on, that previous
627 versions did not. These will either be enabled by new files in the F<hints/>
628 directories, or new subdirectories and F<README> files at the top level of the
633 =item XXX-some-platform
639 =head2 Discontinued Platforms
641 XXX List any platforms that this version of perl no longer compiles on.
645 =item XXX-some-platform
651 =head2 Platform-Specific Notes
653 XXX List any changes for specific platforms. This could include configuration
654 and compilation changes or changes in portability/compatibility. However,
655 changes within modules for platforms should generally be listed in the
656 L</Modules and Pragmata> section.
666 The C<test-prep> build target now depends on F<pod/perltoc.pod> to allow the
667 F<t/porting/buildtoc.t> test to run successfully.
677 [perl #82988] Skip hanging taint.t test on MirBSD 10 (1fb83d0)
679 Skip a hanging test under MirBSD that was already being skipped under
684 Previously if you build perl with a shared libperl.so on MirBSD (the
685 default config), it will work up to the installation; however, once
686 installed, it will be unable to find libperl. Treat path handling
687 like in the other BSD dialects.
693 =head1 Internal Changes
695 XXX Changes which affect the interface available to C<XS> code go here.
696 Other significant internal changes for future core maintainers should
699 [ List each test improvement as a =item entry ]
703 =item * Fix harmless invalid read in Perl_re_compile() (f6d9469)
705 [perl #2460] described a case where electric fence reported an invalid
706 read. This could be reproduced under valgrind with blead and -e'/x/',
707 but only on a non-debugging build.
709 This was because it was checking for certain pairs of nodes (e.g. BOL + END)
710 and wasn't allowing for EXACT nodes, which have the string at the next
711 node position when using a naive NEXTOPER(first). In the non-debugging
712 build, the nodes aren't initialised to zero, and a 1-char EXACT node isn't
713 long enough to spill into the type field of the "next node".
715 Fix this by only using NEXTOPER(first) when we know the first node is
718 =item * Break out the generated function Perl_keywords() into F<keywords.c>, a new file. (26ea9e1)
720 As it and Perl_yylex() both need FEATURE_IS_ENABLED, feature_is_enabled() is
721 no longer static, and the two macro definitions move from toke.c to perl.h
723 Previously, one had to cut and paste the output of perl_keywords.pl into the
724 middle of toke.c, and it was not clear that it was generated code.
728 A lot of tests have been ported from Test to Test::More, e.g. in
731 =item * Increase default PerlIO buffer size. (b83080d)
733 The previous default size of a PerlIO buffer (4096 bytes) has been increased
734 to the larger of 8192 bytes and your local BUFSIZ. Benchmarks show that doubling
735 this decade-old default increases read and write performance in the neighborhood
736 of 25% to 50% when using the default layers of perlio on top of unix. To choose
737 a non-default size, such as to get back the old value or to obtain and even
738 larger value, configure with:
740 ./Configure -Accflags=-DPERLIOBUF_DEFAULT_BUFSIZ=N
742 where N is the desired size in bytes; it should probably be a multiple of
752 =head1 Selected Bug Fixes
754 XXX Important bug fixes in the core language are summarised here.
755 Bug fixes in files in F<ext/> and F<lib/> are best summarised in
756 L</Modules and Pragmata>.
758 [ List each fix as a =item entry ]
764 A Unicode C<\p{}> property match in a regular expression pattern will
765 now force Unicode rules for the rest of the regular expression
769 [perl #38456] binmode FH, ":crlf" only modifies top crlf layer (7826b36)
771 When pushed on top of the stack, crlf will no longer enable crlf layers
772 lower in the stack. This will prevent unexpected results.
776 Fix 'raw' layer for RT #80764 (ecfd064)
778 Made a ':raw' open do what it advertises to do (first open the file,
779 then binmode it), instead of leaving off the top layer.
783 Use PerlIOBase_open for pop, utf8 and bytes layers (c0888ac)
785 Three of Perl's builtin PerlIO layers (C<:pop>, C<:utf8> and
786 C<:bytes>) didn't allow stacking when opening a file. For example
789 open FH, '>:pop:perlio', 'some.file' or die $!;
791 Would throw an error: "Invalid argument". This has been fixed in this
796 An issue present since 5.13.1, where s/A/B/ with A utf8 and B
797 non-utf8, could cause corruption or segfaults has been
802 String evals will no longer fail after 2 billion scopes have been
803 compiled (d1bfb64, 2df5bdd, 0d311cd and 6012dc8)
807 [perl #81750] When strict 'refs' mode is off,
808 C<%{...}> in rvalue context returns C<undef> if
809 its argument is undefined. An optimisation introduced in perl 5.12.0 to
810 make C<keys %{...}> faster when used as a boolean did not take this into
811 account, causing C<keys %{+undef}> (and C<keys %$foo> when C<$foo> is
812 undefined) to be an error, which it should only be in strict mode.
816 [perl #83194] Combining the vector (%v) flag and dynamic precision would
817 cause sprintf to confuse the order of its arguments, making it treat the
818 string as the precision and vice versa.
822 [perl #77692] Sometimes the UTF8 length cache would not be reset on a value
823 returned by substr, causing C<length(substr($uni_string,...))> to give
824 wrong answers. With C<${^UTF8CACHE}> set to -1, it would produce a 'panic'
829 During the restoration of a localised typeglob on scope exit, any
830 destructors called as a result would be able to see the typeglob in an
831 inconsistent state, containing freed entries, which could result in a
832 crash. This would affect code like this:
835 eval { die bless [] }; # puts an object in $@
840 Now the glob entries are cleared before any destructors are called. This
841 also means that destructors can vivify entries in the glob. So perl tries
842 again and, if the entries are re-created too many times, dies with a
843 'panic: gp_free...' error message.
847 [perl #78494] When pipes are shared between threads, the C<close> function
848 (and any implicit close, such as on thread exit) no longer blocks.
852 Several contexts no longer allow a Unicode character to begin a word
853 that should never begin words, for an example an accent that must follow
854 another character previously could precede all other characters.
858 =head1 Known Problems
860 XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
861 tests that had to be C<TODO>ed for the release would be noted here, unless
862 they were specific to a particular platform (see below).
864 This is a list of some significant unfixed bugs, which are regressions
865 from either 5.XXX.XXX or 5.XXX.XXX.
867 [ List each fix as a =item entry ]
879 XXX If any significant core contributor has died, we've added a short obituary
882 =head1 Acknowledgements
884 XXX The list of people to thank goes here.
886 =head1 Reporting Bugs
888 If you find what you think is a bug, you might check the articles
889 recently posted to the comp.lang.perl.misc newsgroup and the perl
890 bug database at http://rt.perl.org/perlbug/ . There may also be
891 information at http://www.perl.org/ , the Perl Home Page.
893 If you believe you have an unreported bug, please run the L<perlbug>
894 program included with your release. Be sure to trim your bug down
895 to a tiny but sufficient test case. Your bug report, along with the
896 output of C<perl -V>, will be sent off to perlbug@perl.org to be
897 analysed by the Perl porting team.
899 If the bug you are reporting has security implications, which make it
900 inappropriate to send to a publicly archived mailing list, then please send
901 it to perl5-security-report@perl.org. This points to a closed subscription
902 unarchived mailing list, which includes all the core committers, who be able
903 to help assess the impact of issues, figure out a resolution, and help
904 co-ordinate the release of patches to mitigate or fix the problem across all
905 platforms on which Perl is supported. Please only use this address for
906 security issues in the Perl core, not for modules independently
911 The F<Changes> file for an explanation of how to view exhaustive details
914 The F<INSTALL> file for how to build Perl.
916 The F<README> file for general stuff.
918 The F<Artistic> and F<Copying> files for copyright information.