=encoding utf8 =head1 NAME [ this is a template for a new perldelta file. Any text flagged as XXX needs to be processed before release. ] perldelta - what is new for perl v5.21.4 =head1 DESCRIPTION This document describes differences between the 5.21.3 release and the 5.21.4 release. If you are upgrading from an earlier release such as 5.21.2, first read L, which describes differences between 5.21.2 and 5.21.3. =head1 Notice XXX Any important notices here =head1 Core Enhancements XXX New core language features go here. Summarize user-visible core language enhancements. Particularly prominent performance optimisations could go here, but most should go in the L section. [ List each enhancement as a =head2 entry ] =head2 Infinity and NaN (not-a-number) handling improved Floating point values are able to hold the special values infinity (also -infinity), and NaN (not-a-number). Now we more robustly recognize and propagate the value in computations, and on output normalize them to C and C. See also the L enhancements. =head1 Security XXX Any security-related notices go here. In particular, any security vulnerabilities closed should be noted here rather than in the L section. [ List each security issue as a =head2 entry ] =head1 Incompatible Changes XXX For a release on a stable branch, this section aspires to be: There are no changes intentionally incompatible with 5.XXX.XXX If any exist, they are bugs, and we request that you submit a report. See L below. [ List each incompatible change as a =head2 entry ] =head2 Changes to the C<*> prototype The C<*> character in a subroutine's prototype used to allow barewords to take precedence over most, but not all subroutines. It was never consistent and exhibited buggy behaviour. Now it has been changed, so subroutines always take precedence over barewords, which brings it into conformity with similarly prototyped built-in functions: sub splat($) { ... } sub foo { ... } splat(foo); # now always splat(foo()) splat(bar); # still splat('bar') as before close(foo); # close(foo()) close(bar); # close('bar') =head1 Deprecations XXX Any deprecated features, syntax, modules etc. should be listed here. =head2 Module removals XXX Remove this section if inapplicable. The following modules will be removed from the core distribution in a future release, and will at that time need to be installed from CPAN. Distributions on CPAN which require these modules will need to list them as prerequisites. The core versions of these modules will now issue C<"deprecated">-category warnings to alert you to this fact. To silence these deprecation warnings, install the modules in question from CPAN. Note that these are (with rare exceptions) fine modules that you are encouraged to continue to use. Their disinclusion from core primarily hinges on their necessity to bootstrapping a fully functional, CPAN-capable Perl installation, not usually on concerns over their design. =over =item XXX XXX Note that deprecated modules should be listed here even if they are listed as an updated module in the L section. =back [ List each other deprecation as a =head2 entry ] =head1 Performance Enhancements XXX Changes which enhance performance without changing behaviour go here. There may well be none in a stable release. [ List each enhancement as a =item entry ] =over 4 =item * Subroutines with an empty prototype and bodies containing just C are now eligible for inlining. L<[perl #122728]|https://rt.perl.org/Ticket/Display.html?id=122728> =item * Subroutines in packages no longer need to carry typeglobs around with them. Declaring a subroutine will now put a simple sub reference in the stash if possible, saving memory. The typeglobs still notionally exist, so accessing them will cause the subroutine reference to be upgraded to a typeglob. This optimisation does not currently apply to XSUBs or exported subroutines, and method calls will undo it, since they cache things in typeglobs. L<[perl #120441]|https://rt.perl.org/Ticket/Display.html?id=120441> =back =head1 Modules and Pragmata XXX All changes to installed files in F, F, F and F go here. If Module::CoreList is updated, generate an initial draft of the following sections using F. A paragraph summary for important changes should then be added by hand. In an ideal world, dual-life modules would have a F file that could be cribbed. [ Within each section, list entries as a =item entry ] =head2 New Modules and Pragmata =over 4 =item * XXX =back =head2 Updated Modules and Pragmata =over 4 =item * L has been upgraded from version 2.00 to 2.02. Tests can now be run in parallel. =item * L has been upgraded from version 0.96 to 0.97. =item * L has been upgraded from version 0.22 to 0.23. =item * L has been upgraded from version 1.50 to 1.51. It provides a new C function, based on the existing C<< B::GV->SAFENAME >>, that converts "\cOPEN" to "^OPEN". =item * L has been upgraded from version 0.992 to 0.993. =item * L has been upgraded from version 1.27 to 1.28. It now deparses C)> and typed lexical (C) correctly. =item * L has been upgraded from version 0.37 to 0.38. =item * L has been upgraded from version 1.31 to 1.32. It now accepts fully-qualified constant names, allowing constants to be defined in packages other than the caller. =item * L has been upgraded from version 2.126 to 2.128. =item * L has been upgraded from version 0.008 to 0.010. =item * L has been upgraded from version 0.280217 to 0.280219. L<[perl #122675]|https://rt.perl.org/Ticket/Display.html?id=122675> =item * L has been upgraded from version 1.68 to 2.04. =item * L has been upgraded from version 1.65 to 1.68. L<[perl #122415]|https://rt.perl.org/Ticket/Display.html?id=122415> =item * L has been upgraded from version 1.27 to 1.28. C and C will now warn if passed inappropriate or misspelled options. =item * L has been upgraded from version 1.10 to 1.11. =item * L has been upgraded from version 0.047 to 0.049. =item * L has been upgraded from version 1.33 to 1.34. =item * L has been upgraded from version 0.31 to 0.32. =item * L has been upgraded from version 3.31 to 3.32. =item * L has been upgraded from version 5.021003 to 5.20140915. =item * L has been upgraded from version 1.22 to 1.23. =item * PathTools has been upgraded from version 3.49 to 3.50. =item * L has been upgraded from version 3.23 to 3.24. =item * L has been upgraded from version 1.42 to 1.43. The C99 math functions and constants (for example acosh, round, M_E, M_PI) have been added. =item * Scalar-List-Utils has been upgraded from version 1.39 to 1.41. =item * L has been upgraded from version 1.14 to 1.15. =item * L has been upgraded from version 3.32 to 3.33. =item * L has been upgraded from version 1.001003 to 1.001006. =item * L has been upgraded from version 1.95 to 1.96. =item * L has been upgraded from version 1.27 to 1.29. =item * L has been upgraded from version 0.9908 to 0.9909. =back =head2 Removed Modules and Pragmata =over 4 =item * XXX =back =head1 Documentation XXX Changes to files in F go here. Consider grouping entries by file and be sure to link to the appropriate page, e.g. L. =head2 New Documentation XXX Changes which create B files in F go here. =head3 L XXX Description of the purpose of the new file here =head2 Changes to Existing Documentation XXX Changes which significantly change existing files in F go here. However, any changes to F should go in the L section. =head3 L =over 4 =item * An ambiguity in the documentation of the Ellipsis statement has been corrected. L<[perl #122661]|https://rt.perl.org/Ticket/Display.html?id=122661> =back =head3 L =over 4 =item * Added a discussion of locale issues in XS code. =back =head1 Diagnostics The following additions or changes have been made to diagnostic output, including warnings and fatal error messages. For the complete list of diagnostic messages, see L. XXX New or changed warnings emitted by the core's C code go here. Also include any changes in L that reconcile it to the C code. =head2 New Diagnostics XXX Newly added diagnostic messages go under here, separated into New Errors and New Warnings =head3 New Errors =over 4 =item * XXX L =back =head3 New Warnings =over 4 =item * XXX L =back =head2 Changes to Existing Diagnostics XXX Changes (i.e. rewording) of diagnostic messages go here =over 4 =item * XXX Describe change here =back =head2 Diagnostic Removals =over 4 =item * "Constant is not a FOO reference" Compile-time checking of constant dereferencing (e.g., C<< my_constant->() >>) has been removed, since it was not taking overloading into account. L<[perl #69456]|https://rt.perl.org/Ticket/Display.html?id=69456> L<[perl #122607]|https://rt.perl.org/Ticket/Display.html?id=122607> =item * The warning "Ambiguous use of -foo resolved as -&foo()" has been removed. There is actually no ambiguity here, and this impedes the use of negated constants; e.g., C<-Inf>. =item * The little-known C syntax (see L and L) could get confused in the scope of C if C were a constant whose value contained Latin-1 characters. =back =head1 Utility Changes XXX Changes to installed programs such as F and F go here. Most of these are built within the directory F. [ List utility changes as a =head2 entry for each utility and =item entries for each change Use L with program names to get proper documentation linking. ] =head2 L =over 4 =item * XXX =back =head1 Configuration and Compilation XXX Changes to F, F, F, and analogous tools go here. Any other changes to the Perl build process should be listed here. However, any platform-specific changes should be listed in the L section, instead. [ List changes as a =item entry ]. =over 4 =item * XXX =back =head1 Testing XXX Any significant changes to the testing of a freshly built perl should be listed here. Changes which create B files in F go here as do any large changes to the testing harness (e.g. when parallel testing was added). Changes to existing files in F aren't worth summarizing, although the bugs that they represent may be covered elsewhere. [ List each test improvement as a =item entry ] =over 4 =item * XXX =back =head1 Platform Support XXX Any changes to platform support should be listed in the sections below. [ Within the sections, list each platform as a =item entry with specific changes as paragraphs below it. ] =head2 New Platforms XXX List any platforms that this version of perl compiles on, that previous versions did not. These will either be enabled by new files in the F directories, or new subdirectories and F files at the top level of the source tree. =over 4 =item XXX-some-platform XXX =back =head2 Discontinued Platforms XXX List any platforms that this version of perl no longer compiles on. =over 4 =item XXX-some-platform XXX =back =head2 Platform-Specific Notes XXX List any changes for specific platforms. This could include configuration and compilation changes or changes in portability/compatibility. However, changes within modules for platforms should generally be listed in the L section. =over 4 =item XXX-some-platform XXX =back =head1 Internal Changes XXX Changes which affect the interface available to C code go here. Other significant internal changes for future core maintainers should be noted as well. [ List each change as a =item entry ] =over 4 =item * C no longer does anything and has been moved to F. =item * C is a new API function that can be passed a CV or GV. It returns an SV containing the name of the subroutine for use in diagnostics. L<[perl #116735]|https://rt.perl.org/Ticket/Display.html?id=116735> L<[perl #120441]|https://rt.perl.org/Ticket/Display.html?id=120441> =item * C is a new API function that works like C, except that it allows the caller to specify whether the call checker requires a full GV for reporting the subroutine's name, or whether it could be passed a CV instead. Whatever value is passed will be acceptable to C. C guarantees there will be a GV, but it may have to create one on the fly, which is inefficient. L<[perl #116735]|https://rt.perl.org/Ticket/Display.html?id=116735> =item * C (which is not part of the API) is now a more complex macro, which may call a function and reify a GV. For those cases where is has been used as a boolean, C has been added, which will return true for CVs that notionally have GVs, but without reifying the GV. C also returns a GV now for lexical subs. L<[perl #120441]|https://rt.perl.org/Ticket/Display.html?id=120441> =item * Added L. Changing the program's locale should be avoided by XS code. Nevertheless, certain non-Perl libraries called from XS, such as C do so. When this happens, Perl needs to be told that the locale has changed. Use this function to do so, before returning to Perl. =back =head1 Selected Bug Fixes XXX Important bug fixes in the core language are summarized here. Bug fixes in files in F and F are best summarized in L. [ List each fix as a =item entry ] =over 4 =item * XXX =item * Constant dereferencing now works correctly for typeglob constants. Previously the glob was stringified and its name looked up. Now the glob itself is used. L<[perl #69456]|https://rt.perl.org/Ticket/Display.html?id=69456> =item * When parsing a funny character ($ @ % &) followed by braces, the parser no longer tries to guess whether it is a block or a hash constructor (causing a syntax error when it guesses the latter), since it can only be a block. =item * C now frees the referent immediately, instead of hanging on to it until the next statement. L<[perl #122556]|https://rt.perl.org/Ticket/Display.html?id=122556> =item * Various cases where the name of a sub is used (autoload, overloading, error messages) used to crash for lexical subs, but have been fixed. =item * Bareword lookup now tries to avoid vivifying packages if it turns out the bareword is not going to be a subroutine name. =item * Compilation of anonymous constants (e.g., C) no longer deletes any subroutine named C<__ANON__> in the current package. Not only was C<*__ANON__{CODE}> cleared, but there was a memory leak, too. This bug goes back to perl 5.8.0. =item * Stub declarations like C and C no longer wipe out constants of the same name declared by C. This bug was introduced in perl 5.10.0. =item * Under some conditions a warning raised in compilation of regular expression patterns could be displayed multiple times. This is now fixed. =item * C now works properly in many instances. Some names known to C<\N{...}> refer to a sequence of multiple characters, instead of the usual single character. Bracketed character classes generally only match single characters, but now special handling has been added so that they can match named sequences, but not if the class is inverted or the sequence is specified as the beginning or end of a range. In these cases, the only behavior change from before is a slight rewording of the fatal error message given when this class is part of a C construct. When the C<[...]> stands alone, the same non-fatal warning as before is raised, and only the first character in the sequence is used, again just as before. =item * Tainted constants evaluated at compile time no longer cause unrelated statements to become tainted. L<[perl #122669]|https://rt.perl.org/Ticket/Display.html?id=122669> =item * C, which vivifies a handle with a name like "main::_GEN_0", was not giving the handle the right reference count, so a double free could happen. =item * When deciding that a bareword was a method name, the parser would get confused if an "our" sub with the same name existed, and look up the method in the package of the "our" sub, instead of the package of the invocant. =item * The parser no longer gets confused by C<\U=> within a double-quoted string. It used to produce a syntax error, but now compiles it correctly. L<[perl #80368]|https://rt.perl.org/Ticket/Display.html?id=80368> =item * It has always been the intention for the C<-B> and C<-T> file test operators to treat UTF-8 encoded files as text. (L has been updated to say this.) Previously, it was possible for some files to be considered UTF-8 that actually weren't valid UTF-8. This is now fixed. The operators now work on EBCDIC platforms as well. =item * Under some conditions warning messages raised during regular expression pattern compilation were being output more than once. This has now been fixed. =item * A regression has been fixed that was introduced in v5.20.0 (fixed in v5.20.1 as well as here) in which a UTF-8 encoded regular expression pattern that contains a single ASCII lowercase letter does not match its uppercase counterpart. L<[perl #122655]|https://rt.perl.org/Ticket/Display.html?id=122655> =item * Constant folding could incorrectly suppress warnings if lexical warnings (C or C) were not in effect and C<$^W> were false at compile time and true at run time. =item * Loading UTF8 tables during a regular expression match could cause assertion failures under debugging builds if the previous match used the very same regular expression. L<[perl #122747]|https://rt.perl.org/Ticket/Display.html?id=122747> =item * Thread cloning used to work incorrectly for lexical subs, possibly causing crashes or double frees on exit. =item * Since perl 5.14.0, deleting C<$SomePackage::{__ANON__}> and then undefining an anonymous subroutine could corrupt things internally, resulting in L crashing or L giving nonsensical data. This has been fixed. =item * C<(caller $n)[3]> now reports names of lexical subs, instead of treating them as "(unknown)". =item * C now supports lexical subs for the comparison routine. =back =head1 Known Problems XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any tests that had to be Ced for the release would be noted here. Unfixed platform specific bugs also go here. [ List each fix as a =item entry ] =over 4 =item * XXX =back =head1 Errata From Previous Releases =over 4 =item * XXX Add anything here that we forgot to add, or were mistaken about, in the perldelta of a previous release. =back =head1 Obituary XXX If any significant core contributor has died, we've added a short obituary here. =head1 Acknowledgements XXX Generate this with: perl Porting/acknowledgements.pl v5.21.3..HEAD =head1 Reporting Bugs If you find what you think is a bug, you might check the articles recently posted to the comp.lang.perl.misc newsgroup and the perl bug database at https://rt.perl.org/ . There may also be information at http://www.perl.org/ , the Perl Home Page. If you believe you have an unreported bug, please run the L program included with your release. Be sure to trim your bug down to a tiny but sufficient test case. Your bug report, along with the output of C, will be sent off to perlbug@perl.org to be analysed by the Perl porting team. If the bug you are reporting has security implications, which make it inappropriate to send to a publicly archived mailing list, then please send it to perl5-security-report@perl.org. This points to a closed subscription unarchived mailing list, which includes all the core committers, who will be able to help assess the impact of issues, figure out a resolution, and help co-ordinate the release of patches to mitigate or fix the problem across all platforms on which Perl is supported. Please only use this address for security issues in the Perl core, not for modules independently distributed on CPAN. =head1 SEE ALSO The F file for an explanation of how to view exhaustive details on what changed. The F file for how to build Perl. The F file for general stuff. The F and F files for copyright information. =cut