diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 19:43:11 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 19:43:11 +0000 |
commit | fc22b3d6507c6745911b9dfcc68f1e665ae13dbc (patch) | |
tree | ce1e3bce06471410239a6f41282e328770aa404a /upstream/fedora-40/man1/perl5220delta.1 | |
parent | Initial commit. (diff) | |
download | manpages-l10n-fc22b3d6507c6745911b9dfcc68f1e665ae13dbc.tar.xz manpages-l10n-fc22b3d6507c6745911b9dfcc68f1e665ae13dbc.zip |
Adding upstream version 4.22.0.upstream/4.22.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'upstream/fedora-40/man1/perl5220delta.1')
-rw-r--r-- | upstream/fedora-40/man1/perl5220delta.1 | 3128 |
1 files changed, 3128 insertions, 0 deletions
diff --git a/upstream/fedora-40/man1/perl5220delta.1 b/upstream/fedora-40/man1/perl5220delta.1 new file mode 100644 index 00000000..cb1a38d5 --- /dev/null +++ b/upstream/fedora-40/man1/perl5220delta.1 @@ -0,0 +1,3128 @@ +.\" -*- mode: troff; coding: utf-8 -*- +.\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. +.ie n \{\ +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds C` +. ds C' +'br\} +.\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" +.\" If the F register is >0, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.\" +.\" Avoid warning from groff about undefined register 'F'. +.de IX +.. +.nr rF 0 +.if \n(.g .if rF .nr rF 1 +.if (\n(rF:(\n(.g==0)) \{\ +. if \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. if !\nF==2 \{\ +. nr % 0 +. nr F 2 +. \} +. \} +.\} +.rr rF +.\" ======================================================================== +.\" +.IX Title "PERL5220DELTA 1" +.TH PERL5220DELTA 1 2024-01-25 "perl v5.38.2" "Perl Programmers Reference Guide" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh +.SH NAME +perl5220delta \- what is new for perl v5.22.0 +.SH DESCRIPTION +.IX Header "DESCRIPTION" +This document describes differences between the 5.20.0 release and the 5.22.0 +release. +.PP +If you are upgrading from an earlier release such as 5.18.0, first read +perl5200delta, which describes differences between 5.18.0 and 5.20.0. +.SH "Core Enhancements" +.IX Header "Core Enhancements" +.SS "New bitwise operators" +.IX Subsection "New bitwise operators" +A new experimental facility has been added that makes the four standard +bitwise operators (\f(CW\*(C`& | ^ ~\*(C'\fR) treat their operands consistently as +numbers, and introduces four new dotted operators (\f(CW\*(C`&. |. ^. ~.\*(C'\fR) that +treat their operands consistently as strings. The same applies to the +assignment variants (\f(CW\*(C`&= |= ^= &.= |.= ^.=\*(C'\fR). +.PP +To use this, enable the "bitwise" feature and disable the +"experimental::bitwise" warnings category. See "Bitwise String +Operators" in perlop for details. +[GH #14348] <https://github.com/Perl/perl5/issues/14348>. +.SS "New double-diamond operator" +.IX Subsection "New double-diamond operator" +\&\f(CW\*(C`<<>>\*(C'\fR is like \f(CW\*(C`<>\*(C'\fR but uses three-argument \f(CW\*(C`open\*(C'\fR to open +each file in \f(CW@ARGV\fR. This means that each element of \f(CW@ARGV\fR will be treated +as an actual file name, and \f(CW"|foo"\fR won't be treated as a pipe open. +.ie n .SS "New ""\eb"" boundaries in regular expressions" +.el .SS "New \f(CW\eb\fP boundaries in regular expressions" +.IX Subsection "New b boundaries in regular expressions" +\fR\f(CI\*(C`qr/\eb{gcb}/\*(C'\fR\fI\fR +.IX Subsection "qr/b{gcb}/" +.PP +\&\f(CW\*(C`gcb\*(C'\fR stands for Grapheme Cluster Boundary. It is a Unicode property +that finds the boundary between sequences of characters that look like a +single character to a native speaker of a language. Perl has long had +the ability to deal with these through the \f(CW\*(C`\eX\*(C'\fR regular escape +sequence. Now, there is an alternative way of handling these. See +"\eb{}, \eb, \eB{}, \eB" in perlrebackslash for details. +.PP +\fR\f(CI\*(C`qr/\eb{wb}/\*(C'\fR\fI\fR +.IX Subsection "qr/b{wb}/" +.PP +\&\f(CW\*(C`wb\*(C'\fR stands for Word Boundary. It is a Unicode property +that finds the boundary between words. This is similar to the plain +\&\f(CW\*(C`\eb\*(C'\fR (without braces) but is more suitable for natural language +processing. It knows, for example, that apostrophes can occur in the +middle of words. See "\eb{}, \eb, \eB{}, \eB" in perlrebackslash for details. +.PP +\fR\f(CI\*(C`qr/\eb{sb}/\*(C'\fR\fI\fR +.IX Subsection "qr/b{sb}/" +.PP +\&\f(CW\*(C`sb\*(C'\fR stands for Sentence Boundary. It is a Unicode property +to aid in parsing natural language sentences. +See "\eb{}, \eb, \eB{}, \eB" in perlrebackslash for details. +.SS "Non-Capturing Regular Expression Flag" +.IX Subsection "Non-Capturing Regular Expression Flag" +Regular expressions now support a \f(CW\*(C`/n\*(C'\fR flag that disables capturing +and filling in \f(CW$1\fR, \f(CW$2\fR, etc inside of groups: +.PP +.Vb 1 +\& "hello" =~ /(hi|hello)/n; # $1 is not set +.Ve +.PP +This is equivalent to putting \f(CW\*(C`?:\*(C'\fR at the beginning of every capturing group. +.PP +See "n" in perlre for more information. +.ie n .SS """use re \*(Aqstrict\*(Aq""" +.el .SS "\f(CWuse re \*(Aqstrict\*(Aq\fP" +.IX Subsection "use re strict" +This applies stricter syntax rules to regular expression patterns +compiled within its scope. This will hopefully alert you to typos and +other unintentional behavior that backwards-compatibility issues prevent +us from reporting in normal regular expression compilations. Because the +behavior of this is subject to change in future Perl releases as we gain +experience, using this pragma will raise a warning of category +\&\f(CW\*(C`experimental::re_strict\*(C'\fR. +See 'strict' in re. +.SS "Unicode 7.0 (with correction) is now supported" +.IX Subsection "Unicode 7.0 (with correction) is now supported" +For details on what is in this release, see +<http://www.unicode.org/versions/Unicode7.0.0/>. +The version of Unicode 7.0 that comes with Perl includes +a correction dealing with glyph shaping in Arabic +(see <http://www.unicode.org/errata/#current_errata>). +.ie n .SS """use\ locale"" can restrict which locale categories are affected" +.el .SS "\f(CWuse\ locale\fP can restrict which locale categories are affected" +.IX Subsection "use locale can restrict which locale categories are affected" +It is now possible to pass a parameter to \f(CW\*(C`use\ locale\*(C'\fR to specify +a subset of locale categories to be locale-aware, with the remaining +ones unaffected. See "The "use locale" pragma" in perllocale for details. +.SS "Perl now supports POSIX 2008 locale currency additions" +.IX Subsection "Perl now supports POSIX 2008 locale currency additions" +On platforms that are able to handle POSIX.1\-2008, the +hash returned by +\&\f(CWPOSIX::localeconv()\fR +includes the international currency fields added by that version of the +POSIX standard. These are +\&\f(CW\*(C`int_n_cs_precedes\*(C'\fR, +\&\f(CW\*(C`int_n_sep_by_space\*(C'\fR, +\&\f(CW\*(C`int_n_sign_posn\*(C'\fR, +\&\f(CW\*(C`int_p_cs_precedes\*(C'\fR, +\&\f(CW\*(C`int_p_sep_by_space\*(C'\fR, +and +\&\f(CW\*(C`int_p_sign_posn\*(C'\fR. +.SS "Better heuristics on older platforms for determining locale UTF\-8ness" +.IX Subsection "Better heuristics on older platforms for determining locale UTF-8ness" +On platforms that implement neither the C99 standard nor the POSIX 2001 +standard, determining if the current locale is UTF\-8 or not depends on +heuristics. These are improved in this release. +.SS "Aliasing via reference" +.IX Subsection "Aliasing via reference" +Variables and subroutines can now be aliased by assigning to a reference: +.PP +.Vb 2 +\& \e$c = \e$d; +\& \e&x = \e&y; +.Ve +.PP +Aliasing can also be accomplished +by using a backslash before a \f(CW\*(C`foreach\*(C'\fR iterator variable; this is +perhaps the most useful idiom this feature provides: +.PP +.Vb 1 +\& foreach \e%hash (@array_of_hash_refs) { ... } +.Ve +.PP +This feature is experimental and must be enabled via \f(CWuse\ feature\ \*(Aqrefaliasing\*(Aq\fR. It will warn unless the \f(CW\*(C`experimental::refaliasing\*(C'\fR +warnings category is disabled. +.PP +See "Assigning to References" in perlref +.ie n .SS """prototype"" with no arguments" +.el .SS "\f(CWprototype\fP with no arguments" +.IX Subsection "prototype with no arguments" +\&\f(CWprototype()\fR with no arguments now infers \f(CW$_\fR. +[GH #14376] <https://github.com/Perl/perl5/issues/14376>. +.ie n .SS "New "":const"" subroutine attribute" +.el .SS "New \f(CW:const\fP subroutine attribute" +.IX Subsection "New :const subroutine attribute" +The \f(CW\*(C`const\*(C'\fR attribute can be applied to an anonymous subroutine. It +causes the new sub to be executed immediately whenever one is created +(\fIi.e.\fR when the \f(CW\*(C`sub\*(C'\fR expression is evaluated). Its value is captured +and used to create a new constant subroutine that is returned. This +feature is experimental. See "Constant Functions" in perlsub. +.ie n .SS """fileno"" now works on directory handles" +.el .SS "\f(CWfileno\fP now works on directory handles" +.IX Subsection "fileno now works on directory handles" +When the relevant support is available in the operating system, the +\&\f(CW\*(C`fileno\*(C'\fR builtin now works on directory handles, yielding the +underlying file descriptor in the same way as for filehandles. On +operating systems without such support, \f(CW\*(C`fileno\*(C'\fR on a directory handle +continues to return the undefined value, as before, but also sets \f(CW$!\fR to +indicate that the operation is not supported. +.PP +Currently, this uses either a \f(CW\*(C`dd_fd\*(C'\fR member in the OS \f(CW\*(C`DIR\*(C'\fR +structure, or a \f(CWdirfd(3)\fR function as specified by POSIX.1\-2008. +.SS "List form of pipe open implemented for Win32" +.IX Subsection "List form of pipe open implemented for Win32" +The list form of pipe: +.PP +.Vb 1 +\& open my $fh, "\-|", "program", @arguments; +.Ve +.PP +is now implemented on Win32. It has the same limitations as \f(CW\*(C`system +LIST\*(C'\fR on Win32, since the Win32 API doesn't accept program arguments +as a list. +.SS "Assignment to list repetition" +.IX Subsection "Assignment to list repetition" +\&\f(CW\*(C`(...) x ...\*(C'\fR can now be used within a list that is assigned to, as long +as the left-hand side is a valid lvalue. This allows \f(CW\*(C`(undef,undef,$foo)\ =\ that_function()\*(C'\fR to be written as \f(CW\*(C`((undef)x2,\ $foo)\ =\ that_function()\*(C'\fR. +.SS "Infinity and NaN (not-a-number) handling improved" +.IX Subsection "Infinity and NaN (not-a-number) handling improved" +Floating point values are able to hold the special values infinity, negative +infinity, and NaN (not-a-number). Now we more robustly recognize and +propagate the value in computations, and on output normalize them to the strings +\&\f(CW\*(C`Inf\*(C'\fR, \f(CW\*(C`\-Inf\*(C'\fR, and \f(CW\*(C`NaN\*(C'\fR. +.PP +See also the POSIX enhancements. +.SS "Floating point parsing has been improved" +.IX Subsection "Floating point parsing has been improved" +Parsing and printing of floating point values has been improved. +.PP +As a completely new feature, hexadecimal floating point literals +(like \f(CW\*(C`0x1.23p\-4\*(C'\fR) are now supported, and they can be output with +\&\f(CW\*(C`printf\ "%a"\*(C'\fR. See "Scalar value constructors" in perldata for more +details. +.SS "Packing infinity or not-a-number into a character is now fatal" +.IX Subsection "Packing infinity or not-a-number into a character is now fatal" +Before, when trying to pack infinity or not-a-number into a +(signed) character, Perl would warn, and assumed you tried to +pack \f(CW0xFF\fR; if you gave it as an argument to \f(CW\*(C`chr\*(C'\fR, +\&\f(CW\*(C`U+FFFD\*(C'\fR was returned. +.PP +But now, all such actions (\f(CW\*(C`pack\*(C'\fR, \f(CW\*(C`chr\*(C'\fR, and \f(CW\*(C`print \*(Aq%c\*(Aq\*(C'\fR) +result in a fatal error. +.SS "Experimental C Backtrace API" +.IX Subsection "Experimental C Backtrace API" +Perl now supports (via a C level API) retrieving +the C level backtrace (similar to what symbolic debuggers like gdb do). +.PP +The backtrace returns the stack trace of the C call frames, +with the symbol names (function names), the object names (like "perl"), +and if it can, also the source code locations (file:line). +.PP +The supported platforms are Linux and OS X (some *BSD might work at +least partly, but they have not yet been tested). +.PP +The feature needs to be enabled with \f(CW\*(C`Configure \-Dusecbacktrace\*(C'\fR. +.PP +See "C backtrace" in perlhacktips for more information. +.SH Security +.IX Header "Security" +.ie n .SS "Perl is now compiled with ""\-fstack\-protector\-strong"" if available" +.el .SS "Perl is now compiled with \f(CW\-fstack\-protector\-strong\fP if available" +.IX Subsection "Perl is now compiled with -fstack-protector-strong if available" +Perl has been compiled with the anti-stack-smashing option +\&\f(CW\*(C`\-fstack\-protector\*(C'\fR since 5.10.1. Now Perl uses the newer variant +called \f(CW\*(C`\-fstack\-protector\-strong\*(C'\fR, if available. +.SS "The Safe module could allow outside packages to be replaced" +.IX Subsection "The Safe module could allow outside packages to be replaced" +Critical bugfix: outside packages could be replaced. Safe has +been patched to 2.38 to address this. +.ie n .SS "Perl is now always compiled with ""\-D_FORTIFY_SOURCE=2"" if available" +.el .SS "Perl is now always compiled with \f(CW\-D_FORTIFY_SOURCE=2\fP if available" +.IX Subsection "Perl is now always compiled with -D_FORTIFY_SOURCE=2 if available" +The 'code hardening' option called \f(CW\*(C`_FORTIFY_SOURCE\*(C'\fR, available in +gcc 4.*, is now always used for compiling Perl, if available. +.PP +Note that this isn't necessarily a huge step since in many platforms +the step had already been taken several years ago: many Linux +distributions (like Fedora) have been using this option for Perl, +and OS X has enforced the same for many years. +.SH "Incompatible Changes" +.IX Header "Incompatible Changes" +.SS "Subroutine signatures moved before attributes" +.IX Subsection "Subroutine signatures moved before attributes" +The experimental sub signatures feature, as introduced in 5.20, parsed +signatures after attributes. In this release, following feedback from users +of the experimental feature, the positioning has been moved such that +signatures occur after the subroutine name (if any) and before the attribute +list (if any). +.ie n .SS """&"" and ""\e&"" prototypes accepts only subs" +.el .SS "\f(CW&\fP and \f(CW\e&\fP prototypes accepts only subs" +.IX Subsection "& and & prototypes accepts only subs" +The \f(CW\*(C`&\*(C'\fR prototype character now accepts only anonymous subs (\f(CW\*(C`sub +{...}\*(C'\fR), things beginning with \f(CW\*(C`\e&\*(C'\fR, or an explicit \f(CW\*(C`undef\*(C'\fR. Formerly +it erroneously also allowed references to arrays, hashes, and lists. +[GH #2776] <https://github.com/Perl/perl5/issues/2776>. +[GH #14186] <https://github.com/Perl/perl5/issues/14186>. +[GH #14353] <https://github.com/Perl/perl5/issues/14353>. +.PP +In addition, the \f(CW\*(C`\e&\*(C'\fR prototype was allowing subroutine calls, whereas +now it only allows subroutines: \f(CW&foo\fR is still permitted as an argument, +while \f(CW&foo()\fR and \f(CWfoo()\fR no longer are. +[GH #10633] <https://github.com/Perl/perl5/issues/10633>. +.ie n .SS """use encoding"" is now lexical" +.el .SS "\f(CWuse encoding\fP is now lexical" +.IX Subsection "use encoding is now lexical" +The encoding pragma's effect is now limited to lexical scope. This +pragma is deprecated, but in the meantime, it could adversely affect +unrelated modules that are included in the same program; this change +fixes that. +.SS "List slices returning empty lists" +.IX Subsection "List slices returning empty lists" +List slices now return an empty list only if the original list was empty +(or if there are no indices). Formerly, a list slice would return an empty +list if all indices fell outside the original list; now it returns a list +of \f(CW\*(C`undef\*(C'\fR values in that case. +[GH #12335] <https://github.com/Perl/perl5/issues/12335>. +.ie n .SS """\eN{}"" with a sequence of multiple spaces is now a fatal error" +.el .SS "\f(CW\eN{}\fP with a sequence of multiple spaces is now a fatal error" +.IX Subsection "N{} with a sequence of multiple spaces is now a fatal error" +E.g. \f(CW\*(C`\eN{TOO\ \ MANY\ SPACES}\*(C'\fR or \f(CW\*(C`\eN{TRAILING\ SPACE\ }\*(C'\fR. +This has been deprecated since v5.18. +.ie n .SS """use\ UNIVERSAL\ \*(Aq...\*(Aq"" is now a fatal error" +.el .SS "\f(CWuse\ UNIVERSAL\ \*(Aq...\*(Aq\fP is now a fatal error" +.IX Subsection "use UNIVERSAL ... is now a fatal error" +Importing functions from \f(CW\*(C`UNIVERSAL\*(C'\fR has been deprecated since v5.12, and +is now a fatal error. \f(CW\*(C`use\ UNIVERSAL\*(C'\fR without any arguments is still +allowed. +.ie n .SS "In double-quotish ""\ec\fIX\fP"", \fIX\fP must now be a printable ASCII character" +.el .SS "In double-quotish \f(CW\ec\fP\f(CIX\fP\f(CW\fP, \fIX\fP must now be a printable ASCII character" +.IX Subsection "In double-quotish cX, X must now be a printable ASCII character" +In prior releases, failure to do this raised a deprecation warning. +.ie n .SS "Splitting the tokens ""(?"" and ""(*"" in regular expressions is now a fatal compilation error." +.el .SS "Splitting the tokens \f(CW(?\fP and \f(CW(*\fP in regular expressions is now a fatal compilation error." +.IX Subsection "Splitting the tokens (? and (* in regular expressions is now a fatal compilation error." +These had been deprecated since v5.18. +.ie n .SS """qr/foo/x"" now ignores all Unicode pattern white space" +.el .SS "\f(CWqr/foo/x\fP now ignores all Unicode pattern white space" +.IX Subsection "qr/foo/x now ignores all Unicode pattern white space" +The \f(CW\*(C`/x\*(C'\fR regular expression modifier allows the pattern to contain +white space and comments (both of which are ignored) for improved +readability. Until now, not all the white space characters that Unicode +designates for this purpose were handled. The additional ones now +recognized are: +.PP +.Vb 5 +\& U+0085 NEXT LINE +\& U+200E LEFT\-TO\-RIGHT MARK +\& U+200F RIGHT\-TO\-LEFT MARK +\& U+2028 LINE SEPARATOR +\& U+2029 PARAGRAPH SEPARATOR +.Ve +.PP +The use of these characters with \f(CW\*(C`/x\*(C'\fR outside bracketed character +classes and when not preceded by a backslash has raised a deprecation +warning since v5.18. Now they will be ignored. +.ie n .SS "Comment lines within ""(?[\ ])"" are now ended only by a ""\en""" +.el .SS "Comment lines within \f(CW(?[\ ])\fP are now ended only by a \f(CW\en\fP" +.IX Subsection "Comment lines within (?[ ]) are now ended only by a n" +\&\f(CW\*(C`(?[\ ])\*(C'\fR is an experimental feature, introduced in v5.18. It operates +as if \f(CW\*(C`/x\*(C'\fR is always enabled. But there was a difference: comment +lines (following a \f(CW\*(C`#\*(C'\fR character) were terminated by anything matching +\&\f(CW\*(C`\eR\*(C'\fR which includes all vertical whitespace, such as form feeds. For +consistency, this is now changed to match what terminates comment lines +outside \f(CW\*(C`(?[\ ])\*(C'\fR, namely a \f(CW\*(C`\en\*(C'\fR (even if escaped), which is the +same as what terminates a heredoc string and formats. +.ie n .SS """(?[...])"" operators now follow standard Perl precedence" +.el .SS "\f(CW(?[...])\fP operators now follow standard Perl precedence" +.IX Subsection "(?[...]) operators now follow standard Perl precedence" +This experimental feature allows set operations in regular expression patterns. +Prior to this, the intersection operator had the same precedence as the other +binary operators. Now it has higher precedence. This could lead to different +outcomes than existing code expects (though the documentation has always noted +that this change might happen, recommending fully parenthesizing the +expressions). See "Extended Bracketed Character Classes" in perlrecharclass. +.ie n .SS "Omitting ""%"" and ""@"" on hash and array names is no longer permitted" +.el .SS "Omitting \f(CW%\fP and \f(CW@\fP on hash and array names is no longer permitted" +.IX Subsection "Omitting % and @ on hash and array names is no longer permitted" +Really old Perl let you omit the \f(CW\*(C`@\*(C'\fR on array names and the \f(CW\*(C`%\*(C'\fR on hash +names in some spots. This has issued a deprecation warning since Perl +5.000, and is no longer permitted. +.ie n .SS """$!"" text is now in English outside the scope of ""use locale""" +.el .SS "\f(CW""$!""\fP text is now in English outside the scope of \f(CWuse locale\fP" +.IX Subsection """$!"" text is now in English outside the scope of use locale" +Previously, the text, unlike almost everything else, always came out +based on the current underlying locale of the program. (Also affected +on some systems is \f(CW"$^E"\fR.) For programs that are unprepared to +handle locale differences, this can cause garbage text to be displayed. +It's better to display text that is translatable via some tool than +garbage text which is much harder to figure out. +.ie n .SS """$!"" text will be returned in UTF\-8 when appropriate" +.el .SS "\f(CW""$!""\fP text will be returned in UTF\-8 when appropriate" +.IX Subsection """$!"" text will be returned in UTF-8 when appropriate" +The stringification of \f(CW$!\fR and \f(CW$^E\fR will have the UTF\-8 flag set +when the text is actually non-ASCII UTF\-8. This will enable programs +that are set up to be locale-aware to properly output messages in the +user's native language. Code that needs to continue the 5.20 and +earlier behavior can do the stringification within the scopes of both +\&\f(CW\*(C`use\ bytes\*(C'\fR and \f(CW\*(C`use\ locale\ ":messages"\*(C'\fR. Within these two +scopes, no other Perl operations will +be affected by locale; only \f(CW$!\fR and \f(CW$^E\fR stringification. The +\&\f(CW\*(C`bytes\*(C'\fR pragma causes the UTF\-8 flag to not be set, just as in previous +Perl releases. This resolves +[GH #12035] <https://github.com/Perl/perl5/issues/12035>. +.ie n .SS "Support for ""?PATTERN?"" without explicit operator has been removed" +.el .SS "Support for \f(CW?PATTERN?\fP without explicit operator has been removed" +.IX Subsection "Support for ?PATTERN? without explicit operator has been removed" +The \f(CW\*(C`m?PATTERN?\*(C'\fR construct, which allows matching a regex only once, +previously had an alternative form that was written directly with a question +mark delimiter, omitting the explicit \f(CW\*(C`m\*(C'\fR operator. This usage has produced +a deprecation warning since 5.14.0. It is now a syntax error, so that the +question mark can be available for use in new operators. +.ie n .SS "defined(@array) and defined(%hash) are now fatal errors" +.el .SS "\f(CWdefined(@array)\fP and \f(CWdefined(%hash)\fP are now fatal errors" +.IX Subsection "defined(@array) and defined(%hash) are now fatal errors" +These have been deprecated since v5.6.1 and have raised deprecation +warnings since v5.16. +.SS "Using a hash or an array as a reference are now fatal errors" +.IX Subsection "Using a hash or an array as a reference are now fatal errors" +For example, \f(CW\*(C`%foo\->{"bar"}\*(C'\fR now causes a fatal compilation +error. These have been deprecated since before v5.8, and have raised +deprecation warnings since then. +.ie n .SS "Changes to the ""*"" prototype" +.el .SS "Changes to the \f(CW*\fP prototype" +.IX Subsection "Changes to the * prototype" +The \f(CW\*(C`*\*(C'\fR character in a subroutine's prototype used to allow barewords to take +precedence over most, but not all, subroutine names. It was never +consistent and exhibited buggy behavior. +.PP +Now it has been changed, so subroutines always take precedence over barewords, +which brings it into conformity with similarly prototyped built-in functions: +.PP +.Vb 6 +\& sub splat(*) { ... } +\& sub foo { ... } +\& splat(foo); # now always splat(foo()) +\& splat(bar); # still splat(\*(Aqbar\*(Aq) as before +\& close(foo); # close(foo()) +\& close(bar); # close(\*(Aqbar\*(Aq) +.Ve +.SH Deprecations +.IX Header "Deprecations" +.ie n .SS "Setting ""${^ENCODING}"" to anything but ""undef""" +.el .SS "Setting \f(CW${^ENCODING}\fP to anything but \f(CWundef\fP" +.IX Subsection "Setting ${^ENCODING} to anything but undef" +This variable allows Perl scripts to be written in an encoding other than +ASCII or UTF\-8. However, it affects all modules globally, leading +to wrong answers and segmentation faults. New scripts should be written +in UTF\-8; old scripts should be converted to UTF\-8, which is easily done +with the piconv utility. +.SS "Use of non-graphic characters in single-character variable names" +.IX Subsection "Use of non-graphic characters in single-character variable names" +The syntax for single-character variable names is more lenient than +for longer variable names, allowing the one-character name to be a +punctuation character or even invisible (a non-graphic). Perl v5.20 +deprecated the ASCII-range controls as such a name. Now, all +non-graphic characters that formerly were allowed are deprecated. +The practical effect of this occurs only when not under \f(CW\*(C`use\ utf8\*(C'\fR, and affects just the C1 controls (code points 0x80 through +0xFF), NO-BREAK SPACE, and SOFT HYPHEN. +.ie n .SS "Inlining of ""sub () { $var }"" with observable side-effects" +.el .SS "Inlining of \f(CWsub () { $var }\fP with observable side-effects" +.IX Subsection "Inlining of sub () { $var } with observable side-effects" +In many cases Perl makes \f(CW\*(C`sub\ ()\ {\ $var\ }\*(C'\fR into an inlinable constant +subroutine, capturing the value of \f(CW$var\fR at the time the \f(CW\*(C`sub\*(C'\fR expression +is evaluated. This can break the closure behavior in those cases where +\&\f(CW$var\fR is subsequently modified, since the subroutine won't return the +changed value. (Note that this all only applies to anonymous subroutines +with an empty prototype (\f(CW\*(C`sub\ ()\*(C'\fR).) +.PP +This usage is now deprecated in those cases where the variable could be +modified elsewhere. Perl detects those cases and emits a deprecation +warning. Such code will likely change in the future and stop producing a +constant. +.PP +If your variable is only modified in the place where it is declared, then +Perl will continue to make the sub inlinable with no warnings. +.PP +.Vb 4 +\& sub make_constant { +\& my $var = shift; +\& return sub () { $var }; # fine +\& } +\& +\& sub make_constant_deprecated { +\& my $var; +\& $var = shift; +\& return sub () { $var }; # deprecated +\& } +\& +\& sub make_constant_deprecated2 { +\& my $var = shift; +\& log_that_value($var); # could modify $var +\& return sub () { $var }; # deprecated +\& } +.Ve +.PP +In the second example above, detecting that \f(CW$var\fR is assigned to only once +is too hard to detect. That it happens in a spot other than the \f(CW\*(C`my\*(C'\fR +declaration is enough for Perl to find it suspicious. +.PP +This deprecation warning happens only for a simple variable for the body of +the sub. (A \f(CW\*(C`BEGIN\*(C'\fR block or \f(CW\*(C`use\*(C'\fR statement inside the sub is ignored, +because it does not become part of the sub's body.) For more complex +cases, such as \f(CW\*(C`sub\ ()\ {\ do_something()\ if\ 0;\ $var\ }\*(C'\fR the behavior has +changed such that inlining does not happen if the variable is modifiable +elsewhere. Such cases should be rare. +.ie n .SS "Use of multiple ""/x"" regexp modifiers" +.el .SS "Use of multiple \f(CW/x\fP regexp modifiers" +.IX Subsection "Use of multiple /x regexp modifiers" +It is now deprecated to say something like any of the following: +.PP +.Vb 3 +\& qr/foo/xx; +\& /(?xax:foo)/; +\& use re qw(/amxx); +.Ve +.PP +That is, now \f(CW\*(C`x\*(C'\fR should only occur once in any string of contiguous +regular expression pattern modifiers. We do not believe there are any +occurrences of this in all of CPAN. This is in preparation for a future +Perl release having \f(CW\*(C`/xx\*(C'\fR permit white-space for readability in +bracketed character classes (those enclosed in square brackets: +\&\f(CW\*(C`[...]\*(C'\fR). +.ie n .SS "Using a NO-BREAK space in a character alias for ""\eN{...}"" is now deprecated" +.el .SS "Using a NO-BREAK space in a character alias for \f(CW\eN{...}\fP is now deprecated" +.IX Subsection "Using a NO-BREAK space in a character alias for N{...} is now deprecated" +This non-graphic character is essentially indistinguishable from a +regular space, and so should not be allowed. See +"CUSTOM ALIASES" in charnames. +.ie n .SS "A literal ""{"" should now be escaped in a pattern" +.el .SS "A literal \f(CW""{""\fP should now be escaped in a pattern" +.IX Subsection "A literal ""{"" should now be escaped in a pattern" +If you want a literal left curly bracket (also called a left brace) in a +regular expression pattern, you should now escape it by either +preceding it with a backslash (\f(CW"\e{"\fR) or enclosing it within square +brackets \f(CW"[{]"\fR, or by using \f(CW\*(C`\eQ\*(C'\fR; otherwise a deprecation warning +will be raised. This was first announced as forthcoming in the v5.16 +release; it will allow future extensions to the language to happen. +.SS "Making all warnings fatal is discouraged" +.IX Subsection "Making all warnings fatal is discouraged" +The documentation for fatal warnings notes that +\&\f(CW\*(C`use warnings FATAL => \*(Aqall\*(Aq\*(C'\fR is discouraged, and provides stronger +language about the risks of fatal warnings in general. +.SH "Performance Enhancements" +.IX Header "Performance Enhancements" +.IP \(bu 4 +If a method or class name is known at compile time, a hash is precomputed +to speed up run-time method lookup. Also, compound method names like +\&\f(CW\*(C`SUPER::new\*(C'\fR are parsed at compile time, to save having to parse them at +run time. +.IP \(bu 4 +Array and hash lookups (especially nested ones) that use only constants +or simple variables as keys, are now considerably faster. See +"Internal Changes" for more details. +.IP \(bu 4 +\&\f(CW\*(C`(...)x1\*(C'\fR, \f(CW\*(C`("constant")x0\*(C'\fR and \f(CW\*(C`($scalar)x0\*(C'\fR are now optimised in list +context. If the right-hand argument is a constant 1, the repetition +operator disappears. If the right-hand argument is a constant 0, the whole +expression is optimised to the empty list, so long as the left-hand +argument is a simple scalar or constant. (That is, \f(CW\*(C`(foo())x0\*(C'\fR is not +subject to this optimisation.) +.IP \(bu 4 +\&\f(CW\*(C`substr\*(C'\fR assignment is now optimised into 4\-argument \f(CW\*(C`substr\*(C'\fR at the end +of a subroutine (or as the argument to \f(CW\*(C`return\*(C'\fR). Previously, this +optimisation only happened in void context. +.IP \(bu 4 +In \f(CW"\eL..."\fR, \f(CW"\eQ..."\fR, etc., the extra "stringify" op is now optimised +away, making these just as fast as \f(CW\*(C`lcfirst\*(C'\fR, \f(CW\*(C`quotemeta\*(C'\fR, etc. +.IP \(bu 4 +Assignment to an empty list is now sometimes faster. In particular, it +never calls \f(CW\*(C`FETCH\*(C'\fR on tied arguments on the right-hand side, whereas it +used to sometimes. +.IP \(bu 4 +There is a performance improvement of up to 20% when \f(CW\*(C`length\*(C'\fR is applied to +a non-magical, non-tied string, and either \f(CW\*(C`use bytes\*(C'\fR is in scope or the +string doesn't use UTF\-8 internally. +.IP \(bu 4 +On most perl builds with 64\-bit integers, memory usage for non-magical, +non-tied scalars containing only a floating point value has been reduced +by between 8 and 32 bytes, depending on OS. +.IP \(bu 4 +In \f(CW\*(C`@array = split\*(C'\fR, the assignment can be optimized away, so that \f(CW\*(C`split\*(C'\fR +writes directly to the array. This optimisation was happening only for +package arrays other than \f(CW@_\fR, and only sometimes. Now this +optimisation happens almost all the time. +.IP \(bu 4 +\&\f(CW\*(C`join\*(C'\fR is now subject to constant folding. So for example +\&\f(CW\*(C`join\ "\-",\ "a",\ "b"\*(C'\fR is converted at compile-time to \f(CW"a\-b"\fR. +Moreover, \f(CW\*(C`join\*(C'\fR with a scalar or constant for the separator and a +single-item list to join is simplified to a stringification, and the +separator doesn't even get evaluated. +.IP \(bu 4 +\&\f(CWqq(@array)\fR is implemented using two ops: a stringify op and a join op. +If the \f(CW\*(C`qq\*(C'\fR contains nothing but a single array, the stringification is +optimized away. +.IP \(bu 4 +\&\f(CW\*(C`our\ $var\*(C'\fR and \f(CW\*(C`our($s,@a,%h)\*(C'\fR in void context are no longer evaluated at +run time. Even a whole sequence of \f(CW\*(C`our\ $foo;\*(C'\fR statements will simply be +skipped over. The same applies to \f(CW\*(C`state\*(C'\fR variables. +.IP \(bu 4 +Many internal functions have been refactored to improve performance and reduce +their memory footprints. +[GH #13659] <https://github.com/Perl/perl5/issues/13659> +[GH #13856] <https://github.com/Perl/perl5/issues/13856> +[GH #13874] <https://github.com/Perl/perl5/issues/13874> +.IP \(bu 4 +\&\f(CW\*(C`\-T\*(C'\fR and \f(CW\*(C`\-B\*(C'\fR filetests will return sooner when an empty file is detected. +[GH #13686] <https://github.com/Perl/perl5/issues/13686> +.IP \(bu 4 +Hash lookups where the key is a constant are faster. +.IP \(bu 4 +Subroutines with an empty prototype and a body containing just \f(CW\*(C`undef\*(C'\fR are now +eligible for inlining. +[GH #14077] <https://github.com/Perl/perl5/issues/14077> +.IP \(bu 4 +Subroutines in packages no longer need to be stored in typeglobs: +declaring a subroutine will now put a simple sub reference directly in the +stash if possible, saving memory. The typeglob still notionally exists, +so accessing it will cause the stash entry to be upgraded to a typeglob +(\fIi.e.\fR this is just an internal implementation detail). +This optimization does not currently apply to XSUBs or exported +subroutines, and method calls will undo it, since they cache things in +typeglobs. +[GH #13392] <https://github.com/Perl/perl5/issues/13392> +.IP \(bu 4 +The functions \f(CWutf8::native_to_unicode()\fR and \f(CWutf8::unicode_to_native()\fR +(see utf8) are now optimized out on ASCII platforms. There is now not even +a minimal performance hit in writing code portable between ASCII and EBCDIC +platforms. +.IP \(bu 4 +Win32 Perl uses 8 KB less of per-process memory than before for every perl +process, because some data is now memory mapped from disk and shared +between processes from the same perl binary. +.SH "Modules and Pragmata" +.IX Header "Modules and Pragmata" +.SS "Updated Modules and Pragmata" +.IX Subsection "Updated Modules and Pragmata" +Many of the libraries distributed with perl have been upgraded since v5.20.0. +For a complete list of changes, run: +.PP +.Vb 1 +\& corelist \-\-diff 5.20.0 5.22.0 +.Ve +.PP +You can substitute your favorite version in place of 5.20.0, too. +.PP +Some notable changes include: +.IP \(bu 4 +Archive::Tar has been upgraded to version 2.04. +.Sp +Tests can now be run in parallel. +.IP \(bu 4 +attributes has been upgraded to version 0.27. +.Sp +The usage of \f(CW\*(C`memEQs\*(C'\fR in the XS has been corrected. +[GH #14072] <https://github.com/Perl/perl5/issues/14072> +.Sp +Avoid reading beyond the end of a buffer. [perl #122629] +.IP \(bu 4 +B has been upgraded to version 1.58. +.Sp +It provides a new \f(CW\*(C`B::safename\*(C'\fR function, based on the existing +\&\f(CW\*(C`B::GV\->SAFENAME\*(C'\fR, that converts \f(CW\*(C`\ecOPEN\*(C'\fR to \f(CW\*(C`^OPEN\*(C'\fR. +.Sp +Nulled COPs are now of class \f(CW\*(C`B::COP\*(C'\fR, rather than \f(CW\*(C`B::OP\*(C'\fR. +.Sp +\&\f(CW\*(C`B::REGEXP\*(C'\fR objects now provide a \f(CW\*(C`qr_anoncv\*(C'\fR method for accessing the +implicit CV associated with \f(CW\*(C`qr//\*(C'\fR things containing code blocks, and a +\&\f(CW\*(C`compflags\*(C'\fR method that returns the pertinent flags originating from the +\&\f(CW\*(C`qr//blahblah\*(C'\fR op. +.Sp +\&\f(CW\*(C`B::PMOP\*(C'\fR now provides a \f(CW\*(C`pmregexp\*(C'\fR method returning a \f(CW\*(C`B::REGEXP\*(C'\fR object. +Two new classes, \f(CW\*(C`B::PADNAME\*(C'\fR and \f(CW\*(C`B::PADNAMELIST\*(C'\fR, have been introduced. +.Sp +A bug where, after an ithread creation or pseudofork, special/immortal SVs in +the child ithread/pseudoprocess did not have the correct class of +\&\f(CW\*(C`B::SPECIAL\*(C'\fR, has been fixed. +The \f(CW\*(C`id\*(C'\fR and \f(CW\*(C`outid\*(C'\fR PADLIST methods have been added. +.IP \(bu 4 +B::Concise has been upgraded to version 0.996. +.Sp +Null ops that are part of the execution chain are now given sequence +numbers. +.Sp +Private flags for nulled ops are now dumped with mnemonics as they would be +for the non-nulled counterparts. +.IP \(bu 4 +B::Deparse has been upgraded to version 1.35. +.Sp +It now deparses \f(CW\*(C`+sub : attr { ... }\*(C'\fR correctly at the start of a +statement. Without the initial \f(CW\*(C`+\*(C'\fR, \f(CW\*(C`sub\*(C'\fR would be a statement label. +.Sp +\&\f(CW\*(C`BEGIN\*(C'\fR blocks are now emitted in the right place most of the time, but +the change unfortunately introduced a regression, in that \f(CW\*(C`BEGIN\*(C'\fR blocks +occurring just before the end of the enclosing block may appear below it +instead. +.Sp +\&\f(CW\*(C`B::Deparse\*(C'\fR no longer puts erroneous \f(CW\*(C`local\*(C'\fR here and there, such as for +\&\f(CW\*(C`LIST = tr/a//d\*(C'\fR. [perl #119815] +.Sp +Adjacent \f(CW\*(C`use\*(C'\fR statements are no longer accidentally nested if one +contains a \f(CW\*(C`do\*(C'\fR block. [perl #115066] +.Sp +Parenthesised arrays in lists passed to \f(CW\*(C`\e\*(C'\fR are now correctly deparsed +with parentheses (\fIe.g.\fR, \f(CW\*(C`\e(@a, (@b), @c)\*(C'\fR now retains the parentheses +around \f(CW@b\fR), thus preserving the flattening behavior of referenced +parenthesised arrays. Formerly, it only worked for one array: \f(CW\*(C`\e(@a)\*(C'\fR. +.Sp +\&\f(CW\*(C`local our\*(C'\fR is now deparsed correctly, with the \f(CW\*(C`our\*(C'\fR included. +.Sp +\&\f(CW\*(C`for($foo; !$bar; $baz) {...}\*(C'\fR was deparsed without the \f(CW\*(C`!\*(C'\fR (or \f(CW\*(C`not\*(C'\fR). +This has been fixed. +.Sp +Core keywords that conflict with lexical subroutines are now deparsed with +the \f(CW\*(C`CORE::\*(C'\fR prefix. +.Sp +\&\f(CW\*(C`foreach state $x (...) {...}\*(C'\fR now deparses correctly with \f(CW\*(C`state\*(C'\fR and +not \f(CW\*(C`my\*(C'\fR. +.Sp +\&\f(CW\*(C`our @array = split(...)\*(C'\fR now deparses correctly with \f(CW\*(C`our\*(C'\fR in those +cases where the assignment is optimized away. +.Sp +It now deparses \f(CWour(\fR\f(CILIST\fR\f(CW)\fR and typed lexical (\f(CW\*(C`my Dog $spot\*(C'\fR) correctly. +.Sp +Deparse \f(CW$#_\fR as that instead of as \f(CW$#{_}\fR. +[GH #14545] <https://github.com/Perl/perl5/issues/14545> +.Sp +BEGIN blocks at the end of the enclosing scope are now deparsed in the +right place. [perl #77452] +.Sp +BEGIN blocks were sometimes deparsed as _\|_ANON_\|_, but are now always called +BEGIN. +.Sp +Lexical subroutines are now fully deparsed. [perl #116553] +.Sp +\&\f(CW\*(C`Anything =~ y///r\*(C'\fR with \f(CW\*(C`/r\*(C'\fR no longer omits the left-hand operand. +.Sp +The op trees that make up regexp code blocks are now deparsed for real. +Formerly, the original string that made up the regular expression was used. +That caused problems with \f(CW\*(C`qr/(?{<<heredoc})/\*(C'\fR and multiline code blocks, +which were deparsed incorrectly. [perl #123217] [perl #115256] +.Sp +\&\f(CW$;\fR at the end of a statement no longer loses its semicolon. +[perl #123357] +.Sp +Some cases of subroutine declarations stored in the stash in shorthand form +were being omitted. +.Sp +Non-ASCII characters are now consistently escaped in strings, instead of +some of the time. (There are still outstanding problems with regular +expressions and identifiers that have not been fixed.) +.Sp +When prototype sub calls are deparsed with \f(CW\*(C`&\*(C'\fR (\fIe.g.\fR, under the \fB\-P\fR +option), \f(CW\*(C`scalar\*(C'\fR is now added where appropriate, to force the scalar +context implied by the prototype. +.Sp +\&\f(CW\*(C`require(foo())\*(C'\fR, \f(CW\*(C`do(foo())\*(C'\fR, \f(CW\*(C`goto(foo())\*(C'\fR and similar constructs with +loop controls are now deparsed correctly. The outer parentheses are not +optional. +.Sp +Whitespace is no longer escaped in regular expressions, because it was +getting erroneously escaped within \f(CW\*(C`(?x:...)\*(C'\fR sections. +.Sp +\&\f(CW\*(C`sub foo { foo() }\*(C'\fR is now deparsed with those mandatory parentheses. +.Sp +\&\f(CW\*(C`/@array/\*(C'\fR is now deparsed as a regular expression, and not just +\&\f(CW@array\fR. +.Sp +\&\f(CW\*(C`/@{\-}/\*(C'\fR, \f(CW\*(C`/@{+}/\*(C'\fR and \f(CW$#{1}\fR are now deparsed with the braces, which +are mandatory in these cases. +.Sp +In deparsing feature bundles, \f(CW\*(C`B::Deparse\*(C'\fR was emitting \f(CW\*(C`no feature;\*(C'\fR first +instead of \f(CW\*(C`no feature \*(Aq:all\*(Aq;\*(C'\fR. This has been fixed. +.Sp +\&\f(CW\*(C`chdir FH\*(C'\fR is now deparsed without quotation marks. +.Sp +\&\f(CW\*(C`\emy @a\*(C'\fR is now deparsed without parentheses. (Parenthese would flatten +the array.) +.Sp +\&\f(CW\*(C`system\*(C'\fR and \f(CW\*(C`exec\*(C'\fR followed by a block are now deparsed correctly. +Formerly there was an erroneous \f(CW\*(C`do\*(C'\fR before the block. +.Sp +\&\f(CW\*(C`use constant QR => qr/.../flags\*(C'\fR followed by \f(CW\*(C`"" =~ QR\*(C'\fR is no longer +without the flags. +.Sp +Deparsing \f(CW\*(C`BEGIN { undef &foo }\*(C'\fR with the \fB\-w\fR switch enabled started to +emit 'uninitialized' warnings in Perl 5.14. This has been fixed. +.Sp +Deparsing calls to subs with a \f(CW\*(C`(;+)\*(C'\fR prototype resulted in an infinite +loop. The \f(CW\*(C`(;$\*(C'\fR) \f(CW\*(C`(_)\*(C'\fR and \f(CW\*(C`(;_)\*(C'\fR prototypes were given the wrong +precedence, causing \f(CWfoo($a<$b)\fR to be deparsed without the parentheses. +.Sp +Deparse now provides a defined state sub in inner subs. +.IP \(bu 4 +B::Op_private has been added. +.Sp +B::Op_private provides detailed information about the flags used in the +\&\f(CW\*(C`op_private\*(C'\fR field of perl opcodes. +.IP \(bu 4 +bigint, bignum, bigrat have been upgraded to version 0.39. +.Sp +Document in CAVEATS that using strings as numbers won't always invoke +the big number overloading, and how to invoke it. [rt.perl.org #123064] +.IP \(bu 4 +Carp has been upgraded to version 1.36. +.Sp +\&\f(CW\*(C`Carp::Heavy\*(C'\fR now ignores version mismatches with Carp if Carp is newer +than 1.12, since \f(CW\*(C`Carp::Heavy\*(C'\fR's guts were merged into Carp at that +point. +[GH #13708] <https://github.com/Perl/perl5/issues/13708> +.Sp +Carp now handles non-ASCII platforms better. +.Sp +Off-by-one error fix for Perl < 5.14. +.IP \(bu 4 +constant has been upgraded to version 1.33. +.Sp +It now accepts fully-qualified constant names, allowing constants to be defined +in packages other than the caller. +.IP \(bu 4 +CPAN has been upgraded to version 2.11. +.Sp +Add support for \f(CWCwd::getdcwd()\fR and introduce workaround for a misbehavior +seen on Strawberry Perl 5.20.1. +.Sp +Fix \f(CWchdir()\fR after building dependencies bug. +.Sp +Introduce experimental support for plugins/hooks. +.Sp +Integrate the \f(CW\*(C`App::Cpan\*(C'\fR sources. +.Sp +Do not check recursion on optional dependencies. +.Sp +Sanity check \fIMETA.yml\fR to contain a hash. +[cpan #95271] <https://rt.cpan.org/Ticket/Display.html?id=95271> +.IP \(bu 4 +CPAN::Meta::Requirements has been upgraded to version 2.132. +.Sp +Works around limitations in \f(CW\*(C`version::vpp\*(C'\fR detecting v\-string magic and adds +support for forthcoming ExtUtils::MakeMaker bootstrap \fIversion.pm\fR for +Perls older than 5.10.0. +.IP \(bu 4 +Data::Dumper has been upgraded to version 2.158. +.Sp +Fixes CVE\-2014\-4330 by adding a configuration variable/option to limit +recursion when dumping deep data structures. +.Sp +Changes to resolve Coverity issues. +XS dumps incorrectly stored the name of code references stored in a +GLOB. +[GH #13911] <https://github.com/Perl/perl5/issues/13911> +.IP \(bu 4 +DynaLoader has been upgraded to version 1.32. +.Sp +Remove \f(CW\*(C`dl_nonlazy\*(C'\fR global if unused in Dynaloader. [perl #122926] +.IP \(bu 4 +Encode has been upgraded to version 2.72. +.Sp +\&\f(CW\*(C`piconv\*(C'\fR now has better error handling when the encoding name is nonexistent, +and a build breakage when upgrading Encode in perl\-5.8.2 and earlier has +been fixed. +.Sp +Building in C++ mode on Windows now works. +.IP \(bu 4 +Errno has been upgraded to version 1.23. +.Sp +Add \f(CW\*(C`\-P\*(C'\fR to the preprocessor command-line on GCC 5. GCC added extra +line directives, breaking parsing of error code definitions. [rt.perl.org +#123784] +.IP \(bu 4 +experimental has been upgraded to version 0.013. +.Sp +Hardcodes features for Perls older than 5.15.7. +.IP \(bu 4 +ExtUtils::CBuilder has been upgraded to version 0.280221. +.Sp +Fixes a regression on Android. +[GH #14064] <https://github.com/Perl/perl5/issues/14064> +.IP \(bu 4 +ExtUtils::Manifest has been upgraded to version 1.70. +.Sp +Fixes a bug with \f(CWmaniread()\fR's handling of quoted filenames and improves +\&\f(CWmanifind()\fR to follow symlinks. +[GH #14003] <https://github.com/Perl/perl5/issues/14003> +.IP \(bu 4 +ExtUtils::ParseXS has been upgraded to version 3.28. +.Sp +Only declare \f(CW\*(C`file\*(C'\fR unused if we actually define it. +Improve generated \f(CW\*(C`RETVAL\*(C'\fR code generation to avoid repeated +references to \f(CWST(0)\fR. [perl #123278] +Broaden and document the \f(CW\*(C`/OBJ$/\*(C'\fR to \f(CW\*(C`/REF$/\*(C'\fR typemap optimization +for the \f(CW\*(C`DESTROY\*(C'\fR method. [perl #123418] +.IP \(bu 4 +Fcntl has been upgraded to version 1.13. +.Sp +Add support for the Linux pipe buffer size \f(CWfcntl()\fR commands. +.IP \(bu 4 +File::Find has been upgraded to version 1.29. +.Sp +\&\f(CWfind()\fR and \f(CWfinddepth()\fR will now warn if passed inappropriate or +misspelled options. +.IP \(bu 4 +File::Glob has been upgraded to version 1.24. +.Sp +Avoid \f(CWSvIV()\fR expanding to call \f(CWget_sv()\fR three times in a few +places. [perl #123606] +.IP \(bu 4 +HTTP::Tiny has been upgraded to version 0.054. +.Sp +\&\f(CW\*(C`keep_alive\*(C'\fR is now fork-safe and thread-safe. +.IP \(bu 4 +IO has been upgraded to version 1.35. +.Sp +The XS implementation has been fixed for the sake of older Perls. +.IP \(bu 4 +IO::Socket has been upgraded to version 1.38. +.Sp +Document the limitations of the \f(CWconnected()\fR method. [perl #123096] +.IP \(bu 4 +IO::Socket::IP has been upgraded to version 0.37. +.Sp +A better fix for subclassing \f(CWconnect()\fR. +[cpan #95983] <https://rt.cpan.org/Ticket/Display.html?id=95983> +[cpan #97050] <https://rt.cpan.org/Ticket/Display.html?id=97050> +.Sp +Implements Timeout for \f(CWconnect()\fR. +[cpan #92075] <https://rt.cpan.org/Ticket/Display.html?id=92075> +.IP \(bu 4 +The libnet collection of modules has been upgraded to version 3.05. +.Sp +Support for IPv6 and SSL to \f(CW\*(C`Net::FTP\*(C'\fR, \f(CW\*(C`Net::NNTP\*(C'\fR, \f(CW\*(C`Net::POP3\*(C'\fR and \f(CW\*(C`Net::SMTP\*(C'\fR. +Improvements in \f(CW\*(C`Net::SMTP\*(C'\fR authentication. +.IP \(bu 4 +Locale::Codes has been upgraded to version 3.34. +.Sp +Fixed a bug in the scripts used to extract data from spreadsheets that +prevented the SHP currency code from being found. +[cpan #94229] <https://rt.cpan.org/Ticket/Display.html?id=94229> +.Sp +New codes have been added. +.IP \(bu 4 +Math::BigInt has been upgraded to version 1.9997. +.Sp +Synchronize POD changes from the CPAN release. +\&\f(CW\*(C`Math::BigFloat\->blog(x)\*(C'\fR would sometimes return \f(CWblog(2*x)\fR when +the accuracy was greater than 70 digits. +The result of \f(CW\*(C`Math::BigFloat\->bdiv()\*(C'\fR in list context now +satisfies \f(CW\*(C`x = quotient * divisor + remainder\*(C'\fR. +.Sp +Correct handling of subclasses. +[cpan #96254] <https://rt.cpan.org/Ticket/Display.html?id=96254> +[cpan #96329] <https://rt.cpan.org/Ticket/Display.html?id=96329> +.IP \(bu 4 +Module::Metadata has been upgraded to version 1.000026. +.Sp +Support installations on older perls with an ExtUtils::MakeMaker earlier +than 6.63_03 +.IP \(bu 4 +overload has been upgraded to version 1.26. +.Sp +A redundant \f(CW\*(C`ref $sub\*(C'\fR check has been removed. +.IP \(bu 4 +The PathTools module collection has been upgraded to version 3.56. +.Sp +A warning from the \fBgcc\fR compiler is now avoided when building the XS. +.Sp +Don't turn leading \f(CW\*(C`//\*(C'\fR into \f(CW\*(C`/\*(C'\fR on Cygwin. [perl #122635] +.IP \(bu 4 +perl5db.pl has been upgraded to version 1.49. +.Sp +The debugger would cause an assertion failure. +[GH #14605] <https://github.com/Perl/perl5/issues/14605> +.Sp +\&\f(CWfork()\fR in the debugger under \f(CW\*(C`tmux\*(C'\fR will now create a new window for +the forked process. [GH #13602] <https://github.com/Perl/perl5/issues/13602> +.Sp +The debugger now saves the current working directory on startup and +restores it when you restart your program with \f(CW\*(C`R\*(C'\fR or \f(CW\*(C`rerun\*(C'\fR. +[GH #13691] <https://github.com/Perl/perl5/issues/13691> +.IP \(bu 4 +PerlIO::scalar has been upgraded to version 0.22. +.Sp +Reading from a position well past the end of the scalar now correctly +returns end of file. [perl #123443] +.Sp +Seeking to a negative position still fails, but no longer leaves the +file position set to a negation location. +.Sp +\&\f(CWeof()\fR on a \f(CW\*(C`PerlIO::scalar\*(C'\fR handle now properly returns true when +the file position is past the 2GB mark on 32\-bit systems. +.Sp +Attempting to write at file positions impossible for the platform now +fail early rather than wrapping at 4GB. +.IP \(bu 4 +Pod::Perldoc has been upgraded to version 3.25. +.Sp +Filehandles opened for reading or writing now have \f(CW:encoding(UTF\-8)\fR set. +[cpan #98019] <https://rt.cpan.org/Ticket/Display.html?id=98019> +.IP \(bu 4 +POSIX has been upgraded to version 1.53. +.Sp +The C99 math functions and constants (for example \f(CW\*(C`acosh\*(C'\fR, \f(CW\*(C`isinf\*(C'\fR, \f(CW\*(C`isnan\*(C'\fR, \f(CW\*(C`round\*(C'\fR, +\&\f(CW\*(C`trunc\*(C'\fR; \f(CW\*(C`M_E\*(C'\fR, \f(CW\*(C`M_SQRT2\*(C'\fR, \f(CW\*(C`M_PI\*(C'\fR) have been added. +.Sp +\&\f(CWPOSIX::tmpnam()\fR now produces a deprecation warning. [perl #122005] +.IP \(bu 4 +Safe has been upgraded to version 2.39. +.Sp +\&\f(CW\*(C`reval\*(C'\fR was not propagating void context properly. +.IP \(bu 4 +Scalar-List-Utils has been upgraded to version 1.41. +.Sp +A new module, Sub::Util, has been added, containing functions related to +CODE refs, including \f(CW\*(C`subname\*(C'\fR (inspired by \f(CW\*(C`Sub::Identity\*(C'\fR) and \f(CW\*(C`set_subname\*(C'\fR +(copied and renamed from \f(CW\*(C`Sub::Name\*(C'\fR). +The use of \f(CW\*(C`GetMagic\*(C'\fR in \f(CWList::Util::reduce()\fR has also been fixed. +[cpan #63211] <https://rt.cpan.org/Ticket/Display.html?id=63211> +.IP \(bu 4 +SDBM_File has been upgraded to version 1.13. +.Sp +Simplified the build process. [perl #123413] +.IP \(bu 4 +Time::Piece has been upgraded to version 1.29. +.Sp +When pretty printing negative \f(CW\*(C`Time::Seconds\*(C'\fR, the "minus" is no longer lost. +.IP \(bu 4 +Unicode::Collate has been upgraded to version 1.12. +.Sp +Version 0.67's improved discontiguous contractions is invalidated by default +and is supported as a parameter \f(CW\*(C`long_contraction\*(C'\fR. +.IP \(bu 4 +Unicode::Normalize has been upgraded to version 1.18. +.Sp +The XSUB implementation has been removed in favor of pure Perl. +.IP \(bu 4 +Unicode::UCD has been upgraded to version 0.61. +.Sp +A new function \fBproperty_values()\fR +has been added to return a given property's possible values. +.Sp +A new function \fBcharprop()\fR +has been added to return the value of a given property for a given code +point. +.Sp +A new function \fBcharprops_all()\fR +has been added to return the values of all Unicode properties for a +given code point. +.Sp +A bug has been fixed so that \fBpropaliases()\fR +returns the correct short and long names for the Perl extensions where +it was incorrect. +.Sp +A bug has been fixed so that +\&\fBprop_value_aliases()\fR +returns \f(CW\*(C`undef\*(C'\fR instead of a wrong result for properties that are Perl +extensions. +.Sp +This module now works on EBCDIC platforms. +.IP \(bu 4 +utf8 has been upgraded to version 1.17 +.Sp +A mismatch between the documentation and the code in \f(CWutf8::downgrade()\fR +was fixed in favor of the documentation. The optional second argument +is now correctly treated as a perl boolean (true/false semantics) and +not as an integer. +.IP \(bu 4 +version has been upgraded to version 0.9909. +.Sp +Numerous changes. See the \fIChanges\fR file in the CPAN distribution for +details. +.IP \(bu 4 +Win32 has been upgraded to version 0.51. +.Sp +\&\f(CWGetOSName()\fR now supports Windows 8.1, and building in C++ mode now works. +.IP \(bu 4 +Win32API::File has been upgraded to version 0.1202 +.Sp +Building in C++ mode now works. +.IP \(bu 4 +XSLoader has been upgraded to version 0.20. +.Sp +Allow XSLoader to load modules from a different namespace. +[perl #122455] +.SS "Removed Modules and Pragmata" +.IX Subsection "Removed Modules and Pragmata" +The following modules (and associated modules) have been removed from the core +perl distribution: +.IP \(bu 4 +CGI +.IP \(bu 4 +Module::Build +.SH Documentation +.IX Header "Documentation" +.SS "New Documentation" +.IX Subsection "New Documentation" +\fIperlunicook\fR +.IX Subsection "perlunicook" +.PP +This document, by Tom Christiansen, provides examples of handling Unicode in +Perl. +.SS "Changes to Existing Documentation" +.IX Subsection "Changes to Existing Documentation" +\fIperlaix\fR +.IX Subsection "perlaix" +.IP \(bu 4 +A note on long doubles has been added. +.PP +\fIperlapi\fR +.IX Subsection "perlapi" +.IP \(bu 4 +Note that \f(CW\*(C`SvSetSV\*(C'\fR doesn't do set magic. +.IP \(bu 4 +\&\f(CW\*(C`sv_usepvn_flags\*(C'\fR \- fix documentation to mention the use of \f(CW\*(C`Newx\*(C'\fR instead of +\&\f(CW\*(C`malloc\*(C'\fR. +.Sp +[GH #13835] <https://github.com/Perl/perl5/issues/13835> +.IP \(bu 4 +Clarify where \f(CW\*(C`NUL\*(C'\fR may be embedded or is required to terminate a string. +.IP \(bu 4 +Some documentation that was previously missing due to formatting errors is +now included. +.IP \(bu 4 +Entries are now organized into groups rather than by the file where they +are found. +.IP \(bu 4 +Alphabetical sorting of entries is now done consistently (automatically +by the POD generator) to make entries easier to find when scanning. +.PP +\fIperldata\fR +.IX Subsection "perldata" +.IP \(bu 4 +The syntax of single-character variable names has been brought +up-to-date and more fully explained. +.IP \(bu 4 +Hexadecimal floating point numbers are described, as are infinity and +NaN. +.PP +\fIperlebcdic\fR +.IX Subsection "perlebcdic" +.IP \(bu 4 +This document has been significantly updated in the light of recent +improvements to EBCDIC support. +.PP +\fIperlfilter\fR +.IX Subsection "perlfilter" +.IP \(bu 4 +Added a LIMITATIONS section. +.PP +\fIperlfunc\fR +.IX Subsection "perlfunc" +.IP \(bu 4 +Mention that \f(CWstudy()\fR is currently a no-op. +.IP \(bu 4 +Calling \f(CW\*(C`delete\*(C'\fR or \f(CW\*(C`exists\*(C'\fR on array values is now described as "strongly +discouraged" rather than "deprecated". +.IP \(bu 4 +Improve documentation of \f(CW\*(C`our\*(C'\fR. +.IP \(bu 4 +\&\f(CW\*(C`\-l\*(C'\fR now notes that it will return false if symlinks aren't supported by the +file system. +[GH #13695] <https://github.com/Perl/perl5/issues/13695> +.IP \(bu 4 +Note that \f(CW\*(C`exec LIST\*(C'\fR and \f(CW\*(C`system LIST\*(C'\fR may fall back to the shell on +Win32. Only the indirect-object syntax \f(CW\*(C`exec PROGRAM LIST\*(C'\fR and +\&\f(CW\*(C`system PROGRAM LIST\*(C'\fR will reliably avoid using the shell. +.Sp +This has also been noted in perlport. +.Sp +[GH #13907] <https://github.com/Perl/perl5/issues/13907> +.PP +\fIperlguts\fR +.IX Subsection "perlguts" +.IP \(bu 4 +The OOK example has been updated to account for COW changes and a change in the +storage of the offset. +.IP \(bu 4 +Details on C level symbols and libperl.t added. +.IP \(bu 4 +Information on Unicode handling has been added +.IP \(bu 4 +Information on EBCDIC handling has been added +.PP +\fIperlhack\fR +.IX Subsection "perlhack" +.IP \(bu 4 +A note has been added about running on platforms with non-ASCII +character sets +.IP \(bu 4 +A note has been added about performance testing +.PP +\fIperlhacktips\fR +.IX Subsection "perlhacktips" +.IP \(bu 4 +Documentation has been added illustrating the perils of assuming that +there is no change to the contents of static memory pointed to by the +return values of Perl's wrappers for C library functions. +.IP \(bu 4 +Replacements for \f(CW\*(C`tmpfile\*(C'\fR, \f(CW\*(C`atoi\*(C'\fR, \f(CW\*(C`strtol\*(C'\fR, and \f(CW\*(C`strtoul\*(C'\fR are now +recommended. +.IP \(bu 4 +Updated documentation for the \f(CW\*(C`test.valgrind\*(C'\fR \f(CW\*(C`make\*(C'\fR target. +[GH #13658] <https://github.com/Perl/perl5/issues/13658> +.IP \(bu 4 +Information is given about writing test files portably to non-ASCII +platforms. +.IP \(bu 4 +A note has been added about how to get a C language stack backtrace. +.PP +\fIperlhpux\fR +.IX Subsection "perlhpux" +.IP \(bu 4 +Note that the message "Redeclaration of "sendpath" with a different +storage class specifier" is harmless. +.PP +\fIperllocale\fR +.IX Subsection "perllocale" +.IP \(bu 4 +Updated for the enhancements in v5.22, along with some clarifications. +.PP +\fIperlmodstyle\fR +.IX Subsection "perlmodstyle" +.IP \(bu 4 +Instead of pointing to the module list, we are now pointing to +PrePAN <http://prepan.org/>. +.PP +\fIperlop\fR +.IX Subsection "perlop" +.IP \(bu 4 +Updated for the enhancements in v5.22, along with some clarifications. +.PP +\fIperlpodspec\fR +.IX Subsection "perlpodspec" +.IP \(bu 4 +The specification of the pod language is changing so that the default +encoding of pods that aren't in UTF\-8 (unless otherwise indicated) is +CP1252 instead of ISO 8859\-1 (Latin1). +.PP +\fIperlpolicy\fR +.IX Subsection "perlpolicy" +.IP \(bu 4 +We now have a code of conduct for the \fIp5p\fR mailing list, as documented +in "STANDARDS OF CONDUCT" in perlpolicy. +.IP \(bu 4 +The conditions for marking an experimental feature as non-experimental are now +set out. +.IP \(bu 4 +Clarification has been made as to what sorts of changes are permissible in +maintenance releases. +.PP +\fIperlport\fR +.IX Subsection "perlport" +.IP \(bu 4 +Out-of-date VMS-specific information has been fixed and/or simplified. +.IP \(bu 4 +Notes about EBCDIC have been added. +.PP +\fIperlre\fR +.IX Subsection "perlre" +.IP \(bu 4 +The description of the \f(CW\*(C`/x\*(C'\fR modifier has been clarified to note that +comments cannot be continued onto the next line by escaping them; and +there is now a list of all the characters that are considered whitespace +by this modifier. +.IP \(bu 4 +The new \f(CW\*(C`/n\*(C'\fR modifier is described. +.IP \(bu 4 +A note has been added on how to make bracketed character class ranges +portable to non-ASCII machines. +.PP +\fIperlrebackslash\fR +.IX Subsection "perlrebackslash" +.IP \(bu 4 +Added documentation of \f(CW\*(C`\eb{sb}\*(C'\fR, \f(CW\*(C`\eb{wb}\*(C'\fR, \f(CW\*(C`\eb{gcb}\*(C'\fR, and \f(CW\*(C`\eb{g}\*(C'\fR. +.PP +\fIperlrecharclass\fR +.IX Subsection "perlrecharclass" +.IP \(bu 4 +Clarifications have been added to "Character Ranges" in perlrecharclass +to the effect \f(CW\*(C`[A\-Z]\*(C'\fR, \f(CW\*(C`[a\-z]\*(C'\fR, \f(CW\*(C`[0\-9]\*(C'\fR and +any subranges thereof in regular expression bracketed character classes +are guaranteed to match exactly what a naive English speaker would +expect them to match, even on platforms (such as EBCDIC) where perl +has to do extra work to accomplish this. +.IP \(bu 4 +The documentation of Bracketed Character Classes has been expanded to cover the +improvements in \f(CW\*(C`qr/[\eN{named sequence}]/\*(C'\fR (see under "Selected Bug Fixes"). +.PP +\fIperlref\fR +.IX Subsection "perlref" +.IP \(bu 4 +A new section has been added +Assigning to References +.PP +\fIperlsec\fR +.IX Subsection "perlsec" +.IP \(bu 4 +Comments added on algorithmic complexity and tied hashes. +.PP +\fIperlsyn\fR +.IX Subsection "perlsyn" +.IP \(bu 4 +An ambiguity in the documentation of the \f(CW\*(C`...\*(C'\fR statement has been corrected. +[GH #14054] <https://github.com/Perl/perl5/issues/14054> +.IP \(bu 4 +The empty conditional in \f(CW\*(C`for\*(C'\fR and \f(CW\*(C`while\*(C'\fR is now documented +in perlsyn. +.PP +\fIperlunicode\fR +.IX Subsection "perlunicode" +.IP \(bu 4 +This has had extensive revisions to bring it up-to-date with current +Unicode support and to make it more readable. Notable is that Unicode +7.0 changed what it should do with non-characters. Perl retains the old +way of handling for reasons of backward compatibility. See +"Noncharacter code points" in perlunicode. +.PP +\fIperluniintro\fR +.IX Subsection "perluniintro" +.IP \(bu 4 +Advice for how to make sure your strings and regular expression patterns are +interpreted as Unicode has been updated. +.PP +\fIperlvar\fR +.IX Subsection "perlvar" +.IP \(bu 4 +\&\f(CW$]\fR is no longer listed as being deprecated. Instead, discussion has +been added on the advantages and disadvantages of using it versus +\&\f(CW$^V\fR. \f(CW$OLD_PERL_VERSION\fR was re-added to the documentation as the long +form of \f(CW$]\fR. +.IP \(bu 4 +\&\f(CW\*(C`${^ENCODING}\*(C'\fR is now marked as deprecated. +.IP \(bu 4 +The entry for \f(CW\*(C`%^H\*(C'\fR has been clarified to indicate it can only handle +simple values. +.PP +\fIperlvms\fR +.IX Subsection "perlvms" +.IP \(bu 4 +Out-of-date and/or incorrect material has been removed. +.IP \(bu 4 +Updated documentation on environment and shell interaction in VMS. +.PP +\fIperlxs\fR +.IX Subsection "perlxs" +.IP \(bu 4 +Added a discussion of locale issues in XS code. +.SH Diagnostics +.IX Header "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 perldiag. +.SS "New Diagnostics" +.IX Subsection "New Diagnostics" +\fINew Errors\fR +.IX Subsection "New Errors" +.IP \(bu 4 +Bad symbol for scalar +.Sp +(P) An internal request asked to add a scalar entry to something that +wasn't a symbol table entry. +.IP \(bu 4 +Can't use a hash as a reference +.Sp +(F) You tried to use a hash as a reference, as in +\&\f(CW\*(C`%foo\->{"bar"}\*(C'\fR or \f(CW\*(C`%$ref\->{"hello"}\*(C'\fR. Versions of perl <= 5.6.1 +used to allow this syntax, but shouldn't have. +.IP \(bu 4 +Can't use an array as a reference +.Sp +(F) You tried to use an array as a reference, as in +\&\f(CW\*(C`@foo\->[23]\*(C'\fR or \f(CW\*(C`@$ref\->[99]\*(C'\fR. Versions of perl <= 5.6.1 used to +allow this syntax, but shouldn't have. +.IP \(bu 4 +Can't use 'defined(@array)' (Maybe you should just omit the \fBdefined()\fR?) +.Sp +(F) \f(CWdefined()\fR is not useful on arrays because it +checks for an undefined \fIscalar\fR value. If you want to see if the +array is empty, just use \f(CW\*(C`if\ (@array)\ {\ #\ not\ empty\ }\*(C'\fR for example. +.IP \(bu 4 +Can't use 'defined(%hash)' (Maybe you should just omit the \fBdefined()\fR?) +.Sp +(F) \f(CWdefined()\fR is not usually right on hashes. +.Sp +Although \f(CW\*(C`defined\ %hash\*(C'\fR is false on a plain not-yet-used hash, it +becomes true in several non-obvious circumstances, including iterators, +weak references, stash names, even remaining true after \f(CW\*(C`undef\ %hash\*(C'\fR. +These things make \f(CW\*(C`defined\ %hash\*(C'\fR fairly useless in practice, so it now +generates a fatal error. +.Sp +If a check for non-empty is what you wanted then just put it in boolean +context (see "Scalar values" in perldata): +.Sp +.Vb 3 +\& if (%hash) { +\& # not empty +\& } +.Ve +.Sp +If you had \f(CW\*(C`defined\ %Foo::Bar::QUUX\*(C'\fR to check whether such a package +variable exists then that's never really been reliable, and isn't +a good way to enquire about the features of a package, or whether +it's loaded, etc. +.IP \(bu 4 +Cannot chr \f(CW%f\fR +.Sp +(F) You passed an invalid number (like an infinity or not-a-number) to +\&\f(CW\*(C`chr\*(C'\fR. +.IP \(bu 4 +Cannot compress \f(CW%f\fR in pack +.Sp +(F) You tried converting an infinity or not-a-number to an unsigned +character, which makes no sense. +.IP \(bu 4 +Cannot pack \f(CW%f\fR with '%c' +.Sp +(F) You tried converting an infinity or not-a-number to a character, +which makes no sense. +.IP \(bu 4 +Cannot print \f(CW%f\fR with '%c' +.Sp +(F) You tried printing an infinity or not-a-number as a character (\f(CW%c\fR), +which makes no sense. Maybe you meant \f(CW\*(Aq%s\*(Aq\fR, or just stringifying it? +.IP \(bu 4 +charnames alias definitions may not contain a sequence of multiple spaces +.Sp +(F) You defined a character name which had multiple space +characters in a row. Change them to single spaces. Usually these +names are defined in the \f(CW\*(C`:alias\*(C'\fR import argument to \f(CW\*(C`use charnames\*(C'\fR, but +they could be defined by a translator installed into \f(CW$^H{charnames}\fR. +See "CUSTOM ALIASES" in charnames. +.IP \(bu 4 +charnames alias definitions may not contain trailing white-space +.Sp +(F) You defined a character name which ended in a space +character. Remove the trailing space(s). Usually these names are +defined in the \f(CW\*(C`:alias\*(C'\fR import argument to \f(CW\*(C`use charnames\*(C'\fR, but they +could be defined by a translator installed into \f(CW$^H{charnames}\fR. +See "CUSTOM ALIASES" in charnames. +.IP \(bu 4 +:const is not permitted on named subroutines +.Sp +(F) The \f(CW\*(C`const\*(C'\fR attribute causes an anonymous subroutine to be run and +its value captured at the time that it is cloned. Named subroutines are +not cloned like this, so the attribute does not make sense on them. +.IP \(bu 4 +Hexadecimal float: internal error +.Sp +(F) Something went horribly bad in hexadecimal float handling. +.IP \(bu 4 +Hexadecimal float: unsupported long double format +.Sp +(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. +.IP \(bu 4 +Illegal suidscript +.Sp +(F) The script run under suidperl was somehow illegal. +.IP \(bu 4 +In '(?...)', the '(' and '?' must be adjacent in regex; marked by <\-\-\ HERE in m/%s/ +.Sp +(F) The two-character sequence \f(CW"(?"\fR in +this context in a regular expression pattern should be an +indivisible token, with nothing intervening between the \f(CW"("\fR +and the \f(CW"?"\fR, but you separated them. +.IP \(bu 4 +In '(*VERB...)', the '(' and '*' must be adjacent in regex; marked by <\-\-\ HERE in m/%s/ +.Sp +(F) The two-character sequence \f(CW"(*"\fR in +this context in a regular expression pattern should be an +indivisible token, with nothing intervening between the \f(CW"("\fR +and the \f(CW"*"\fR, but you separated them. +.IP \(bu 4 +Invalid quantifier in {,} in regex; marked by <\-\- HERE in m/%s/ +.Sp +(F) The pattern looks like a {min,max} quantifier, but the min or max could not +be parsed as a valid number: either it has leading zeroes, or it represents +too big a number to cope with. The <\-\-\ HERE shows where in the regular +expression the problem was discovered. See perlre. +.IP \(bu 4 +\&'%s' is an unknown bound type in regex +.Sp +(F) You used \f(CW\*(C`\eb{...}\*(C'\fR or \f(CW\*(C`\eB{...}\*(C'\fR and the \f(CW\*(C`...\*(C'\fR is not known to +Perl. The current valid ones are given in +"\eb{}, \eb, \eB{}, \eB" in perlrebackslash. +.IP \(bu 4 +Missing or undefined argument to require +.Sp +(F) You tried to call \f(CW\*(C`require\*(C'\fR with no argument or with an undefined +value as an argument. \f(CW\*(C`require\*(C'\fR expects either a package name or a +file-specification as an argument. See "require" in perlfunc. +.Sp +Formerly, \f(CW\*(C`require\*(C'\fR with no argument or \f(CW\*(C`undef\*(C'\fR warned about a Null filename. +.PP +\fINew Warnings\fR +.IX Subsection "New Warnings" +.IP \(bu 4 +\&\eC is deprecated in regex +.Sp +(D deprecated) The \f(CW\*(C`/\eC/\*(C'\fR character class was deprecated in v5.20, and +now emits a warning. It is intended that it will become an error in v5.24. +This character class matches a single byte even if it appears within a +multi-byte character, breaks encapsulation, and can corrupt UTF\-8 +strings. +.IP \(bu 4 +"%s" is more clearly written simply as "%s" in regex; marked by <\-\- HERE in m/%s/ +.Sp +(W regexp) (only under \f(CW\*(C`use\ re\ \*(Aqstrict\*(Aq\*(C'\fR or within \f(CW\*(C`(?[...])\*(C'\fR) +.Sp +You specified a character that has the given plainer way of writing it, +and which is also portable to platforms running with different character +sets. +.IP \(bu 4 +Argument "%s" treated as 0 in increment (++) +.Sp +(W numeric) The indicated string was fed as an argument to the \f(CW\*(C`++\*(C'\fR operator +which expects either a number or a string matching \f(CW\*(C`/^[a\-zA\-Z]*[0\-9]*\ez/\*(C'\fR. +See "Auto-increment and Auto-decrement" in perlop for details. +.IP \(bu 4 +Both or neither range ends should be Unicode in regex; marked by <\-\- HERE in m/%s/ +.Sp +(W regexp) (only under \f(CW\*(C`use\ re\ \*(Aqstrict\*(Aq\*(C'\fR or within \f(CW\*(C`(?[...])\*(C'\fR) +.Sp +In a bracketed character class in a regular expression pattern, you +had a range which has exactly one end of it specified using \f(CW\*(C`\eN{}\*(C'\fR, and +the other end is specified using a non-portable mechanism. Perl treats +the range as a Unicode range, that is, all the characters in it are +considered to be the Unicode characters, and which may be different code +points on some platforms Perl runs on. For example, \f(CW\*(C`[\eN{U+06}\-\ex08]\*(C'\fR +is treated as if you had instead said \f(CW\*(C`[\eN{U+06}\-\eN{U+08}]\*(C'\fR, that is it +matches the characters whose code points in Unicode are 6, 7, and 8. +But that \f(CW\*(C`\ex08\*(C'\fR might indicate that you meant something different, so +the warning gets raised. +.IP \(bu 4 +Can't do %s("%s") on non\-UTF\-8 locale; resolved to "%s". +.Sp +(W locale) You are 1) running under "\f(CW\*(C`use locale\*(C'\fR"; 2) the current +locale is not a UTF\-8 one; 3) you tried to do the designated case-change +operation on the specified Unicode character; and 4) the result of this +operation would mix Unicode and locale rules, which likely conflict. +.Sp +The warnings category \f(CW\*(C`locale\*(C'\fR is new. +.IP \(bu 4 +:const is experimental +.Sp +(S experimental::const_attr) The \f(CW\*(C`const\*(C'\fR attribute is experimental. +If you want to use the feature, disable the warning with \f(CWno warnings +\&\*(Aqexperimental::const_attr\*(Aq\fR, but know that in doing so you are taking +the risk that your code may break in a future Perl version. +.IP \(bu 4 +gmtime(%f) failed +.Sp +(W overflow) You called \f(CW\*(C`gmtime\*(C'\fR with a number that it could not handle: +too large, too small, or NaN. The returned value is \f(CW\*(C`undef\*(C'\fR. +.IP \(bu 4 +Hexadecimal float: exponent overflow +.Sp +(W overflow) The hexadecimal floating point has larger exponent +than the floating point supports. +.IP \(bu 4 +Hexadecimal float: exponent underflow +.Sp +(W overflow) The hexadecimal floating point has smaller exponent +than the floating point supports. +.IP \(bu 4 +Hexadecimal float: mantissa overflow +.Sp +(W overflow) The hexadecimal floating point literal had more bits in +the mantissa (the part between the \f(CW\*(C`0x\*(C'\fR and the exponent, also known as +the fraction or the significand) than the floating point supports. +.IP \(bu 4 +Hexadecimal float: precision loss +.Sp +(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). +.IP \(bu 4 +Locale '%s' may not work well.%s +.Sp +(W locale) You are using the named locale, which is a non\-UTF\-8 one, and +which perl has determined is not fully compatible with what it can +handle. The second \f(CW%s\fR gives a reason. +.Sp +The warnings category \f(CW\*(C`locale\*(C'\fR is new. +.IP \(bu 4 +localtime(%f) failed +.Sp +(W overflow) You called \f(CW\*(C`localtime\*(C'\fR with a number that it could not handle: +too large, too small, or NaN. The returned value is \f(CW\*(C`undef\*(C'\fR. +.IP \(bu 4 +Negative repeat count does nothing +.Sp +(W numeric) You tried to execute the +\&\f(CW\*(C`x\*(C'\fR repetition operator fewer than 0 +times, which doesn't make sense. +.IP \(bu 4 +NO-BREAK SPACE in a charnames alias definition is deprecated +.Sp +(D deprecated) You defined a character name which contained a no-break +space character. Change it to a regular space. Usually these names are +defined in the \f(CW\*(C`:alias\*(C'\fR import argument to \f(CW\*(C`use charnames\*(C'\fR, but they +could be defined by a translator installed into \f(CW$^H{charnames}\fR. See +"CUSTOM ALIASES" in charnames. +.IP \(bu 4 +Non-finite repeat count does nothing +.Sp +(W numeric) You tried to execute the +\&\f(CW\*(C`x\*(C'\fR repetition operator \f(CW\*(C`Inf\*(C'\fR (or +\&\f(CW\*(C`\-Inf\*(C'\fR) or NaN times, which doesn't make sense. +.IP \(bu 4 +PerlIO layer ':win32' is experimental +.Sp +(S experimental::win32_perlio) The \f(CW\*(C`:win32\*(C'\fR PerlIO layer is +experimental. If you want to take the risk of using this layer, +simply disable this warning: +.Sp +.Vb 1 +\& no warnings "experimental::win32_perlio"; +.Ve +.IP \(bu 4 +Ranges of ASCII printables should be some subset of "0\-9", "A\-Z", or "a\-z" in regex; marked by <\-\- HERE in m/%s/ +.Sp +(W regexp) (only under \f(CW\*(C`use\ re\ \*(Aqstrict\*(Aq\*(C'\fR or within \f(CW\*(C`(?[...])\*(C'\fR) +.Sp +Stricter rules help to find typos and other errors. Perhaps you didn't +even intend a range here, if the \f(CW"\-"\fR was meant to be some other +character, or should have been escaped (like \f(CW"\e\-"\fR). If you did +intend a range, the one that was used is not portable between ASCII and +EBCDIC platforms, and doesn't have an obvious meaning to a casual +reader. +.Sp +.Vb 7 +\& [3\-7] # OK; Obvious and portable +\& [d\-g] # OK; Obvious and portable +\& [A\-Y] # OK; Obvious and portable +\& [A\-z] # WRONG; Not portable; not clear what is meant +\& [a\-Z] # WRONG; Not portable; not clear what is meant +\& [%\-.] # WRONG; Not portable; not clear what is meant +\& [\ex41\-Z] # WRONG; Not portable; not obvious to non\-geek +.Ve +.Sp +(You can force portability by specifying a Unicode range, which means that +the endpoints are specified by +\&\f(CW\*(C`\eN{...}\*(C'\fR, but the meaning may +still not be obvious.) +The stricter rules require that ranges that start or stop with an ASCII +character that is not a control have all their endpoints be a literal +character, and not some escape sequence (like \f(CW"\ex41"\fR), and the ranges +must be all digits, or all uppercase letters, or all lowercase letters. +.IP \(bu 4 +Ranges of digits should be from the same group in regex; marked by <\-\- HERE in m/%s/ +.Sp +(W regexp) (only under \f(CW\*(C`use\ re\ \*(Aqstrict\*(Aq\*(C'\fR or within \f(CW\*(C`(?[...])\*(C'\fR) +.Sp +Stricter rules help to find typos and other errors. You included a +range, and at least one of the end points is a decimal digit. Under the +stricter rules, when this happens, both end points should be digits in +the same group of 10 consecutive digits. +.IP \(bu 4 +Redundant argument in \f(CW%s\fR +.Sp +(W redundant) You called a function with more arguments than were +needed, as indicated by information within other arguments you supplied +(\fIe.g\fR. a printf format). Currently only emitted when a printf-type format +required fewer arguments than were supplied, but might be used in the +future for \fIe.g.\fR "pack" in perlfunc. +.Sp +The warnings category \f(CW\*(C`redundant\*(C'\fR is new. See also +[GH #13534] <https://github.com/Perl/perl5/issues/13534>. +.IP \(bu 4 +Replacement list is longer than search list +.Sp +This is not a new diagnostic, but in earlier releases was accidentally +not displayed if the transliteration contained wide characters. This is +now fixed, so that you may see this diagnostic in places where you +previously didn't (but should have). +.IP \(bu 4 +Use of \eb{} for non\-UTF\-8 locale is wrong. Assuming a UTF\-8 locale +.Sp +(W locale) You are matching a regular expression using locale rules, +and a Unicode boundary is being matched, but the locale is not a Unicode +one. This doesn't make sense. Perl will continue, assuming a Unicode +(UTF\-8) locale, but the results could well be wrong except if the locale +happens to be ISO\-8859\-1 (Latin1) where this message is spurious and can +be ignored. +.Sp +The warnings category \f(CW\*(C`locale\*(C'\fR is new. +.IP \(bu 4 +Using /u for '%s' instead of /%s in regex; marked by <\-\- HERE in m/%s/ +.Sp +(W regexp) You used a Unicode boundary (\f(CW\*(C`\eb{...}\*(C'\fR or \f(CW\*(C`\eB{...}\*(C'\fR) in a +portion of a regular expression where the character set modifiers \f(CW\*(C`/a\*(C'\fR +or \f(CW\*(C`/aa\*(C'\fR are in effect. These two modifiers indicate an ASCII +interpretation, and this doesn't make sense for a Unicode definition. +The generated regular expression will compile so that the boundary uses +all of Unicode. No other portion of the regular expression is affected. +.IP \(bu 4 +The bitwise feature is experimental +.Sp +(S experimental::bitwise) This warning is emitted if you use bitwise +operators (\f(CW\*(C`& | ^ ~ &. |. ^. ~.\*(C'\fR) with the "bitwise" feature enabled. +Simply suppress the warning if you want to use the feature, but know +that in doing so you are taking the risk of using an experimental +feature which may change or be removed in a future Perl version: +.Sp +.Vb 3 +\& no warnings "experimental::bitwise"; +\& use feature "bitwise"; +\& $x |.= $y; +.Ve +.IP \(bu 4 +Unescaped left brace in regex is deprecated, passed through in regex; marked by <\-\- HERE in m/%s/ +.Sp +(D deprecated, regexp) You used a literal \f(CW"{"\fR character in a regular +expression pattern. You should change to use \f(CW"\e{"\fR instead, because a future +version of Perl (tentatively v5.26) will consider this to be a syntax error. If +the pattern delimiters are also braces, any matching right brace +(\f(CW"}"\fR) should also be escaped to avoid confusing the parser, for +example, +.Sp +.Vb 1 +\& qr{abc\e{def\e}ghi} +.Ve +.IP \(bu 4 +Use of literal non-graphic characters in variable names is deprecated +.Sp +(D deprecated) Using literal non-graphic (including control) +characters in the source to refer to the \fI^FOO\fR variables, like \f(CW$^X\fR and +\&\f(CW\*(C`${^GLOBAL_PHASE}\*(C'\fR is now deprecated. +.IP \(bu 4 +Useless use of attribute "const" +.Sp +(W misc) The \f(CW\*(C`const\*(C'\fR attribute has no effect except +on anonymous closure prototypes. You applied it to +a subroutine via attributes.pm. This is only useful +inside an attribute handler for an anonymous subroutine. +.IP \(bu 4 +Useless use of /d modifier in transliteration operator +.Sp +This is not a new diagnostic, but in earlier releases was accidentally +not displayed if the transliteration contained wide characters. This is +now fixed, so that you may see this diagnostic in places where you +previously didn't (but should have). +.IP \(bu 4 +"use re 'strict'" is experimental +.Sp +(S experimental::re_strict) The things that are different when a regular +expression pattern is compiled under \f(CW\*(Aqstrict\*(Aq\fR are subject to change +in future Perl releases in incompatible ways; there are also proposals +to change how to enable strict checking instead of using this subpragma. +This means that a pattern that compiles today may not in a future Perl +release. This warning is to alert you to that risk. +.IP \(bu 4 +Warning: unable to close filehandle properly: \f(CW%s\fR +.Sp +Warning: unable to close filehandle \f(CW%s\fR properly: \f(CW%s\fR +.Sp +(S io) Previously, perl silently ignored any errors when doing an implicit +close of a filehandle, \fIi.e.\fR where the reference count of the filehandle +reached zero and the user's code hadn't already called \f(CWclose()\fR; \fIe.g.\fR +.Sp +.Vb 4 +\& { +\& open my $fh, \*(Aq>\*(Aq, $file or die "open: \*(Aq$file\*(Aq: $!\en"; +\& print $fh, $data or die; +\& } # implicit close here +.Ve +.Sp +In a situation such as disk full, due to buffering, the error may only be +detected during the final close, so not checking the result of the close is +dangerous. +.Sp +So perl now warns in such situations. +.IP \(bu 4 +Wide character (U+%X) in \f(CW%s\fR +.Sp +(W locale) While in a single-byte locale (\fIi.e.\fR, a non\-UTF\-8 +one), a multi-byte character was encountered. Perl considers this +character to be the specified Unicode code point. Combining non\-UTF\-8 +locales and Unicode is dangerous. Almost certainly some characters +will have two different representations. For example, in the ISO 8859\-7 +(Greek) locale, the code point 0xC3 represents a Capital Gamma. But so +also does 0x393. This will make string comparisons unreliable. +.Sp +You likely need to figure out how this multi-byte character got mixed up +with your single-byte locale (or perhaps you thought you had a UTF\-8 +locale, but Perl disagrees). +.Sp +The warnings category \f(CW\*(C`locale\*(C'\fR is new. +.SS "Changes to Existing Diagnostics" +.IX Subsection "Changes to Existing Diagnostics" +.IP \(bu 4 +<> should be quotes +.Sp +This warning has been changed to +<> at require-statement should be quotes +to make the issue more identifiable. +.IP \(bu 4 +Argument "%s" isn't numeric%s +.Sp +The perldiag entry for this warning has added this clarifying note: +.Sp +.Vb 4 +\& Note that for the Inf and NaN (infinity and not\-a\-number) the +\& definition of "numeric" is somewhat unusual: the strings themselves +\& (like "Inf") are considered numeric, and anything following them is +\& considered non\-numeric. +.Ve +.IP \(bu 4 +Global symbol "%s" requires explicit package name +.Sp +This message has had '(did you forget to declare "my \f(CW%s\fR"?)' appended to it, to +make it more helpful to new Perl programmers. +[GH #13732] <https://github.com/Perl/perl5/issues/13732> +.IP \(bu 4 +\&'"my" variable &foo::bar can't be in a package' has been reworded to say +\&'subroutine' instead of 'variable'. +.IP \(bu 4 +\&\eN{} in character class restricted to one character in regex; marked by +<\-\-\ HERE in m/%s/ +.Sp +This message has had \fIcharacter class\fR changed to \fIinverted character +class or as a range end-point is\fR to reflect improvements in +\&\f(CW\*(C`qr/[\eN{named sequence}]/\*(C'\fR (see under "Selected Bug Fixes"). +.IP \(bu 4 +panic: frexp +.Sp +This message has had ': \f(CW%f\fR' appended to it, to show what the offending +floating point number is. +.IP \(bu 4 +\&\fIPossible precedence problem on bitwise \fR\f(CI%c\fR\fI operator\fR reworded as +Possible precedence problem on bitwise \f(CW%s\fR operator. +.IP \(bu 4 +Unsuccessful \f(CW%s\fR on filename containing newline +.Sp +This warning is now only produced when the newline is at the end of +the filename. +.IP \(bu 4 +"Variable \f(CW%s\fR will not stay shared" has been changed to say "Subroutine" +when it is actually a lexical sub that will not stay shared. +.IP \(bu 4 +Variable length lookbehind not implemented in regex m/%s/ +.Sp +The perldiag entry for this warning has had information about Unicode +behavior added. +.SS "Diagnostic Removals" +.IX Subsection "Diagnostic Removals" +.IP \(bu 4 +"Ambiguous use of \-foo resolved as \-&\fBfoo()\fR" +.Sp +There is actually no ambiguity here, and this impedes the use of negated +constants; \fIe.g.\fR, \f(CW\*(C`\-Inf\*(C'\fR. +.IP \(bu 4 +"Constant is not a FOO reference" +.Sp +Compile-time checking of constant dereferencing (\fIe.g.\fR, \f(CWmy_constant\->()\fR) +has been removed, since it was not taking overloading into account. +[GH #9891] <https://github.com/Perl/perl5/issues/9891> +[GH #14044] <https://github.com/Perl/perl5/issues/14044> +.SH "Utility Changes" +.IX Header "Utility Changes" +.SS "\fIfind2perl\fP, \fIs2p\fP and \fIa2p\fP removal" +.IX Subsection "find2perl, s2p and a2p removal" +.IP \(bu 4 +The \fIx2p/\fR directory has been removed from the Perl core. +.Sp +This removes find2perl, s2p and a2p. They have all been released to CPAN as +separate distributions (\f(CW\*(C`App::find2perl\*(C'\fR, \f(CW\*(C`App::s2p\*(C'\fR, \f(CW\*(C`App::a2p\*(C'\fR). +.SS h2ph +.IX Subsection "h2ph" +.IP \(bu 4 +\&\fIh2ph\fR now handles hexadecimal constants in the compiler's predefined +macro definitions, as visible in \f(CW$Config{cppsymbols}\fR. +[GH #14491] <https://github.com/Perl/perl5/issues/14491>. +.SS encguess +.IX Subsection "encguess" +.IP \(bu 4 +No longer depends on non-core modules. +.SH "Configuration and Compilation" +.IX Header "Configuration and Compilation" +.IP \(bu 4 +\&\fIConfigure\fR now checks for \f(CWlrintl()\fR, \f(CWlroundl()\fR, \f(CWllrintl()\fR, and +\&\f(CWllroundl()\fR. +.IP \(bu 4 +\&\fIConfigure\fR with \f(CW\*(C`\-Dmksymlinks\*(C'\fR should now be faster. +[GH #13890] <https://github.com/Perl/perl5/issues/13890>. +.IP \(bu 4 +The \f(CW\*(C`pthreads\*(C'\fR and \f(CW\*(C`cl\*(C'\fR libraries will be linked by default if present. +This allows XS modules that require threading to work on non-threaded +perls. Note that you must still pass \f(CW\*(C`\-Dusethreads\*(C'\fR if you want a +threaded perl. +.IP \(bu 4 +To get more precision and range for floating point numbers one can now +use the GCC quadmath library which implements the quadruple precision +floating point numbers on x86 and IA\-64 platforms. See \fIINSTALL\fR for +details. +.IP \(bu 4 +MurmurHash64A and MurmurHash64B can now be configured as the internal hash +function. +.IP \(bu 4 +\&\f(CW\*(C`make test.valgrind\*(C'\fR now supports parallel testing. +.Sp +For example: +.Sp +.Vb 1 +\& TEST_JOBS=9 make test.valgrind +.Ve +.Sp +See "valgrind" in perlhacktips for more information. +.Sp +[GH #13658] <https://github.com/Perl/perl5/issues/13658> +.IP \(bu 4 +The MAD (Misc Attribute Decoration) build option has been removed +.Sp +This was an unmaintained attempt at preserving +the Perl parse tree more faithfully so that automatic conversion of +Perl 5 to Perl 6 would have been easier. +.Sp +This build-time configuration option had been unmaintained for years, +and had probably seriously diverged on both Perl 5 and Perl 6 sides. +.IP \(bu 4 +A new compilation flag, \f(CW\*(C`\-DPERL_OP_PARENT\*(C'\fR is available. For details, +see the discussion below at "Internal Changes". +.IP \(bu 4 +Pathtools no longer tries to load XS on miniperl. This speeds up building perl +slightly. +.SH Testing +.IX Header "Testing" +.IP \(bu 4 +\&\fIt/porting/re_context.t\fR has been added to test that utf8 and its +dependencies only use the subset of the \f(CW\*(C`$1..$n\*(C'\fR capture vars that +\&\f(CWPerl_save_re_context()\fR is hard-coded to localize, because that function +has no efficient way of determining at runtime what vars to localize. +.IP \(bu 4 +Tests for performance issues have been added in the file \fIt/perf/taint.t\fR. +.IP \(bu 4 +Some regular expression tests are written in such a way that they will +run very slowly if certain optimizations break. These tests have been +moved into new files, \fIt/re/speed.t\fR and \fIt/re/speed_thr.t\fR, +and are run with a \f(CWwatchdog()\fR. +.IP \(bu 4 +\&\f(CW\*(C`test.pl\*(C'\fR now allows \f(CW\*(C`plan skip_all => $reason\*(C'\fR, to make it +more compatible with \f(CW\*(C`Test::More\*(C'\fR. +.IP \(bu 4 +A new test script, \fIop/infnan.t\fR, has been added to test if infinity and NaN are +working correctly. See "Infinity and NaN (not-a-number) handling improved". +.SH "Platform Support" +.IX Header "Platform Support" +.SS "Regained Platforms" +.IX Subsection "Regained Platforms" +.IP "IRIX and Tru64 platforms are working again." 4 +.IX Item "IRIX and Tru64 platforms are working again." +Some \f(CW\*(C`make test\*(C'\fR failures remain: +[GH #14557] <https://github.com/Perl/perl5/issues/14557> +and [GH #14727] <https://github.com/Perl/perl5/issues/14727> +for IRIX; [GH #14629] <https://github.com/Perl/perl5/issues/14629>, +[cpan #99605] <https://rt.cpan.org/Public/Bug/Display.html?id=99605>, and +[cpan #104836] <https://rt.cpan.org/Ticket/Display.html?id=104836> for Tru64. +.IP "z/OS running EBCDIC Code Page 1047" 4 +.IX Item "z/OS running EBCDIC Code Page 1047" +Core perl now works on this EBCDIC platform. Earlier perls also worked, but, +even though support wasn't officially withdrawn, recent perls would not compile +and run well. Perl 5.20 would work, but had many bugs which have now been +fixed. Many CPAN modules that ship with Perl still fail tests, including +\&\f(CW\*(C`Pod::Simple\*(C'\fR. However the version of \f(CW\*(C`Pod::Simple\*(C'\fR currently on CPAN should work; +it was fixed too late to include in Perl 5.22. Work is under way to fix many +of the still-broken CPAN modules, which likely will be installed on CPAN when +completed, so that you may not have to wait until Perl 5.24 to get a working +version. +.SS "Discontinued Platforms" +.IX Subsection "Discontinued Platforms" +.IP NeXTSTEP/OPENSTEP 4 +.IX Item "NeXTSTEP/OPENSTEP" +NeXTSTEP was a proprietary operating system bundled with NeXT's +workstations in the early to mid 90s; OPENSTEP was an API specification +that provided a NeXTSTEP-like environment on a non-NeXTSTEP system. Both +are now long dead, so support for building Perl on them has been removed. +.SS "Platform-Specific Notes" +.IX Subsection "Platform-Specific Notes" +.IP EBCDIC 4 +.IX Item "EBCDIC" +Special handling is required of the perl interpreter on EBCDIC platforms +to get \f(CW\*(C`qr/[i\-j]/\*(C'\fR to match only \f(CW"i"\fR and \f(CW"j"\fR, since there are 7 +characters between the +code points for \f(CW"i"\fR and \f(CW"j"\fR. This special handling had only been +invoked when both ends of the range are literals. Now it is also +invoked if any of the \f(CW\*(C`\eN{...}\*(C'\fR forms for specifying a character by +name or Unicode code point is used instead of a literal. See +"Character Ranges" in perlrecharclass. +.IP HP-UX 4 +.IX Item "HP-UX" +The archname now distinguishes use64bitint from use64bitall. +.IP Android 4 +.IX Item "Android" +Build support has been improved for cross-compiling in general and for +Android in particular. +.IP VMS 4 +.IX Item "VMS" +.RS 4 +.PD 0 +.IP \(bu 4 +.PD +When spawning a subprocess without waiting, the return value is now +the correct PID. +.IP \(bu 4 +Fix a prototype so linking doesn't fail under the VMS C++ compiler. +.IP \(bu 4 +\&\f(CW\*(C`finite\*(C'\fR, \f(CW\*(C`finitel\*(C'\fR, and \f(CW\*(C`isfinite\*(C'\fR detection has been added to +\&\f(CW\*(C`configure.com\*(C'\fR, environment handling has had some minor changes, and +a fix for legacy feature checking status. +.RE +.RS 4 +.RE +.IP Win32 4 +.IX Item "Win32" +.RS 4 +.PD 0 +.IP \(bu 4 +.PD +\&\fIminiperl.exe\fR is now built with \f(CW\*(C`\-fno\-strict\-aliasing\*(C'\fR, allowing 64\-bit +builds to complete on GCC 4.8. +[GH #14556] <https://github.com/Perl/perl5/issues/14556> +.IP \(bu 4 +\&\f(CW\*(C`nmake minitest\*(C'\fR now works on Win32. Due to dependency issues you +need to build \f(CW\*(C`nmake test\-prep\*(C'\fR first, and a small number of the +tests fail. +[GH #14318] <https://github.com/Perl/perl5/issues/14318> +.IP \(bu 4 +Perl can now be built in C++ mode on Windows by setting the makefile macro +\&\f(CW\*(C`USE_CPLUSPLUS\*(C'\fR to the value "define". +.IP \(bu 4 +The list form of piped open has been implemented for Win32. Note: unlike +\&\f(CW\*(C`system LIST\*(C'\fR this does not fall back to the shell. +[GH #13574] <https://github.com/Perl/perl5/issues/13574> +.IP \(bu 4 +New \f(CW\*(C`DebugSymbols\*(C'\fR and \f(CW\*(C`DebugFull\*(C'\fR configuration options added to +Windows makefiles. +.IP \(bu 4 +Previously, compiling XS modules (including CPAN ones) using Visual C++ for +Win64 resulted in around a dozen warnings per file from \fIhv_func.h\fR. These +warnings have been silenced. +.IP \(bu 4 +Support for building without PerlIO has been removed from the Windows +makefiles. Non-PerlIO builds were all but deprecated in Perl 5.18.0 and are +already not supported by \fIConfigure\fR on POSIX systems. +.IP \(bu 4 +Between 2 and 6 milliseconds and seven I/O calls have been saved per attempt +to open a perl module for each path in \f(CW@INC\fR. +.IP \(bu 4 +Intel C builds are now always built with C99 mode on. +.IP \(bu 4 +\&\f(CW%I64d\fR is now being used instead of \f(CW%lld\fR for MinGW. +.IP \(bu 4 +In the experimental \f(CW\*(C`:win32\*(C'\fR layer, a crash in \f(CW\*(C`open\*(C'\fR was fixed. Also +opening \fI/dev/null\fR (which works under Win32 Perl's default \f(CW\*(C`:unix\*(C'\fR +layer) was implemented for \f(CW\*(C`:win32\*(C'\fR. +[GH #13968] <https://github.com/Perl/perl5/issues/13968> +.IP \(bu 4 +A new makefile option, \f(CW\*(C`USE_LONG_DOUBLE\*(C'\fR, has been added to the Windows +dmake makefile for gcc builds only. Set this to "define" if you want perl to +use long doubles to give more accuracy and range for floating point numbers. +.RE +.RS 4 +.RE +.IP OpenBSD 4 +.IX Item "OpenBSD" +On OpenBSD, Perl will now default to using the system \f(CW\*(C`malloc\*(C'\fR due to the +security features it provides. Perl's own malloc wrapper has been in use +since v5.14 due to performance reasons, but the OpenBSD project believes +the tradeoff is worth it and would prefer that users who need the speed +specifically ask for it. +.Sp +[GH #13888] <https://github.com/Perl/perl5/issues/13888>. +.IP Solaris 4 +.IX Item "Solaris" +.RS 4 +.PD 0 +.IP \(bu 4 +.PD +We now look for the Sun Studio compiler in both \fI/opt/solstudio*\fR and +\&\fI/opt/solarisstudio*\fR. +.IP \(bu 4 +Builds on Solaris 10 with \f(CW\*(C`\-Dusedtrace\*(C'\fR would fail early since make +didn't follow implied dependencies to build \f(CW\*(C`perldtrace.h\*(C'\fR. Added an +explicit dependency to \f(CW\*(C`depend\*(C'\fR. +[GH #13334] <https://github.com/Perl/perl5/issues/13334> +.IP \(bu 4 +C99 options have been cleaned up; hints look for \f(CW\*(C`solstudio\*(C'\fR +as well as \f(CW\*(C`SUNWspro\*(C'\fR; and support for native \f(CW\*(C`setenv\*(C'\fR has been added. +.RE +.RS 4 +.RE +.SH "Internal Changes" +.IX Header "Internal Changes" +.IP \(bu 4 +Experimental support has been added to allow ops in the optree to locate +their parent, if any. This is enabled by the non-default build option +\&\f(CW\*(C`\-DPERL_OP_PARENT\*(C'\fR. It is envisaged that this will eventually become +enabled by default, so XS code which directly accesses the \f(CW\*(C`op_sibling\*(C'\fR +field of ops should be updated to be future-proofed. +.Sp +On \f(CW\*(C`PERL_OP_PARENT\*(C'\fR builds, the \f(CW\*(C`op_sibling\*(C'\fR field has been renamed +\&\f(CW\*(C`op_sibparent\*(C'\fR and a new flag, \f(CW\*(C`op_moresib\*(C'\fR, added. On the last op in a +sibling chain, \f(CW\*(C`op_moresib\*(C'\fR is false and \f(CW\*(C`op_sibparent\*(C'\fR points to the +parent (if any) rather than being \f(CW\*(C`NULL\*(C'\fR. +.Sp +To make existing code work transparently whether using \f(CW\*(C`PERL_OP_PARENT\*(C'\fR +or not, a number of new macros and functions have been added that should +be used, rather than directly manipulating \f(CW\*(C`op_sibling\*(C'\fR. +.Sp +For the case of just reading \f(CW\*(C`op_sibling\*(C'\fR to determine the next sibling, +two new macros have been added. A simple scan through a sibling chain +like this: +.Sp +.Vb 1 +\& for (; kid\->op_sibling; kid = kid\->op_sibling) { ... } +.Ve +.Sp +should now be written as: +.Sp +.Vb 1 +\& for (; OpHAS_SIBLING(kid); kid = OpSIBLING(kid)) { ... } +.Ve +.Sp +For altering optrees, a general-purpose function \f(CWop_sibling_splice()\fR +has been added, which allows for manipulation of a chain of sibling ops. +By analogy with the Perl function \f(CWsplice()\fR, it allows you to cut out +zero or more ops from a sibling chain and replace them with zero or more +new ops. It transparently handles all the updating of sibling, parent, +op_last pointers etc. +.Sp +If you need to manipulate ops at a lower level, then three new macros, +\&\f(CW\*(C`OpMORESIB_set\*(C'\fR, \f(CW\*(C`OpLASTSIB_set\*(C'\fR and \f(CW\*(C`OpMAYBESIB_set\*(C'\fR are intended to +be a low-level portable way to set \f(CW\*(C`op_sibling\*(C'\fR / \f(CW\*(C`op_sibparent\*(C'\fR while +also updating \f(CW\*(C`op_moresib\*(C'\fR. The first sets the sibling pointer to a new +sibling, the second makes the op the last sibling, and the third +conditionally does the first or second action. Note that unlike +\&\f(CWop_sibling_splice()\fR these macros won't maintain consistency in the +parent at the same time (\fIe.g.\fR by updating \f(CW\*(C`op_first\*(C'\fR and \f(CW\*(C`op_last\*(C'\fR where +appropriate). +.Sp +A C\-level \f(CWPerl_op_parent()\fR function and a Perl-level \f(CWB::OP::parent()\fR +method have been added. The C function only exists under +\&\f(CW\*(C`PERL_OP_PARENT\*(C'\fR builds (using it is build-time error on vanilla +perls). \f(CWB::OP::parent()\fR exists always, but on a vanilla build it +always returns \f(CW\*(C`NULL\*(C'\fR. Under \f(CW\*(C`PERL_OP_PARENT\*(C'\fR, they return the parent +of the current op, if any. The variable \f(CW$B::OP::does_parent\fR allows you +to determine whether \f(CW\*(C`B\*(C'\fR supports retrieving an op's parent. +.Sp +\&\f(CW\*(C`PERL_OP_PARENT\*(C'\fR was introduced in 5.21.2, but the interface was +changed considerably in 5.21.11. If you updated your code before the +5.21.11 changes, it may require further revision. The main changes after +5.21.2 were: +.RS 4 +.IP \(bu 4 +The \f(CW\*(C`OP_SIBLING\*(C'\fR and \f(CW\*(C`OP_HAS_SIBLING\*(C'\fR macros have been renamed +\&\f(CW\*(C`OpSIBLING\*(C'\fR and \f(CW\*(C`OpHAS_SIBLING\*(C'\fR for consistency with other +op-manipulating macros. +.IP \(bu 4 +The \f(CW\*(C`op_lastsib\*(C'\fR field has been renamed \f(CW\*(C`op_moresib\*(C'\fR, and its meaning +inverted. +.IP \(bu 4 +The macro \f(CW\*(C`OpSIBLING_set\*(C'\fR has been removed, and has been superseded by +\&\f(CW\*(C`OpMORESIB_set\*(C'\fR \fIet al\fR. +.IP \(bu 4 +The \f(CWop_sibling_splice()\fR function now accepts a null \f(CW\*(C`parent\*(C'\fR argument +where the splicing doesn't affect the first or last ops in the sibling +chain +.RE +.RS 4 +.RE +.IP \(bu 4 +Macros have been created to allow XS code to better manipulate the POSIX locale +category \f(CW\*(C`LC_NUMERIC\*(C'\fR. See "Locale-related functions and macros" in perlapi. +.IP \(bu 4 +The previous \f(CW\*(C`atoi\*(C'\fR \fIet al\fR replacement function, \f(CW\*(C`grok_atou\*(C'\fR, has now been +superseded by \f(CW\*(C`grok_atoUV\*(C'\fR. See perlclib for details. +.IP \(bu 4 +A new function, \f(CWPerl_sv_get_backrefs()\fR, has been added which allows you +retrieve the weak references, if any, which point at an SV. +.IP \(bu 4 +The \f(CWscreaminstr()\fR function has been removed. Although marked as +public API, it was undocumented and had no usage in CPAN modules. Calling +it has been fatal since 5.17.0. +.IP \(bu 4 +The \f(CWnewDEFSVOP()\fR, \f(CWblock_start()\fR, \f(CWblock_end()\fR and \f(CWintro_my()\fR +functions have been added to the API. +.IP \(bu 4 +The internal \f(CW\*(C`convert\*(C'\fR function in \fIop.c\fR has been renamed +\&\f(CW\*(C`op_convert_list\*(C'\fR and added to the API. +.IP \(bu 4 +The \f(CWsv_magic()\fR function no longer forbids "ext" magic on read-only +values. After all, perl can't know whether the custom magic will modify +the SV or not. +[GH #14202] <https://github.com/Perl/perl5/issues/14202>. +.IP \(bu 4 +Accessing "CvPADLIST" in perlapi on an XSUB is now forbidden. +.Sp +The \f(CW\*(C`CvPADLIST\*(C'\fR field has been reused for a different internal purpose +for XSUBs. So in particular, you can no longer rely on it being NULL as a +test of whether a CV is an XSUB. Use \f(CWCvISXSUB()\fR instead. +.IP \(bu 4 +SVs of type \f(CW\*(C`SVt_NV\*(C'\fR are now sometimes bodiless when the build +configuration and platform allow it: specifically, when \f(CWsizeof(NV) <= +sizeof(IV)\fR. "Bodiless" means that the NV value is stored directly in +the head of an SV, without requiring a separate body to be allocated. This +trick has already been used for IVs since 5.9.2 (though in the case of +IVs, it is always used, regardless of platform and build configuration). +.IP \(bu 4 +The \f(CW$DB::single\fR, \f(CW$DB::signal\fR and \f(CW$DB::trace\fR variables now have set\- and +get-magic that stores their values as IVs, and those IVs are used when +testing their values in \f(CWpp_dbstate()\fR. This prevents perl from +recursing infinitely if an overloaded object is assigned to any of those +variables. +[GH #14013] <https://github.com/Perl/perl5/issues/14013>. +.IP \(bu 4 +\&\f(CWPerl_tmps_grow()\fR, which is marked as public API but is undocumented, has +been removed from the public API. This change does not affect XS code that +uses the \f(CW\*(C`EXTEND_MORTAL\*(C'\fR macro to pre-extend the mortal stack. +.IP \(bu 4 +Perl's internals no longer sets or uses the \f(CW\*(C`SVs_PADMY\*(C'\fR flag. +\&\f(CWSvPADMY()\fR now returns a true value for anything not marked \f(CW\*(C`PADTMP\*(C'\fR +and \f(CW\*(C`SVs_PADMY\*(C'\fR is now defined as 0. +.IP \(bu 4 +The macros \f(CW\*(C`SETsv\*(C'\fR and \f(CW\*(C`SETsvUN\*(C'\fR have been removed. They were no longer used +in the core since commit 6f1401dc2a five years ago, and have not been +found present on CPAN. +.IP \(bu 4 +The \f(CW\*(C`SvFAKE\*(C'\fR bit (unused on HVs) got informally reserved by +David Mitchell for future work on vtables. +.IP \(bu 4 +The \f(CWsv_catpvn_flags()\fR function accepts \f(CW\*(C`SV_CATBYTES\*(C'\fR and \f(CW\*(C`SV_CATUTF8\*(C'\fR +flags, which specify whether the appended string is bytes or UTF\-8, +respectively. (These flags have in fact been present since 5.16.0, but +were formerly not regarded as part of the API.) +.IP \(bu 4 +A new opcode class, \f(CW\*(C`METHOP\*(C'\fR, has been introduced. It holds +information used at runtime to improve the performance +of class/object method calls. +.Sp +\&\f(CW\*(C`OP_METHOD\*(C'\fR and \f(CW\*(C`OP_METHOD_NAMED\*(C'\fR have changed from being +\&\f(CW\*(C`UNOP/SVOP\*(C'\fR to being \f(CW\*(C`METHOP\*(C'\fR. +.IP \(bu 4 +\&\f(CWcv_name()\fR 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. +.Sp +[GH #12767] <https://github.com/Perl/perl5/issues/12767> +[GH #13392] <https://github.com/Perl/perl5/issues/13392> +.IP \(bu 4 +\&\f(CWcv_set_call_checker_flags()\fR is a new API function that works like +\&\f(CWcv_set_call_checker()\fR, 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 \f(CWcv_name()\fR. \f(CWcv_set_call_checker()\fR +guarantees there will be a GV, but it may have to create one on the fly, +which is inefficient. +[GH #12767] <https://github.com/Perl/perl5/issues/12767> +.IP \(bu 4 +\&\f(CW\*(C`CvGV\*(C'\fR (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 it has been used as a +boolean, \f(CW\*(C`CvHASGV\*(C'\fR has been added, which will return true for CVs that +notionally have GVs, but without reifying the GV. \f(CW\*(C`CvGV\*(C'\fR also returns a GV +now for lexical subs. +[GH #13392] <https://github.com/Perl/perl5/issues/13392> +.IP \(bu 4 +The "sync_locale" in perlapi function has been added to the public API. +Changing the program's locale should be avoided by XS code. Nevertheless, +certain non-Perl libraries called from XS need to do so, such as \f(CW\*(C`Gtk\*(C'\fR. +When this happens, Perl needs to be told that the locale has +changed. Use this function to do so, before returning to Perl. +.IP \(bu 4 +The defines and labels for the flags in the \f(CW\*(C`op_private\*(C'\fR field of OPs are now +auto-generated from data in \fIregen/op_private\fR. The noticeable effect of this +is that some of the flag output of \f(CW\*(C`Concise\*(C'\fR might differ slightly, and the +flag output of \f(CW\*(C`perl\ \-Dx\*(C'\fR may differ considerably (they both use the same set +of labels now). Also, debugging builds now have a new assertion in +\&\f(CWop_free()\fR to ensure that the op doesn't have any unrecognized flags set in +\&\f(CW\*(C`op_private\*(C'\fR. +.IP \(bu 4 +The deprecated variable \f(CW\*(C`PL_sv_objcount\*(C'\fR has been removed. +.IP \(bu 4 +Perl now tries to keep the locale category \f(CW\*(C`LC_NUMERIC\*(C'\fR set to "C" +except around operations that need it to be set to the program's +underlying locale. This protects the many XS modules that cannot cope +with the decimal radix character not being a dot. Prior to this +release, Perl initialized this category to "C", but a call to +\&\f(CWPOSIX::setlocale()\fR would change it. Now such a call will change the +underlying locale of the \f(CW\*(C`LC_NUMERIC\*(C'\fR category for the program, but the +locale exposed to XS code will remain "C". There are new macros +to manipulate the LC_NUMERIC locale, including +\&\f(CW\*(C`STORE_LC_NUMERIC_SET_TO_NEEDED\*(C'\fR and +\&\f(CW\*(C`STORE_LC_NUMERIC_FORCE_TO_UNDERLYING\*(C'\fR. +See "Locale-related functions and macros" in perlapi. +.IP \(bu 4 +A new macro \f(CW\*(C`isUTF8_CHAR\*(C'\fR has been written which +efficiently determines if the string given by its parameters begins +with a well-formed UTF\-8 encoded character. +.IP \(bu 4 +The following private API functions had their context parameter removed: +\&\f(CW\*(C`Perl_cast_ulong\*(C'\fR, \f(CW\*(C`Perl_cast_i32\*(C'\fR, \f(CW\*(C`Perl_cast_iv\*(C'\fR, \f(CW\*(C`Perl_cast_uv\*(C'\fR, +\&\f(CW\*(C`Perl_cv_const_sv\*(C'\fR, \f(CW\*(C`Perl_mg_find\*(C'\fR, \f(CW\*(C`Perl_mg_findext\*(C'\fR, \f(CW\*(C`Perl_mg_magical\*(C'\fR, +\&\f(CW\*(C`Perl_mini_mktime\*(C'\fR, \f(CW\*(C`Perl_my_dirfd\*(C'\fR, \f(CW\*(C`Perl_sv_backoff\*(C'\fR, \f(CW\*(C`Perl_utf8_hop\*(C'\fR. +.Sp +Note that the prefix-less versions of those functions that are part of the +public API, such as \f(CWcast_i32()\fR, remain unaffected. +.IP \(bu 4 +The \f(CW\*(C`PADNAME\*(C'\fR and \f(CW\*(C`PADNAMELIST\*(C'\fR types are now separate types, and no +longer simply aliases for SV and AV. +[GH #14250] <https://github.com/Perl/perl5/issues/14250>. +.IP \(bu 4 +Pad names are now always UTF\-8. The \f(CW\*(C`PadnameUTF8\*(C'\fR macro always returns +true. Previously, this was effectively the case already, but any support +for two different internal representations of pad names has now been +removed. +.IP \(bu 4 +A new op class, \f(CW\*(C`UNOP_AUX\*(C'\fR, has been added. This is a subclass of +\&\f(CW\*(C`UNOP\*(C'\fR with an \f(CW\*(C`op_aux\*(C'\fR field added, which points to an array of unions +of UV, SV* etc. It is intended for where an op needs to store more data +than a simple \f(CW\*(C`op_sv\*(C'\fR or whatever. Currently the only op of this type is +\&\f(CW\*(C`OP_MULTIDEREF\*(C'\fR (see next item). +.IP \(bu 4 +A new op has been added, \f(CW\*(C`OP_MULTIDEREF\*(C'\fR, which performs one or more +nested array and hash lookups where the key is a constant or simple +variable. For example the expression \f(CW\*(C`$a[0]{$k}[$i]\*(C'\fR, which previously +involved ten \f(CW\*(C`rv2Xv\*(C'\fR, \f(CW\*(C`Xelem\*(C'\fR, \f(CW\*(C`gvsv\*(C'\fR and \f(CW\*(C`const\*(C'\fR ops is now performed +by a single \f(CW\*(C`multideref\*(C'\fR op. It can also handle \f(CW\*(C`local\*(C'\fR, \f(CW\*(C`exists\*(C'\fR and +\&\f(CW\*(C`delete\*(C'\fR. A non-simple index expression, such as \f(CW\*(C`[$i+1]\*(C'\fR is still done +using \f(CW\*(C`aelem\*(C'\fR/\f(CW\*(C`helem\*(C'\fR, and single-level array lookup with a small constant +index is still done using \f(CW\*(C`aelemfast\*(C'\fR. +.SH "Selected Bug Fixes" +.IX Header "Selected Bug Fixes" +.IP \(bu 4 +\&\f(CW\*(C`close\*(C'\fR now sets \f(CW$!\fR +.Sp +When an I/O error occurs, the fact that there has been an error is recorded +in the handle. \f(CW\*(C`close\*(C'\fR returns false for such a handle. Previously, the +value of \f(CW$!\fR would be untouched by \f(CW\*(C`close\*(C'\fR, so the common convention of +writing \f(CW\*(C`close\ $fh\ or\ die\ $!\*(C'\fR did not work reliably. Now the handle +records the value of \f(CW$!\fR, too, and \f(CW\*(C`close\*(C'\fR restores it. +.IP \(bu 4 +\&\f(CW\*(C`no re\*(C'\fR now can turn off everything that \f(CW\*(C`use re\*(C'\fR enables +.Sp +Previously, running \f(CW\*(C`no re\*(C'\fR would turn off only a few things. Now it +can turn off all the enabled things. For example, the only way to +stop debugging, once enabled, was to exit the enclosing block; that is +now fixed. +.IP \(bu 4 +\&\f(CW\*(C`pack("D", $x)\*(C'\fR and \f(CW\*(C`pack("F", $x)\*(C'\fR now zero the padding on x86 long +double builds. Under some build options on GCC 4.8 and later, they used +to either overwrite the zero-initialized padding, or bypass the +initialized buffer entirely. This caused \fIop/pack.t\fR to fail. +[GH #14554] <https://github.com/Perl/perl5/issues/14554> +.IP \(bu 4 +Extending an array cloned from a parent thread could result in "Modification of +a read-only value attempted" errors when attempting to modify the new elements. +[GH #14605] <https://github.com/Perl/perl5/issues/14605> +.IP \(bu 4 +An assertion failure and subsequent crash with \f(CW\*(C`*x=<y>\*(C'\fR has been fixed. +[GH #14493] <https://github.com/Perl/perl5/issues/14493> +.IP \(bu 4 +A possible crashing/looping bug related to compiling lexical subs has been +fixed. +[GH #14596] <https://github.com/Perl/perl5/issues/14596> +.IP \(bu 4 +UTF\-8 now works correctly in function names, in unquoted HERE-document +terminators, and in variable names used as array indexes. +[GH #14601] <https://github.com/Perl/perl5/issues/14601> +.IP \(bu 4 +Repeated global pattern matches in scalar context on large tainted strings were +exponentially slow depending on the current match position in the string. +[GH #14238] <https://github.com/Perl/perl5/issues/14238> +.IP \(bu 4 +Various crashes due to the parser getting confused by syntax errors have been +fixed. +[GH #14496] <https://github.com/Perl/perl5/issues/14496> +[GH #14497] <https://github.com/Perl/perl5/issues/14497> +[GH #14548] <https://github.com/Perl/perl5/issues/14548> +[GH #14564] <https://github.com/Perl/perl5/issues/14564> +.IP \(bu 4 +\&\f(CW\*(C`split\*(C'\fR in the scope of lexical \f(CW$_\fR has been fixed not to fail assertions. +[GH #14483] <https://github.com/Perl/perl5/issues/14483> +.IP \(bu 4 +\&\f(CW\*(C`my $x : attr\*(C'\fR syntax inside various list operators no longer fails +assertions. +[GH #14500] <https://github.com/Perl/perl5/issues/14500> +.IP \(bu 4 +An \f(CW\*(C`@\*(C'\fR sign in quotes followed by a non-ASCII digit (which is not a valid +identifier) would cause the parser to crash, instead of simply trying the +\&\f(CW\*(C`@\*(C'\fR as literal. This has been fixed. +[GH #14553] <https://github.com/Perl/perl5/issues/14553> +.IP \(bu 4 +\&\f(CW\*(C`*bar::=*foo::=*glob_with_hash\*(C'\fR has been crashing since Perl 5.14, but no +longer does. +[GH #14512] <https://github.com/Perl/perl5/issues/14512> +.IP \(bu 4 +\&\f(CW\*(C`foreach\*(C'\fR in scalar context was not pushing an item on to the stack, resulting +in bugs. (\f(CW\*(C`print\ 4,\ scalar\ do\ {\ foreach(@x){}\ }\ +\ 1\*(C'\fR would print 5.) +It has been fixed to return \f(CW\*(C`undef\*(C'\fR. +[GH #14569] <https://github.com/Perl/perl5/issues/14569> +.IP \(bu 4 +Several cases of data used to store environment variable contents in core C +code being potentially overwritten before being used have been fixed. +[GH #14476] <https://github.com/Perl/perl5/issues/14476> +.IP \(bu 4 +Some patterns starting with \f(CW\*(C`/.*..../\*(C'\fR matched against long strings have +been slow since v5.8, and some of the form \f(CW\*(C`/.*..../i\*(C'\fR have been slow +since v5.18. They are now all fast again. +[GH #14475] <https://github.com/Perl/perl5/issues/14475>. +.IP \(bu 4 +The original visible value of \f(CW$/\fR is now preserved when it is set to +an invalid value. Previously if you set \f(CW$/\fR to a reference to an +array, for example, perl would produce a runtime error and not set +\&\f(CW\*(C`PL_rs\*(C'\fR, but Perl code that checked \f(CW$/\fR would see the array +reference. +[GH #14245] <https://github.com/Perl/perl5/issues/14245>. +.IP \(bu 4 +In a regular expression pattern, a POSIX class, like \f(CW\*(C`[:ascii:]\*(C'\fR, must +be inside a bracketed character class, like \f(CW\*(C`qr/[[:ascii:]]/\*(C'\fR. A +warning is issued when something looking like a POSIX class is not +inside a bracketed class. That warning wasn't getting generated when +the POSIX class was negated: \f(CW\*(C`[:^ascii:]\*(C'\fR. This is now fixed. +.IP \(bu 4 +Perl 5.14.0 introduced a bug whereby \f(CW\*(C`eval\ {\ LABEL:\ }\*(C'\fR would crash. This +has been fixed. +[GH #14438] <https://github.com/Perl/perl5/issues/14438>. +.IP \(bu 4 +Various crashes due to the parser getting confused by syntax errors have +been fixed. +[GH #14421] <https://github.com/Perl/perl5/issues/14421>. +[GH #14472] <https://github.com/Perl/perl5/issues/14472>. +[GH #14480] <https://github.com/Perl/perl5/issues/14480>. +[GH #14447] <https://github.com/Perl/perl5/issues/14447>. +.IP \(bu 4 +Code like \f(CW\*(C`/$a[/\*(C'\fR used to read the next line of input and treat it as +though it came immediately after the opening bracket. Some invalid code +consequently would parse and run, but some code caused crashes, so this is +now disallowed. +[GH #14462] <https://github.com/Perl/perl5/issues/14462>. +.IP \(bu 4 +Fix argument underflow for \f(CW\*(C`pack\*(C'\fR. +[GH #14525] <https://github.com/Perl/perl5/issues/14525>. +.IP \(bu 4 +Fix handling of non-strict \f(CW\*(C`\ex{}\*(C'\fR. Now \f(CW\*(C`\ex{}\*(C'\fR is equivalent to \f(CW\*(C`\ex{0}\*(C'\fR +instead of faulting. +.IP \(bu 4 +\&\f(CW\*(C`stat \-t\*(C'\fR is now no longer treated as stackable, just like \f(CW\*(C`\-t stat\*(C'\fR. +[GH #14499] <https://github.com/Perl/perl5/issues/14499>. +.IP \(bu 4 +The following no longer causes a SEGV: \f(CW\*(C`qr{x+(y(?0))*}\*(C'\fR. +.IP \(bu 4 +Fixed infinite loop in parsing backrefs in regexp patterns. +.IP \(bu 4 +Several minor bug fixes in behavior of Infinity and NaN, including +warnings when stringifying Infinity-like or NaN-like strings. For example, +"NaNcy" doesn't numify to NaN anymore. +.IP \(bu 4 +A bug in regular expression patterns that could lead to segfaults and +other crashes has been fixed. This occurred only in patterns compiled +with \f(CW\*(C`/i\*(C'\fR while taking into account the current POSIX locale (which usually +means they have to be compiled within the scope of \f(CW\*(C`use\ locale\*(C'\fR), +and there must be a string of at least 128 consecutive bytes to match. +[GH #14389] <https://github.com/Perl/perl5/issues/14389>. +.IP \(bu 4 +\&\f(CW\*(C`s///g\*(C'\fR now works on very long strings (where there are more than 2 +billion iterations) instead of dying with 'Substitution loop'. +[GH #11742] <https://github.com/Perl/perl5/issues/11742>. +[GH #14190] <https://github.com/Perl/perl5/issues/14190>. +.IP \(bu 4 +\&\f(CW\*(C`gmtime\*(C'\fR no longer crashes with not-a-number values. +[GH #14365] <https://github.com/Perl/perl5/issues/14365>. +.IP \(bu 4 +\&\f(CW\*(C`\e()\*(C'\fR (a reference to an empty list), and \f(CW\*(C`y///\*(C'\fR with lexical \f(CW$_\fR in +scope, could both do a bad write past the end of the stack. They have +both been fixed to extend the stack first. +.IP \(bu 4 +\&\f(CWprototype()\fR with no arguments used to read the previous item on the +stack, so \f(CW\*(C`print\ "foo",\ prototype()\*(C'\fR would print foo's prototype. +It has been fixed to infer \f(CW$_\fR instead. +[GH #14376] <https://github.com/Perl/perl5/issues/14376>. +.IP \(bu 4 +Some cases of lexical state subs declared inside predeclared subs could +crash, for example when evalling a string including the name of an outer +variable, but no longer do. +.IP \(bu 4 +Some cases of nested lexical state subs inside anonymous subs could cause +\&'Bizarre copy' errors or possibly even crashes. +.IP \(bu 4 +When trying to emit warnings, perl's default debugger (\fIperl5db.pl\fR) was +sometimes giving 'Undefined subroutine &DB::db_warn called' instead. This +bug, which started to occur in Perl 5.18, has been fixed. +[GH #14400] <https://github.com/Perl/perl5/issues/14400>. +.IP \(bu 4 +Certain syntax errors in substitutions, such as \f(CW\*(C`s/${<>{})//\*(C'\fR, would +crash, and had done so since Perl 5.10. (In some cases the crash did not +start happening till 5.16.) The crash has, of course, been fixed. +[GH #14391] <https://github.com/Perl/perl5/issues/14391>. +.IP \(bu 4 +Fix a couple of string grow size calculation overflows; in particular, +a repeat expression like \f(CW\*(C`33\ x\ ~3\*(C'\fR could cause a large buffer +overflow since the new output buffer size was not correctly handled by +\&\f(CWSvGROW()\fR. An expression like this now properly produces a memory wrap +panic. +[GH #14401] <https://github.com/Perl/perl5/issues/14401>. +.IP \(bu 4 +\&\f(CW\*(C`formline("@...", "a");\*(C'\fR would crash. The \f(CW\*(C`FF_CHECKNL\*(C'\fR case in +\&\f(CWpp_formline()\fR didn't set the pointer used to mark the chop position, +which led to the \f(CW\*(C`FF_MORE\*(C'\fR case crashing with a segmentation fault. +This has been fixed. +[GH #14388] <https://github.com/Perl/perl5/issues/14388>. +.IP \(bu 4 +A possible buffer overrun and crash when parsing a literal pattern during +regular expression compilation has been fixed. +[GH #14416] <https://github.com/Perl/perl5/issues/14416>. +.IP \(bu 4 +\&\f(CWfchmod()\fR and \f(CWfutimes()\fR now set \f(CW$!\fR when they fail due to being +passed a closed file handle. +[GH #14073] <https://github.com/Perl/perl5/issues/14073>. +.IP \(bu 4 +\&\f(CWop_free()\fR and \f(CWscalarvoid()\fR no longer crash due to a stack overflow +when freeing a deeply recursive op tree. +[GH #11866] <https://github.com/Perl/perl5/issues/11866>. +.IP \(bu 4 +In Perl 5.20.0, \f(CW$^N\fR accidentally had the internal UTF\-8 flag turned off +if accessed from a code block within a regular expression, effectively +UTF\-8\-encoding the value. This has been fixed. +[GH #14211] <https://github.com/Perl/perl5/issues/14211>. +.IP \(bu 4 +A failed \f(CW\*(C`semctl\*(C'\fR call no longer overwrites existing items on the stack, +which means that \f(CW\*(C`(semctl(\-1,0,0,0))[0]\*(C'\fR no longer gives an +"uninitialized" warning. +.IP \(bu 4 +\&\f(CW\*(C`else{foo()}\*(C'\fR with no space before \f(CW\*(C`foo\*(C'\fR is now better at assigning the +right line number to that statement. +[GH #14070] <https://github.com/Perl/perl5/issues/14070>. +.IP \(bu 4 +Sometimes the assignment in \f(CW\*(C`@array = split\*(C'\fR gets optimised so that \f(CW\*(C`split\*(C'\fR +itself writes directly to the array. This caused a bug, preventing this +assignment from being used in lvalue context. So +\&\f(CW\*(C`(@a=split//,"foo")=bar()\*(C'\fR was an error. (This bug probably goes back to +Perl 3, when the optimisation was added.) It has now been fixed. +[GH #14183] <https://github.com/Perl/perl5/issues/14183>. +.IP \(bu 4 +When an argument list fails the checks specified by a subroutine +signature (which is still an experimental feature), the resulting error +messages now give the file and line number of the caller, not of the +called subroutine. +[GH #13643] <https://github.com/Perl/perl5/issues/13643>. +.IP \(bu 4 +The flip-flop operators (\f(CW\*(C`..\*(C'\fR and \f(CW\*(C`...\*(C'\fR in scalar context) used to maintain +a separate state for each recursion level (the number of times the +enclosing sub was called recursively), contrary to the documentation. Now +each closure has one internal state for each flip-flop. +[GH #14110] <https://github.com/Perl/perl5/issues/14110>. +.IP \(bu 4 +The flip-flop operator (\f(CW\*(C`..\*(C'\fR in scalar context) would return the same +scalar each time, unless the containing subroutine was called recursively. +Now it always returns a new scalar. +[GH #14110] <https://github.com/Perl/perl5/issues/14110>. +.IP \(bu 4 +\&\f(CW\*(C`use\*(C'\fR, \f(CW\*(C`no\*(C'\fR, statement labels, special blocks (\f(CW\*(C`BEGIN\*(C'\fR) and pod are now +permitted as the first thing in a \f(CW\*(C`map\*(C'\fR or \f(CW\*(C`grep\*(C'\fR block, the block after +\&\f(CW\*(C`print\*(C'\fR or \f(CW\*(C`say\*(C'\fR (or other functions) returning a handle, and within +\&\f(CW\*(C`${...}\*(C'\fR, \f(CW\*(C`@{...}\*(C'\fR, etc. +[GH #14088] <https://github.com/Perl/perl5/issues/14088>. +.IP \(bu 4 +The repetition operator \f(CW\*(C`x\*(C'\fR now propagates lvalue context to its left-hand +argument when used in contexts like \f(CW\*(C`foreach\*(C'\fR. That allows +\&\f(CW\*(C`for(($#that_array)x2)\ {\ ...\ }\*(C'\fR to work as expected if the loop modifies +\&\f(CW$_\fR. +.IP \(bu 4 +\&\f(CW\*(C`(...) x ...\*(C'\fR in scalar context used to corrupt the stack if one operand +was an object with "x" overloading, causing erratic behavior. +[GH #13811] <https://github.com/Perl/perl5/issues/13811>. +.IP \(bu 4 +Assignment to a lexical scalar is often optimised away; for example in +\&\f(CW\*(C`my $x; $x = $y + $z\*(C'\fR, the assign operator is optimised away and the add +operator writes its result directly to \f(CW$x\fR. Various bugs related to +this optimisation have been fixed. Certain operators on the right-hand +side would sometimes fail to assign the value at all or assign the wrong +value, or would call STORE twice or not at all on tied variables. The +operators affected were \f(CW\*(C`$foo++\*(C'\fR, \f(CW\*(C`$foo\-\-\*(C'\fR, and \f(CW\*(C`\-$foo\*(C'\fR under \f(CW\*(C`use +integer\*(C'\fR, \f(CW\*(C`chomp\*(C'\fR, \f(CW\*(C`chr\*(C'\fR and \f(CW\*(C`setpgrp\*(C'\fR. +.IP \(bu 4 +List assignments were sometimes buggy if the same scalar ended up on both +sides of the assignment due to use of \f(CW\*(C`tied\*(C'\fR, \f(CW\*(C`values\*(C'\fR or \f(CW\*(C`each\*(C'\fR. The +result would be the wrong value getting assigned. +.IP \(bu 4 +\&\f(CWsetpgrp($nonzero)\fR (with one argument) was accidentally changed in 5.16 +to mean \f(CWsetpgrp(0)\fR. This has been fixed. +.IP \(bu 4 +\&\f(CW\*(C`_\|_SUB_\|_\*(C'\fR could return the wrong value or even corrupt memory under the +debugger (the \f(CW\*(C`\-d\*(C'\fR switch) and in subs containing \f(CW\*(C`eval $string\*(C'\fR. +.IP \(bu 4 +When \f(CW\*(C`sub\ ()\ {\ $var\ }\*(C'\fR becomes inlinable, it now returns a different +scalar each time, just as a non-inlinable sub would, though Perl still +optimises the copy away in cases where it would make no observable +difference. +.IP \(bu 4 +\&\f(CW\*(C`my\ sub\ f\ ()\ {\ $var\ }\*(C'\fR and \f(CW\*(C`sub\ ()\ :\ attr\ {\ $var\ }\*(C'\fR are no longer +eligible for inlining. The former would crash; the latter would just +throw the attributes away. An exception is made for the little-known +\&\f(CW\*(C`:method\*(C'\fR attribute, which does nothing much. +.IP \(bu 4 +Inlining of subs with an empty prototype is now more consistent than +before. Previously, a sub with multiple statements, of which all but the last +were optimised away, would be inlinable only if it were an anonymous sub +containing a string \f(CW\*(C`eval\*(C'\fR or \f(CW\*(C`state\*(C'\fR declaration or closing over an +outer lexical variable (or any anonymous sub under the debugger). Now any +sub that gets folded to a single constant after statements have been +optimised away is eligible for inlining. This applies to things like \f(CW\*(C`sub +() { jabber() if DEBUG; 42 }\*(C'\fR. +.Sp +Some subroutines with an explicit \f(CW\*(C`return\*(C'\fR were being made inlinable, +contrary to the documentation, Now \f(CW\*(C`return\*(C'\fR always prevents inlining. +.IP \(bu 4 +On some systems, such as VMS, \f(CW\*(C`crypt\*(C'\fR can return a non-ASCII string. If a +scalar assigned to had contained a UTF\-8 string previously, then \f(CW\*(C`crypt\*(C'\fR +would not turn off the UTF\-8 flag, thus corrupting the return value. This +would happen with \f(CW\*(C`$lexical\ =\ crypt\ ...\*(C'\fR. +.IP \(bu 4 +\&\f(CW\*(C`crypt\*(C'\fR no longer calls \f(CW\*(C`FETCH\*(C'\fR twice on a tied first argument. +.IP \(bu 4 +An unterminated here-doc on the last line of a quote-like operator +(\f(CW\*(C`qq[${ <<END }]\*(C'\fR, \f(CW\*(C`/(?{ <<END })/\*(C'\fR) no longer causes a double free. It +started doing so in 5.18. +.IP \(bu 4 +\&\f(CWindex()\fR and \f(CWrindex()\fR no longer crash when used on strings over 2GB in +size. +[GH #13700] <https://github.com/Perl/perl5/issues/13700>. +.IP \(bu 4 +A small, previously intentional, memory leak in +\&\f(CW\*(C`PERL_SYS_INIT\*(C'\fR/\f(CW\*(C`PERL_SYS_INIT3\*(C'\fR on Win32 builds was fixed. This might +affect embedders who repeatedly create and destroy perl engines within +the same process. +.IP \(bu 4 +\&\f(CWPOSIX::localeconv()\fR now returns the data for the program's underlying +locale even when called from outside the scope of \f(CW\*(C`use\ locale\*(C'\fR. +.IP \(bu 4 +\&\f(CWPOSIX::localeconv()\fR now works properly on platforms which don't have +\&\f(CW\*(C`LC_NUMERIC\*(C'\fR and/or \f(CW\*(C`LC_MONETARY\*(C'\fR, or for which Perl has been compiled +to disregard either or both of these locale categories. In such +circumstances, there are now no entries for the corresponding values in +the hash returned by \f(CWlocaleconv()\fR. +.IP \(bu 4 +\&\f(CWPOSIX::localeconv()\fR now marks appropriately the values it returns as +UTF\-8 or not. Previously they were always returned as bytes, even if +they were supposed to be encoded as UTF\-8. +.IP \(bu 4 +On Microsoft Windows, within the scope of \f(CW\*(C`use\ locale\*(C'\fR, the following +POSIX character classes gave results for many locales that did not +conform to the POSIX standard: +\&\f(CW\*(C`[[:alnum:]]\*(C'\fR, +\&\f(CW\*(C`[[:alpha:]]\*(C'\fR, +\&\f(CW\*(C`[[:blank:]]\*(C'\fR, +\&\f(CW\*(C`[[:digit:]]\*(C'\fR, +\&\f(CW\*(C`[[:graph:]]\*(C'\fR, +\&\f(CW\*(C`[[:lower:]]\*(C'\fR, +\&\f(CW\*(C`[[:print:]]\*(C'\fR, +\&\f(CW\*(C`[[:punct:]]\*(C'\fR, +\&\f(CW\*(C`[[:upper:]]\*(C'\fR, +\&\f(CW\*(C`[[:word:]]\*(C'\fR, +and +\&\f(CW\*(C`[[:xdigit:]]\*(C'\fR. +This was because the underlying Microsoft implementation does not +follow the standard. Perl now takes special precautions to correct for +this. +.IP \(bu 4 +Many issues have been detected by Coverity <http://www.coverity.com/> and +fixed. +.IP \(bu 4 +\&\f(CWsystem()\fR and friends should now work properly on more Android builds. +.Sp +Due to an oversight, the value specified through \f(CW\*(C`\-Dtargetsh\*(C'\fR to \fIConfigure\fR +would end up being ignored by some of the build process. This caused perls +cross-compiled for Android to end up with defective versions of \f(CWsystem()\fR, +\&\f(CWexec()\fR and backticks: the commands would end up looking for \f(CW\*(C`/bin/sh\*(C'\fR +instead of \f(CW\*(C`/system/bin/sh\*(C'\fR, and so would fail for the vast majority +of devices, leaving \f(CW$!\fR as \f(CW\*(C`ENOENT\*(C'\fR. +.IP \(bu 4 +\&\f(CW\*(C`qr(...\e(...\e)...)\*(C'\fR, +\&\f(CW\*(C`qr[...\e[...\e]...]\*(C'\fR, +and +\&\f(CW\*(C`qr{...\e{...\e}...}\*(C'\fR +now work. Previously it was impossible to escape these three +left-characters with a backslash within a regular expression pattern +where otherwise they would be considered metacharacters, and the pattern +opening delimiter was the character, and the closing delimiter was its +mirror character. +.IP \(bu 4 +\&\f(CW\*(C`s///e\*(C'\fR on tainted UTF\-8 strings corrupted \f(CWpos()\fR. This bug, +introduced in 5.20, is now fixed. +[GH #13948] <https://github.com/Perl/perl5/issues/13948>. +.IP \(bu 4 +A non-word boundary in a regular expression (\f(CW\*(C`\eB\*(C'\fR) did not always +match the end of the string; in particular \f(CW\*(C`q{} =~ /\eB/\*(C'\fR did not +match. This bug, introduced in perl 5.14, is now fixed. +[GH #13917] <https://github.com/Perl/perl5/issues/13917>. +.IP \(bu 4 +\&\f(CW\*(C`" P" =~ /(?=.*P)P/\*(C'\fR should match, but did not. This is now fixed. +[GH #13954] <https://github.com/Perl/perl5/issues/13954>. +.IP \(bu 4 +Failing to compile \f(CW\*(C`use Foo\*(C'\fR in an \f(CW\*(C`eval\*(C'\fR could leave a spurious +\&\f(CW\*(C`BEGIN\*(C'\fR subroutine definition, which would produce a "Subroutine +BEGIN redefined" warning on the next use of \f(CW\*(C`use\*(C'\fR, or other \f(CW\*(C`BEGIN\*(C'\fR +block. +[GH #13926] <https://github.com/Perl/perl5/issues/13926>. +.IP \(bu 4 +\&\f(CW\*(C`method { BLOCK } ARGS\*(C'\fR syntax now correctly parses the arguments if they +begin with an opening brace. +[GH #9085] <https://github.com/Perl/perl5/issues/9085>. +.IP \(bu 4 +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. +[GH #13863] <https://github.com/Perl/perl5/issues/13863>. +.IP \(bu 4 +A bug has been fixed where zero-length assertions and code blocks inside of a +regex could cause \f(CW\*(C`pos\*(C'\fR to see an incorrect value. +[GH #14016] <https://github.com/Perl/perl5/issues/14016>. +.IP \(bu 4 +Dereferencing of constants now works correctly for typeglob constants. Previously +the glob was stringified and its name looked up. Now the glob itself is used. +[GH #9891] <https://github.com/Perl/perl5/issues/9891> +.IP \(bu 4 +When parsing a sigil (\f(CW\*(C`$\*(C'\fR \f(CW\*(C`@\*(C'\fR \f(CW\*(C`%\*(C'\fR \f(CW\*(C`&)\*(C'\fR 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. +.IP \(bu 4 +\&\f(CW\*(C`undef\ $reference\*(C'\fR now frees the referent immediately, instead of hanging on +to it until the next statement. +[GH #14032] <https://github.com/Perl/perl5/issues/14032> +.IP \(bu 4 +Various cases where the name of a sub is used (autoload, overloading, error +messages) used to crash for lexical subs, but have been fixed. +.IP \(bu 4 +Bareword lookup now tries to avoid vivifying packages if it turns out the +bareword is not going to be a subroutine name. +.IP \(bu 4 +Compilation of anonymous constants (\fIe.g.\fR, \f(CW\*(C`sub () { 3 }\*(C'\fR) no longer deletes +any subroutine named \f(CW\*(C`_\|_ANON_\|_\*(C'\fR in the current package. Not only was +\&\f(CW\*(C`*_\|_ANON_\|_{CODE}\*(C'\fR cleared, but there was a memory leak, too. This bug goes +back to Perl 5.8.0. +.IP \(bu 4 +Stub declarations like \f(CW\*(C`sub f;\*(C'\fR and \f(CW\*(C`sub f ();\*(C'\fR no longer wipe out constants +of the same name declared by \f(CW\*(C`use constant\*(C'\fR. This bug was introduced in Perl +5.10.0. +.IP \(bu 4 +\&\f(CW\*(C`qr/[\eN{named sequence}]/\*(C'\fR now works properly in many instances. +.Sp +Some names +known to \f(CW\*(C`\eN{...}\*(C'\fR 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 \f(CW\*(C`?[...])\*(C'\fR construct. When the \f(CW\*(C`[...]\*(C'\fR +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. +.IP \(bu 4 +Tainted constants evaluated at compile time no longer cause unrelated +statements to become tainted. +[GH #14059] <https://github.com/Perl/perl5/issues/14059> +.IP \(bu 4 +\&\f(CW\*(C`open\ $$fh,\ ...\*(C'\fR, which vivifies a handle with a name like +\&\f(CW"main::_GEN_0"\fR, was not giving the handle the right reference count, so +a double free could happen. +.IP \(bu 4 +When deciding that a bareword was a method name, the parser would get confused +if an \f(CW\*(C`our\*(C'\fR sub with the same name existed, and look up the method in the +package of the \f(CW\*(C`our\*(C'\fR sub, instead of the package of the invocant. +.IP \(bu 4 +The parser no longer gets confused by \f(CW\*(C`\eU=\*(C'\fR within a double-quoted string. It +used to produce a syntax error, but now compiles it correctly. +[GH #10882] <https://github.com/Perl/perl5/issues/10882> +.IP \(bu 4 +It has always been the intention for the \f(CW\*(C`\-B\*(C'\fR and \f(CW\*(C`\-T\*(C'\fR file test operators to +treat UTF\-8 encoded files as text. (perlfunc 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. +.IP \(bu 4 +Under some conditions warning messages raised during regular expression pattern +compilation were being output more than once. This has now been fixed. +.IP \(bu 4 +Perl 5.20.0 introduced a regression in which a UTF\-8 encoded regular +expression pattern that contains a single ASCII lowercase letter did not +match its uppercase counterpart. That has been fixed in both 5.20.1 and +5.22.0. +[GH #14051] <https://github.com/Perl/perl5/issues/14051> +.IP \(bu 4 +Constant folding could incorrectly suppress warnings if lexical warnings +(\f(CW\*(C`use warnings\*(C'\fR or \f(CW\*(C`no warnings\*(C'\fR) were not in effect and \f(CW$^W\fR were +false at compile time and true at run time. +.IP \(bu 4 +Loading Unicode tables during a regular expression match could cause assertion +failures under debugging builds if the previous match used the very same +regular expression. +[GH #14081] <https://github.com/Perl/perl5/issues/14081> +.IP \(bu 4 +Thread cloning used to work incorrectly for lexical subs, possibly causing +crashes or double frees on exit. +.IP \(bu 4 +Since Perl 5.14.0, deleting \f(CW$SomePackage::{_\|_ANON_\|_}\fR and then undefining an +anonymous subroutine could corrupt things internally, resulting in +Devel::Peek crashing or B.pm giving nonsensical data. This has been +fixed. +.IP \(bu 4 +\&\f(CW\*(C`(caller\ $n)[3]\*(C'\fR now reports names of lexical subs, instead of +treating them as \f(CW"(unknown)"\fR. +.IP \(bu 4 +\&\f(CW\*(C`sort subname LIST\*(C'\fR now supports using a lexical sub as the comparison +routine. +.IP \(bu 4 +Aliasing (\fIe.g.\fR, via \f(CW\*(C`*x\ =\ *y\*(C'\fR) could confuse list assignments that mention the +two names for the same variable on either side, causing wrong values to be +assigned. +[GH #5788] <https://github.com/Perl/perl5/issues/5788> +.IP \(bu 4 +Long here-doc terminators could cause a bad read on short lines of input. This +has been fixed. It is doubtful that any crash could have occurred. This bug +goes back to when here-docs were introduced in Perl 3.000 twenty-five years +ago. +.IP \(bu 4 +An optimization in \f(CW\*(C`split\*(C'\fR to treat \f(CW\*(C`split\ /^/\*(C'\fR like \f(CW\*(C`split\ /^/m\*(C'\fR had the +unfortunate side-effect of also treating \f(CW\*(C`split\ /\eA/\*(C'\fR like \f(CW\*(C`split\ /^/m\*(C'\fR, +which it should not. This has been fixed. (Note, however, that \f(CW\*(C`split\ /^x/\*(C'\fR +does not behave like \f(CW\*(C`split\ /^x/m\*(C'\fR, which is also considered to be a bug and +will be fixed in a future version.) +[GH #14086] <https://github.com/Perl/perl5/issues/14086> +.IP \(bu 4 +The little-known \f(CW\*(C`my\ Class\ $var\*(C'\fR syntax (see fields and attributes) +could get confused in the scope of \f(CW\*(C`use utf8\*(C'\fR if \f(CW\*(C`Class\*(C'\fR were a constant +whose value contained Latin\-1 characters. +.IP \(bu 4 +Locking and unlocking values via Hash::Util or \f(CW\*(C`Internals::SvREADONLY\*(C'\fR +no longer has any effect on values that were read-only to begin with. +Previously, unlocking such values could result in crashes, hangs or +other erratic behavior. +.IP \(bu 4 +Some unterminated \f(CW\*(C`(?(...)...)\*(C'\fR constructs in regular expressions would +either crash or give erroneous error messages. \f(CW\*(C`/(?(1)/\*(C'\fR is one such +example. +.IP \(bu 4 +\&\f(CW\*(C`pack\ "w",\ $tied\*(C'\fR no longer calls FETCH twice. +.IP \(bu 4 +List assignments like \f(CW\*(C`($x,\ $z)\ =\ (1,\ $y)\*(C'\fR now work correctly if \f(CW$x\fR and +\&\f(CW$y\fR have been aliased by \f(CW\*(C`foreach\*(C'\fR. +.IP \(bu 4 +Some patterns including code blocks with syntax errors, such as +\&\f(CW\*(C`/\ (?{(^{})/\*(C'\fR, would hang or fail assertions on debugging builds. Now +they produce errors. +.IP \(bu 4 +An assertion failure when parsing \f(CW\*(C`sort\*(C'\fR with debugging enabled has been +fixed. +[GH #14087] <https://github.com/Perl/perl5/issues/14087>. +.IP \(bu 4 +\&\f(CW\*(C`*a\ =\ *b;\ @a\ =\ split\ //,\ $b[1]\*(C'\fR could do a bad read and produce junk +results. +.IP \(bu 4 +In \f(CW\*(C`()\ =\ @array\ =\ split\*(C'\fR, the \f(CW\*(C`()\ =\*(C'\fR at the beginning no longer confuses +the optimizer into assuming a limit of 1. +.IP \(bu 4 +Fatal warnings no longer prevent the output of syntax errors. +[GH #14155] <https://github.com/Perl/perl5/issues/14155>. +.IP \(bu 4 +Fixed a NaN double-to-long-double conversion error on VMS. For quiet NaNs +(and only on Itanium, not Alpha) negative infinity instead of NaN was +produced. +.IP \(bu 4 +Fixed the issue that caused \f(CW\*(C`make distclean\*(C'\fR to incorrectly leave some +files behind. +[GH #14108] <https://github.com/Perl/perl5/issues/14108>. +.IP \(bu 4 +AIX now sets the length in \f(CW\*(C`getsockopt\*(C'\fR correctly. +[GH #13484] <https://github.com/Perl/perl5/issues/13484>. +[cpan #91183] <https://rt.cpan.org/Ticket/Display.html?id=91183>. +[cpan #85570] <https://rt.cpan.org/Ticket/Display.html?id=85570>. +.IP \(bu 4 +The optimization phase of a regexp compilation could run "forever" and +exhaust all memory under certain circumstances; now fixed. +[GH #13984] <https://github.com/Perl/perl5/issues/13984>. +.IP \(bu 4 +The test script \fIt/op/crypt.t\fR now uses the SHA\-256 algorithm if the +default one is disabled, rather than giving failures. +[GH #13715] <https://github.com/Perl/perl5/issues/13715>. +.IP \(bu 4 +Fixed an off-by-one error when setting the size of a shared array. +[GH #14151] <https://github.com/Perl/perl5/issues/14151>. +.IP \(bu 4 +Fixed a bug that could cause perl to enter an infinite loop during +compilation. In particular, a \f(CWwhile(1)\fR within a sublist, \fIe.g.\fR +.Sp +.Vb 1 +\& sub foo { () = ($a, my $b, ($c, do { while(1) {} })) } +.Ve +.Sp +The bug was introduced in 5.20.0 +[GH #14165] <https://github.com/Perl/perl5/issues/14165>. +.IP \(bu 4 +On Win32, if a variable was \f(CW\*(C`local\*(C'\fR\-ized in a pseudo-process that later +forked, restoring the original value in the child pseudo-process caused +memory corruption and a crash in the child pseudo-process (and therefore the +OS process). +[GH #8641] <https://github.com/Perl/perl5/issues/8641>. +.IP \(bu 4 +Calling \f(CW\*(C`write\*(C'\fR on a format with a \f(CW\*(C`^**\*(C'\fR field could produce a panic +in \f(CWsv_chop()\fR if there were insufficient arguments or if the variable +used to fill the field was empty. +[GH #14255] <https://github.com/Perl/perl5/issues/14255>. +.IP \(bu 4 +Non-ASCII lexical sub names now appear without trailing junk when they +appear in error messages. +.IP \(bu 4 +The \f(CW\*(C`\e@\*(C'\fR subroutine prototype no longer flattens parenthesized arrays +(taking a reference to each element), but takes a reference to the array +itself. +[GH #9111] <https://github.com/Perl/perl5/issues/9111>. +.IP \(bu 4 +A block containing nothing except a C\-style \f(CW\*(C`for\*(C'\fR loop could corrupt the +stack, causing lists outside the block to lose elements or have elements +overwritten. This could happen with \f(CW\*(C`map { for(...){...} } ...\*(C'\fR and with +lists containing \f(CW\*(C`do { for(...){...} }\*(C'\fR. +[GH #14269] <https://github.com/Perl/perl5/issues/14269>. +.IP \(bu 4 +\&\f(CWscalar()\fR now propagates lvalue context, so that +\&\f(CW\*(C`for(scalar($#foo))\ {\ ...\ }\*(C'\fR can modify \f(CW$#foo\fR through \f(CW$_\fR. +.IP \(bu 4 +\&\f(CW\*(C`qr/@array(?{block})/\*(C'\fR no longer dies with "Bizarre copy of ARRAY". +[GH #14292] <https://github.com/Perl/perl5/issues/14292>. +.IP \(bu 4 +\&\f(CW\*(C`eval\ \*(Aq$variable\*(Aq\*(C'\fR in nested named subroutines would sometimes look up a +global variable even with a lexical variable in scope. +.IP \(bu 4 +In perl 5.20.0, \f(CW\*(C`sort CORE::fake\*(C'\fR where 'fake' is anything other than a +keyword, started chopping off the last 6 characters and treating the result +as a sort sub name. The previous behavior of treating \f(CW\*(C`CORE::fake\*(C'\fR as a +sort sub name has been restored. +[GH #14323] <https://github.com/Perl/perl5/issues/14323>. +.IP \(bu 4 +Outside of \f(CW\*(C`use utf8\*(C'\fR, a single-character Latin\-1 lexical variable is +disallowed. The error message for it, "Can't use global \f(CW$foo\fR...", was +giving garbage instead of the variable name. +.IP \(bu 4 +\&\f(CW\*(C`readline\*(C'\fR on a nonexistent handle was causing \f(CW\*(C`${^LAST_FH}\*(C'\fR to produce a +reference to an undefined scalar (or fail an assertion). Now +\&\f(CW\*(C`${^LAST_FH}\*(C'\fR ends up undefined. +.IP \(bu 4 +\&\f(CW\*(C`(...) x ...\*(C'\fR in void context now applies scalar context to the left-hand +argument, instead of the context the current sub was called in. +[GH #14174] <https://github.com/Perl/perl5/issues/14174>. +.SH "Known Problems" +.IX Header "Known Problems" +.IP \(bu 4 +\&\f(CW\*(C`pack\*(C'\fR\-ing a NaN on a perl compiled with Visual C 6 does not behave properly, +leading to a test failure in \fIt/op/infnan.t\fR. +[GH #14705] <https://github.com/Perl/perl5/issues/14705> +.IP \(bu 4 +A goal is for Perl to be able to be recompiled to work reasonably well on any +Unicode version. In Perl 5.22, though, the earliest such version is Unicode +5.1 (current is 7.0). +.IP \(bu 4 +EBCDIC platforms +.RS 4 +.IP \(bu 4 +The \f(CW\*(C`cmp\*(C'\fR (and hence \f(CW\*(C`sort\*(C'\fR) operators do not necessarily give the +correct results when both operands are UTF-EBCDIC encoded strings and +there is a mixture of ASCII and/or control characters, along with other +characters. +.IP \(bu 4 +Ranges containing \f(CW\*(C`\eN{...}\*(C'\fR in the \f(CW\*(C`tr///\*(C'\fR (and \f(CW\*(C`y///\*(C'\fR) +transliteration operators are treated differently than the equivalent +ranges in regular expression patterns. They should, but don't, cause +the values in the ranges to all be treated as Unicode code points, and +not native ones. ("Version 8 Regular Expressions" in perlre gives +details as to how it should work.) +.IP \(bu 4 +Encode and encoding are mostly broken. +.IP \(bu 4 +Many CPAN modules that are shipped with core show failing tests. +.IP \(bu 4 +\&\f(CW\*(C`pack\*(C'\fR/\f(CW\*(C`unpack\*(C'\fR with \f(CW"U0"\fR format may not work properly. +.RE +.RS 4 +.RE +.IP \(bu 4 +The following modules are known to have test failures with this version of +Perl. In many cases, patches have been submitted, so there will hopefully be +new releases soon: +.RS 4 +.IP \(bu 4 +B::Generate version 1.50 +.IP \(bu 4 +B::Utils version 0.25 +.IP \(bu 4 +Coro version 6.42 +.IP \(bu 4 +Dancer version 1.3130 +.IP \(bu 4 +Data::Alias version 1.18 +.IP \(bu 4 +Data::Dump::Streamer version 2.38 +.IP \(bu 4 +Data::Util version 0.63 +.IP \(bu 4 +Devel::Spy version 0.07 +.IP \(bu 4 +invoker version 0.34 +.IP \(bu 4 +Lexical::Var version 0.009 +.IP \(bu 4 +LWP::ConsoleLogger version 0.000018 +.IP \(bu 4 +Mason version 2.22 +.IP \(bu 4 +NgxQueue version 0.02 +.IP \(bu 4 +Padre version 1.00 +.IP \(bu 4 +Parse::Keyword 0.08 +.RE +.RS 4 +.RE +.SH Obituary +.IX Header "Obituary" +Brian McCauley died on May 8, 2015. He was a frequent poster to Usenet, Perl +Monks, and other Perl forums, and made several CPAN contributions under the +nick NOBULL, including to the Perl FAQ. He attended almost every +YAPC::Europe, and indeed, helped organise YAPC::Europe 2006 and the QA +Hackathon 2009. His wit and his delight in intricate systems were +particularly apparent in his love of board games; many Perl mongers will +have fond memories of playing Fluxx and other games with Brian. He will be +missed. +.SH Acknowledgements +.IX Header "Acknowledgements" +Perl 5.22.0 represents approximately 12 months of development since Perl 5.20.0 +and contains approximately 590,000 lines of changes across 2,400 files from 94 +authors. +.PP +Excluding auto-generated files, documentation and release tools, there were +approximately 370,000 lines of changes to 1,500 .pm, .t, .c and .h files. +.PP +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.22.0: +.PP +Aaron Crane, Abhijit Menon-Sen, Abigail, Alberto Simões, Alex Solovey, Alex +Vandiver, Alexandr Ciornii, Alexandre (Midnite) Jousset, Andreas König, +Andreas Voegele, Andrew Fresh, Andy Dougherty, Anthony Heading, Aristotle +Pagaltzis, brian d foy, Brian Fraser, Chad Granum, Chris 'BinGOs' Williams, +Craig A. Berry, Dagfinn Ilmari Mannsåker, Daniel Dragan, Darin McBride, Dave +Rolsky, David Golden, David Mitchell, David Wheeler, Dmitri Tikhonov, Doug +Bell, E. Choroba, Ed J, Eric Herman, Father Chrysostomos, George Greer, Glenn +D. Golden, Graham Knop, H.Merijn Brand, Herbert Breunung, Hugo van der Sanden, +James E Keenan, James McCoy, James Raspass, Jan Dubois, Jarkko Hietaniemi, +Jasmine Ngan, Jerry D. Hedden, Jim Cromie, John Goodyear, kafka, Karen +Etheridge, Karl Williamson, Kent Fredric, kmx, Lajos Veres, Leon Timmermans, +Lukas Mai, Mathieu Arnold, Matthew Horsfall, Max Maischein, Michael Bunk, +Nicholas Clark, Niels Thykier, Niko Tyni, Norman Koch, Olivier Mengué, Peter +John Acklam, Peter Martini, Petr Písař, Philippe Bruhat (BooK), Pierre +Bogossian, Rafael Garcia-Suarez, Randy Stauner, Reini Urban, Ricardo Signes, +Rob Hoelz, Rostislav Skudnov, Sawyer X, Shirakata Kentaro, Shlomi Fish, +Sisyphus, Slaven Rezic, Smylers, Steffen Müller, Steve Hay, Sullivan Beck, +syber, Tadeusz Sośnierz, Thomas Sibley, Todd Rinaldo, Tony Cook, Vincent Pit, +Vladimir Marek, Yaroslav Kuzmin, Yves Orton, Ævar Arnfjörð Bjarmason. +.PP +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. +.PP +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. +.PP +For a more complete list of all of Perl's historical contributors, please see +the \fIAUTHORS\fR file in the Perl source distribution. +.SH "Reporting Bugs" +.IX Header "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. +.PP +If you believe you have an unreported bug, please run the perlbug 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 \f(CW\*(C`perl \-V\*(C'\fR, +will be sent off to perlbug@perl.org to be analysed by the Perl porting team. +.PP +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. +.SH "SEE ALSO" +.IX Header "SEE ALSO" +The \fIChanges\fR file for an explanation of how to view exhaustive details on +what changed. +.PP +The \fIINSTALL\fR file for how to build Perl. +.PP +The \fIREADME\fR file for general stuff. +.PP +The \fIArtistic\fR and \fICopying\fR files for copyright information. |