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.4
12 This document describes differences between the 5.21.3 release and the 5.21.4
15 If you are upgrading from an earlier release such as 5.21.2, first read
16 L<perl5213delta>, which describes differences between 5.21.2 and 5.21.3.
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 Infinity and NaN (not-a-number) handling improved
32 Floating point values are able to hold the special values infinity
33 (also -infinity), and NaN (not-a-number). Now we more robustly recognize
34 and propagate the value in computations, and on output normalize them
37 See also the L<POSIX> enhancements.
41 XXX Any security-related notices go here. In particular, any security
42 vulnerabilities closed should be noted here rather than in the
43 L</Selected Bug Fixes> section.
45 [ List each security issue as a =head2 entry ]
47 =head1 Incompatible Changes
49 XXX For a release on a stable branch, this section aspires to be:
51 There are no changes intentionally incompatible with 5.XXX.XXX
52 If any exist, they are bugs, and we request that you submit a
53 report. See L</Reporting Bugs> below.
55 [ List each incompatible change as a =head2 entry ]
57 =head2 Changes to the C<*> prototype
59 The C<*> character in a subroutine's prototype used to allow barewords
60 to take precedence over most, but not all subroutines. It was never
61 consistent and exhibited buggy behaviour.
63 Now it has been changed, so subroutines always take precedence over
64 barewords, which brings it into conformity with similarly prototyped
69 splat(foo); # now always splat(foo())
70 splat(bar); # still splat('bar') as before
71 close(foo); # close(foo())
72 close(bar); # close('bar')
76 XXX Any deprecated features, syntax, modules etc. should be listed here.
78 =head2 Module removals
80 XXX Remove this section if inapplicable.
82 The following modules will be removed from the core distribution in a
83 future release, and will at that time need to be installed from CPAN.
84 Distributions on CPAN which require these modules will need to list them as
87 The core versions of these modules will now issue C<"deprecated">-category
88 warnings to alert you to this fact. To silence these deprecation warnings,
89 install the modules in question from CPAN.
91 Note that these are (with rare exceptions) fine modules that you are encouraged
92 to continue to use. Their disinclusion from core primarily hinges on their
93 necessity to bootstrapping a fully functional, CPAN-capable Perl installation,
94 not usually on concerns over their design.
100 XXX Note that deprecated modules should be listed here even if they are listed
101 as an updated module in the L</Modules and Pragmata> section.
105 [ List each other deprecation as a =head2 entry ]
107 =head1 Performance Enhancements
109 XXX Changes which enhance performance without changing behaviour go here.
110 There may well be none in a stable release.
112 [ List each enhancement as a =item entry ]
118 Subroutines with an empty prototype and bodies containing just C<undef> are
119 now eligible for inlining. [perl #122728]
123 =head1 Modules and Pragmata
125 XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
126 go here. If Module::CoreList is updated, generate an initial draft of the
127 following sections using F<Porting/corelist-perldelta.pl>. A paragraph summary
128 for important changes should then be added by hand. In an ideal world,
129 dual-life modules would have a F<Changes> file that could be cribbed.
131 [ Within each section, list entries as a =item entry ]
133 =head2 New Modules and Pragmata
143 =head2 Updated Modules and Pragmata
149 L<XXX> has been upgraded from version A.xx to B.yy.
153 L<B::Concise> has been upgraded from version 0.992 to 0.993.
157 L<B::Deparse> has been upgraded from version 1.27 to 1.28.
159 It now deparses C<our(I<LIST>)> and typed lexical (C<my Dog $spot>)
164 L<CPAN::Meta::Requirements> has been upgraded from version 2.126 to 2.128.
168 L<ExtUtils::CBuilder> has been upgraded from version 0.280216 to 0.280219.
173 L<ExtUtils::Manifest> has been upgraded from version 1.65 to 1.66.
178 L<ExtUtils::ParseXS>: Documentation has been added to
179 F<ExtUtils-ParseXS/lib/perlxs.pod> concerning handling of locales when writing
184 L<File::Find> has been upgraded from version 1.27 to 1.28.
186 C<find()> and C<finddepth()> will now warn if passed inappropriate or
191 L<Getopt::Std> has been upgraded from version 1.10 to 1.11.
195 L<HTTP::Tiny> has been upgraded from version 0.047 to 0.048.
199 L<Module::CoreList> has been upgraded from version 5.021003 to 5.021004.
203 L<POSIX> has been upgraded from version 1.42 to 1.43.
205 The C99 math functions and constants (for example acosh, round,
206 M_E, M_PI) have been added.
210 L<Pod::Perldoc> has been upgraded from version 3.23 to 3.24.
214 Scalar-List-Utils has been upgraded from version 1.40 to 1.41.
218 L<constant> has been upgraded from version 1.31 to 1.32.
220 It now accepts fully-qualified constant names, allowing constants to be
221 defined in packages other than the caller.
225 L<threads> has been upgraded from version 1.95 to 1.96.
229 =head2 Removed Modules and Pragmata
241 XXX Changes to files in F<pod/> go here. Consider grouping entries by
242 file and be sure to link to the appropriate page, e.g. L<perlfunc>.
244 =head2 New Documentation
246 XXX Changes which create B<new> files in F<pod/> go here.
250 XXX Description of the purpose of the new file here
252 =head2 Changes to Existing Documentation
254 XXX Changes which significantly change existing files in F<pod/> go here.
255 However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
264 XXX Description of the change here
268 L<perlsyn>: An ambiguity in the documentation of the Ellipsis statement has
269 been corrected. [perl #122661]
275 The following additions or changes have been made to diagnostic output,
276 including warnings and fatal error messages. For the complete list of
277 diagnostic messages, see L<perldiag>.
279 XXX New or changed warnings emitted by the core's C<C> code go here. Also
280 include any changes in L<perldiag> that reconcile it to the C<C> code.
282 =head2 New Diagnostics
284 XXX Newly added diagnostic messages go under here, separated into New Errors
293 XXX L<message|perldiag/"message">
303 XXX L<message|perldiag/"message">
307 =head2 Changes to Existing Diagnostics
309 XXX Changes (i.e. rewording) of diagnostic messages go here
315 XXX Describe change here
319 =head2 Diagnostic Removals
325 "Constant is not a FOO reference"
327 Compile-time checking of constant dereferencing (e.g.,
328 C<< my_constant->() >>) has been removed, since it was not taking
329 overloading into account. [perl #69456] [perl #122607]
333 The warning "Ambiguous use of -foo resolved as -&foo()" has been removed.
334 There is actually no ambiguity here, and this impedes the use of negated
335 constants; e.g., C<-Inf>.
339 The little-known C<my Class $var> syntax (see L<fields> and L<attributes>)
340 could get confused in the scope of C<use utf8> if C<Class> were a constant
341 whose value contained Latin-1 characters.
345 =head1 Utility Changes
347 XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go here.
348 Most of these are built within the directory F<utils>.
350 [ List utility changes as a =head2 entry for each utility and =item
351 entries for each change
352 Use L<XXX> with program names to get proper documentation linking. ]
364 =head1 Configuration and Compilation
366 XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
367 go here. Any other changes to the Perl build process should be listed here.
368 However, any platform-specific changes should be listed in the
369 L</Platform Support> section, instead.
371 [ List changes as a =item entry ].
383 XXX Any significant changes to the testing of a freshly built perl should be
384 listed here. Changes which create B<new> files in F<t/> go here as do any
385 large changes to the testing harness (e.g. when parallel testing was added).
386 Changes to existing files in F<t/> aren't worth summarizing, although the bugs
387 that they represent may be covered elsewhere.
389 [ List each test improvement as a =item entry ]
399 =head1 Platform Support
401 XXX Any changes to platform support should be listed in the sections below.
403 [ Within the sections, list each platform as a =item entry with specific
404 changes as paragraphs below it. ]
408 XXX List any platforms that this version of perl compiles on, that previous
409 versions did not. These will either be enabled by new files in the F<hints/>
410 directories, or new subdirectories and F<README> files at the top level of the
415 =item XXX-some-platform
421 =head2 Discontinued Platforms
423 XXX List any platforms that this version of perl no longer compiles on.
427 =item XXX-some-platform
433 =head2 Platform-Specific Notes
435 XXX List any changes for specific platforms. This could include configuration
436 and compilation changes or changes in portability/compatibility. However,
437 changes within modules for platforms should generally be listed in the
438 L</Modules and Pragmata> section.
442 =item XXX-some-platform
448 =head1 Internal Changes
450 XXX Changes which affect the interface available to C<XS> code go here. Other
451 significant internal changes for future core maintainers should be noted as
454 [ List each change as a =item entry ]
458 C<save_re_context> no longer does anything and has been moved to
463 =head1 Selected Bug Fixes
465 XXX Important bug fixes in the core language are summarized here. Bug fixes in
466 files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>.
468 [ List each fix as a =item entry ]
478 Constant dereferencing now works correctly for typeglob constants.
479 Previously the glob was stringified and its name looked up. Now the glob
480 itself is used. [perl #69456]
484 When parsing a funny character ($ @ % &) followed by braces, the parser no
485 longer tries to guess whether it is a block or a hash constructor (causing
486 a syntax error when it guesses the latter), since it can only be a block.
490 C<undef $reference> now frees the referent immediately, instead of hanging
491 on to it until the next statement. [perl #122556]
495 Various cases where the name of a sub is used (autoload, overloading, error
496 messages) used to crash for lexical subs, but have been fixed.
500 Bareword lookup now tries to avoid vivifying packages if it turns out the
501 bareword is not going to be a subroutine name.
505 Compilation of anonymous constants (e.g., C<sub () { 3 }>) no longer
506 deletes any subroutine named C<__ANON__> in the current package. Not only
507 was C<*__ANON__{CODE}> cleared, but there was a memory leak, too. This bug
508 goes back to perl 5.8.0.
512 Stub declarations like C<sub f;> and C<sub f ();> no longer wipe out
513 constants of the same name declared by C<use constant>. This bug was
514 introduced in perl 5.10.0.
518 Under some conditions a warning raised in compilation of regular
519 expression patterns could be displayed multiple times. This is now
524 C<qr/[\N{named sequence}]/> now works properly in many instances. Some
525 names known to C<\N{...}> refer to a sequence of multiple characters,
526 instead of the usual single character. Bracketed character classes
527 generally only match single characters, but now special handling has
528 been added so that they can match named sequences, but not if the class
529 is inverted or the sequence is specified as the beginning or end of a
530 range. In these cases, the only behavior change from before is a slight
531 rewording of the fatal error message given when this class is part of a
532 C<?[...])> construct. When the C<[...]> stands alone, the same
533 non-fatal warning as before is raised, and only the first character in
534 the sequence is used, again just as before.
538 Tainted constants evaluated at compile time no longer cause unrelated
539 statements to become tainted. [perl #122669]
543 C<open $$fh, ...>, which vivifies a handle with a name like "main::_GEN_0",
544 was not giving the handle the right reference count, so a double free could
549 When deciding that a bareword was a method name, the parser would get
550 confused if an "our" sub with the same name existed, and look up the method
551 in the package of the "our" sub, instead of the package of the invocant.
555 The parser no longer gets confused by C<\U=> within a double-quoted string.
556 It used to roduce a syntax error, but now compiles it correctly.
561 It has always been the intention for the C<-B> and C<-T> file test
562 operators to treat UTF-8 encoded files as text.
563 (L<perlfunc|perlfunc/-X FILEHANDLE> has been updated to say this.)
564 Previously, it was possible for some files to be considered UTF-8 that
565 actually weren't valid UTF-8. This is now fixed. The operators now
566 work on EBCDIC platforms as well.
570 Under some conditions warning messages raised during regular expression
571 pattern compilation were being output more than once. This has now been
576 A regression has been fixed that was introduced in v5.20.0 (fixed in
577 v5.20.1 as well as here) in which a UTF-8 encoded regular expression
578 pattern that contains a single ASCII lowercase letter does not match its
579 uppercase counterpart. [perl #122655]
583 Constant folding could incorrectly suppress warnings if lexical warnings
584 (C<use warnings> or C<no warnings>) were not in effect and C<$^W> were
585 false at compile time and true at run time.
589 Loading UTF8 tables during a regular expression match could cause assertion
590 failures under debugging builds if the previous match used the very same
591 regular expression. [perl #122747]
595 Thread cloning used to work incorrectly for lexical subs, possibly causing
596 crashes or double frees on exit.
600 =head1 Known Problems
602 XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
603 tests that had to be C<TODO>ed for the release would be noted here. Unfixed
604 platform specific bugs also go here.
606 [ List each fix as a =item entry ]
616 =head1 Errata From Previous Releases
622 XXX Add anything here that we forgot to add, or were mistaken about, in
623 the perldelta of a previous release.
629 XXX If any significant core contributor has died, we've added a short obituary
632 =head1 Acknowledgements
634 XXX Generate this with:
636 perl Porting/acknowledgements.pl v5.21.3..HEAD
638 =head1 Reporting Bugs
640 If you find what you think is a bug, you might check the articles recently
641 posted to the comp.lang.perl.misc newsgroup and the perl bug database at
642 https://rt.perl.org/ . There may also be information at
643 http://www.perl.org/ , the Perl Home Page.
645 If you believe you have an unreported bug, please run the L<perlbug> program
646 included with your release. Be sure to trim your bug down to a tiny but
647 sufficient test case. Your bug report, along with the output of C<perl -V>,
648 will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
650 If the bug you are reporting has security implications, which make it
651 inappropriate to send to a publicly archived mailing list, then please send it
652 to perl5-security-report@perl.org. This points to a closed subscription
653 unarchived mailing list, which includes all the core committers, who will be
654 able to help assess the impact of issues, figure out a resolution, and help
655 co-ordinate the release of patches to mitigate or fix the problem across all
656 platforms on which Perl is supported. Please only use this address for
657 security issues in the Perl core, not for modules independently distributed on
662 The F<Changes> file for an explanation of how to view exhaustive details on
665 The F<INSTALL> file for how to build Perl.
667 The F<README> file for general stuff.
669 The F<Artistic> and F<Copying> files for copyright information.