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.
120 L<[perl #122728]|https://rt.perl.org/Ticket/Display.html?id=122728>
124 Subroutines in packages no longer need to carry typeglobs around with them.
125 Declaring a subroutine will now put a simple sub reference in the stash if
126 possible, saving memory. The typeglobs still notionally exist, so
127 accessing them will cause the subroutine reference to be upgraded to a
128 typeglob. This optimisation does not currently apply to XSUBs or exported
129 subroutines, and method calls will undo it, since they cache things in
131 L<[perl #120441]|https://rt.perl.org/Ticket/Display.html?id=120441>
135 =head1 Modules and Pragmata
137 XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
138 go here. If Module::CoreList is updated, generate an initial draft of the
139 following sections using F<Porting/corelist-perldelta.pl>. A paragraph summary
140 for important changes should then be added by hand. In an ideal world,
141 dual-life modules would have a F<Changes> file that could be cribbed.
143 [ Within each section, list entries as a =item entry ]
145 =head2 New Modules and Pragmata
155 =head2 Updated Modules and Pragmata
161 L<Archive::Tar> has been upgraded from version 2.00 to 2.02.
163 Tests can now be run in parallel.
167 L<Attribute::Handlers> has been upgraded from version 0.96 to 0.97.
171 L<attributes> has been upgraded from version 0.22 to 0.23.
175 L<B> has been upgraded from version 1.50 to 1.51.
177 It provides a new C<B::safename> function, based on the existing
178 C<< B::GV->SAFENAME >>, that converts "\cOPEN" to "^OPEN".
182 L<B::Concise> has been upgraded from version 0.992 to 0.993.
186 L<B::Deparse> has been upgraded from version 1.27 to 1.28.
188 It now deparses C<our(I<LIST>)> and typed lexical (C<my Dog $spot>) correctly.
192 L<bignum> has been upgraded from version 0.37 to 0.38.
196 L<constant> has been upgraded from version 1.31 to 1.32.
198 It now accepts fully-qualified constant names, allowing constants to be defined
199 in packages other than the caller.
203 L<CPAN::Meta::Requirements> has been upgraded from version 2.126 to 2.128.
207 L<experimental> has been upgraded from version 0.008 to 0.010.
211 L<ExtUtils::CBuilder> has been upgraded from version 0.280217 to 0.280219.
212 L<[perl #122675]|https://rt.perl.org/Ticket/Display.html?id=122675>
216 L<ExtUtils::Install> has been upgraded from version 1.68 to 2.04.
220 L<ExtUtils::Manifest> has been upgraded from version 1.65 to 1.68.
221 L<[perl #122415]|https://rt.perl.org/Ticket/Display.html?id=122415>
225 L<File::Find> has been upgraded from version 1.27 to 1.28.
227 C<find()> and C<finddepth()> will now warn if passed inappropriate or
232 L<Getopt::Std> has been upgraded from version 1.10 to 1.11.
236 L<HTTP::Tiny> has been upgraded from version 0.047 to 0.049.
240 L<IO> has been upgraded from version 1.33 to 1.34.
244 L<IO::Socket::IP> has been upgraded from version 0.31 to 0.32.
248 L<Locale::Codes> has been upgraded from version 3.31 to 3.32.
252 L<Module::CoreList> has been upgraded from version 5.021003 to 5.20140915.
256 L<overload> has been upgraded from version 1.22 to 1.23.
260 PathTools has been upgraded from version 3.49 to 3.50.
264 L<Pod::Perldoc> has been upgraded from version 3.23 to 3.24.
268 L<POSIX> has been upgraded from version 1.42 to 1.43.
270 The C99 math functions and constants (for example acosh, round, M_E, M_PI) have
275 Scalar-List-Utils has been upgraded from version 1.39 to 1.41.
279 L<Term::ReadLine> has been upgraded from version 1.14 to 1.15.
283 L<Test::Harness> has been upgraded from version 3.32 to 3.33.
287 L<Test::Simple> has been upgraded from version 1.001003 to 1.001006.
291 L<threads> has been upgraded from version 1.95 to 1.96.
295 L<Time::Piece> has been upgraded from version 1.27 to 1.29.
299 L<version> has been upgraded from version 0.9908 to 0.9909.
303 =head2 Removed Modules and Pragmata
315 XXX Changes to files in F<pod/> go here. Consider grouping entries by
316 file and be sure to link to the appropriate page, e.g. L<perlfunc>.
318 =head2 New Documentation
320 XXX Changes which create B<new> files in F<pod/> go here.
324 XXX Description of the purpose of the new file here
326 =head2 Changes to Existing Documentation
328 XXX Changes which significantly change existing files in F<pod/> go here.
329 However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
338 An ambiguity in the documentation of the Ellipsis statement has
340 L<[perl #122661]|https://rt.perl.org/Ticket/Display.html?id=122661>
350 Added a discussion of locale issues in XS code.
356 The following additions or changes have been made to diagnostic output,
357 including warnings and fatal error messages. For the complete list of
358 diagnostic messages, see L<perldiag>.
360 XXX New or changed warnings emitted by the core's C<C> code go here. Also
361 include any changes in L<perldiag> that reconcile it to the C<C> code.
363 =head2 New Diagnostics
365 XXX Newly added diagnostic messages go under here, separated into New Errors
374 XXX L<message|perldiag/"message">
384 XXX L<message|perldiag/"message">
388 =head2 Changes to Existing Diagnostics
390 XXX Changes (i.e. rewording) of diagnostic messages go here
396 XXX Describe change here
400 =head2 Diagnostic Removals
406 "Constant is not a FOO reference"
408 Compile-time checking of constant dereferencing (e.g.,
409 C<< my_constant->() >>) has been removed, since it was not taking
410 overloading into account.
411 L<[perl #69456]|https://rt.perl.org/Ticket/Display.html?id=69456>
412 L<[perl #122607]|https://rt.perl.org/Ticket/Display.html?id=122607>
416 The warning "Ambiguous use of -foo resolved as -&foo()" has been removed.
417 There is actually no ambiguity here, and this impedes the use of negated
418 constants; e.g., C<-Inf>.
422 The little-known C<my Class $var> syntax (see L<fields> and L<attributes>)
423 could get confused in the scope of C<use utf8> if C<Class> were a constant
424 whose value contained Latin-1 characters.
428 =head1 Utility Changes
430 XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go here.
431 Most of these are built within the directory F<utils>.
433 [ List utility changes as a =head2 entry for each utility and =item
434 entries for each change
435 Use L<XXX> with program names to get proper documentation linking. ]
447 =head1 Configuration and Compilation
449 XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
450 go here. Any other changes to the Perl build process should be listed here.
451 However, any platform-specific changes should be listed in the
452 L</Platform Support> section, instead.
454 [ List changes as a =item entry ].
466 XXX Any significant changes to the testing of a freshly built perl should be
467 listed here. Changes which create B<new> files in F<t/> go here as do any
468 large changes to the testing harness (e.g. when parallel testing was added).
469 Changes to existing files in F<t/> aren't worth summarizing, although the bugs
470 that they represent may be covered elsewhere.
472 [ List each test improvement as a =item entry ]
482 =head1 Platform Support
484 XXX Any changes to platform support should be listed in the sections below.
486 [ Within the sections, list each platform as a =item entry with specific
487 changes as paragraphs below it. ]
491 XXX List any platforms that this version of perl compiles on, that previous
492 versions did not. These will either be enabled by new files in the F<hints/>
493 directories, or new subdirectories and F<README> files at the top level of the
498 =item XXX-some-platform
504 =head2 Discontinued Platforms
506 XXX List any platforms that this version of perl no longer compiles on.
510 =item XXX-some-platform
516 =head2 Platform-Specific Notes
518 XXX List any changes for specific platforms. This could include configuration
519 and compilation changes or changes in portability/compatibility. However,
520 changes within modules for platforms should generally be listed in the
521 L</Modules and Pragmata> section.
525 =item XXX-some-platform
531 =head1 Internal Changes
533 XXX Changes which affect the interface available to C<XS> code go here. Other
534 significant internal changes for future core maintainers should be noted as
537 [ List each change as a =item entry ]
543 C<save_re_context> no longer does anything and has been moved to
548 C<cv_name> is a new API function that can be passed a CV or GV. It returns
549 an SV containing the name of the subroutine for use in diagnostics.
550 L<[perl #116735]|https://rt.perl.org/Ticket/Display.html?id=116735>
551 L<[perl #120441]|https://rt.perl.org/Ticket/Display.html?id=120441>
555 C<cv_set_call_checker_flags> is a new API function that works like
556 C<cv_set_call_checker>, except that it allows the caller to specify whether
557 the call checker requires a full GV for reporting the subroutine's name, or
558 whether it could be passed a CV instead. Whatever value is passed will be
559 acceptable to C<cv_name>. C<cv_set_call_checker> guarantees there will be
560 a GV, but it may have to create one on the fly, which is inefficient.
561 L<[perl #116735]|https://rt.perl.org/Ticket/Display.html?id=116735>
565 C<CvGV> (which is not part of the API) is now a more complex macro, which
566 may call a function and reify a GV. For those cases where is has been used
567 as a boolean, C<CvHASGV> has been added, which will return true for CVs
568 that notionally have GVs, but without reifying the GV. C<CvGV> also
569 returns a GV now for lexical subs.
570 L<[perl #120441]|https://rt.perl.org/Ticket/Display.html?id=120441>
574 Added L<perlapi/sync_locale>.
575 Changing the program's locale should be avoided by XS code. Nevertheless,
576 certain non-Perl libraries called from XS, such as C<Gtk> do so. When this
577 happens, Perl needs to be told that the locale has changed. Use this function
578 to do so, before returning to Perl.
582 =head1 Selected Bug Fixes
584 XXX Important bug fixes in the core language are summarized here. Bug fixes in
585 files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>.
587 [ List each fix as a =item entry ]
597 Constant dereferencing now works correctly for typeglob constants.
598 Previously the glob was stringified and its name looked up. Now the glob
600 L<[perl #69456]|https://rt.perl.org/Ticket/Display.html?id=69456>
604 When parsing a funny character ($ @ % &) followed by braces, the parser no
605 longer tries to guess whether it is a block or a hash constructor (causing
606 a syntax error when it guesses the latter), since it can only be a block.
610 C<undef $reference> now frees the referent immediately, instead of hanging
611 on to it until the next statement.
612 L<[perl #122556]|https://rt.perl.org/Ticket/Display.html?id=122556>
616 Various cases where the name of a sub is used (autoload, overloading, error
617 messages) used to crash for lexical subs, but have been fixed.
621 Bareword lookup now tries to avoid vivifying packages if it turns out the
622 bareword is not going to be a subroutine name.
626 Compilation of anonymous constants (e.g., C<sub () { 3 }>) no longer
627 deletes any subroutine named C<__ANON__> in the current package. Not only
628 was C<*__ANON__{CODE}> cleared, but there was a memory leak, too. This bug
629 goes back to perl 5.8.0.
633 Stub declarations like C<sub f;> and C<sub f ();> no longer wipe out
634 constants of the same name declared by C<use constant>. This bug was
635 introduced in perl 5.10.0.
639 Under some conditions a warning raised in compilation of regular
640 expression patterns could be displayed multiple times. This is now
645 C<qr/[\N{named sequence}]/> now works properly in many instances. Some
646 names known to C<\N{...}> refer to a sequence of multiple characters,
647 instead of the usual single character. Bracketed character classes
648 generally only match single characters, but now special handling has
649 been added so that they can match named sequences, but not if the class
650 is inverted or the sequence is specified as the beginning or end of a
651 range. In these cases, the only behavior change from before is a slight
652 rewording of the fatal error message given when this class is part of a
653 C<?[...])> construct. When the C<[...]> stands alone, the same
654 non-fatal warning as before is raised, and only the first character in
655 the sequence is used, again just as before.
659 Tainted constants evaluated at compile time no longer cause unrelated
660 statements to become tainted.
661 L<[perl #122669]|https://rt.perl.org/Ticket/Display.html?id=122669>
665 C<open $$fh, ...>, which vivifies a handle with a name like "main::_GEN_0",
666 was not giving the handle the right reference count, so a double free could
671 When deciding that a bareword was a method name, the parser would get
672 confused if an "our" sub with the same name existed, and look up the method
673 in the package of the "our" sub, instead of the package of the invocant.
677 The parser no longer gets confused by C<\U=> within a double-quoted string.
678 It used to produce a syntax error, but now compiles it correctly.
679 L<[perl #80368]|https://rt.perl.org/Ticket/Display.html?id=80368>
683 It has always been the intention for the C<-B> and C<-T> file test
684 operators to treat UTF-8 encoded files as text.
685 (L<perlfunc|perlfunc/-X FILEHANDLE> has been updated to say this.)
686 Previously, it was possible for some files to be considered UTF-8 that
687 actually weren't valid UTF-8. This is now fixed. The operators now
688 work on EBCDIC platforms as well.
692 Under some conditions warning messages raised during regular expression
693 pattern compilation were being output more than once. This has now been
698 A regression has been fixed that was introduced in v5.20.0 (fixed in
699 v5.20.1 as well as here) in which a UTF-8 encoded regular expression
700 pattern that contains a single ASCII lowercase letter does not match its
701 uppercase counterpart.
702 L<[perl #122655]|https://rt.perl.org/Ticket/Display.html?id=122655>
706 Constant folding could incorrectly suppress warnings if lexical warnings
707 (C<use warnings> or C<no warnings>) were not in effect and C<$^W> were
708 false at compile time and true at run time.
712 Loading UTF8 tables during a regular expression match could cause assertion
713 failures under debugging builds if the previous match used the very same
715 L<[perl #122747]|https://rt.perl.org/Ticket/Display.html?id=122747>
719 Thread cloning used to work incorrectly for lexical subs, possibly causing
720 crashes or double frees on exit.
724 Since perl 5.14.0, deleting C<$SomePackage::{__ANON__}> and then undefining
725 an anonymous subroutine could corrupt things internally, resulting in
726 L<Devel::Peek> crashing or L<B.pm|B> giving nonsensical data. This has
731 C<(caller $n)[3]> now reports names of lexical subs, instead of treating
736 C<sort subname LIST> now supports lexical subs for the comparison routine.
740 =head1 Known Problems
742 XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
743 tests that had to be C<TODO>ed for the release would be noted here. Unfixed
744 platform specific bugs also go here.
746 [ List each fix as a =item entry ]
756 =head1 Errata From Previous Releases
762 XXX Add anything here that we forgot to add, or were mistaken about, in
763 the perldelta of a previous release.
769 XXX If any significant core contributor has died, we've added a short obituary
772 =head1 Acknowledgements
774 XXX Generate this with:
776 perl Porting/acknowledgements.pl v5.21.3..HEAD
778 =head1 Reporting Bugs
780 If you find what you think is a bug, you might check the articles recently
781 posted to the comp.lang.perl.misc newsgroup and the perl bug database at
782 https://rt.perl.org/ . There may also be information at
783 http://www.perl.org/ , the Perl Home Page.
785 If you believe you have an unreported bug, please run the L<perlbug> program
786 included with your release. Be sure to trim your bug down to a tiny but
787 sufficient test case. Your bug report, along with the output of C<perl -V>,
788 will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
790 If the bug you are reporting has security implications, which make it
791 inappropriate to send to a publicly archived mailing list, then please send it
792 to perl5-security-report@perl.org. This points to a closed subscription
793 unarchived mailing list, which includes all the core committers, who will be
794 able to help assess the impact of issues, figure out a resolution, and help
795 co-ordinate the release of patches to mitigate or fix the problem across all
796 platforms on which Perl is supported. Please only use this address for
797 security issues in the Perl core, not for modules independently distributed on
802 The F<Changes> file for an explanation of how to view exhaustive details on
805 The F<INSTALL> file for how to build Perl.
807 The F<README> file for general stuff.
809 The F<Artistic> and F<Copying> files for copyright information.