=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.15.0 =head1 DESCRIPTION This document describes differences between the 5.15.0 release and the 5.14.0 release. If you are upgrading from an earlier release such as 5.YYY.YYY, first read L, which describes differences between 5.ZZZ.ZZZ and 5.YYY.YYY. Some of the changes have been included in Perl 5.14.1. These are indicated with a "(5.14.1)" marker. =head1 Notice XXX Any important notices here =head1 Core Enhancements XXX New core language features go here. Summarise 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 ] =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 [ List each incompatible change as a =head2 entry ] =head1 Deprecations XXX Any deprecated features, syntax, modules etc. should be listed here. In particular, deprecated modules should be listed here even if they are listed as an updated module in the L section. [ List each 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 * XXX =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, which prints stub entries to STDOUT. Results can be pasted in place of the '=head2' entries below. 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 1.29 to version 1.30. =item * L has been upgraded from version 1.03 to 1.05. It addresses two regressions in Perl 5.14.0: =over =item * Deparsing of the C operator and its diamond (C<< <> >>) form now works again [RT #90898] (5.14.1). =item * The presence of subroutines named C<::::> or C<::::::> no longer causes B::Deparse to hang (5.14.1). =back XXX Other Deparse fixes go here. =item * L has been upgraded from version 1.07 to 1.08. Its C function no longer refuses to write to copy-on-write scalars. =item * L has been upgraded from version 1.56 to version 1.57. Correct copy constructor usage. Fix polarwise formatting with numeric format specifier. More stable C algorithm. =item * L has been upgraded from version 0.14 to 0.15 =item * L has been upgraded from version 0.11 to 0.12. It fixes a problem with C<< open my $fh, ">", \$scalar >> not working if C<$scalar> is a copy-on-write scalar. =item * XXX If any changes are made, the version will need to be bumped again. What blead has is currently (as of a9d1f3db, 7th of June) identical to 5.14.1's version. L has been upgraded from version 3.15_03 to 3.15_04. It corrects the search paths on VMS [RT #90640]. =item * L has been upgraded from version 2.27 to version 2.28. It no longer turns copy-on-write scalars into read-only scalars when freezing and thawing. =item * L has been upgraded from version 1.9721_01 to version 1.9722. Portability fix, and avoiding some compiler warnings. =item * L has been upgraded from version 2.49 to 2.50. Updated for v5.12.4. =item * XXX =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 =item * C, C and C are now listed in L (5.14.1). =back =head3 L =over =item * L has been expanded with examples using the new C syntax introduced in Perl 5.14.0 (5.14.1). =back =head3 L =over 4 =item * The explanation of bitwise operators has been expanded to explain how they work on Unicode strings (5.14.1). =item * The section on the triple-dot or yada-yada operator has been moved up, as it used to separate two closely related sections about the comma operator (5.14.1). =item * More examples for C have been added (5.14.1). =item * The C<<< <<\FOO >>> here-doc syntax has been documented (5.14.1). =back =head3 L =over =item * L has undergone a significant clean-up. Most notably, the B<-0x...> form of the B<-0> flag has been clarified, and the final section on environment variables has been corrected and expanded (5.14.1). =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. [ Within each section, list entries as a =item entry ] =head2 New Diagnostics XXX Newly added diagnostic messages go here =over 4 =item * Assigning to a temporary scalar returned from an XS lvalue subroutine now produces a warning: "Useless assignment to a temporary". This should help PDL users [RT #31946]. =back =head2 Changes to Existing Diagnostics XXX Changes (i.e. rewording) of diagnostic messages go here =over 4 =item * XXX =back =head1 Utility Changes XXX Changes to installed programs such as F and F go here. Most of these are built within the directories F and F. [ List utility changes as a =head3 entry for each utility and =item entries for each change Use L with program names to get proper documentation linking. ] =head3 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 * F has been modified for compatibility with GCC's B<-Werror> option, as used by some projects that include perl's header files (5.14.1). =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 summarising, 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. =over 4 =item * The compiled representation of formats is now stored via the mg_ptr of their PERL_MAGIC_fm. Previously it was stored in the string buffer, beyond SvLEN(), the regular end of the string. SvCOMPILED() and SvCOMPILED_{on,off}() now exist solely for compatibility for XS code. The first is always 0, the other two now no-ops. =back =head1 Selected Bug Fixes XXX Important bug fixes in the core language are summarised here. Bug fixes in files in F and F are best summarised in L. [ List each fix as a =item entry ] =over 4 =item * The new (in 5.14.0) regular expression modifier C when repeated like C forbids the characters outside the ASCII range that match characters inside that range from matching under C. This did not work under some circumstances, all involving alternation, such as: "\N{KELVIN SIGN}" =~ /k|foo/iaa; succeeded inaprropriately. This is now fixed. =item * 5.14.0 introduced some memory leaks in regular expression character classes such as C<[\w\s]>, which have now been fixed (5.14.1). =item * An edge case in regular expression matching could potentially loop. This happened only under C in bracketed character classes that have characters with multi-character folds, and the target string to match against includes the first portion of the fold, followed by another character that has a multi-character fold that begins with the remaining portion of the fold, plus some more. "s\N{U+DF}" =~ /[\x{DF}foo]/i is one such case. C<\xDF> folds to C<"ss"> (5.14.1). =item * A few characters in regular expression pattern matches did not match correctly in some circumstances, all involving C. The affected characters are: COMBINING GREEK YPOGEGRAMMENI, GREEK CAPITAL LETTER IOTA, GREEK CAPITAL LETTER UPSILON, GREEK PROSGEGRAMMENI, GREEK SMALL LETTER IOTA WITH DIALYTIKA AND OXIA, GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS, GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND OXIA, GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS, LATIN SMALL LETTER LONG S, LATIN SMALL LIGATURE LONG S T, and LATIN SMALL LIGATURE ST. =item * Formats: number of edge cases have been fixed with formats and formline; in particular, where the format itself is potentially variable (such as with ties and overloading), and where the format and data differ in their encoding. In both these cases, it used to possible for the output to be corrupted. =item * A bug has been fixed that would cause a "Use of freed value in iteration" error if the next two hash elements that would be iterated over are deleted [RT #85026] (5.14.1). =item * Passing the same constant subroutine to both C and C no longer causes one or the other to fail [RT #89218] (5.14.1). =item * XXX Someone tell me whether this first clause is correct (see commit 765f542d): Copy-on-write scalars were introduced in 5.10.0. These occur when C<__PACKAGE__> or a hash key is a assigned to a scalar. Several parts of Perl were not updated to account for them, but have now been fixed: =over =item * C had a nasty bug that would modify copy-on-write scalars' string buffers in place (i.e., skipping the copy). This could result in hashes having two elements with the same key [RT #91834]. =item * Lvalue subroutines were not allowing COW scalars to be returned. This was fixed for lvalue scalar context in Perl 5.12.3 and 5.14.0, but list context was not fixed until this release. =item * Elements of restricted hashes (see the L pragma) containing copy-on-write values couldn't be deleted, nor could such hashes be cleared (C<%hash = ()>). =item * Localising a tied variable used to make it read-only if it contained a copy-on-write string. =item * L, L and L had similar problems. See L, above. =back =item * There have been various fixes to lvalue subroutines: XXX Should these first three go under New Features? =over =item * Explicit return now returns the actual argument passed to return, instead of copying it [RT #72724]. =item * Lvalue subroutines used to enforce lvalue syntax (i.e., whatever can go on the left-hand side of C<=>) for the last statement and the arguments to return. Since lvalue subroutines are not always called in lvalue context, this restriction has been lifted. =item * Lvalue subroutines are less restrictive as to what values can be returned. It used to croak on values returned by C and C and from other subroutines, but no longer does so. =item * Empty lvalue subroutines (C) used to return C<@_> in list context. In fact, all subroutines used to, but regular subs were fixed in Perl 5.8.2. Now lvalue subroutines have been likewise fixed. =item * Lvalue subroutines used to copy their return values in rvalue context. Not only was this a waste of CPU cycles, but it also caused bugs. A C<($)> prototype would cause an lvalue sub to copy its return value [RT #62498], and C would loop endlessly [RT #78680]. =item * Autovivification now works on values returned from lvalue subroutines [RT #7946]. =item * XXX This entry is probably too sarcastic in its use of "inanities". But I'm too tired to think of a better wording. When called in pass-by-reference context (e.g., subroutine arguments or a list passed to C), an lvalue subroutine returning arrays or hashes used to bind the arrays (or hashes) to scalar variables--something that is not supposed to happen. This could result in "Bizzare copy of ARRAY" errors or C ignoring its arguments. It also made inanities like C<@{\$_}> "work". This was fixed in 5.14.0 if an array were the first thing returned from the subroutine (but not for C<$scalar, @array> or hashes being returned). Now a more general fix has been applied [RT #23790]. =back =item * List assignment to lexical variables declared with attributes in the same statement (C) stopped working in Perl 5.8.0. It has now been fixed. =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, unless they were specific to a particular platform (see below). This is a list of some significant unfixed bugs, which are regressions from either 5.XXX.XXX or 5.XXX.XXX. [ List each fix as a =item entry ] =over 4 =item * XXX =back =head1 Obituary XXX If any significant core contributor has died, we've added a short obituary here. =head1 Acknowledgements XXX The list of people to thank goes here. =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 http://rt.perl.org/perlbug/ . 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 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