X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/07ec6dc6c1e9a3a06ac5059d954fcec1dde7945d..bdab7676902d2f95f6fad47110f6e94e386db556:/pod/perldelta.pod diff --git a/pod/perldelta.pod b/pod/perldelta.pod index d8e0a4c..9da5db5 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -27,6 +27,15 @@ 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 @@ -45,6 +54,23 @@ XXX For a release on a stable branch, this section aspires to be: [ 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. @@ -89,7 +115,8 @@ 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] =back @@ -123,13 +150,45 @@ L has been upgraded from version A.xx to B.yy. =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 2.126 to 2.128. + +=item * + +L has been upgraded from version 0.280216 to 0.280219. +[perl #122675]. + +=item * + +L has been upgraded from version 1.65 to 1.66. +[perl #122415]. + +=item * + +L: Documentation has been added to +F concerning handling of locales when writing +XS code. + +=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 0.992 to 0.993. +L has been upgraded from version 1.10 to 1.11. =item * @@ -143,14 +202,24 @@ L has been upgraded from version 5.021003 to 5.021004. 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 * L has been upgraded from version 3.23 to 3.24. =item * +Scalar-List-Utils has been upgraded from version 1.40 to 1.41. + +=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 1.95 to 1.96. @@ -194,6 +263,11 @@ section. XXX Description of the change here +=item * + +L: An ambiguity in the documentation of the Ellipsis statement has +been corrected. [perl #122661] + =back =head1 Diagnostics @@ -242,6 +316,32 @@ 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. [perl #69456] [perl #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. @@ -355,11 +455,8 @@ well. =over 4 -=item * - -The parser no longer gets confused by C<\U=> within a double-quoted string. -It used to roduce a syntax error, but now compile it correctly. -[perl #80368] +C no longer does anything and has been moved to +F. =back @@ -376,6 +473,128 @@ files in F and F are best summarized in L. 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 * + +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. [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 =head1 Known Problems