X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/1c43698bb7a30756ad27d5ff52376ba1d596e8bb..07600c147206f87bb71e342e64acb1cb7789fe1c:/pod/perldelta.pod diff --git a/pod/perldelta.pod b/pod/perldelta.pod index d110482..1c20e7f 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -5,15 +5,15 @@ [ 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.3 +perldelta - what is new for perl v5.21.4 =head1 DESCRIPTION -This document describes differences between the 5.21.2 release and the 5.21.3 +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.1, first read -L, which describes differences between 5.21.1 and 5.21.2. +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 @@ -21,30 +21,87 @@ XXX Any important notices here =head1 Core Enhancements -=head2 C is no longer fatal +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. -In 5.21.1, C was made fatal. This has been relaxed -to not die if the argument is assigning to an array. +[ 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 -=head2 The L module could allow outside packages to be replaced +XXX Any security-related notices go here. In particular, any security +vulnerabilities closed should be noted here rather than in the +L section. -Critical bugfix: outside packages could be replaced. L has -been patched to 2.38 to address this. +[ List each security issue as a =head2 entry ] =head1 Incompatible Changes -=head2 S> is now a fatal error +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 -Importing functions from C has been deprecated since v5.12, and -is now a fatal error. S> without any arguments is still -allowed. +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 @@ -58,131 +115,171 @@ There may well be none in a stable release. =item * -XXX +Subroutines with an empty prototype and bodies containing just C are +now eligible for inlining. [perl #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. [perl #120441] =back =head1 Modules and Pragmata -=head2 Updated 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 * -L has been upgraded from version 1.19 to 1.21 +XXX + +=back -=item * +=head2 Updated Modules and Pragmata -L has been upgraded from version 0.20 to 0.22. +=over 4 =item * -L has been upgraded from version 2.141520 to 2.142060. +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 2.125 to 2.126. +L has been upgraded from version 0.992 to 0.993. =item * -L has been upgraded from version 1.64 to 1.65. +L has been upgraded from version 1.27 to 1.28. -The MANIFEST is now opened with C<:raw>, to prevent Cs leaking in. +It now deparses C)> and typed lexical (C) +correctly. =item * -L has been upgraded from version 0.043 to 0.047. +L has been upgraded from version 2.126 to 2.128. =item * -L has been upgraded from version 1.45 to 1.46. - -Fixed the scope level handling of the debugger's C command. +L has been upgraded from version 0.280216 to 0.280219. +[perl #122675]. =item * -L has been upgraded from version 1.41 to 1.42. - -Replaced the thread-unsafe code used to prevent duplicate warning -messages for using the isxxx() functions. [perl #122476] +L has been upgraded from version 1.65 to 1.66. +[perl #122415]. =item * -L has been upgraded from version 2.37 to 2.38. - -Critical bugfix: outside packages could be replaced. +L: Documentation has been added to +F concerning handling of locales when writing +XS code. =item * -L has been upgraded from version 2.014 to 2.015. +L has been upgraded from version 1.27 to 1.28. -Test suite updates, particularly useful for Solaris and cygwin, and -a slight change to the pattern used for IPv4 address matching. +C and C will now warn if passed inappropriate or +misspelled options. -=back +=item * -=head1 Documentation +L has been upgraded from version 1.10 to 1.11. -=head2 Changes to Existing Documentation +=item * -=head3 L +L has been upgraded from version 0.047 to 0.048. -=over 4 +=item * + +L has been upgraded from version 5.021003 to 5.021004. =item * -Added reference to L. +L has been upgraded from version 1.42 to 1.43. -=back +The C99 math functions and constants (for example acosh, round, +M_E, M_PI) have been added. -=head3 L +=item * -=over 4 +L has been upgraded from version 3.23 to 3.24. =item * -Details on C level symbols and libperl.t added. +Scalar-List-Utils has been upgraded from version 1.40 to 1.41. -=back +=item * -=head3 L +L has been upgraded from version 1.31 to 1.32. -=over 4 +It now accepts fully-qualified constant names, allowing constants to be +defined in packages other than the caller. =item * -Recommended replacements for tmpfile, atoi, strtol, and strtoul added. - +L has been upgraded from version 1.95 to 1.96. + =back -=head3 L +=head2 Removed Modules and Pragmata =over 4 =item * -ASCII v. EBCDIC clarifications added. +XXX =back -=head3 L +=head1 Documentation -=over 4 +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. -=item * +=head2 New Documentation -Comments added on algorithmic complexity and tied hashes. +XXX Changes which create B files in F go here. -=back +=head3 L + +XXX Description of the purpose of the new file here -=head3 L +=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 * -Updated documentation on environment and shell interaction in VMS. +XXX Description of the change here + +=item * + +L: An ambiguity in the documentation of the Ellipsis statement has +been corrected. [perl #122661] =back @@ -216,60 +313,64 @@ XXX L =item * -L +XXX L -(W overflow) The hexadecimal floating point has larger exponent -than the floating point supports. +=back -=item * +=head2 Changes to Existing Diagnostics -L +XXX Changes (i.e. rewording) of diagnostic messages go here -(W overflow) The hexadecimal floating point has smaller exponent -than the floating point supports. +=over 4 =item * -L - -(F) Something went horribly bad in hexadecimal float handling. +XXX Describe change here -=item * +=back -L +=head2 Diagnostic Removals -(W overflow) The hexadecimal floating point literal had more bits in -the mantissa (the part between the 0x and the exponent, also known as -the fraction or the significand) than the floating point supports. +=over 4 =item * -L +"Constant is not a FOO reference" -(W overflow) The hexadecimal floating point had internally more -digits than could be output. This can be caused by unsupported -long double formats, or by 64-bit integers not being available -(needed to retrieve the digits under some configurations). +Compile-time checking of constant dereferencing (e.g., +C<< my_constant->() >>) has been removed, since it was not taking +overloading into account. [perl #69456] [perl #122607] =item * -L +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>. -(F) You have configured Perl to use long doubles but -the internals of the long double format are unknown, -therefore the hexadecimal float output is impossible. +=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 -=head2 Changes to Existing Diagnostics +=head1 Utility Changes -XXX Changes (i.e. rewording) of diagnostic messages go here +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 Describe change here +XXX =back @@ -286,7 +387,7 @@ L section, instead. =item * -Internal handling of floating point values has been improved. +XXX =back @@ -315,6 +416,33 @@ 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 @@ -342,15 +470,32 @@ well. =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. +C no longer does anything and has been moved to +F. =item * -Added L as a safer replacement for atoi and strtol. +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. +[perl #116735] [perl #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. +[perl #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. [perl #120441] =back @@ -365,22 +510,129 @@ files in F and F are best summarized in L. =item * -Failing to compile C in an eval could leave a spurious -C subroutine definition, which would produce a "Subroutine -BEGIN redefined" warning on the next use of C, or other C -block. [perl #122107] +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. [perl #69456] =item * -C syntax now correctly parses the arguments if they -begin with an opening brace. [perl #46947] +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 * -External libraries and Perl may have different ideas of what the locale is. -This is problematic when parsing version strings if the locale's numeric -separator has been changed. Version parsing has been patched to ensure -it handles the locales correctly. [perl #121930] +C now frees the referent immediately, instead of hanging +on to it until the next statement. [perl #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. [perl #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 roduce a syntax error, but now compiles it correctly. +[perl #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. [perl #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. [perl #122747] + +=item * + +Thread cloning used to work incorrectly for lexical subs, possibly causing +crashes or double frees on exit. =back @@ -411,11 +663,16 @@ 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.2..HEAD + perl Porting/acknowledgements.pl v5.21.3..HEAD =head1 Reporting Bugs