X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/0d4476e95f2eba8a8d6a9e40ebc667abda352891..4de751aa8a27866a3e6ceb6f13d09e9cba8ace55:/pod/perldelta.pod diff --git a/pod/perldelta.pod b/pod/perldelta.pod index ce241e6..e5e5dbf 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -2,399 +2,480 @@ =head1 NAME -perldelta - what is new for perl v5.23.9 +perldelta - what is new for perl v5.25.1 =head1 DESCRIPTION -This document describes differences between the 5.23.8 release and the 5.23.9 +This document describes differences between the 5.25.0 release and the 5.25.1 release. -If you are upgrading from an earlier release such as 5.23.7, first read -L, which describes differences between 5.23.7 and 5.23.8. +If you are upgrading from an earlier release such as 5.24.0, first read +L, which describes differences between 5.24.0 and 5.25.0. + +=head1 Notice + +XXX Any important notices here =head1 Core Enhancements -=head2 perl will now croak when closing an in-place output file fails +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. -Until now, failure to close the output file for an in-place edit was not -detected, meaning that the input file could be clobbered without the edit being -successfully completed. Now, when the output file cannot be closed -successfully, an exception is raised. +[ List each enhancement as a =head2 entry ] =head1 Security -=head2 Remove duplicate environment variables from C +XXX Any security-related notices go here. In particular, any security +vulnerabilities closed should be noted here rather than in the +L section. -Previously, if an environment variable appeared more than once in -C, C<%ENV> would contain the last entry for that name, -while a typical C would return the first entry. We now -make sure C<%ENV> contains the same as what C returns. +[ List each security issue as a =head2 entry ] -Second, we remove duplicates from C, so if a setting -with that name is set in C<%ENV> we won't pass an unsafe value -to a child process. +=head2 require ::Foo::Bar is now illegal. -[CVE-2016-2381] +Formerly, C would try to read F. Now any +bareword require which starts with a double colon dies instead. -=head1 Performance Enhancements +=head2 Unescaped literal C<"{"> characters in regular expression +patterns are no longer permissible -=over 4 +You have to now say something like C<"\{"> or C<"[{]"> to specify to +match a LEFT CURLY BRACKET. This will allow future extensions to the +language. This restriction is not enforced, nor are there current plans +to enforce it, if the C<"{"> is the first character in the pattern. -=item * +These have been deprecated since v5.16, with a deprecation message +displayed starting in v5.22. + +=head2 Literal control character variable names are no longer permissible + +A variable name may no longer contain a literal control character under +any circumstances. These previously were allowed in single-character +names on ASCII platforms, but have been deprecated there since Perl +v5.20. This affects things like C<$I<\cT>>, where I<\cT> is a literal +control (such as a C or C character) in the +source code. + +=head2 C is no longer permissible + +Using more than one C regular expression pattern modifier on a +single pattern is now forbidden. This is to allow a future enhancement +to the language. This usage has been deprecated since v5.22. + +=head2 C is no longer permissible in C<\N{...}> + +The name of a character may no longer contain non-breaking spaces. It +has been deprecated to do so since Perl v5.22. + +=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 number of calls to C has been reduced. This -optimizes the compilation of inverted character classes. +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 -=head1 Modules and Pragmata +[ List each other deprecation as a =head2 entry ] -=head2 Updated Modules and Pragmata +=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 * -L has been upgraded from version 1.08 to 1.11. +Bareword constant strings are now permitted to take part in constant +folding. They were originally exempted from constant folding in August 1999, +during the development of Perl 5.6, to ensure that C +would still apply to bareword constants. That has now been accomplished a +different way, so barewords, like other constants, now gain the performance +benefits of constant folding. -=item * +This also means that void-context warnings on constant expressions of +barewords now report the folded constant operand, rather than the operation; +this matches the behaviour for non-bareword constants. -L has been upgraded from version 1.04 to 1.05. +=back -=item * +=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. -L has been upgraded from version 1.38 to 1.40. +[ Within each section, list entries as a =item entry ] -C now returns the error in scalar context. [CPAN #107225] +=head2 New Modules and Pragmata + +=over 4 =item * -L has been upgraded from version 1.24 to 1.25. +XXX -It now exports Winsock error constants. +=back -=item * +=head2 Updated Modules and Pragmata -L has been upgraded from version 1.32 to 1.33. +=over 4 =item * -L has been upgraded from version 1.33 to 1.34. - =item * -L has been upgraded from version 1.25 to 1.26. +L has been upgraded from version 1.68 to 1.69. This remedies several +defects in making its symbols exportable. [perl #127821] -=item * +=back + +=head2 Removed Modules and Pragmata -L has been upgraded from version 2.05 to 2.06_01. +=over 4 =item * -L has been upgraded from version 1.42_01 to 1.42_02. +XXX -=item * +=back -L has been upgraded from version 5.20160121 to -5.20160320. +=head1 Documentation -=item * +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. -L has been upgraded from version 1.09 to 1.10. +=head2 New Documentation -=item * +XXX Changes which create B files in F go here. -L has been upgraded from version 1.63 to 1.64. +=head3 L -It now exports Winsock error constants. +XXX Description of the purpose of the new file here -=item * +=head2 Changes to Existing Documentation -L has been upgraded from version 1.42_01 to 1.42_02. +XXX Changes which significantly change existing files in F go here. +However, any changes to F should go in the L +section. -=item * +=head3 L -L has been upgraded from version 1.22 to 1.23. +=over 4 =item * -L has been upgraded from version 2.020_02 to 2.020_03. +XXX Description of the change here -=item * +=back -L has been upgraded from version 2.55 to 2.56. +=head1 Diagnostics -=item * +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. -L has been upgraded from version 1.10 to 1.11. +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. -Narrowed the filename check. +=head2 New Diagnostics -=item * +XXX Newly added diagnostic messages go under here, separated into New Errors +and New Warnings + +=head3 New Errors -L has been upgraded from version 3.07 to 3.08. +=over 4 =item * -L has been upgraded from version 2.05 to 2.06. +L =item * -L has been upgraded from version 1.01 to 1.02. +L =item * -L has been upgraded from version 1.9730 to 1.9732. +L =item * -L has been upgraded from version 0.9909 to 0.9916. +L + +=back + +=head3 New Warnings + +=over 4 =item * -L has been upgraded from version 1.35 to 1.36. +XXX L + +=back + +=head2 Changes to Existing Diagnostics -Narrowed the filename check. +XXX Changes (i.e. rewording) of diagnostic messages go here + +=over 4 =item * -L has been upgraded from version 0.1202 to 0.1203. +Code like C<$x = $x . "a"> was incorrectly failing to yield a +L +warning when C<$x> was a lexical variable with an undefined value. That has +now been fixed. [perl #127877] =back -=head1 Documentation +=head1 Utility Changes -=head2 Changes to Existing Documentation +XXX Changes to installed programs such as F and F go here. +Most of these are built within the directory F. -=head3 L +[ 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 * -The L manual page got a cleanup: there's more consistency now -(in POD usage, grammar, code examples), better practices in code examples -(use of C, removal of bareword filehandles, dropped usage of C<&> -when calling subroutines, ...), etc. +Long lines in the message body are now wrapped at 900 characters, to stay +well within the 1000-character limit imposed by SMTP mail transfer agents. +This is particularly likely to be important for the list of arguments to +C, which can readily exceed the limit if, for example, it names +several non-default installation paths. This change also adds the first unit +tests for perlbug. [perl #128020] =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 * -Dtrace builds now build successfully on systems with a newer dtrace -that require an input object file that uses the probes in the F<.d> -file. - -Previously the probe would fail and cause a build failure. [perl -#122287] +C now builds C and C if you +invoke it with C<-Dusecrosscompiler> but not C<-Dtargethost=somehost>. +This means you can supply your target platform C, generate +the headers and proceed to build your cross-target perl. [perl #127234] =item * -F no longer warns if a module doesn't contain documentation, -as this isn't actually an error. Now missing documentation will only -be reported when using the B<--verbose> switch, and if it does, the -missing documentation will be reported on C instead of C. +Builds with C<-Accflags=-DPERL_TRACE_OPS> now only dump the operator +counts when the environment variable C to be set to a +non-zero integer. This allows C to pass on such a build. =item * -The B option to the C command was removed. This was redundant -anyway, and on some systems, it caused a warning. +When building with GCC 6 and link-time optimization (the C<-flto> option to +C), C was treating all probed symbols as present on the +system, regardless of whether they actually exist. This has been fixed. +[perl #128131] =item * -Added F probes for C, C, and C. +The F library is used for internal testing of Perl itself, and +also copied by several CPAN modules. Some of those modules must work on +older versions of Perl, so F must in turn avoid newer Perl +features. Compatibility with Perl 5.8 was inadvertently removed some time +ago; it has now been restored. [perl #128052] =item * -Fix up dtrace compile/link for Solaris. [perl #127543] +The build process no longer emits an extra blank line before building each +"simple" extension (those with only F<*.pm> and F<*.pod> files). =back -=head1 Platform Support +=head1 Testing -=head2 Platform-Specific Notes +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 Win32 +=item * -=over +XXX -=item * +=back + +=head1 Platform Support -Building a 64-bit perl with a 64-bit GCC but a 32-bit gmake would -result in an invalid C<$Config{archname}> for the resulting perl. -[perl #127584] +XXX Any changes to platform support should be listed in the sections below. -=item * +[ Within the sections, list each platform as a =item entry with specific +changes as paragraphs below it. ] -Errors set by Winsock functions are now put directly into C<$^E>, and the -relevant C error codes are now exported from the L and L -modules for testing this against. +=head2 New Platforms -The previous behaviour of putting the errors (converted to POSIX-style C -error codes since Perl 5.20.0) into C<$!> was buggy due to the non-equivalence -of like-named Winsock and POSIX error constants, a relationship between which -has unfortunately been established in one way or another since Perl 5.8.0. +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. -The new behaviour provides a much more robust solution for checking Winsock -errors in portable software without accidentally matching POSIX tests that were -intended for other OSes and may have different meanings for Winsock. +=over 4 -The old behaviour is currently retained, warts and all, for backwards -compatibility, but users are encouraged to change any code that tests C<$!> -against C constants for Winsock errors to instead test C<$^E> against -C constants. After a suitable deprecation period, the old behaviour may -be removed, leaving C<$!> unchanged after Winsock function calls, to avoid any -possible confusion over which error variable to check. +=item XXX-some-platform -=back +XXX =back -=head1 Selected Bug Fixes +=head2 Discontinued Platforms -=over 4 +XXX List any platforms that this version of perl no longer compiles on. -=item * +=over 4 -It now works properly to specify a user-defined property, such as +=item XXX-some-platform - qr/\p{mypkg1::IsMyProperty}/i +XXX -with C caseless matching, an explicit package name, and -I not defined at the time of the pattern compilation. +=back -=item * +=head2 Platform-Specific Notes -Perl's memcpy(), memmove(), memset() and memcmp() fallbacks are now -more compatible with the originals. [perl #127619] +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. -=item * +=over 4 -The peak memory usage when compiling some regular expression patterns is -now significantly smaller. [perl #127392] +=item XXX-some-platform -=item * +XXX -A case has been fixed in which malformed UTF-8 in the source of a Perl -script caused an assertion failure instead of an error message. [perl -#127262] +=back -=item * +=head1 Internal Changes -Fixed a buffer overrun issue in F which was reported by Coverity. -[CPAN #111707] +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. -=item * +[ List each change as a =item entry ] -Fixed a possible division by 0 error in C -(reported by Coverity). [CPAN #105415] +=over 4 =item * -Fixed the issue where a C<< s///r >>) with B<< -DPERL_NO_COW >> attempts -to modify the source SV, resulting in the program dying. [perl #127635] - -=item * +Perl is now built with the C compiler define enabled by +default. To disable it, use the C compiler define. +This flag alters how the C field is used in C structures, +and has been available optionally since perl 5.22.0. -Fixed a spurious warning about posix character classes. [perl #127581] +See L for more details of what this +build option does. -=item * +=back -Fixed an obscure case where a pattern could fail to match. This only -occurred when matching characters from the set of C1 controls, when -the target matched string was in UTF-8, and only on EBCDIC platforms. +=head1 Selected Bug Fixes -=item * +XXX Important bug fixes in the core language are summarized here. Bug fixes in +files in F and F are best summarized in L. -Fixed over eager warnings for C<< /[.foo.]/ >>. +[ List each fix as a =item entry ] -This prevents Perl from warning about constructs like C<< /[.].*[.]/ >>. -[perl #127582, #127604] +=over 4 =item * -Narrow the filename check in F and F. Previously, -it assumed that if the filename (without the F<.pmc?> extension) differed -from the package name, if was a misspelled use statement (i.e. C -instead of C). We now check whether there's really a -miscapitalization happening, and not another issue. - -=item * +Expressions containing an C<&&> or C<||> operator (or their synonyms C +and C) were being compiled incorrectly in some cases. If the left-hand +side consisted of either a negated bareword constant or a negated C +block containing a constant expression, and the right-hand side consisted of +a negated non-foldable expression, one of the negations was effectively +ignored. The same was true of C and C statement modifiers, +though with the left-hand and right-hand sides swapped. This long-standing +bug has now been fixed. [perl #127952] -Turn an assertion into a more user friendly failure when parsing -regexes. [perl #127599] +=back -=item * +=head1 Known Problems -Correctly raise an error when trying to compile patterns with -unterminated character classes while there are trailing backslashes. -[perl #126141]. +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. -=item * +[ List each fix as a =item entry ] -Added a guard against malformed UTF-8. [perl #127262] +=over 4 =item * -Only test C if we have everything needed to use it. In a FreeBSD -the C entry point may exist, but it can be disabled by policy. -[perl #127533] +XXX -=item * - -Handle C regops and C regops in C properly. -[perl #126206] +=back -=item * +=head1 Errata From Previous Releases -Fix a Solaris optimiser bug which prevented certain regular expression -to be compiled. [perl #127455] +=over 4 =item * -Improved the detection of infinite recursion in regular expressions. -Previously, perl would in certain cases slowly consume resources until -finally running out of memory. [perl #126182] - +XXX Add anything here that we forgot to add, or were mistaken about, in +the perldelta of a previous release. =back -=head1 Acknowledgements - -Perl 5.23.9 represents approximately 4 weeks of development since Perl 5.23.8 -and contains approximately 21,000 lines of changes across 230 files from 23 -authors. +=head1 Obituary -Excluding auto-generated files, documentation and release tools, there were -approximately 8,500 lines of changes to 120 .pm, .t, .c and .h files. +XXX If any significant core contributor has died, we've added a short obituary +here. -Perl continues to flourish into its third decade thanks to a vibrant community -of users and developers. The following people are known to have contributed the -improvements that became Perl 5.23.9: - -Abigail, Alex Vandiver, Andy Broad, Aristotle Pagaltzis, Chris 'BinGOs' -Williams, Craig A. Berry, Dagfinn Ilmari Mannsåker, Daniel Dragan, David -Mitchell, Father Chrysostomos, H.Merijn Brand, Jarkko Hietaniemi, John Peacock, -Karl Williamson, Leon Timmermans, Lukas Mai, Matthew Horsfall, Ricardo Signes, -Sawyer X, Shlomi Fish, Steve Hay, Tony Cook, Yves Orton. - -The list above is almost certainly incomplete as it is automatically generated -from version control history. In particular, it does not include the names of -the (very much appreciated) contributors who reported issues to the Perl bug -tracker. +=head1 Acknowledgements -Many of the changes included in this version originated in the CPAN modules -included in Perl's core. We're grateful to the entire CPAN community for -helping Perl to flourish. +Generate this with: -For a more complete list of all of Perl's historical contributors, please see -the F file in the Perl source distribution. + perl Porting/acknowledgements.pl v5.25.1..HEAD =head1 Reporting Bugs @@ -408,15 +489,10 @@ 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. +If the bug you are reporting has security implications which make it +inappropriate to send to a publicly archived mailing list, then see +L +for details of how to report the issue. =head1 SEE ALSO