5 [ this is a template for a new perldelta file. Any text flagged as XXX needs
6 to be processed before release. ]
8 perldelta - what is new for perl v5.21.1
12 This document describes differences between the 5.21.0 release and the 5.21.1
15 If you are upgrading from an earlier release such as 5.20.0, first read
16 L<perl5210delta>, which describes differences between 5.20.0 and 5.21.0.
20 XXX Any important notices here
22 =head1 Core Enhancements
24 XXX New core language features go here. Summarize user-visible core language
25 enhancements. Particularly prominent performance optimisations could go
26 here, but most should go in the L</Performance Enhancements> section.
28 [ List each enhancement as a =head2 entry ]
30 =head2 C<qr/foo/x> now ignores any Unicode pattern white space
32 The C</x> regular expression modifier allows the pattern to contain
33 white space and comments, both of which are ignored, for improved
34 readability. Until now, not all the white space characters that Unicode
35 designates for this purpose were handled. The additional ones now
38 U+200E LEFT-TO-RIGHT MARK,
39 U+200F RIGHT-TO-LEFT MARK,
40 U+2028 LINE SEPARATOR,
42 U+2029 PARAGRAPH SEPARATOR.
44 =head2 S<C<use locale>> can restrict which locale categories are affected
46 It is now possible to pass a parameter to S<C<use locale>> to specify
47 a subset of locale categories to be locale-aware, with the remaining
48 ones unaffected. See L<perllocale/The "use locale" pragma> for details.
52 XXX Any security-related notices go here. In particular, any security
53 vulnerabilities closed should be noted here rather than in the
54 L</Selected Bug Fixes> section.
56 [ List each security issue as a =head2 entry ]
58 =head1 Incompatible Changes
60 XXX For a release on a stable branch, this section aspires to be:
62 There are no changes intentionally incompatible with 5.XXX.XXX
63 If any exist, they are bugs, and we request that you submit a
64 report. See L</Reporting Bugs> below.
66 =head2 In double-quotish C<\cI<X>>, I<X> must now be a printable ASCII character
68 In prior releases, failure to do this raised a deprecation warning.
70 =head2 Splitting the tokens C<(?> and C<(*> in regular expressions is
71 now a fatal compilation error.
73 These had been deprecated since v5.18.
75 =head2 5 additional characters are treated as white space under C</x> in
76 regex patterns (unless escaped)
78 The use of these characters with C</x> outside bracketed character
79 classes and when not preceeded by a backslash has raised a deprecation
80 warning since v5.18. Now they will be ignored. See L</qrE<sol>fooE<sol>x>
81 for the list of the five characters.
83 =head2 Comment lines within S<C<(?[ ])>> now are ended only by a C<\n>
85 S<C<(?[ ])>> is an experimental feature, introduced in v5.18. It operates
86 as if C</x> is always enabled. But there was a difference, comment
87 lines (following a C<#> character) were terminated by anything matching
88 C<\R> which includes all vertical whitespace, such as form feeds. For
89 consistency, this is now changed to match what terminates comment lines
90 outside S<C<(?[ ])>>, namely a C<\n> (even if escaped), which is the
91 same as what terminates a heredoc string and formats.
93 =head2 Omitting % and @ on hash and array names is no longer permitted
95 Really old Perl let you omit the @ on array names and the % on hash
96 names in some spots. This has issued a deprecation warning since Perl
97 5.0, and is no longer permitted.
99 =head2 C<"$!"> text is now in English outside C<"use locale"> scope
101 Previously, the text, unlike almost everything else, always came out
102 based on the current underlying locale of the program. (Also affected
103 on some systems is C<"$^E>".) For programs that are unprepared to
104 handle locale, this can cause garbage text to be displayed. It's better
105 to display text that is translatable via some tool than garbage text
106 which is much harder to figure out.
108 =head2 C<"$!"> text will be returned in UTF-8 when appropriate
110 The stringification of C<$!> and C<$^E> will have the UTF-8 flag set
111 when the text is actually non-ASCII UTF-8. This will enable programs
112 that are set up to be locale-aware to properly output messages in the
113 user's native language. Code that needs to continue the 5.20 and
114 earlier behavior can do the stringification within the scopes of both
115 'use bytes' and 'use locale ":messages". No other Perl operations will
116 be affected by locale; only C<$!> and C<$^E> stringification. The
117 'bytes' pragma causes the UTF-8 flag to not be set, just as in previous
118 Perl releases. This resolves [perl #112208].
122 XXX Any deprecated features, syntax, modules etc. should be listed here.
124 =head2 Using a NO-BREAK space in a character alias for C<\N{...}> is now
127 This non-graphic character is essentially indistinguishable from a
128 regular space, and so should not be allowed. See
129 L<charnames/CUSTOM ALIASES>.
131 =head2 Module removals
133 XXX Remove this section if inapplicable.
135 The following modules will be removed from the core distribution in a
136 future release, and will at that time need to be installed from CPAN.
137 Distributions on CPAN which require these modules will need to list them as
140 The core versions of these modules will now issue C<"deprecated">-category
141 warnings to alert you to this fact. To silence these deprecation warnings,
142 install the modules in question from CPAN.
144 Note that these are (with rare exceptions) fine modules that you are encouraged
145 to continue to use. Their disinclusion from core primarily hinges on their
146 necessity to bootstrapping a fully functional, CPAN-capable Perl installation,
147 not usually on concerns over their design.
153 XXX Note that deprecated modules should be listed here even if they are listed
154 as an updated module in the L</Modules and Pragmata> section.
158 [ List each other deprecation as a =head2 entry ]
160 =head1 Performance Enhancements
162 XXX Changes which enhance performance without changing behaviour go here.
163 There may well be none in a stable release.
165 [ List each enhancement as a =item entry ]
171 Many internal functions have been refactored to improve performance and reduce
172 their memory footprints.
174 L<[perl #121436]|https://rt.perl.org/Ticket/Display.html?id=121436>
175 L<[perl #121906]|https://rt.perl.org/Ticket/Display.html?id=121906>
176 L<[perl #121969]|https://rt.perl.org/Ticket/Display.html?id=121969>
180 C<-T> and C<-B> filetests will return sooner when an empty file is detected.
182 L<perl #121489|https://rt.perl.org/Ticket/Display.html?id=121489>
186 =head1 Modules and Pragmata
188 XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
189 go here. If Module::CoreList is updated, generate an initial draft of the
190 following sections using F<Porting/corelist-perldelta.pl>. A paragraph summary
191 for important changes should then be added by hand. In an ideal world,
192 dual-life modules would have a F<Changes> file that could be cribbed.
194 [ Within each section, list entries as a =item entry ]
196 =head2 New Modules and Pragmata
206 =head2 Updated Modules and Pragmata
212 L<Carp> has been upgraded from version 1.3301 to 1.34.
214 Carp::Heavy now ignores version mismatches with Carp if Carp is newer
215 than 1.12, since Carp::Heavy's guts were merged into Carp at that
217 L<[perl #121574]|https://rt.perl.org/Ticket/Display.html?id=121574>
221 L<Encode> has been upgraded from version 2.60_01 to 2.62.
223 B<piconv> now has better error handling when the encoding name is nonexistent,
224 and a build breakage when upgrading L<Encode> in perl-5.8.2 and earlier has
229 The libnet collection of modules has been upgraded from version 1.25 to 1.27.
231 There are only whitespace changes to the installed files.
235 The Locale-Codes collection of modules has been upgraded from vesion 3.30 to 3.31.
237 Fixed a bug in the scripts used to extract data from spreadsheets that
238 prevented the SHP currency code from being found.
239 L<[cpan #94229]|https://rt.cpan.org/Ticket/Display.html?id=94229>
243 L<Math::BigInt> has been upgraded from version 1.9993 to 1.9994.
245 Synchronize POD changes from the CPAN release.
247 C<< Math::BigFloat->blog(x) >> would sometimes return blog(2*x) when
248 the accuracy was greater than 70 digits.
250 The result of C<< Math::BigFloat->bdiv() >> in list context now
251 satisfies C<< x = quotient * divisor + remainder >>.
255 L<Math::BigRat> has been upgraded from version 0.2606 to 0.2607.
257 Synchronize POD changes from the CPAN release.
261 L<Module::Metadata> has been upgraded from version 1.000022 to 1.000024.
263 Support installations on older perls with an L<ExtUtils::MakeMaker> earlier
268 L<perl5db.pl> has been upgraded from version 1.44 to 1.45.
272 A mismatch between the documentation and the code in utf8::downgrade()
273 was fixed in favour of the documentation. The optional second argument
274 is now correctly treated as a perl boolean (true/false semantics) and
279 fork() in the debugger under C<tmux> will now create a new window for
280 the forked process. L<[perl
281 #121333]|https://rt.perl.org/Ticket/Display.html?id=121333>
283 The debugger now saves the current working directory on startup and
284 restores it when you restart your program with C<R> or <rerun>. L<[perl
285 #121509]|https://rt.perl.org/Ticket/Display.html?id=121509>
287 L<Unicode::Collate> has been upgraded from version 1.04 to 1.07.
289 Version 0.67's improved discontiguous contractions is invalidated by default
290 and is supported as a parameter 'long_contraction'.
294 L<Unicode::Normalize> has been upgraded from version 1.17 to 1.18.
296 The XSUB implementation has been removed in favour of pure Perl.
300 L<Hash::Util> has been upgraded from version 0.16 to 0.17.
302 Minor bug fixes and documentation fixes to Hash::Util::hash_stats()
307 =head2 Removed Modules and Pragmata
319 XXX Changes to files in F<pod/> go here. Consider grouping entries by
320 file and be sure to link to the appropriate page, e.g. L<perlfunc>.
322 =head2 New Documentation
324 XXX Changes which create B<new> files in F<pod/> go here.
328 XXX Description of the purpose of the new file here
330 =head2 Changes to Existing Documentation
332 XXX Changes which significantly change existing files in F<pod/> go here.
333 However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
342 C<-l> now notes that it will return false if symlinks aren't supported by the
345 L<[perl #121523]|https://rt.perl.org/Ticket/Display.html?id=121523>
355 C<sv_usepvn_flags> - Fix documentation to mention the use of C<NewX> instead of
358 L<[perl #121869]|https://rt.perl.org/Ticket/Display.html?id=121869>
362 =head3 L<perlhacktips>
368 Updated documentation for the C<test.valgrind> C<make> target.
370 L<[perl #121431]|https://rt.perl.org/Ticket/Display.html?id=121431>
376 The following additions or changes have been made to diagnostic output,
377 including warnings and fatal error messages. For the complete list of
378 diagnostic messages, see L<perldiag>.
380 XXX New or changed warnings emitted by the core's C<C> code go here. Also
381 include any changes in L<perldiag> that reconcile it to the C<C> code.
383 =head2 New Diagnostics
385 XXX Newly added diagnostic messages go under here, separated into New Errors
394 XXX L<message|perldiag/"message">
404 L<PerlIO layer ':win32' is experimental|perldiag/"PerlIO layer ':win32' is experimental">:
406 (S experimental::win32_perlio) The C<:win32> PerlIO layer is
407 experimental. If you want to take the risk of using this layer,
408 simply disable this warning:
410 no warnings "experimental::win32_perlio";
414 =head2 Changes to Existing Diagnostics
416 XXX Changes (i.e. rewording) of diagnostic messages go here
422 L<Unsuccessful %s on filename containing newline|perldiag/"Unsuccessful %s on filename containing newline">
424 This warning is now only produced when the newline is at the end of
429 =head1 Utility Changes
431 XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go here.
432 Most of these are built within the directories F<utils> and F<x2p>.
434 [ List utility changes as a =head2 entry for each utility and =item
435 entries for each change
436 Use L<XXX> with program names to get proper documentation linking. ]
448 =head1 Configuration and Compilation
450 XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
451 go here. Any other changes to the Perl build process should be listed here.
452 However, any platform-specific changes should be listed in the
453 L</Platform Support> section, instead.
455 [ List changes as a =item entry ].
461 C<make test.valgrind> now supports parallel testing.
465 TEST_JOBS=9 make test.valgrind
467 See L<perlhacktips/valgrind> for more information.
469 L<[perl #121431]|https://rt.perl.org/Ticket/Display.html?id=121431>
475 XXX Any significant changes to the testing of a freshly built perl should be
476 listed here. Changes which create B<new> files in F<t/> go here as do any
477 large changes to the testing harness (e.g. when parallel testing was added).
478 Changes to existing files in F<t/> aren't worth summarizing, although the bugs
479 that they represent may be covered elsewhere.
481 [ List each test improvement as a =item entry ]
491 =head1 Platform Support
493 XXX Any changes to platform support should be listed in the sections below.
495 [ Within the sections, list each platform as a =item entry with specific
496 changes as paragraphs below it. ]
500 XXX List any platforms that this version of perl compiles on, that previous
501 versions did not. These will either be enabled by new files in the F<hints/>
502 directories, or new subdirectories and F<README> files at the top level of the
507 =item XXX-some-platform
513 =head2 Discontinued Platforms
515 XXX List any platforms that this version of perl no longer compiles on.
519 =item NeXTSTEP/OPENSTEP
521 NeXTSTEP was proprietary OS bundled with NeXT's workstations in the early
522 to mid 90's; OPENSTEP was an API specification that provided a NeXTSTEP-like
523 environment on a non-NeXTSTEP system. Both are now long dead, so support
524 for building Perl on them has been removed.
528 =head2 Platform-Specific Notes
530 XXX List any changes for specific platforms. This could include configuration
531 and compilation changes or changes in portability/compatibility. However,
532 changes within modules for platforms should generally be listed in the
533 L</Modules and Pragmata> section.
537 =item XXX-some-platform
543 =head1 Internal Changes
545 XXX Changes which affect the interface available to C<XS> code go here. Other
546 significant internal changes for future core maintainers should be noted as
553 The deprecated variable C<PL_sv_objcount> has been removed.
557 Perl now tries to keep the locale category C<LC_NUMERIC> set to "C"
558 except around operations that need it to be set to the program's
559 underlying locale. This protects the many XS modules that cannot cope
560 with the decimal radix character not being a dot. Prior to this
561 release, Perl initialized this category to "C", but a call to
562 C<POSIX::setlocale()> would change it. Now such a call will change the
563 underlying locale of the C<LC_NUMERIC> category for the program, but the
564 locale exposed to XS code will remain "C". There is an API under
565 development for those relatively few modules that need to use the
566 underlying locale. This API will be nailed down during the course of
567 developing v5.21. Send email to L<mailto:perl5-porters@perl.org> for
572 =head1 Selected Bug Fixes
574 XXX Important bug fixes in the core language are summarized here. Bug fixes in
575 files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>.
577 [ List each fix as a =item entry ]
583 index() and rindex() no longer crash when used on strings over 2GB in
585 L<[perl #121562]|https://rt.perl.org/Ticket/Display.html?id=121562>.
589 A small previously intentional memory leak in PERL_SYS_INIT/PERL_SYS_INIT3 on
590 Win32 builds was fixed. This might affect embedders who repeatedly create and
591 destroy perl engines within the same process.
595 C<POSIX::localeconv()> now returns the data for the program's underlying
596 locale even when called from outside the scope of S<C<use locale>>.
600 C<POSIX::localeconv()> now works properly on platforms which don't have
601 C<LC_NUMERIC> and/or C<LC_MONETARY>, or for which Perl has been compiled
602 to disregard either or both of these locale categories. In such
603 circumstances, there are now no entries for the corresponding values in
604 the hash returned by C<localeconv()>.
608 C<POSIX::localeconv()> now marks appropriately the values it returns as
609 UTF-8 or not. Previously they were always returned as a bytes, even if
610 they were supposed to be encoded as UTF-8.
614 On Microsoft Windows, within the scope of C<S<use locale>>, the following
615 POSIX character classes gave results for many locales that did not
616 conform to the POSIX standard:
629 These are because the underlying Microsoft implementation does not
630 follow the standard. Perl now takes special precautions to correct for
635 Many issues have been detected by L<Coverity|http://www.coverity.com/> and
640 =head1 Known Problems
642 XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
643 tests that had to be C<TODO>ed for the release would be noted here. Unfixed
644 platform specific bugs also go here.
646 [ List each fix as a =item entry ]
656 =head1 Errata From Previous Releases
662 XXX Add anything here that we forgot to add, or were mistaken about, in
663 the perldelta of a previous release.
669 XXX If any significant core contributor has died, we've added a short obituary
672 =head1 Acknowledgements
674 XXX Generate this with:
676 perl Porting/acknowledgements.pl v5.21.1..HEAD
678 =head1 Reporting Bugs
680 If you find what you think is a bug, you might check the articles recently
681 posted to the comp.lang.perl.misc newsgroup and the perl bug database at
682 https://rt.perl.org/ . There may also be information at
683 http://www.perl.org/ , the Perl Home Page.
685 If you believe you have an unreported bug, please run the L<perlbug> program
686 included with your release. Be sure to trim your bug down to a tiny but
687 sufficient test case. Your bug report, along with the output of C<perl -V>,
688 will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
690 If the bug you are reporting has security implications, which make it
691 inappropriate to send to a publicly archived mailing list, then please send it
692 to perl5-security-report@perl.org. This points to a closed subscription
693 unarchived mailing list, which includes all the core committers, who will be
694 able to help assess the impact of issues, figure out a resolution, and help
695 co-ordinate the release of patches to mitigate or fix the problem across all
696 platforms on which Perl is supported. Please only use this address for
697 security issues in the Perl core, not for modules independently distributed on
702 The F<Changes> file for an explanation of how to view exhaustive details on
705 The F<INSTALL> file for how to build Perl.
707 The F<README> file for general stuff.
709 The F<Artistic> and F<Copying> files for copyright information.