Debian Codegraph @

upstream/mageia-cauldron/man1/perl5220delta.1

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\"
56 .\" Required to disable full justification in groff 1.23.0.
57 .if n .ds AD l
58 .\" ========================================================================
59 .\"
60 .IX Title "PERL5220DELTA 1"
61 .TH PERL5220DELTA 1 2024-05-07 "perl v5.42.0" "Perl Programmers Reference Guide"
62 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
63 .\" way too many mistakes in technical documents.
64 .if n .ad l
65 .nh
66 .SH NAME
67 perl5220delta \- what is new for perl v5.22.0
68 .SH DESCRIPTION
69 .IX Header "DESCRIPTION"
70 This document describes differences between the 5.20.0 release and the 5.22.0
71 release.
72 .PP
73 If you are upgrading from an earlier release such as 5.18.0, first read
74 perl5200delta, which describes differences between 5.18.0 and 5.20.0.
75 .SH "Core Enhancements"
76 .IX Header "Core Enhancements"
77 .SS "New bitwise operators"
78 .IX Subsection "New bitwise operators"
79 A new experimental facility has been added that makes the four standard
80 bitwise operators (\f(CW\*(C`& | ^ ~\*(C'\fR) treat their operands consistently as
81 numbers, and introduces four new dotted operators (\f(CW\*(C`&. |. ^. ~.\*(C'\fR) that
82 treat their operands consistently as strings. The same applies to the
83 assignment variants (\f(CW\*(C`&= |= ^= &.= |.= ^.=\*(C'\fR).
84 .PP
85 To use this, enable the "bitwise" feature and disable the
86 "experimental::bitwise" warnings category. See "Bitwise String
87 Operators" in perlop for details.
88 [GH #14348] <https://github.com/Perl/perl5/issues/14348>.
89 .SS "New double\-diamond operator"
90 .IX Subsection "New double-diamond operator"
91 \&\f(CW\*(C`<<>>\*(C'\fR is like \f(CW\*(C`<>\*(C'\fR but uses three\-argument \f(CW\*(C`open\*(C'\fR to open
92 each file in \f(CW@ARGV\fR. This means that each element of \f(CW@ARGV\fR will be treated
93 as an actual file name, and \f(CW"|foo"\fR won\*(Aqt be treated as a pipe open.
94 .ie n .SS "New ""\eb"" boundaries in regular expressions"
95 .el .SS "New \f(CW\eb\fP boundaries in regular expressions"
96 .IX Subsection "New b boundaries in regular expressions"
97 \fR\f(CI\*(C`qr/\eb{gcb}/\*(C'\fR\fI\fR
98 .IX Subsection "qr/b{gcb}/"
99 .PP
100 \&\f(CW\*(C`gcb\*(C'\fR stands for Grapheme Cluster Boundary. It is a Unicode property
101 that finds the boundary between sequences of characters that look like a
102 single character to a native speaker of a language. Perl has long had
103 the ability to deal with these through the \f(CW\*(C`\eX\*(C'\fR regular escape
104 sequence. Now, there is an alternative way of handling these. See
105 "\eb{}, \eb, \eB{}, \eB" in perlrebackslash for details.
106 .PP
107 \fR\f(CI\*(C`qr/\eb{wb}/\*(C'\fR\fI\fR
108 .IX Subsection "qr/b{wb}/"
109 .PP
110 \&\f(CW\*(C`wb\*(C'\fR stands for Word Boundary. It is a Unicode property
111 that finds the boundary between words. This is similar to the plain
112 \&\f(CW\*(C`\eb\*(C'\fR (without braces) but is more suitable for natural language
113 processing. It knows, for example, that apostrophes can occur in the
114 middle of words. See "\eb{}, \eb, \eB{}, \eB" in perlrebackslash for details.
115 .PP
116 \fR\f(CI\*(C`qr/\eb{sb}/\*(C'\fR\fI\fR
117 .IX Subsection "qr/b{sb}/"
118 .PP
119 \&\f(CW\*(C`sb\*(C'\fR stands for Sentence Boundary. It is a Unicode property
120 to aid in parsing natural language sentences.
121 See "\eb{}, \eb, \eB{}, \eB" in perlrebackslash for details.
122 .SS "Non\-Capturing Regular Expression Flag"
123 .IX Subsection "Non-Capturing Regular Expression Flag"
124 Regular expressions now support a \f(CW\*(C`/n\*(C'\fR flag that disables capturing
125 and filling in \f(CW$1\fR, \f(CW$2\fR, etc inside of groups:
126 .PP
127 .Vb 1
128 \& "hello" =~ /(hi|hello)/n; # $1 is not set
129 .Ve
130 .PP
131 This is equivalent to putting \f(CW\*(C`?:\*(C'\fR at the beginning of every capturing group.
132 .PP
133 See "n" in perlre for more information.
134 .ie n .SS """use re \*(Aqstrict\*(Aq"""
135 .el .SS "\f(CWuse re \*(Aqstrict\*(Aq\fP"
136 .IX Subsection "use re 'strict'"
137 This applies stricter syntax rules to regular expression patterns
138 compiled within its scope. This will hopefully alert you to typos and
139 other unintentional behavior that backwards\-compatibility issues prevent
140 us from reporting in normal regular expression compilations. Because the
141 behavior of this is subject to change in future Perl releases as we gain
142 experience, using this pragma will raise a warning of category
143 \&\f(CW\*(C`experimental::re_strict\*(C'\fR.
144 See \*(Aqstrict\*(Aq in re.
145 .SS "Unicode 7.0 (with correction) is now supported"
146 .IX Subsection "Unicode 7.0 (with correction) is now supported"
147 For details on what is in this release, see
148 <http://www.unicode.org/versions/Unicode7.0.0/>.
149 The version of Unicode 7.0 that comes with Perl includes
150 a correction dealing with glyph shaping in Arabic
151 (see <http://www.unicode.org/errata/#current_errata>).
152 .ie n .SS """use\ locale"" can restrict which locale categories are affected"
153 .el .SS "\f(CWuse\ locale\fP can restrict which locale categories are affected"
154 .IX Subsection "use locale can restrict which locale categories are affected"
155 It is now possible to pass a parameter to \f(CW\*(C`use\ locale\*(C'\fR to specify
156 a subset of locale categories to be locale\-aware, with the remaining
157 ones unaffected. See "The "use locale" pragma" in perllocale for details.
158 .SS "Perl now supports POSIX 2008 locale currency additions"
159 .IX Subsection "Perl now supports POSIX 2008 locale currency additions"
160 On platforms that are able to handle POSIX.1\-2008, the
161 hash returned by
162 \&\f(CWPOSIX::localeconv()\fR
163 includes the international currency fields added by that version of the
164 POSIX standard. These are
165 \&\f(CW\*(C`int_n_cs_precedes\*(C'\fR,
166 \&\f(CW\*(C`int_n_sep_by_space\*(C'\fR,
167 \&\f(CW\*(C`int_n_sign_posn\*(C'\fR,
168 \&\f(CW\*(C`int_p_cs_precedes\*(C'\fR,
169 \&\f(CW\*(C`int_p_sep_by_space\*(C'\fR,
170 and
171 \&\f(CW\*(C`int_p_sign_posn\*(C'\fR.
172 .SS "Better heuristics on older platforms for determining locale UTF\-8ness"
173 .IX Subsection "Better heuristics on older platforms for determining locale UTF-8ness"
174 On platforms that implement neither the C99 standard nor the POSIX 2001
175 standard, determining if the current locale is UTF\-8 or not depends on
176 heuristics. These are improved in this release.
177 .SS "Aliasing via reference"
178 .IX Subsection "Aliasing via reference"
179 Variables and subroutines can now be aliased by assigning to a reference:
180 .PP
181 .Vb 2
182 \& \e$c = \e$d;
183 \& \e&x = \e&y;
184 .Ve
185 .PP
186 Aliasing can also be accomplished
187 by using a backslash before a \f(CW\*(C`foreach\*(C'\fR iterator variable; this is
188 perhaps the most useful idiom this feature provides:
189 .PP
190 .Vb 1
191 \& foreach \e%hash (@array_of_hash_refs) { ... }
192 .Ve
193 .PP
194 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
195 warnings category is disabled.
196 .PP
197 See "Assigning to References" in perlref
198 .ie n .SS """prototype"" with no arguments"
199 .el .SS "\f(CWprototype\fP with no arguments"
200 .IX Subsection "prototype with no arguments"
201 \&\f(CWprototype()\fR with no arguments now infers \f(CW$_\fR.
202 [GH #14376] <https://github.com/Perl/perl5/issues/14376>.
203 .ie n .SS "New "":const"" subroutine attribute"
204 .el .SS "New \f(CW:const\fP subroutine attribute"
205 .IX Subsection "New :const subroutine attribute"
206 The \f(CW\*(C`const\*(C'\fR attribute can be applied to an anonymous subroutine. It
207 causes the new sub to be executed immediately whenever one is created
208 (\fIi.e.\fR when the \f(CW\*(C`sub\*(C'\fR expression is evaluated). Its value is captured
209 and used to create a new constant subroutine that is returned. This
210 feature is experimental. See "Constant Functions" in perlsub.
211 .ie n .SS """fileno"" now works on directory handles"
212 .el .SS "\f(CWfileno\fP now works on directory handles"
213 .IX Subsection "fileno now works on directory handles"
214 When the relevant support is available in the operating system, the
215 \&\f(CW\*(C`fileno\*(C'\fR builtin now works on directory handles, yielding the
216 underlying file descriptor in the same way as for filehandles. On
217 operating systems without such support, \f(CW\*(C`fileno\*(C'\fR on a directory handle
218 continues to return the undefined value, as before, but also sets \f(CW$!\fR to
219 indicate that the operation is not supported.
220 .PP
221 Currently, this uses either a \f(CW\*(C`dd_fd\*(C'\fR member in the OS \f(CW\*(C`DIR\*(C'\fR
222 structure, or a \f(CWdirfd(3)\fR function as specified by POSIX.1\-2008.
223 .SS "List form of pipe open implemented for Win32"
224 .IX Subsection "List form of pipe open implemented for Win32"
225 The list form of pipe:
226 .PP
227 .Vb 1
228 \& open my $fh, "\-|", "program", @arguments;
229 .Ve
230 .PP
231 is now implemented on Win32. It has the same limitations as \f(CW\*(C`system
232 LIST\*(C'\fR on Win32, since the Win32 API doesn\*(Aqt accept program arguments
233 as a list.
234 .SS "Assignment to list repetition"
235 .IX Subsection "Assignment to list repetition"
236 \&\f(CW\*(C`(...) x ...\*(C'\fR can now be used within a list that is assigned to, as long
237 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.
238 .SS "Infinity and NaN (not\-a\-number) handling improved"
239 .IX Subsection "Infinity and NaN (not-a-number) handling improved"
240 Floating point values are able to hold the special values infinity, negative
241 infinity, and NaN (not\-a\-number). Now we more robustly recognize and
242 propagate the value in computations, and on output normalize them to the strings
243 \&\f(CW\*(C`Inf\*(C'\fR, \f(CW\*(C`\-Inf\*(C'\fR, and \f(CW\*(C`NaN\*(C'\fR.
244 .PP
245 See also the POSIX enhancements.
246 .SS "Floating point parsing has been improved"
247 .IX Subsection "Floating point parsing has been improved"
248 Parsing and printing of floating point values has been improved.
249 .PP
250 As a completely new feature, hexadecimal floating point literals
251 (like \f(CW\*(C`0x1.23p\-4\*(C'\fR) are now supported, and they can be output with
252 \&\f(CW\*(C`printf\ "%a"\*(C'\fR. See "Scalar value constructors" in perldata for more
253 details.
254 .SS "Packing infinity or not\-a\-number into a character is now fatal"
255 .IX Subsection "Packing infinity or not-a-number into a character is now fatal"
256 Before, when trying to pack infinity or not\-a\-number into a
257 (signed) character, Perl would warn, and assumed you tried to
258 pack \f(CW0xFF\fR; if you gave it as an argument to \f(CW\*(C`chr\*(C'\fR,
259 \&\f(CW\*(C`U+FFFD\*(C'\fR was returned.
260 .PP
261 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)
262 result in a fatal error.
263 .SS "Experimental C Backtrace API"
264 .IX Subsection "Experimental C Backtrace API"
265 Perl now supports (via a C level API) retrieving
266 the C level backtrace (similar to what symbolic debuggers like gdb do).
267 .PP
268 The backtrace returns the stack trace of the C call frames,
269 with the symbol names (function names), the object names (like "perl"),
270 and if it can, also the source code locations (file:line).
271 .PP
272 The supported platforms are Linux and OS X (some *BSD might work at
273 least partly, but they have not yet been tested).
274 .PP
275 The feature needs to be enabled with \f(CW\*(C`Configure \-Dusecbacktrace\*(C'\fR.
276 .PP
277 See "C backtrace" in perlhacktips for more information.
278 .SH Security
279 .IX Header "Security"
280 .ie n .SS "Perl is now compiled with ""\-fstack\-protector\-strong"" if available"
281 .el .SS "Perl is now compiled with \f(CW\-fstack\-protector\-strong\fP if available"
282 .IX Subsection "Perl is now compiled with -fstack-protector-strong if available"
283 Perl has been compiled with the anti\-stack\-smashing option
284 \&\f(CW\*(C`\-fstack\-protector\*(C'\fR since 5.10.1. Now Perl uses the newer variant
285 called \f(CW\*(C`\-fstack\-protector\-strong\*(C'\fR, if available.
286 .SS "The Safe module could allow outside packages to be replaced"
287 .IX Subsection "The Safe module could allow outside packages to be replaced"
288 Critical bugfix: outside packages could be replaced. Safe has
289 been patched to 2.38 to address this.
290 .ie n .SS "Perl is now always compiled with ""\-D_FORTIFY_SOURCE=2"" if available"
291 .el .SS "Perl is now always compiled with \f(CW\-D_FORTIFY_SOURCE=2\fP if available"
292 .IX Subsection "Perl is now always compiled with -D_FORTIFY_SOURCE=2 if available"
293 The \*(Aqcode hardening\*(Aq option called \f(CW\*(C`_FORTIFY_SOURCE\*(C'\fR, available in
294 gcc 4.*, is now always used for compiling Perl, if available.
295 .PP
296 Note that this isn\*(Aqt necessarily a huge step since in many platforms
297 the step had already been taken several years ago: many Linux
298 distributions (like Fedora) have been using this option for Perl,
299 and OS X has enforced the same for many years.
300 .SH "Incompatible Changes"
301 .IX Header "Incompatible Changes"
302 .SS "Subroutine signatures moved before attributes"
303 .IX Subsection "Subroutine signatures moved before attributes"
304 The experimental sub signatures feature, as introduced in 5.20, parsed
305 signatures after attributes. In this release, following feedback from users
306 of the experimental feature, the positioning has been moved such that
307 signatures occur after the subroutine name (if any) and before the attribute
308 list (if any).
309 .ie n .SS """&"" and ""\e&"" prototypes accepts only subs"
310 .el .SS "\f(CW&\fP and \f(CW\e&\fP prototypes accepts only subs"
311 .IX Subsection "& and & prototypes accepts only subs"
312 The \f(CW\*(C`&\*(C'\fR prototype character now accepts only anonymous subs (\f(CW\*(C`sub
313 {...}\*(C'\fR), things beginning with \f(CW\*(C`\e&\*(C'\fR, or an explicit \f(CW\*(C`undef\*(C'\fR. Formerly
314 it erroneously also allowed references to arrays, hashes, and lists.
315 [GH #2776] <https://github.com/Perl/perl5/issues/2776>.
316 [GH #14186] <https://github.com/Perl/perl5/issues/14186>.
317 [GH #14353] <https://github.com/Perl/perl5/issues/14353>.
318 .PP
319 In addition, the \f(CW\*(C`\e&\*(C'\fR prototype was allowing subroutine calls, whereas
320 now it only allows subroutines: \f(CW&foo\fR is still permitted as an argument,
321 while \f(CW&foo()\fR and \f(CWfoo()\fR no longer are.
322 [GH #10633] <https://github.com/Perl/perl5/issues/10633>.
323 .ie n .SS """use encoding"" is now lexical"
324 .el .SS "\f(CWuse encoding\fP is now lexical"
325 .IX Subsection "use encoding is now lexical"
326 The encoding pragma\*(Aqs effect is now limited to lexical scope. This
327 pragma is deprecated, but in the meantime, it could adversely affect
328 unrelated modules that are included in the same program; this change
329 fixes that.
330 .SS "List slices returning empty lists"
331 .IX Subsection "List slices returning empty lists"
332 List slices now return an empty list only if the original list was empty
333 (or if there are no indices). Formerly, a list slice would return an empty
334 list if all indices fell outside the original list; now it returns a list
335 of \f(CW\*(C`undef\*(C'\fR values in that case.
336 [GH #12335] <https://github.com/Perl/perl5/issues/12335>.
337 .ie n .SS """\eN{}"" with a sequence of multiple spaces is now a fatal error"
338 .el .SS "\f(CW\eN{}\fP with a sequence of multiple spaces is now a fatal error"
339 .IX Subsection "N{} with a sequence of multiple spaces is now a fatal error"
340 E.g. \f(CW\*(C`\eN{TOO\ \ MANY\ SPACES}\*(C'\fR or \f(CW\*(C`\eN{TRAILING\ SPACE\ }\*(C'\fR.
341 This has been deprecated since v5.18.
342 .ie n .SS """use\ UNIVERSAL\ \*(Aq...\*(Aq"" is now a fatal error"
343 .el .SS "\f(CWuse\ UNIVERSAL\ \*(Aq...\*(Aq\fP is now a fatal error"
344 .IX Subsection "use UNIVERSAL '...' is now a fatal error"
345 Importing functions from \f(CW\*(C`UNIVERSAL\*(C'\fR has been deprecated since v5.12, and
346 is now a fatal error. \f(CW\*(C`use\ UNIVERSAL\*(C'\fR without any arguments is still
347 allowed.
348 .ie n .SS "In double\-quotish ""\ec\fIX\fP"", \fIX\fP must now be a printable ASCII character"
349 .el .SS "In double\-quotish \f(CW\ec\fP\f(CIX\fP\f(CW\fP, \fIX\fP must now be a printable ASCII character"
350 .IX Subsection "In double-quotish cX, X must now be a printable ASCII character"
351 In prior releases, failure to do this raised a deprecation warning.
352 .ie n .SS "Splitting the tokens ""(?"" and ""(*"" in regular expressions is now a fatal compilation error"
353 .el .SS "Splitting the tokens \f(CW(?\fP and \f(CW(*\fP in regular expressions is now a fatal compilation error"
354 .IX Subsection "Splitting the tokens (? and (* in regular expressions is now a fatal compilation error"
355 These had been deprecated since v5.18.
356 .ie n .SS """qr/foo/x"" now ignores all Unicode pattern white space"
357 .el .SS "\f(CWqr/foo/x\fP now ignores all Unicode pattern white space"
358 .IX Subsection "qr/foo/x now ignores all Unicode pattern white space"
359 The \f(CW\*(C`/x\*(C'\fR regular expression modifier allows the pattern to contain
360 white space and comments (both of which are ignored) for improved
361 readability. Until now, not all the white space characters that Unicode
362 designates for this purpose were handled. The additional ones now
363 recognized are:
364 .PP
365 .Vb 5
366 \& U+0085 NEXT LINE
367 \& U+200E LEFT\-TO\-RIGHT MARK
368 \& U+200F RIGHT\-TO\-LEFT MARK
369 \& U+2028 LINE SEPARATOR
370 \& U+2029 PARAGRAPH SEPARATOR
371 .Ve
372 .PP
373 The use of these characters with \f(CW\*(C`/x\*(C'\fR outside bracketed character
374 classes and when not preceded by a backslash has raised a deprecation
375 warning since v5.18. Now they will be ignored.
376 .ie n .SS "Comment lines within ""(?[\ ])"" are now ended only by a ""\en"""
377 .el .SS "Comment lines within \f(CW(?[\ ])\fP are now ended only by a \f(CW\en\fP"
378 .IX Subsection "Comment lines within (?[ ]) are now ended only by a n"
379 \&\f(CW\*(C`(?[\ ])\*(C'\fR is an experimental feature, introduced in v5.18. It operates
380 as if \f(CW\*(C`/x\*(C'\fR is always enabled. But there was a difference: comment
381 lines (following a \f(CW\*(C`#\*(C'\fR character) were terminated by anything matching
382 \&\f(CW\*(C`\eR\*(C'\fR which includes all vertical whitespace, such as form feeds. For
383 consistency, this is now changed to match what terminates comment lines
384 outside \f(CW\*(C`(?[\ ])\*(C'\fR, namely a \f(CW\*(C`\en\*(C'\fR (even if escaped), which is the
385 same as what terminates a heredoc string and formats.
386 .ie n .SS """(?[...])"" operators now follow standard Perl precedence"
387 .el .SS "\f(CW(?[...])\fP operators now follow standard Perl precedence"
388 .IX Subsection "(?[...]) operators now follow standard Perl precedence"
389 This experimental feature allows set operations in regular expression patterns.
390 Prior to this, the intersection operator had the same precedence as the other
391 binary operators. Now it has higher precedence. This could lead to different
392 outcomes than existing code expects (though the documentation has always noted
393 that this change might happen, recommending fully parenthesizing the
394 expressions). See "Extended Bracketed Character Classes" in perlrecharclass.
395 .ie n .SS "Omitting ""%"" and ""@"" on hash and array names is no longer permitted"
396 .el .SS "Omitting \f(CW%\fP and \f(CW@\fP on hash and array names is no longer permitted"
397 .IX Subsection "Omitting % and @ on hash and array names is no longer permitted"
398 Really old Perl let you omit the \f(CW\*(C`@\*(C'\fR on array names and the \f(CW\*(C`%\*(C'\fR on hash
399 names in some spots. This has issued a deprecation warning since Perl
400 5.000, and is no longer permitted.
401 .ie n .SS """$!"" text is now in English outside the scope of ""use locale"""
402 .el .SS "\f(CW""$!""\fP text is now in English outside the scope of \f(CWuse locale\fP"
403 .IX Subsection """$!"" text is now in English outside the scope of use locale"
404 Previously, the text, unlike almost everything else, always came out
405 based on the current underlying locale of the program. (Also affected
406 on some systems is \f(CW"$^E"\fR.) For programs that are unprepared to
407 handle locale differences, this can cause garbage text to be displayed.
408 It\*(Aqs better to display text that is translatable via some tool than
409 garbage text which is much harder to figure out.
410 .ie n .SS """$!"" text will be returned in UTF\-8 when appropriate"
411 .el .SS "\f(CW""$!""\fP text will be returned in UTF\-8 when appropriate"
412 .IX Subsection """$!"" text will be returned in UTF-8 when appropriate"
413 The stringification of \f(CW$!\fR and \f(CW$^E\fR will have the UTF\-8 flag set
414 when the text is actually non\-ASCII UTF\-8. This will enable programs
415 that are set up to be locale\-aware to properly output messages in the
416 user\*(Aqs native language. Code that needs to continue the 5.20 and
417 earlier behavior can do the stringification within the scopes of both
418 \&\f(CW\*(C`use\ bytes\*(C'\fR and \f(CW\*(C`use\ locale\ ":messages"\*(C'\fR. Within these two
419 scopes, no other Perl operations will
420 be affected by locale; only \f(CW$!\fR and \f(CW$^E\fR stringification. The
421 \&\f(CW\*(C`bytes\*(C'\fR pragma causes the UTF\-8 flag to not be set, just as in previous
422 Perl releases. This resolves
423 [GH #12035] <https://github.com/Perl/perl5/issues/12035>.
424 .ie n .SS "Support for ""?PATTERN?"" without explicit operator has been removed"
425 .el .SS "Support for \f(CW?PATTERN?\fP without explicit operator has been removed"
426 .IX Subsection "Support for ?PATTERN? without explicit operator has been removed"
427 The \f(CW\*(C`m?PATTERN?\*(C'\fR construct, which allows matching a regex only once,
428 previously had an alternative form that was written directly with a question
429 mark delimiter, omitting the explicit \f(CW\*(C`m\*(C'\fR operator. This usage has produced
430 a deprecation warning since 5.14.0. It is now a syntax error, so that the
431 question mark can be available for use in new operators.
432 .ie n .SS "defined(@array) and defined(%hash) are now fatal errors"
433 .el .SS "\f(CWdefined(@array)\fP and \f(CWdefined(%hash)\fP are now fatal errors"
434 .IX Subsection "defined(@array) and defined(%hash) are now fatal errors"
435 These have been deprecated since v5.6.1 and have raised deprecation
436 warnings since v5.16.
437 .SS "Using a hash or an array as a reference are now fatal errors"
438 .IX Subsection "Using a hash or an array as a reference are now fatal errors"
439 For example, \f(CW\*(C`%foo\->{"bar"}\*(C'\fR now causes a fatal compilation
440 error. These have been deprecated since before v5.8, and have raised
441 deprecation warnings since then.
442 .ie n .SS "Changes to the ""*"" prototype"
443 .el .SS "Changes to the \f(CW*\fP prototype"
444 .IX Subsection "Changes to the * prototype"
445 The \f(CW\*(C`*\*(C'\fR character in a subroutine\*(Aqs prototype used to allow barewords to take
446 precedence over most, but not all, subroutine names. It was never
447 consistent and exhibited buggy behavior.
448 .PP
449 Now it has been changed, so subroutines always take precedence over barewords,
450 which brings it into conformity with similarly prototyped built\-in functions:
451 .PP
452 .Vb 6
453 \& sub splat(*) { ... }
454 \& sub foo { ... }
455 \& splat(foo); # now always splat(foo())
456 \& splat(bar); # still splat(\*(Aqbar\*(Aq) as before
457 \& close(foo); # close(foo())
458 \& close(bar); # close(\*(Aqbar\*(Aq)
459 .Ve
460 .SH Deprecations
461 .IX Header "Deprecations"
462 .ie n .SS "Setting ""${^ENCODING}"" to anything but ""undef"""
463 .el .SS "Setting \f(CW${^ENCODING}\fP to anything but \f(CWundef\fP"
464 .IX Subsection "Setting ${^ENCODING} to anything but undef"
465 This variable allows Perl scripts to be written in an encoding other than
466 ASCII or UTF\-8. However, it affects all modules globally, leading
467 to wrong answers and segmentation faults. New scripts should be written
468 in UTF\-8; old scripts should be converted to UTF\-8, which is easily done
469 with the piconv utility.
470 .SS "Use of non\-graphic characters in single\-character variable names"
471 .IX Subsection "Use of non-graphic characters in single-character variable names"
472 The syntax for single\-character variable names is more lenient than
473 for longer variable names, allowing the one\-character name to be a
474 punctuation character or even invisible (a non\-graphic). Perl v5.20
475 deprecated the ASCII\-range controls as such a name. Now, all
476 non\-graphic characters that formerly were allowed are deprecated.
477 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
478 0xFF), NO\-BREAK SPACE, and SOFT HYPHEN.
479 .ie n .SS "Inlining of ""sub () { $var }"" with observable side\-effects"
480 .el .SS "Inlining of \f(CWsub () { $var }\fP with observable side\-effects"
481 .IX Subsection "Inlining of sub () { $var } with observable side-effects"
482 In many cases Perl makes \f(CW\*(C`sub\ ()\ {\ $var\ }\*(C'\fR into an inlinable constant
483 subroutine, capturing the value of \f(CW$var\fR at the time the \f(CW\*(C`sub\*(C'\fR expression
484 is evaluated. This can break the closure behavior in those cases where
485 \&\f(CW$var\fR is subsequently modified, since the subroutine won\*(Aqt return the
486 changed value. (Note that this all only applies to anonymous subroutines
487 with an empty prototype (\f(CW\*(C`sub\ ()\*(C'\fR).)
488 .PP
489 This usage is now deprecated in those cases where the variable could be
490 modified elsewhere. Perl detects those cases and emits a deprecation
491 warning. Such code will likely change in the future and stop producing a
492 constant.
493 .PP
494 If your variable is only modified in the place where it is declared, then
495 Perl will continue to make the sub inlinable with no warnings.
496 .PP
497 .Vb 4
498 \& sub make_constant {
499 \& my $var = shift;
500 \& return sub () { $var }; # fine
501 \& }
502 \&
503 \& sub make_constant_deprecated {
504 \& my $var;
505 \& $var = shift;
506 \& return sub () { $var }; # deprecated
507 \& }
508 \&
509 \& sub make_constant_deprecated2 {
510 \& my $var = shift;
511 \& log_that_value($var); # could modify $var
512 \& return sub () { $var }; # deprecated
513 \& }
514 .Ve
515 .PP
516 In the second example above, detecting that \f(CW$var\fR is assigned to only once
517 is too hard to detect. That it happens in a spot other than the \f(CW\*(C`my\*(C'\fR
518 declaration is enough for Perl to find it suspicious.
519 .PP
520 This deprecation warning happens only for a simple variable for the body of
521 the sub. (A \f(CW\*(C`BEGIN\*(C'\fR block or \f(CW\*(C`use\*(C'\fR statement inside the sub is ignored,
522 because it does not become part of the sub\*(Aqs body.) For more complex
523 cases, such as \f(CW\*(C`sub\ ()\ {\ do_something()\ if\ 0;\ $var\ }\*(C'\fR the behavior has
524 changed such that inlining does not happen if the variable is modifiable
525 elsewhere. Such cases should be rare.
526 .ie n .SS "Use of multiple ""/x"" regexp modifiers"
527 .el .SS "Use of multiple \f(CW/x\fP regexp modifiers"
528 .IX Subsection "Use of multiple /x regexp modifiers"
529 It is now deprecated to say something like any of the following:
530 .PP
531 .Vb 3
532 \& qr/foo/xx;
533 \& /(?xax:foo)/;
534 \& use re qw(/amxx);
535 .Ve
536 .PP
537 That is, now \f(CW\*(C`x\*(C'\fR should only occur once in any string of contiguous
538 regular expression pattern modifiers. We do not believe there are any
539 occurrences of this in all of CPAN. This is in preparation for a future
540 Perl release having \f(CW\*(C`/xx\*(C'\fR permit white\-space for readability in
541 bracketed character classes (those enclosed in square brackets:
542 \&\f(CW\*(C`[...]\*(C'\fR).
543 .ie n .SS "Using a NO\-BREAK space in a character alias for ""\eN{...}"" is now deprecated"
544 .el .SS "Using a NO\-BREAK space in a character alias for \f(CW\eN{...}\fP is now deprecated"
545 .IX Subsection "Using a NO-BREAK space in a character alias for N{...} is now deprecated"
546 This non\-graphic character is essentially indistinguishable from a
547 regular space, and so should not be allowed. See
548 "CUSTOM ALIASES" in charnames.
549 .ie n .SS "A literal ""{"" should now be escaped in a pattern"
550 .el .SS "A literal \f(CW""{""\fP should now be escaped in a pattern"
551 .IX Subsection "A literal ""{"" should now be escaped in a pattern"
552 If you want a literal left curly bracket (also called a left brace) in a
553 regular expression pattern, you should now escape it by either
554 preceding it with a backslash (\f(CW"\e{"\fR) or enclosing it within square
555 brackets \f(CW"[{]"\fR, or by using \f(CW\*(C`\eQ\*(C'\fR; otherwise a deprecation warning
556 will be raised. This was first announced as forthcoming in the v5.16
557 release; it will allow future extensions to the language to happen.
558 .SS "Making all warnings fatal is discouraged"
559 .IX Subsection "Making all warnings fatal is discouraged"
560 The documentation for fatal warnings notes that
561 \&\f(CW\*(C`use warnings FATAL => \*(Aqall\*(Aq\*(C'\fR is discouraged, and provides stronger
562 language about the risks of fatal warnings in general.
563 .SH "Performance Enhancements"
564 .IX Header "Performance Enhancements"
565 .IP \(bu 4
566 If a method or class name is known at compile time, a hash is precomputed
567 to speed up run\-time method lookup. Also, compound method names like
568 \&\f(CW\*(C`SUPER::new\*(C'\fR are parsed at compile time, to save having to parse them at
569 run time.
570 .IP \(bu 4
571 Array and hash lookups (especially nested ones) that use only constants
572 or simple variables as keys, are now considerably faster. See
573 "Internal Changes" for more details.
574 .IP \(bu 4
575 \&\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
576 context. If the right\-hand argument is a constant 1, the repetition
577 operator disappears. If the right\-hand argument is a constant 0, the whole
578 expression is optimised to the empty list, so long as the left\-hand
579 argument is a simple scalar or constant. (That is, \f(CW\*(C`(foo())x0\*(C'\fR is not
580 subject to this optimisation.)
581 .IP \(bu 4
582 \&\f(CW\*(C`substr\*(C'\fR assignment is now optimised into 4\-argument \f(CW\*(C`substr\*(C'\fR at the end
583 of a subroutine (or as the argument to \f(CW\*(C`return\*(C'\fR). Previously, this
584 optimisation only happened in void context.
585 .IP \(bu 4
586 In \f(CW"\eL..."\fR, \f(CW"\eQ..."\fR, etc., the extra "stringify" op is now optimised
587 away, making these just as fast as \f(CW\*(C`lcfirst\*(C'\fR, \f(CW\*(C`quotemeta\*(C'\fR, etc.
588 .IP \(bu 4
589 Assignment to an empty list is now sometimes faster. In particular, it
590 never calls \f(CW\*(C`FETCH\*(C'\fR on tied arguments on the right\-hand side, whereas it
591 used to sometimes.
592 .IP \(bu 4
593 There is a performance improvement of up to 20% when \f(CW\*(C`length\*(C'\fR is applied to
594 a non\-magical, non\-tied string, and either \f(CW\*(C`use bytes\*(C'\fR is in scope or the
595 string doesn\*(Aqt use UTF\-8 internally.
596 .IP \(bu 4
597 On most perl builds with 64\-bit integers, memory usage for non\-magical,
598 non\-tied scalars containing only a floating point value has been reduced
599 by between 8 and 32 bytes, depending on OS.
600 .IP \(bu 4
601 In \f(CW\*(C`@array = split\*(C'\fR, the assignment can be optimized away, so that \f(CW\*(C`split\*(C'\fR
602 writes directly to the array. This optimisation was happening only for
603 package arrays other than \f(CW@_\fR, and only sometimes. Now this
604 optimisation happens almost all the time.
605 .IP \(bu 4
606 \&\f(CW\*(C`join\*(C'\fR is now subject to constant folding. So for example
607 \&\f(CW\*(C`join\ "\-",\ "a",\ "b"\*(C'\fR is converted at compile\-time to \f(CW"a\-b"\fR.
608 Moreover, \f(CW\*(C`join\*(C'\fR with a scalar or constant for the separator and a
609 single\-item list to join is simplified to a stringification, and the
610 separator doesn\*(Aqt even get evaluated.
611 .IP \(bu 4
612 \&\f(CWqq(@array)\fR is implemented using two ops: a stringify op and a join op.
613 If the \f(CW\*(C`qq\*(C'\fR contains nothing but a single array, the stringification is
614 optimized away.
615 .IP \(bu 4
616 \&\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
617 run time. Even a whole sequence of \f(CW\*(C`our\ $foo;\*(C'\fR statements will simply be
618 skipped over. The same applies to \f(CW\*(C`state\*(C'\fR variables.
619 .IP \(bu 4
620 Many internal functions have been refactored to improve performance and reduce
621 their memory footprints.
622 [GH #13659] <https://github.com/Perl/perl5/issues/13659>
623 [GH #13856] <https://github.com/Perl/perl5/issues/13856>
624 [GH #13874] <https://github.com/Perl/perl5/issues/13874>
625 .IP \(bu 4
626 \&\f(CW\*(C`\-T\*(C'\fR and \f(CW\*(C`\-B\*(C'\fR filetests will return sooner when an empty file is detected.
627 [GH #13686] <https://github.com/Perl/perl5/issues/13686>
628 .IP \(bu 4
629 Hash lookups where the key is a constant are faster.
630 .IP \(bu 4
631 Subroutines with an empty prototype and a body containing just \f(CW\*(C`undef\*(C'\fR are now
632 eligible for inlining.
633 [GH #14077] <https://github.com/Perl/perl5/issues/14077>
634 .IP \(bu 4
635 Subroutines in packages no longer need to be stored in typeglobs:
636 declaring a subroutine will now put a simple sub reference directly in the
637 stash if possible, saving memory. The typeglob still notionally exists,
638 so accessing it will cause the stash entry to be upgraded to a typeglob
639 (\fIi.e.\fR this is just an internal implementation detail).
640 This optimization does not currently apply to XSUBs or exported
641 subroutines, and method calls will undo it, since they cache things in
642 typeglobs.
643 [GH #13392] <https://github.com/Perl/perl5/issues/13392>
644 .IP \(bu 4
645 The functions \f(CWutf8::native_to_unicode()\fR and \f(CWutf8::unicode_to_native()\fR
646 (see utf8) are now optimized out on ASCII platforms. There is now not even
647 a minimal performance hit in writing code portable between ASCII and EBCDIC
648 platforms.
649 .IP \(bu 4
650 Win32 Perl uses 8 KB less of per\-process memory than before for every perl
651 process, because some data is now memory mapped from disk and shared
652 between processes from the same perl binary.
653 .SH "Modules and Pragmata"
654 .IX Header "Modules and Pragmata"
655 .SS "Updated Modules and Pragmata"
656 .IX Subsection "Updated Modules and Pragmata"
657 Many of the libraries distributed with perl have been upgraded since v5.20.0.
658 For a complete list of changes, run:
659 .PP
660 .Vb 1
661 \& corelist \-\-diff 5.20.0 5.22.0
662 .Ve
663 .PP
664 You can substitute your favorite version in place of 5.20.0, too.
665 .PP
666 Some notable changes include:
667 .IP \(bu 4
668 Archive::Tar has been upgraded to version 2.04.
669 .Sp
670 Tests can now be run in parallel.
671 .IP \(bu 4
672 attributes has been upgraded to version 0.27.
673 .Sp
674 The usage of \f(CW\*(C`memEQs\*(C'\fR in the XS has been corrected.
675 [GH #14072] <https://github.com/Perl/perl5/issues/14072>
676 .Sp
677 Avoid reading beyond the end of a buffer. [perl #122629]
678 .IP \(bu 4
679 B has been upgraded to version 1.58.
680 .Sp
681 It provides a new \f(CW\*(C`B::safename\*(C'\fR function, based on the existing
682 \&\f(CW\*(C`B::GV\->SAFENAME\*(C'\fR, that converts \f(CW\*(C`\ecOPEN\*(C'\fR to \f(CW\*(C`^OPEN\*(C'\fR.
683 .Sp
684 Nulled COPs are now of class \f(CW\*(C`B::COP\*(C'\fR, rather than \f(CW\*(C`B::OP\*(C'\fR.
685 .Sp
686 \&\f(CW\*(C`B::REGEXP\*(C'\fR objects now provide a \f(CW\*(C`qr_anoncv\*(C'\fR method for accessing the
687 implicit CV associated with \f(CW\*(C`qr//\*(C'\fR things containing code blocks, and a
688 \&\f(CW\*(C`compflags\*(C'\fR method that returns the pertinent flags originating from the
689 \&\f(CW\*(C`qr//blahblah\*(C'\fR op.
690 .Sp
691 \&\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.
692 Two new classes, \f(CW\*(C`B::PADNAME\*(C'\fR and \f(CW\*(C`B::PADNAMELIST\*(C'\fR, have been introduced.
693 .Sp
694 A bug where, after an ithread creation or pseudofork, special/immortal SVs in
695 the child ithread/pseudoprocess did not have the correct class of
696 \&\f(CW\*(C`B::SPECIAL\*(C'\fR, has been fixed.
697 The \f(CW\*(C`id\*(C'\fR and \f(CW\*(C`outid\*(C'\fR PADLIST methods have been added.
698 .IP \(bu 4
699 B::Concise has been upgraded to version 0.996.
700 .Sp
701 Null ops that are part of the execution chain are now given sequence
702 numbers.
703 .Sp
704 Private flags for nulled ops are now dumped with mnemonics as they would be
705 for the non\-nulled counterparts.
706 .IP \(bu 4
707 B::Deparse has been upgraded to version 1.35.
708 .Sp
709 It now deparses \f(CW\*(C`+sub : attr { ... }\*(C'\fR correctly at the start of a
710 statement. Without the initial \f(CW\*(C`+\*(C'\fR, \f(CW\*(C`sub\*(C'\fR would be a statement label.
711 .Sp
712 \&\f(CW\*(C`BEGIN\*(C'\fR blocks are now emitted in the right place most of the time, but
713 the change unfortunately introduced a regression, in that \f(CW\*(C`BEGIN\*(C'\fR blocks
714 occurring just before the end of the enclosing block may appear below it
715 instead.
716 .Sp
717 \&\f(CW\*(C`B::Deparse\*(C'\fR no longer puts erroneous \f(CW\*(C`local\*(C'\fR here and there, such as for
718 \&\f(CW\*(C`LIST = tr/a//d\*(C'\fR. [perl #119815]
719 .Sp
720 Adjacent \f(CW\*(C`use\*(C'\fR statements are no longer accidentally nested if one
721 contains a \f(CW\*(C`do\*(C'\fR block. [perl #115066]
722 .Sp
723 Parenthesised arrays in lists passed to \f(CW\*(C`\e\*(C'\fR are now correctly deparsed
724 with parentheses (\fIe.g.\fR, \f(CW\*(C`\e(@a, (@b), @c)\*(C'\fR now retains the parentheses
725 around \f(CW@b\fR), thus preserving the flattening behavior of referenced
726 parenthesised arrays. Formerly, it only worked for one array: \f(CW\*(C`\e(@a)\*(C'\fR.
727 .Sp
728 \&\f(CW\*(C`local our\*(C'\fR is now deparsed correctly, with the \f(CW\*(C`our\*(C'\fR included.
729 .Sp
730 \&\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).
731 This has been fixed.
732 .Sp
733 Core keywords that conflict with lexical subroutines are now deparsed with
734 the \f(CW\*(C`CORE::\*(C'\fR prefix.
735 .Sp
736 \&\f(CW\*(C`foreach state $x (...) {...}\*(C'\fR now deparses correctly with \f(CW\*(C`state\*(C'\fR and
737 not \f(CW\*(C`my\*(C'\fR.
738 .Sp
739 \&\f(CW\*(C`our @array = split(...)\*(C'\fR now deparses correctly with \f(CW\*(C`our\*(C'\fR in those
740 cases where the assignment is optimized away.
741 .Sp
742 It now deparses \f(CWour(\fR\f(CILIST\fR\f(CW)\fR and typed lexical (\f(CW\*(C`my Dog $spot\*(C'\fR) correctly.
743 .Sp
744 Deparse \f(CW$#_\fR as that instead of as \f(CW$#{_}\fR.
745 [GH #14545] <https://github.com/Perl/perl5/issues/14545>
746 .Sp
747 BEGIN blocks at the end of the enclosing scope are now deparsed in the
748 right place. [perl #77452]
749 .Sp
750 BEGIN blocks were sometimes deparsed as _\|_ANON_\|_, but are now always called
751 BEGIN.
752 .Sp
753 Lexical subroutines are now fully deparsed. [perl #116553]
754 .Sp
755 \&\f(CW\*(C`Anything =~ y///r\*(C'\fR with \f(CW\*(C`/r\*(C'\fR no longer omits the left\-hand operand.
756 .Sp
757 The op trees that make up regexp code blocks are now deparsed for real.
758 Formerly, the original string that made up the regular expression was used.
759 That caused problems with \f(CW\*(C`qr/(?{<<heredoc})/\*(C'\fR and multiline code blocks,
760 which were deparsed incorrectly. [perl #123217] [perl #115256]
761 .Sp
762 \&\f(CW$;\fR at the end of a statement no longer loses its semicolon.
763 [perl #123357]
764 .Sp
765 Some cases of subroutine declarations stored in the stash in shorthand form
766 were being omitted.
767 .Sp
768 Non\-ASCII characters are now consistently escaped in strings, instead of
769 some of the time. (There are still outstanding problems with regular
770 expressions and identifiers that have not been fixed.)
771 .Sp
772 When prototype sub calls are deparsed with \f(CW\*(C`&\*(C'\fR (\fIe.g.\fR, under the \fB\-P\fR
773 option), \f(CW\*(C`scalar\*(C'\fR is now added where appropriate, to force the scalar
774 context implied by the prototype.
775 .Sp
776 \&\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
777 loop controls are now deparsed correctly. The outer parentheses are not
778 optional.
779 .Sp
780 Whitespace is no longer escaped in regular expressions, because it was
781 getting erroneously escaped within \f(CW\*(C`(?x:...)\*(C'\fR sections.
782 .Sp
783 \&\f(CW\*(C`sub foo { foo() }\*(C'\fR is now deparsed with those mandatory parentheses.
784 .Sp
785 \&\f(CW\*(C`/@array/\*(C'\fR is now deparsed as a regular expression, and not just
786 \&\f(CW@array\fR.
787 .Sp
788 \&\f(CW\*(C`/@{\-}/\*(C'\fR, \f(CW\*(C`/@{+}/\*(C'\fR and \f(CW$#{1}\fR are now deparsed with the braces, which
789 are mandatory in these cases.
790 .Sp
791 In deparsing feature bundles, \f(CW\*(C`B::Deparse\*(C'\fR was emitting \f(CW\*(C`no feature;\*(C'\fR first
792 instead of \f(CW\*(C`no feature \*(Aq:all\*(Aq;\*(C'\fR. This has been fixed.
793 .Sp
794 \&\f(CW\*(C`chdir FH\*(C'\fR is now deparsed without quotation marks.
795 .Sp
796 \&\f(CW\*(C`\emy @a\*(C'\fR is now deparsed without parentheses. (Parenthese would flatten
797 the array.)
798 .Sp
799 \&\f(CW\*(C`system\*(C'\fR and \f(CW\*(C`exec\*(C'\fR followed by a block are now deparsed correctly.
800 Formerly there was an erroneous \f(CW\*(C`do\*(C'\fR before the block.
801 .Sp
802 \&\f(CW\*(C`use constant QR => qr/.../flags\*(C'\fR followed by \f(CW\*(C`"" =~ QR\*(C'\fR is no longer
803 without the flags.
804 .Sp
805 Deparsing \f(CW\*(C`BEGIN { undef &foo }\*(C'\fR with the \fB\-w\fR switch enabled started to
806 emit \*(Aquninitialized\*(Aq warnings in Perl 5.14. This has been fixed.
807 .Sp
808 Deparsing calls to subs with a \f(CW\*(C`(;+)\*(C'\fR prototype resulted in an infinite
809 loop. The \f(CW\*(C`(;$\*(C'\fR) \f(CW\*(C`(_)\*(C'\fR and \f(CW\*(C`(;_)\*(C'\fR prototypes were given the wrong
810 precedence, causing \f(CWfoo($a<$b)\fR to be deparsed without the parentheses.
811 .Sp
812 Deparse now provides a defined state sub in inner subs.
813 .IP \(bu 4
814 B::Op_private has been added.
815 .Sp
816 B::Op_private provides detailed information about the flags used in the
817 \&\f(CW\*(C`op_private\*(C'\fR field of perl opcodes.
818 .IP \(bu 4
819 bigint, bignum, bigrat have been upgraded to version 0.39.
820 .Sp
821 Document in CAVEATS that using strings as numbers won\*(Aqt always invoke
822 the big number overloading, and how to invoke it. [rt.perl.org #123064]
823 .IP \(bu 4
824 Carp has been upgraded to version 1.36.
825 .Sp
826 \&\f(CW\*(C`Carp::Heavy\*(C'\fR now ignores version mismatches with Carp if Carp is newer
827 than 1.12, since \f(CW\*(C`Carp::Heavy\*(C'\fR\*(Aqs guts were merged into Carp at that
828 point.
829 [GH #13708] <https://github.com/Perl/perl5/issues/13708>
830 .Sp
831 Carp now handles non\-ASCII platforms better.
832 .Sp
833 Off\-by\-one error fix for Perl < 5.14.
834 .IP \(bu 4
835 constant has been upgraded to version 1.33.
836 .Sp
837 It now accepts fully\-qualified constant names, allowing constants to be defined
838 in packages other than the caller.
839 .IP \(bu 4
840 CPAN has been upgraded to version 2.11.
841 .Sp
842 Add support for \f(CWCwd::getdcwd()\fR and introduce workaround for a misbehavior
843 seen on Strawberry Perl 5.20.1.
844 .Sp
845 Fix \f(CWchdir()\fR after building dependencies bug.
846 .Sp
847 Introduce experimental support for plugins/hooks.
848 .Sp
849 Integrate the \f(CW\*(C`App::Cpan\*(C'\fR sources.
850 .Sp
851 Do not check recursion on optional dependencies.
852 .Sp
853 Sanity check \fIMETA.yml\fR to contain a hash.
854 [cpan #95271] <https://rt.cpan.org/Ticket/Display.html?id=95271>
855 .IP \(bu 4
856 CPAN::Meta::Requirements has been upgraded to version 2.132.
857 .Sp
858 Works around limitations in \f(CW\*(C`version::vpp\*(C'\fR detecting v\-string magic and adds
859 support for forthcoming ExtUtils::MakeMaker bootstrap \fIversion.pm\fR for
860 Perls older than 5.10.0.
861 .IP \(bu 4
862 Data::Dumper has been upgraded to version 2.158.
863 .Sp
864 Fixes CVE\-2014\-4330 by adding a configuration variable/option to limit
865 recursion when dumping deep data structures.
866 .Sp
867 Changes to resolve Coverity issues.
868 XS dumps incorrectly stored the name of code references stored in a
869 GLOB.
870 [GH #13911] <https://github.com/Perl/perl5/issues/13911>
871 .IP \(bu 4
872 DynaLoader has been upgraded to version 1.32.
873 .Sp
874 Remove \f(CW\*(C`dl_nonlazy\*(C'\fR global if unused in Dynaloader. [perl #122926]
875 .IP \(bu 4
876 Encode has been upgraded to version 2.72.
877 .Sp
878 \&\f(CW\*(C`piconv\*(C'\fR now has better error handling when the encoding name is nonexistent,
879 and a build breakage when upgrading Encode in perl\-5.8.2 and earlier has
880 been fixed.
881 .Sp
882 Building in C++ mode on Windows now works.
883 .IP \(bu 4
884 Errno has been upgraded to version 1.23.
885 .Sp
886 Add \f(CW\*(C`\-P\*(C'\fR to the preprocessor command\-line on GCC 5. GCC added extra
887 line directives, breaking parsing of error code definitions. [rt.perl.org
888 #123784]
889 .IP \(bu 4
890 experimental has been upgraded to version 0.013.
891 .Sp
892 Hardcodes features for Perls older than 5.15.7.
893 .IP \(bu 4
894 ExtUtils::CBuilder has been upgraded to version 0.280221.
895 .Sp
896 Fixes a regression on Android.
897 [GH #14064] <https://github.com/Perl/perl5/issues/14064>
898 .IP \(bu 4
899 ExtUtils::Manifest has been upgraded to version 1.70.
900 .Sp
901 Fixes a bug with \f(CWmaniread()\fR\*(Aqs handling of quoted filenames and improves
902 \&\f(CWmanifind()\fR to follow symlinks.
903 [GH #14003] <https://github.com/Perl/perl5/issues/14003>
904 .IP \(bu 4
905 ExtUtils::ParseXS has been upgraded to version 3.28.
906 .Sp
907 Only declare \f(CW\*(C`file\*(C'\fR unused if we actually define it.
908 Improve generated \f(CW\*(C`RETVAL\*(C'\fR code generation to avoid repeated
909 references to \f(CWST(0)\fR. [perl #123278]
910 Broaden and document the \f(CW\*(C`/OBJ$/\*(C'\fR to \f(CW\*(C`/REF$/\*(C'\fR typemap optimization
911 for the \f(CW\*(C`DESTROY\*(C'\fR method. [perl #123418]
912 .IP \(bu 4
913 Fcntl has been upgraded to version 1.13.
914 .Sp
915 Add support for the Linux pipe buffer size \f(CWfcntl()\fR commands.
916 .IP \(bu 4
917 File::Find has been upgraded to version 1.29.
918 .Sp
919 \&\f(CWfind()\fR and \f(CWfinddepth()\fR will now warn if passed inappropriate or
920 misspelled options.
921 .IP \(bu 4
922 File::Glob has been upgraded to version 1.24.
923 .Sp
924 Avoid \f(CWSvIV()\fR expanding to call \f(CWget_sv()\fR three times in a few
925 places. [perl #123606]
926 .IP \(bu 4
927 HTTP::Tiny has been upgraded to version 0.054.
928 .Sp
929 \&\f(CW\*(C`keep_alive\*(C'\fR is now fork\-safe and thread\-safe.
930 .IP \(bu 4
931 IO has been upgraded to version 1.35.
932 .Sp
933 The XS implementation has been fixed for the sake of older Perls.
934 .IP \(bu 4
935 IO::Socket has been upgraded to version 1.38.
936 .Sp
937 Document the limitations of the \f(CWconnected()\fR method. [perl #123096]
938 .IP \(bu 4
939 IO::Socket::IP has been upgraded to version 0.37.
940 .Sp
941 A better fix for subclassing \f(CWconnect()\fR.
942 [cpan #95983] <https://rt.cpan.org/Ticket/Display.html?id=95983>
943 [cpan #97050] <https://rt.cpan.org/Ticket/Display.html?id=97050>
944 .Sp
945 Implements Timeout for \f(CWconnect()\fR.
946 [cpan #92075] <https://rt.cpan.org/Ticket/Display.html?id=92075>
947 .IP \(bu 4
948 The libnet collection of modules has been upgraded to version 3.05.
949 .Sp
950 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.
951 Improvements in \f(CW\*(C`Net::SMTP\*(C'\fR authentication.
952 .IP \(bu 4
953 Locale::Codes has been upgraded to version 3.34.
954 .Sp
955 Fixed a bug in the scripts used to extract data from spreadsheets that
956 prevented the SHP currency code from being found.
957 [cpan #94229] <https://rt.cpan.org/Ticket/Display.html?id=94229>
958 .Sp
959 New codes have been added.
960 .IP \(bu 4
961 Math::BigInt has been upgraded to version 1.9997.
962 .Sp
963 Synchronize POD changes from the CPAN release.
964 \&\f(CW\*(C`Math::BigFloat\->blog(x)\*(C'\fR would sometimes return \f(CWblog(2*x)\fR when
965 the accuracy was greater than 70 digits.
966 The result of \f(CW\*(C`Math::BigFloat\->bdiv()\*(C'\fR in list context now
967 satisfies \f(CW\*(C`x = quotient * divisor + remainder\*(C'\fR.
968 .Sp
969 Correct handling of subclasses.
970 [cpan #96254] <https://rt.cpan.org/Ticket/Display.html?id=96254>
971 [cpan #96329] <https://rt.cpan.org/Ticket/Display.html?id=96329>
972 .IP \(bu 4
973 Module::Metadata has been upgraded to version 1.000026.
974 .Sp
975 Support installations on older perls with an ExtUtils::MakeMaker earlier
976 than 6.63_03
977 .IP \(bu 4
978 overload has been upgraded to version 1.26.
979 .Sp
980 A redundant \f(CW\*(C`ref $sub\*(C'\fR check has been removed.
981 .IP \(bu 4
982 The PathTools module collection has been upgraded to version 3.56.
983 .Sp
984 A warning from the \fBgcc\fR compiler is now avoided when building the XS.
985 .Sp
986 Don\*(Aqt turn leading \f(CW\*(C`//\*(C'\fR into \f(CW\*(C`/\*(C'\fR on Cygwin. [perl #122635]
987 .IP \(bu 4
988 perl5db.pl has been upgraded to version 1.49.
989 .Sp
990 The debugger would cause an assertion failure.
991 [GH #14605] <https://github.com/Perl/perl5/issues/14605>
992 .Sp
993 \&\f(CWfork()\fR in the debugger under \f(CW\*(C`tmux\*(C'\fR will now create a new window for
994 the forked process. [GH #13602] <https://github.com/Perl/perl5/issues/13602>
995 .Sp
996 The debugger now saves the current working directory on startup and
997 restores it when you restart your program with \f(CW\*(C`R\*(C'\fR or \f(CW\*(C`rerun\*(C'\fR.
998 [GH #13691] <https://github.com/Perl/perl5/issues/13691>
999 .IP \(bu 4
1000 PerlIO::scalar has been upgraded to version 0.22.
1001 .Sp
1002 Reading from a position well past the end of the scalar now correctly
1003 returns end of file. [perl #123443]
1004 .Sp
1005 Seeking to a negative position still fails, but no longer leaves the
1006 file position set to a negation location.
1007 .Sp
1008 \&\f(CWeof()\fR on a \f(CW\*(C`PerlIO::scalar\*(C'\fR handle now properly returns true when
1009 the file position is past the 2GB mark on 32\-bit systems.
1010 .Sp
1011 Attempting to write at file positions impossible for the platform now
1012 fail early rather than wrapping at 4GB.
1013 .IP \(bu 4
1014 Pod::Perldoc has been upgraded to version 3.25.
1015 .Sp
1016 Filehandles opened for reading or writing now have \f(CW:encoding(UTF\-8)\fR set.
1017 [cpan #98019] <https://rt.cpan.org/Ticket/Display.html?id=98019>
1018 .IP \(bu 4
1019 POSIX has been upgraded to version 1.53.
1020 .Sp
1021 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,
1022 \&\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.
1023 .Sp
1024 \&\f(CWPOSIX::tmpnam()\fR now produces a deprecation warning. [perl #122005]
1025 .IP \(bu 4
1026 Safe has been upgraded to version 2.39.
1027 .Sp
1028 \&\f(CW\*(C`reval\*(C'\fR was not propagating void context properly.
1029 .IP \(bu 4
1030 Scalar\-List\-Utils has been upgraded to version 1.41.
1031 .Sp
1032 A new module, Sub::Util, has been added, containing functions related to
1033 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
1034 (copied and renamed from \f(CW\*(C`Sub::Name\*(C'\fR).
1035 The use of \f(CW\*(C`GetMagic\*(C'\fR in \f(CWList::Util::reduce()\fR has also been fixed.
1036 [cpan #63211] <https://rt.cpan.org/Ticket/Display.html?id=63211>
1037 .IP \(bu 4
1038 SDBM_File has been upgraded to version 1.13.
1039 .Sp
1040 Simplified the build process. [perl #123413]
1041 .IP \(bu 4
1042 Time::Piece has been upgraded to version 1.29.
1043 .Sp
1044 When pretty printing negative \f(CW\*(C`Time::Seconds\*(C'\fR, the "minus" is no longer lost.
1045 .IP \(bu 4
1046 Unicode::Collate has been upgraded to version 1.12.
1047 .Sp
1048 Version 0.67\*(Aqs improved discontiguous contractions is invalidated by default
1049 and is supported as a parameter \f(CW\*(C`long_contraction\*(C'\fR.
1050 .IP \(bu 4
1051 Unicode::Normalize has been upgraded to version 1.18.
1052 .Sp
1053 The XSUB implementation has been removed in favor of pure Perl.
1054 .IP \(bu 4
1055 Unicode::UCD has been upgraded to version 0.61.
1056 .Sp
1057 A new function \fBproperty_values()\fR
1058 has been added to return a given property\*(Aqs possible values.
1059 .Sp
1060 A new function \fBcharprop()\fR
1061 has been added to return the value of a given property for a given code
1062 point.
1063 .Sp
1064 A new function \fBcharprops_all()\fR
1065 has been added to return the values of all Unicode properties for a
1066 given code point.
1067 .Sp
1068 A bug has been fixed so that \fBpropaliases()\fR
1069 returns the correct short and long names for the Perl extensions where
1070 it was incorrect.
1071 .Sp
1072 A bug has been fixed so that
1073 \&\fBprop_value_aliases()\fR
1074 returns \f(CW\*(C`undef\*(C'\fR instead of a wrong result for properties that are Perl
1075 extensions.
1076 .Sp
1077 This module now works on EBCDIC platforms.
1078 .IP \(bu 4
1079 utf8 has been upgraded to version 1.17
1080 .Sp
1081 A mismatch between the documentation and the code in \f(CWutf8::downgrade()\fR
1082 was fixed in favor of the documentation. The optional second argument
1083 is now correctly treated as a perl boolean (true/false semantics) and
1084 not as an integer.
1085 .IP \(bu 4
1086 version has been upgraded to version 0.9909.
1087 .Sp
1088 Numerous changes. See the \fIChanges\fR file in the CPAN distribution for
1089 details.
1090 .IP \(bu 4
1091 Win32 has been upgraded to version 0.51.
1092 .Sp
1093 \&\f(CWGetOSName()\fR now supports Windows 8.1, and building in C++ mode now works.
1094 .IP \(bu 4
1095 Win32API::File has been upgraded to version 0.1202
1096 .Sp
1097 Building in C++ mode now works.
1098 .IP \(bu 4
1099 XSLoader has been upgraded to version 0.20.
1100 .Sp
1101 Allow XSLoader to load modules from a different namespace.
1102 [perl #122455]
1103 .SS "Removed Modules and Pragmata"
1104 .IX Subsection "Removed Modules and Pragmata"
1105 The following modules (and associated modules) have been removed from the core
1106 perl distribution:
1107 .IP \(bu 4
1108 CGI
1109 .IP \(bu 4
1110 Module::Build
1111 .SH Documentation
1112 .IX Header "Documentation"
1113 .SS "New Documentation"
1114 .IX Subsection "New Documentation"
1115 \fIperlunicook\fR
1116 .IX Subsection "perlunicook"
1117 .PP
1118 This document, by Tom Christiansen, provides examples of handling Unicode in
1119 Perl.
1120 .SS "Changes to Existing Documentation"
1121 .IX Subsection "Changes to Existing Documentation"
1122 \fIperlaix\fR
1123 .IX Subsection "perlaix"
1124 .IP \(bu 4
1125 A note on long doubles has been added.
1126 .PP
1127 \fIperlapi\fR
1128 .IX Subsection "perlapi"
1129 .IP \(bu 4
1130 Note that \f(CW\*(C`SvSetSV\*(C'\fR doesn\*(Aqt do set magic.
1131 .IP \(bu 4
1132 \&\f(CW\*(C`sv_usepvn_flags\*(C'\fR \- fix documentation to mention the use of \f(CW\*(C`Newx\*(C'\fR instead of
1133 \&\f(CW\*(C`malloc\*(C'\fR.
1134 .Sp
1135 [GH #13835] <https://github.com/Perl/perl5/issues/13835>
1136 .IP \(bu 4
1137 Clarify where \f(CW\*(C`NUL\*(C'\fR may be embedded or is required to terminate a string.
1138 .IP \(bu 4
1139 Some documentation that was previously missing due to formatting errors is
1140 now included.
1141 .IP \(bu 4
1142 Entries are now organized into groups rather than by the file where they
1143 are found.
1144 .IP \(bu 4
1145 Alphabetical sorting of entries is now done consistently (automatically
1146 by the POD generator) to make entries easier to find when scanning.
1147 .PP
1148 \fIperldata\fR
1149 .IX Subsection "perldata"
1150 .IP \(bu 4
1151 The syntax of single\-character variable names has been brought
1152 up\-to\-date and more fully explained.
1153 .IP \(bu 4
1154 Hexadecimal floating point numbers are described, as are infinity and
1155 NaN.
1156 .PP
1157 \fIperlebcdic\fR
1158 .IX Subsection "perlebcdic"
1159 .IP \(bu 4
1160 This document has been significantly updated in the light of recent
1161 improvements to EBCDIC support.
1162 .PP
1163 \fIperlfilter\fR
1164 .IX Subsection "perlfilter"
1165 .IP \(bu 4
1166 Added a LIMITATIONS section.
1167 .PP
1168 \fIperlfunc\fR
1169 .IX Subsection "perlfunc"
1170 .IP \(bu 4
1171 Mention that \f(CWstudy()\fR is currently a no\-op.
1172 .IP \(bu 4
1173 Calling \f(CW\*(C`delete\*(C'\fR or \f(CW\*(C`exists\*(C'\fR on array values is now described as "strongly
1174 discouraged" rather than "deprecated".
1175 .IP \(bu 4
1176 Improve documentation of \f(CW\*(C`our\*(C'\fR.
1177 .IP \(bu 4
1178 \&\f(CW\*(C`\-l\*(C'\fR now notes that it will return false if symlinks aren\*(Aqt supported by the
1179 file system.
1180 [GH #13695] <https://github.com/Perl/perl5/issues/13695>
1181 .IP \(bu 4
1182 Note that \f(CW\*(C`exec LIST\*(C'\fR and \f(CW\*(C`system LIST\*(C'\fR may fall back to the shell on
1183 Win32. Only the indirect\-object syntax \f(CW\*(C`exec PROGRAM LIST\*(C'\fR and
1184 \&\f(CW\*(C`system PROGRAM LIST\*(C'\fR will reliably avoid using the shell.
1185 .Sp
1186 This has also been noted in perlport.
1187 .Sp
1188 [GH #13907] <https://github.com/Perl/perl5/issues/13907>
1189 .PP
1190 \fIperlguts\fR
1191 .IX Subsection "perlguts"
1192 .IP \(bu 4
1193 The OOK example has been updated to account for COW changes and a change in the
1194 storage of the offset.
1195 .IP \(bu 4
1196 Details on C level symbols and libperl.t added.
1197 .IP \(bu 4
1198 Information on Unicode handling has been added
1199 .IP \(bu 4
1200 Information on EBCDIC handling has been added
1201 .PP
1202 \fIperlhack\fR
1203 .IX Subsection "perlhack"
1204 .IP \(bu 4
1205 A note has been added about running on platforms with non\-ASCII
1206 character sets
1207 .IP \(bu 4
1208 A note has been added about performance testing
1209 .PP
1210 \fIperlhacktips\fR
1211 .IX Subsection "perlhacktips"
1212 .IP \(bu 4
1213 Documentation has been added illustrating the perils of assuming that
1214 there is no change to the contents of static memory pointed to by the
1215 return values of Perl\*(Aqs wrappers for C library functions.
1216 .IP \(bu 4
1217 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
1218 recommended.
1219 .IP \(bu 4
1220 Updated documentation for the \f(CW\*(C`test.valgrind\*(C'\fR \f(CW\*(C`make\*(C'\fR target.
1221 [GH #13658] <https://github.com/Perl/perl5/issues/13658>
1222 .IP \(bu 4
1223 Information is given about writing test files portably to non\-ASCII
1224 platforms.
1225 .IP \(bu 4
1226 A note has been added about how to get a C language stack backtrace.
1227 .PP
1228 \fIperlhpux\fR
1229 .IX Subsection "perlhpux"
1230 .IP \(bu 4
1231 Note that the message "Redeclaration of "sendpath" with a different
1232 storage class specifier" is harmless.
1233 .PP
1234 \fIperllocale\fR
1235 .IX Subsection "perllocale"
1236 .IP \(bu 4
1237 Updated for the enhancements in v5.22, along with some clarifications.
1238 .PP
1239 \fIperlmodstyle\fR
1240 .IX Subsection "perlmodstyle"
1241 .IP \(bu 4
1242 Instead of pointing to the module list, we are now pointing to
1243 PrePAN <http://prepan.org/>.
1244 .PP
1245 \fIperlop\fR
1246 .IX Subsection "perlop"
1247 .IP \(bu 4
1248 Updated for the enhancements in v5.22, along with some clarifications.
1249 .PP
1250 \fIperlpodspec\fR
1251 .IX Subsection "perlpodspec"
1252 .IP \(bu 4
1253 The specification of the pod language is changing so that the default
1254 encoding of pods that aren\*(Aqt in UTF\-8 (unless otherwise indicated) is
1255 CP1252 instead of ISO 8859\-1 (Latin1).
1256 .PP
1257 \fIperlpolicy\fR
1258 .IX Subsection "perlpolicy"
1259 .IP \(bu 4
1260 We now have a code of conduct for the \fIp5p\fR mailing list, as documented
1261 in "STANDARDS OF CONDUCT" in perlpolicy.
1262 .IP \(bu 4
1263 The conditions for marking an experimental feature as non\-experimental are now
1264 set out.
1265 .IP \(bu 4
1266 Clarification has been made as to what sorts of changes are permissible in
1267 maintenance releases.
1268 .PP
1269 \fIperlport\fR
1270 .IX Subsection "perlport"
1271 .IP \(bu 4
1272 Out\-of\-date VMS\-specific information has been fixed and/or simplified.
1273 .IP \(bu 4
1274 Notes about EBCDIC have been added.
1275 .PP
1276 \fIperlre\fR
1277 .IX Subsection "perlre"
1278 .IP \(bu 4
1279 The description of the \f(CW\*(C`/x\*(C'\fR modifier has been clarified to note that
1280 comments cannot be continued onto the next line by escaping them; and
1281 there is now a list of all the characters that are considered whitespace
1282 by this modifier.
1283 .IP \(bu 4
1284 The new \f(CW\*(C`/n\*(C'\fR modifier is described.
1285 .IP \(bu 4
1286 A note has been added on how to make bracketed character class ranges
1287 portable to non\-ASCII machines.
1288 .PP
1289 \fIperlrebackslash\fR
1290 .IX Subsection "perlrebackslash"
1291 .IP \(bu 4
1292 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.
1293 .PP
1294 \fIperlrecharclass\fR
1295 .IX Subsection "perlrecharclass"
1296 .IP \(bu 4
1297 Clarifications have been added to "Character Ranges" in perlrecharclass
1298 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
1299 any subranges thereof in regular expression bracketed character classes
1300 are guaranteed to match exactly what a naive English speaker would
1301 expect them to match, even on platforms (such as EBCDIC) where perl
1302 has to do extra work to accomplish this.
1303 .IP \(bu 4
1304 The documentation of Bracketed Character Classes has been expanded to cover the
1305 improvements in \f(CW\*(C`qr/[\eN{named sequence}]/\*(C'\fR (see under "Selected Bug Fixes").
1306 .PP
1307 \fIperlref\fR
1308 .IX Subsection "perlref"
1309 .IP \(bu 4
1310 A new section has been added
1311 Assigning to References
1312 .PP
1313 \fIperlsec\fR
1314 .IX Subsection "perlsec"
1315 .IP \(bu 4
1316 Comments added on algorithmic complexity and tied hashes.
1317 .PP
1318 \fIperlsyn\fR
1319 .IX Subsection "perlsyn"
1320 .IP \(bu 4
1321 An ambiguity in the documentation of the \f(CW\*(C`...\*(C'\fR statement has been corrected.
1322 [GH #14054] <https://github.com/Perl/perl5/issues/14054>
1323 .IP \(bu 4
1324 The empty conditional in \f(CW\*(C`for\*(C'\fR and \f(CW\*(C`while\*(C'\fR is now documented
1325 in perlsyn.
1326 .PP
1327 \fIperlunicode\fR
1328 .IX Subsection "perlunicode"
1329 .IP \(bu 4
1330 This has had extensive revisions to bring it up\-to\-date with current
1331 Unicode support and to make it more readable. Notable is that Unicode
1332 7.0 changed what it should do with non\-characters. Perl retains the old
1333 way of handling for reasons of backward compatibility. See
1334 "Noncharacter code points" in perlunicode.
1335 .PP
1336 \fIperluniintro\fR
1337 .IX Subsection "perluniintro"
1338 .IP \(bu 4
1339 Advice for how to make sure your strings and regular expression patterns are
1340 interpreted as Unicode has been updated.
1341 .PP
1342 \fIperlvar\fR
1343 .IX Subsection "perlvar"
1344 .IP \(bu 4
1345 \&\f(CW$]\fR is no longer listed as being deprecated. Instead, discussion has
1346 been added on the advantages and disadvantages of using it versus
1347 \&\f(CW$^V\fR. \f(CW$OLD_PERL_VERSION\fR was re\-added to the documentation as the long
1348 form of \f(CW$]\fR.
1349 .IP \(bu 4
1350 \&\f(CW\*(C`${^ENCODING}\*(C'\fR is now marked as deprecated.
1351 .IP \(bu 4
1352 The entry for \f(CW\*(C`%^H\*(C'\fR has been clarified to indicate it can only handle
1353 simple values.
1354 .PP
1355 \fIperlvms\fR
1356 .IX Subsection "perlvms"
1357 .IP \(bu 4
1358 Out\-of\-date and/or incorrect material has been removed.
1359 .IP \(bu 4
1360 Updated documentation on environment and shell interaction in VMS.
1361 .PP
1362 \fIperlxs\fR
1363 .IX Subsection "perlxs"
1364 .IP \(bu 4
1365 Added a discussion of locale issues in XS code.
1366 .SH Diagnostics
1367 .IX Header "Diagnostics"
1368 The following additions or changes have been made to diagnostic output,
1369 including warnings and fatal error messages. For the complete list of
1370 diagnostic messages, see perldiag.
1371 .SS "New Diagnostics"
1372 .IX Subsection "New Diagnostics"
1373 \fINew Errors\fR
1374 .IX Subsection "New Errors"
1375 .IP \(bu 4
1376 Bad symbol for scalar
1377 .Sp
1378 (P) An internal request asked to add a scalar entry to something that
1379 wasn\*(Aqt a symbol table entry.
1380 .IP \(bu 4
1381 Can\*(Aqt use a hash as a reference
1382 .Sp
1383 (F) You tried to use a hash as a reference, as in
1384 \&\f(CW\*(C`%foo\->{"bar"}\*(C'\fR or \f(CW\*(C`%$ref\->{"hello"}\*(C'\fR. Versions of perl <= 5.6.1
1385 used to allow this syntax, but shouldn\*(Aqt have.
1386 .IP \(bu 4
1387 Can\*(Aqt use an array as a reference
1388 .Sp
1389 (F) You tried to use an array as a reference, as in
1390 \&\f(CW\*(C`@foo\->[23]\*(C'\fR or \f(CW\*(C`@$ref\->[99]\*(C'\fR. Versions of perl <= 5.6.1 used to
1391 allow this syntax, but shouldn\*(Aqt have.
1392 .IP \(bu 4
1393 Can\*(Aqt use \*(Aqdefined(@array)\*(Aq (Maybe you should just omit the \fBdefined()\fR?)
1394 .Sp
1395 (F) \f(CWdefined()\fR is not useful on arrays because it
1396 checks for an undefined \fIscalar\fR value. If you want to see if the
1397 array is empty, just use \f(CW\*(C`if\ (@array)\ {\ #\ not\ empty\ }\*(C'\fR for example.
1398 .IP \(bu 4
1399 Can\*(Aqt use \*(Aqdefined(%hash)\*(Aq (Maybe you should just omit the \fBdefined()\fR?)
1400 .Sp
1401 (F) \f(CWdefined()\fR is not usually right on hashes.
1402 .Sp
1403 Although \f(CW\*(C`defined\ %hash\*(C'\fR is false on a plain not\-yet\-used hash, it
1404 becomes true in several non\-obvious circumstances, including iterators,
1405 weak references, stash names, even remaining true after \f(CW\*(C`undef\ %hash\*(C'\fR.
1406 These things make \f(CW\*(C`defined\ %hash\*(C'\fR fairly useless in practice, so it now
1407 generates a fatal error.
1408 .Sp
1409 If a check for non\-empty is what you wanted then just put it in boolean
1410 context (see "Scalar values" in perldata):
1411 .Sp
1412 .Vb 3
1413 \& if (%hash) {
1414 \& # not empty
1415 \& }
1416 .Ve
1417 .Sp
1418 If you had \f(CW\*(C`defined\ %Foo::Bar::QUUX\*(C'\fR to check whether such a package
1419 variable exists then that\*(Aqs never really been reliable, and isn\*(Aqt
1420 a good way to enquire about the features of a package, or whether
1421 it\*(Aqs loaded, etc.
1422 .IP \(bu 4
1423 Cannot chr \f(CW%f\fR
1424 .Sp
1425 (F) You passed an invalid number (like an infinity or not\-a\-number) to
1426 \&\f(CW\*(C`chr\*(C'\fR.
1427 .IP \(bu 4
1428 Cannot compress \f(CW%f\fR in pack
1429 .Sp
1430 (F) You tried converting an infinity or not\-a\-number to an unsigned
1431 character, which makes no sense.
1432 .IP \(bu 4
1433 Cannot pack \f(CW%f\fR with \*(Aq%c\*(Aq
1434 .Sp
1435 (F) You tried converting an infinity or not\-a\-number to a character,
1436 which makes no sense.
1437 .IP \(bu 4
1438 Cannot print \f(CW%f\fR with \*(Aq%c\*(Aq
1439 .Sp
1440 (F) You tried printing an infinity or not\-a\-number as a character (\f(CW%c\fR),
1441 which makes no sense. Maybe you meant \f(CW\*(Aq%s\*(Aq\fR, or just stringifying it?
1442 .IP \(bu 4
1443 charnames alias definitions may not contain a sequence of multiple spaces
1444 .Sp
1445 (F) You defined a character name which had multiple space
1446 characters in a row. Change them to single spaces. Usually these
1447 names are defined in the \f(CW\*(C`:alias\*(C'\fR import argument to \f(CW\*(C`use charnames\*(C'\fR, but
1448 they could be defined by a translator installed into \f(CW$^H{charnames}\fR.
1449 See "CUSTOM ALIASES" in charnames.
1450 .IP \(bu 4
1451 charnames alias definitions may not contain trailing white\-space
1452 .Sp
1453 (F) You defined a character name which ended in a space
1454 character. Remove the trailing space(s). Usually these names are
1455 defined in the \f(CW\*(C`:alias\*(C'\fR import argument to \f(CW\*(C`use charnames\*(C'\fR, but they
1456 could be defined by a translator installed into \f(CW$^H{charnames}\fR.
1457 See "CUSTOM ALIASES" in charnames.
1458 .IP \(bu 4
1459 :const is not permitted on named subroutines
1460 .Sp
1461 (F) The \f(CW\*(C`const\*(C'\fR attribute causes an anonymous subroutine to be run and
1462 its value captured at the time that it is cloned. Named subroutines are
1463 not cloned like this, so the attribute does not make sense on them.
1464 .IP \(bu 4
1465 Hexadecimal float: internal error
1466 .Sp
1467 (F) Something went horribly bad in hexadecimal float handling.
1468 .IP \(bu 4
1469 Hexadecimal float: unsupported long double format
1470 .Sp
1471 (F) You have configured Perl to use long doubles but
1472 the internals of the long double format are unknown,
1473 therefore the hexadecimal float output is impossible.
1474 .IP \(bu 4
1475 Illegal suidscript
1476 .Sp
1477 (F) The script run under suidperl was somehow illegal.
1478 .IP \(bu 4
1479 In \*(Aq(?...)\*(Aq, the \*(Aq(\*(Aq and \*(Aq?\*(Aq must be adjacent in regex; marked by <\-\-\ HERE in m/%s/
1480 .Sp
1481 (F) The two\-character sequence \f(CW"(?"\fR in
1482 this context in a regular expression pattern should be an
1483 indivisible token, with nothing intervening between the \f(CW"("\fR
1484 and the \f(CW"?"\fR, but you separated them.
1485 .IP \(bu 4
1486 In \*(Aq(*VERB...)\*(Aq, the \*(Aq(\*(Aq and \*(Aq*\*(Aq must be adjacent in regex; marked by <\-\-\ HERE in m/%s/
1487 .Sp
1488 (F) The two\-character sequence \f(CW"(*"\fR in
1489 this context in a regular expression pattern should be an
1490 indivisible token, with nothing intervening between the \f(CW"("\fR
1491 and the \f(CW"*"\fR, but you separated them.
1492 .IP \(bu 4
1493 Invalid quantifier in {,} in regex; marked by <\-\- HERE in m/%s/
1494 .Sp
1495 (F) The pattern looks like a {min,max} quantifier, but the min or max could not
1496 be parsed as a valid number: either it has leading zeroes, or it represents
1497 too big a number to cope with. The <\-\-\ HERE shows where in the regular
1498 expression the problem was discovered. See perlre.
1499 .IP \(bu 4
1500 \&\*(Aq%s\*(Aq is an unknown bound type in regex
1501 .Sp
1502 (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
1503 Perl. The current valid ones are given in
1504 "\eb{}, \eb, \eB{}, \eB" in perlrebackslash.
1505 .IP \(bu 4
1506 Missing or undefined argument to require
1507 .Sp
1508 (F) You tried to call \f(CW\*(C`require\*(C'\fR with no argument or with an undefined
1509 value as an argument. \f(CW\*(C`require\*(C'\fR expects either a package name or a
1510 file\-specification as an argument. See "require" in perlfunc.
1511 .Sp
1512 Formerly, \f(CW\*(C`require\*(C'\fR with no argument or \f(CW\*(C`undef\*(C'\fR warned about a Null filename.
1513 .PP
1514 \fINew Warnings\fR
1515 .IX Subsection "New Warnings"
1516 .IP \(bu 4
1517 \&\eC is deprecated in regex
1518 .Sp
1519 (D deprecated) The \f(CW\*(C`/\eC/\*(C'\fR character class was deprecated in v5.20, and
1520 now emits a warning. It is intended that it will become an error in v5.24.
1521 This character class matches a single byte even if it appears within a
1522 multi\-byte character, breaks encapsulation, and can corrupt UTF\-8
1523 strings.
1524 .IP \(bu 4
1525 "%s" is more clearly written simply as "%s" in regex; marked by <\-\- HERE in m/%s/
1526 .Sp
1527 (W regexp) (only under \f(CW\*(C`use\ re\ \*(Aqstrict\*(Aq\*(C'\fR or within \f(CW\*(C`(?[...])\*(C'\fR)
1528 .Sp
1529 You specified a character that has the given plainer way of writing it,
1530 and which is also portable to platforms running with different character
1531 sets.
1532 .IP \(bu 4
1533 Argument "%s" treated as 0 in increment (++)
1534 .Sp
1535 (W numeric) The indicated string was fed as an argument to the \f(CW\*(C`++\*(C'\fR operator
1536 which expects either a number or a string matching \f(CW\*(C`/^[a\-zA\-Z]*[0\-9]*\ez/\*(C'\fR.
1537 See "Auto\-increment and Auto\-decrement" in perlop for details.
1538 .IP \(bu 4
1539 Both or neither range ends should be Unicode in regex; marked by <\-\- HERE in m/%s/
1540 .Sp
1541 (W regexp) (only under \f(CW\*(C`use\ re\ \*(Aqstrict\*(Aq\*(C'\fR or within \f(CW\*(C`(?[...])\*(C'\fR)
1542 .Sp
1543 In a bracketed character class in a regular expression pattern, you
1544 had a range which has exactly one end of it specified using \f(CW\*(C`\eN{}\*(C'\fR, and
1545 the other end is specified using a non\-portable mechanism. Perl treats
1546 the range as a Unicode range, that is, all the characters in it are
1547 considered to be the Unicode characters, and which may be different code
1548 points on some platforms Perl runs on. For example, \f(CW\*(C`[\eN{U+06}\-\ex08]\*(C'\fR
1549 is treated as if you had instead said \f(CW\*(C`[\eN{U+06}\-\eN{U+08}]\*(C'\fR, that is it
1550 matches the characters whose code points in Unicode are 6, 7, and 8.
1551 But that \f(CW\*(C`\ex08\*(C'\fR might indicate that you meant something different, so
1552 the warning gets raised.
1553 .IP \(bu 4
1554 Can\*(Aqt do %s("%s") on non\-UTF\-8 locale; resolved to "%s".
1555 .Sp
1556 (W locale) You are 1) running under "\f(CW\*(C`use locale\*(C'\fR"; 2) the current
1557 locale is not a UTF\-8 one; 3) you tried to do the designated case\-change
1558 operation on the specified Unicode character; and 4) the result of this
1559 operation would mix Unicode and locale rules, which likely conflict.
1560 .Sp
1561 The warnings category \f(CW\*(C`locale\*(C'\fR is new.
1562 .IP \(bu 4
1563 :const is experimental
1564 .Sp
1565 (S experimental::const_attr) The \f(CW\*(C`const\*(C'\fR attribute is experimental.
1566 If you want to use the feature, disable the warning with \f(CWno warnings
1567 \&\*(Aqexperimental::const_attr\*(Aq\fR, but know that in doing so you are taking
1568 the risk that your code may break in a future Perl version.
1569 .IP \(bu 4
1570 gmtime(%f) failed
1571 .Sp
1572 (W overflow) You called \f(CW\*(C`gmtime\*(C'\fR with a number that it could not handle:
1573 too large, too small, or NaN. The returned value is \f(CW\*(C`undef\*(C'\fR.
1574 .IP \(bu 4
1575 Hexadecimal float: exponent overflow
1576 .Sp
1577 (W overflow) The hexadecimal floating point has larger exponent
1578 than the floating point supports.
1579 .IP \(bu 4
1580 Hexadecimal float: exponent underflow
1581 .Sp
1582 (W overflow) The hexadecimal floating point has smaller exponent
1583 than the floating point supports.
1584 .IP \(bu 4
1585 Hexadecimal float: mantissa overflow
1586 .Sp
1587 (W overflow) The hexadecimal floating point literal had more bits in
1588 the mantissa (the part between the \f(CW\*(C`0x\*(C'\fR and the exponent, also known as
1589 the fraction or the significand) than the floating point supports.
1590 .IP \(bu 4
1591 Hexadecimal float: precision loss
1592 .Sp
1593 (W overflow) The hexadecimal floating point had internally more
1594 digits than could be output. This can be caused by unsupported
1595 long double formats, or by 64\-bit integers not being available
1596 (needed to retrieve the digits under some configurations).
1597 .IP \(bu 4
1598 Locale \*(Aq%s\*(Aq may not work well.%s
1599 .Sp
1600 (W locale) You are using the named locale, which is a non\-UTF\-8 one, and
1601 which perl has determined is not fully compatible with what it can
1602 handle. The second \f(CW%s\fR gives a reason.
1603 .Sp
1604 The warnings category \f(CW\*(C`locale\*(C'\fR is new.
1605 .IP \(bu 4
1606 localtime(%f) failed
1607 .Sp
1608 (W overflow) You called \f(CW\*(C`localtime\*(C'\fR with a number that it could not handle:
1609 too large, too small, or NaN. The returned value is \f(CW\*(C`undef\*(C'\fR.
1610 .IP \(bu 4
1611 Negative repeat count does nothing
1612 .Sp
1613 (W numeric) You tried to execute the
1614 \&\f(CW\*(C`x\*(C'\fR repetition operator fewer than 0
1615 times, which doesn\*(Aqt make sense.
1616 .IP \(bu 4
1617 NO\-BREAK SPACE in a charnames alias definition is deprecated
1618 .Sp
1619 (D deprecated) You defined a character name which contained a no\-break
1620 space character. Change it to a regular space. Usually these names are
1621 defined in the \f(CW\*(C`:alias\*(C'\fR import argument to \f(CW\*(C`use charnames\*(C'\fR, but they
1622 could be defined by a translator installed into \f(CW$^H{charnames}\fR. See
1623 "CUSTOM ALIASES" in charnames.
1624 .IP \(bu 4
1625 Non\-finite repeat count does nothing
1626 .Sp
1627 (W numeric) You tried to execute the
1628 \&\f(CW\*(C`x\*(C'\fR repetition operator \f(CW\*(C`Inf\*(C'\fR (or
1629 \&\f(CW\*(C`\-Inf\*(C'\fR) or NaN times, which doesn\*(Aqt make sense.
1630 .IP \(bu 4
1631 PerlIO layer \*(Aq:win32\*(Aq is experimental
1632 .Sp
1633 (S experimental::win32_perlio) The \f(CW\*(C`:win32\*(C'\fR PerlIO layer is
1634 experimental. If you want to take the risk of using this layer,
1635 simply disable this warning:
1636 .Sp
1637 .Vb 1
1638 \& no warnings "experimental::win32_perlio";
1639 .Ve
1640 .IP \(bu 4
1641 Ranges of ASCII printables should be some subset of "0\-9", "A\-Z", or "a\-z" in regex; marked by <\-\- HERE in m/%s/
1642 .Sp
1643 (W regexp) (only under \f(CW\*(C`use\ re\ \*(Aqstrict\*(Aq\*(C'\fR or within \f(CW\*(C`(?[...])\*(C'\fR)
1644 .Sp
1645 Stricter rules help to find typos and other errors. Perhaps you didn\*(Aqt
1646 even intend a range here, if the \f(CW"\-"\fR was meant to be some other
1647 character, or should have been escaped (like \f(CW"\e\-"\fR). If you did
1648 intend a range, the one that was used is not portable between ASCII and
1649 EBCDIC platforms, and doesn\*(Aqt have an obvious meaning to a casual
1650 reader.
1651 .Sp
1652 .Vb 7
1653 \& [3\-7] # OK; Obvious and portable
1654 \& [d\-g] # OK; Obvious and portable
1655 \& [A\-Y] # OK; Obvious and portable
1656 \& [A\-z] # WRONG; Not portable; not clear what is meant
1657 \& [a\-Z] # WRONG; Not portable; not clear what is meant
1658 \& [%\-.] # WRONG; Not portable; not clear what is meant
1659 \& [\ex41\-Z] # WRONG; Not portable; not obvious to non\-geek
1660 .Ve
1661 .Sp
1662 (You can force portability by specifying a Unicode range, which means that
1663 the endpoints are specified by
1664 \&\f(CW\*(C`\eN{...}\*(C'\fR, but the meaning may
1665 still not be obvious.)
1666 The stricter rules require that ranges that start or stop with an ASCII
1667 character that is not a control have all their endpoints be a literal
1668 character, and not some escape sequence (like \f(CW"\ex41"\fR), and the ranges
1669 must be all digits, or all uppercase letters, or all lowercase letters.
1670 .IP \(bu 4
1671 Ranges of digits should be from the same group in regex; marked by <\-\- HERE in m/%s/
1672 .Sp
1673 (W regexp) (only under \f(CW\*(C`use\ re\ \*(Aqstrict\*(Aq\*(C'\fR or within \f(CW\*(C`(?[...])\*(C'\fR)
1674 .Sp
1675 Stricter rules help to find typos and other errors. You included a
1676 range, and at least one of the end points is a decimal digit. Under the
1677 stricter rules, when this happens, both end points should be digits in
1678 the same group of 10 consecutive digits.
1679 .IP \(bu 4
1680 Redundant argument in \f(CW%s\fR
1681 .Sp
1682 (W redundant) You called a function with more arguments than were
1683 needed, as indicated by information within other arguments you supplied
1684 (\fIe.g\fR. a printf format). Currently only emitted when a printf\-type format
1685 required fewer arguments than were supplied, but might be used in the
1686 future for \fIe.g.\fR "pack" in perlfunc.
1687 .Sp
1688 The warnings category \f(CW\*(C`redundant\*(C'\fR is new. See also
1689 [GH #13534] <https://github.com/Perl/perl5/issues/13534>.
1690 .IP \(bu 4
1691 Replacement list is longer than search list
1692 .Sp
1693 This is not a new diagnostic, but in earlier releases was accidentally
1694 not displayed if the transliteration contained wide characters. This is
1695 now fixed, so that you may see this diagnostic in places where you
1696 previously didn\*(Aqt (but should have).
1697 .IP \(bu 4
1698 Use of \eb{} for non\-UTF\-8 locale is wrong. Assuming a UTF\-8 locale
1699 .Sp
1700 (W locale) You are matching a regular expression using locale rules,
1701 and a Unicode boundary is being matched, but the locale is not a Unicode
1702 one. This doesn\*(Aqt make sense. Perl will continue, assuming a Unicode
1703 (UTF\-8) locale, but the results could well be wrong except if the locale
1704 happens to be ISO\-8859\-1 (Latin1) where this message is spurious and can
1705 be ignored.
1706 .Sp
1707 The warnings category \f(CW\*(C`locale\*(C'\fR is new.
1708 .IP \(bu 4
1709 Using /u for \*(Aq%s\*(Aq instead of /%s in regex; marked by <\-\- HERE in m/%s/
1710 .Sp
1711 (W regexp) You used a Unicode boundary (\f(CW\*(C`\eb{...}\*(C'\fR or \f(CW\*(C`\eB{...}\*(C'\fR) in a
1712 portion of a regular expression where the character set modifiers \f(CW\*(C`/a\*(C'\fR
1713 or \f(CW\*(C`/aa\*(C'\fR are in effect. These two modifiers indicate an ASCII
1714 interpretation, and this doesn\*(Aqt make sense for a Unicode definition.
1715 The generated regular expression will compile so that the boundary uses
1716 all of Unicode. No other portion of the regular expression is affected.
1717 .IP \(bu 4
1718 The bitwise feature is experimental
1719 .Sp
1720 (S experimental::bitwise) This warning is emitted if you use bitwise
1721 operators (\f(CW\*(C`& | ^ ~ &. |. ^. ~.\*(C'\fR) with the "bitwise" feature enabled.
1722 Simply suppress the warning if you want to use the feature, but know
1723 that in doing so you are taking the risk of using an experimental
1724 feature which may change or be removed in a future Perl version:
1725 .Sp
1726 .Vb 3
1727 \& no warnings "experimental::bitwise";
1728 \& use feature "bitwise";
1729 \& $x |.= $y;
1730 .Ve
1731 .IP \(bu 4
1732 Unescaped left brace in regex is deprecated, passed through in regex; marked by <\-\- HERE in m/%s/
1733 .Sp
1734 (D deprecated, regexp) You used a literal \f(CW"{"\fR character in a regular
1735 expression pattern. You should change to use \f(CW"\e{"\fR instead, because a future
1736 version of Perl (tentatively v5.26) will consider this to be a syntax error. If
1737 the pattern delimiters are also braces, any matching right brace
1738 (\f(CW"}"\fR) should also be escaped to avoid confusing the parser, for
1739 example,
1740 .Sp
1741 .Vb 1
1742 \& qr{abc\e{def\e}ghi}
1743 .Ve
1744 .IP \(bu 4
1745 Use of literal non\-graphic characters in variable names is deprecated
1746 .Sp
1747 (D deprecated) Using literal non\-graphic (including control)
1748 characters in the source to refer to the \fI^FOO\fR variables, like \f(CW$^X\fR and
1749 \&\f(CW\*(C`${^GLOBAL_PHASE}\*(C'\fR is now deprecated.
1750 .IP \(bu 4
1751 Useless use of attribute "const"
1752 .Sp
1753 (W misc) The \f(CW\*(C`const\*(C'\fR attribute has no effect except
1754 on anonymous closure prototypes. You applied it to
1755 a subroutine via attributes.pm. This is only useful
1756 inside an attribute handler for an anonymous subroutine.
1757 .IP \(bu 4
1758 Useless use of /d modifier in transliteration operator
1759 .Sp
1760 This is not a new diagnostic, but in earlier releases was accidentally
1761 not displayed if the transliteration contained wide characters. This is
1762 now fixed, so that you may see this diagnostic in places where you
1763 previously didn\*(Aqt (but should have).
1764 .IP \(bu 4
1765 "use re \*(Aqstrict\*(Aq" is experimental
1766 .Sp
1767 (S experimental::re_strict) The things that are different when a regular
1768 expression pattern is compiled under \f(CW\*(Aqstrict\*(Aq\fR are subject to change
1769 in future Perl releases in incompatible ways; there are also proposals
1770 to change how to enable strict checking instead of using this subpragma.
1771 This means that a pattern that compiles today may not in a future Perl
1772 release. This warning is to alert you to that risk.
1773 .IP \(bu 4
1774 Warning: unable to close filehandle properly: \f(CW%s\fR
1775 .Sp
1776 Warning: unable to close filehandle \f(CW%s\fR properly: \f(CW%s\fR
1777 .Sp
1778 (S io) Previously, perl silently ignored any errors when doing an implicit
1779 close of a filehandle, \fIi.e.\fR where the reference count of the filehandle
1780 reached zero and the user\*(Aqs code hadn\*(Aqt already called \f(CWclose()\fR; \fIe.g.\fR
1781 .Sp
1782 .Vb 4
1783 \& {
1784 \& open my $fh, \*(Aq>\*(Aq, $file or die "open: \*(Aq$file\*(Aq: $!\en";
1785 \& print $fh, $data or die;
1786 \& } # implicit close here
1787 .Ve
1788 .Sp
1789 In a situation such as disk full, due to buffering, the error may only be
1790 detected during the final close, so not checking the result of the close is
1791 dangerous.
1792 .Sp
1793 So perl now warns in such situations.
1794 .IP \(bu 4
1795 Wide character (U+%X) in \f(CW%s\fR
1796 .Sp
1797 (W locale) While in a single\-byte locale (\fIi.e.\fR, a non\-UTF\-8
1798 one), a multi\-byte character was encountered. Perl considers this
1799 character to be the specified Unicode code point. Combining non\-UTF\-8
1800 locales and Unicode is dangerous. Almost certainly some characters
1801 will have two different representations. For example, in the ISO 8859\-7
1802 (Greek) locale, the code point 0xC3 represents a Capital Gamma. But so
1803 also does 0x393. This will make string comparisons unreliable.
1804 .Sp
1805 You likely need to figure out how this multi\-byte character got mixed up
1806 with your single\-byte locale (or perhaps you thought you had a UTF\-8
1807 locale, but Perl disagrees).
1808 .Sp
1809 The warnings category \f(CW\*(C`locale\*(C'\fR is new.
1810 .SS "Changes to Existing Diagnostics"
1811 .IX Subsection "Changes to Existing Diagnostics"
1812 .IP \(bu 4
1813 <> should be quotes
1814 .Sp
1815 This warning has been changed to
1816 <> at require\-statement should be quotes
1817 to make the issue more identifiable.
1818 .IP \(bu 4
1819 Argument "%s" isn\*(Aqt numeric%s
1820 .Sp
1821 The perldiag entry for this warning has added this clarifying note:
1822 .Sp
1823 .Vb 4
1824 \& Note that for the Inf and NaN (infinity and not\-a\-number) the
1825 \& definition of "numeric" is somewhat unusual: the strings themselves
1826 \& (like "Inf") are considered numeric, and anything following them is
1827 \& considered non\-numeric.
1828 .Ve
1829 .IP \(bu 4
1830 Global symbol "%s" requires explicit package name
1831 .Sp
1832 This message has had \*(Aq(did you forget to declare "my \f(CW%s\fR"?)\*(Aq appended to it, to
1833 make it more helpful to new Perl programmers.
1834 [GH #13732] <https://github.com/Perl/perl5/issues/13732>
1835 .IP \(bu 4
1836 \&\*(Aq"my" variable &foo::bar can\*(Aqt be in a package\*(Aq has been reworded to say
1837 \&\*(Aqsubroutine\*(Aq instead of \*(Aqvariable\*(Aq.
1838 .IP \(bu 4
1839 \&\eN{} in character class restricted to one character in regex; marked by
1840 <\-\-\ HERE in m/%s/
1841 .Sp
1842 This message has had \fIcharacter class\fR changed to \fIinverted character
1843 class or as a range end\-point is\fR to reflect improvements in
1844 \&\f(CW\*(C`qr/[\eN{named sequence}]/\*(C'\fR (see under "Selected Bug Fixes").
1845 .IP \(bu 4
1846 panic: frexp
1847 .Sp
1848 This message has had \*(Aq: \f(CW%f\fR\*(Aq appended to it, to show what the offending
1849 floating point number is.
1850 .IP \(bu 4
1851 \&\fIPossible precedence problem on bitwise \fR\f(CI%c\fR\fI operator\fR reworded as
1852 Possible precedence problem on bitwise \f(CW%s\fR operator.
1853 .IP \(bu 4
1854 Unsuccessful \f(CW%s\fR on filename containing newline
1855 .Sp
1856 This warning is now only produced when the newline is at the end of
1857 the filename.
1858 .IP \(bu 4
1859 "Variable \f(CW%s\fR will not stay shared" has been changed to say "Subroutine"
1860 when it is actually a lexical sub that will not stay shared.
1861 .IP \(bu 4
1862 Variable length lookbehind not implemented in regex m/%s/
1863 .Sp
1864 The perldiag entry for this warning has had information about Unicode
1865 behavior added.
1866 .SS "Diagnostic Removals"
1867 .IX Subsection "Diagnostic Removals"
1868 .IP \(bu 4
1869 "Ambiguous use of \-foo resolved as \-&\fBfoo()\fR"
1870 .Sp
1871 There is actually no ambiguity here, and this impedes the use of negated
1872 constants; \fIe.g.\fR, \f(CW\*(C`\-Inf\*(C'\fR.
1873 .IP \(bu 4
1874 "Constant is not a FOO reference"
1875 .Sp
1876 Compile\-time checking of constant dereferencing (\fIe.g.\fR, \f(CWmy_constant\->()\fR)
1877 has been removed, since it was not taking overloading into account.
1878 [GH #9891] <https://github.com/Perl/perl5/issues/9891>
1879 [GH #14044] <https://github.com/Perl/perl5/issues/14044>
1880 .SH "Utility Changes"
1881 .IX Header "Utility Changes"
1882 .SS "\fIfind2perl\fP, \fIs2p\fP and \fIa2p\fP removal"
1883 .IX Subsection "find2perl, s2p and a2p removal"
1884 .IP \(bu 4
1885 The \fIx2p/\fR directory has been removed from the Perl core.
1886 .Sp
1887 This removes find2perl, s2p and a2p. They have all been released to CPAN as
1888 separate distributions (\f(CW\*(C`App::find2perl\*(C'\fR, \f(CW\*(C`App::s2p\*(C'\fR, \f(CW\*(C`App::a2p\*(C'\fR).
1889 .SS h2ph
1890 .IX Subsection "h2ph"
1891 .IP \(bu 4
1892 \&\fIh2ph\fR now handles hexadecimal constants in the compiler\*(Aqs predefined
1893 macro definitions, as visible in \f(CW$Config{cppsymbols}\fR.
1894 [GH #14491] <https://github.com/Perl/perl5/issues/14491>.
1895 .SS encguess
1896 .IX Subsection "encguess"
1897 .IP \(bu 4
1898 No longer depends on non\-core modules.
1899 .SH "Configuration and Compilation"
1900 .IX Header "Configuration and Compilation"
1901 .IP \(bu 4
1902 \&\fIConfigure\fR now checks for \f(CWlrintl()\fR, \f(CWlroundl()\fR, \f(CWllrintl()\fR, and
1903 \&\f(CWllroundl()\fR.
1904 .IP \(bu 4
1905 \&\fIConfigure\fR with \f(CW\*(C`\-Dmksymlinks\*(C'\fR should now be faster.
1906 [GH #13890] <https://github.com/Perl/perl5/issues/13890>.
1907 .IP \(bu 4
1908 The \f(CW\*(C`pthreads\*(C'\fR and \f(CW\*(C`cl\*(C'\fR libraries will be linked by default if present.
1909 This allows XS modules that require threading to work on non\-threaded
1910 perls. Note that you must still pass \f(CW\*(C`\-Dusethreads\*(C'\fR if you want a
1911 threaded perl.
1912 .IP \(bu 4
1913 To get more precision and range for floating point numbers one can now
1914 use the GCC quadmath library which implements the quadruple precision
1915 floating point numbers on x86 and IA\-64 platforms. See \fIINSTALL\fR for
1916 details.
1917 .IP \(bu 4
1918 MurmurHash64A and MurmurHash64B can now be configured as the internal hash
1919 function.
1920 .IP \(bu 4
1921 \&\f(CW\*(C`make test.valgrind\*(C'\fR now supports parallel testing.
1922 .Sp
1923 For example:
1924 .Sp
1925 .Vb 1
1926 \& TEST_JOBS=9 make test.valgrind
1927 .Ve
1928 .Sp
1929 See "valgrind" in perlhacktips for more information.
1930 .Sp
1931 [GH #13658] <https://github.com/Perl/perl5/issues/13658>
1932 .IP \(bu 4
1933 The MAD (Misc Attribute Decoration) build option has been removed
1934 .Sp
1935 This was an unmaintained attempt at preserving
1936 the Perl parse tree more faithfully so that automatic conversion of
1937 Perl 5 to Perl 6 would have been easier.
1938 .Sp
1939 This build\-time configuration option had been unmaintained for years,
1940 and had probably seriously diverged on both Perl 5 and Perl 6 sides.
1941 .IP \(bu 4
1942 A new compilation flag, \f(CW\*(C`\-DPERL_OP_PARENT\*(C'\fR is available. For details,
1943 see the discussion below at "Internal Changes".
1944 .IP \(bu 4
1945 Pathtools no longer tries to load XS on miniperl. This speeds up building perl
1946 slightly.
1947 .SH Testing
1948 .IX Header "Testing"
1949 .IP \(bu 4
1950 \&\fIt/porting/re_context.t\fR has been added to test that utf8 and its
1951 dependencies only use the subset of the \f(CW\*(C`$1..$n\*(C'\fR capture vars that
1952 \&\f(CWPerl_save_re_context()\fR is hard\-coded to localize, because that function
1953 has no efficient way of determining at runtime what vars to localize.
1954 .IP \(bu 4
1955 Tests for performance issues have been added in the file \fIt/perf/taint.t\fR.
1956 .IP \(bu 4
1957 Some regular expression tests are written in such a way that they will
1958 run very slowly if certain optimizations break. These tests have been
1959 moved into new files, \fIt/re/speed.t\fR and \fIt/re/speed_thr.t\fR,
1960 and are run with a \f(CWwatchdog()\fR.
1961 .IP \(bu 4
1962 \&\f(CW\*(C`test.pl\*(C'\fR now allows \f(CW\*(C`plan skip_all => $reason\*(C'\fR, to make it
1963 more compatible with \f(CW\*(C`Test::More\*(C'\fR.
1964 .IP \(bu 4
1965 A new test script, \fIop/infnan.t\fR, has been added to test if infinity and NaN are
1966 working correctly. See "Infinity and NaN (not\-a\-number) handling improved".
1967 .SH "Platform Support"
1968 .IX Header "Platform Support"
1969 .SS "Regained Platforms"
1970 .IX Subsection "Regained Platforms"
1971 .IP "IRIX and Tru64 platforms are working again." 4
1972 .IX Item "IRIX and Tru64 platforms are working again."
1973 Some \f(CW\*(C`make test\*(C'\fR failures remain:
1974 [GH #14557] <https://github.com/Perl/perl5/issues/14557>
1975 and [GH #14727] <https://github.com/Perl/perl5/issues/14727>
1976 for IRIX; [GH #14629] <https://github.com/Perl/perl5/issues/14629>,
1977 [cpan #99605] <https://rt.cpan.org/Public/Bug/Display.html?id=99605>, and
1978 [cpan #104836] <https://rt.cpan.org/Ticket/Display.html?id=104836> for Tru64.
1979 .IP "z/OS running EBCDIC Code Page 1047" 4
1980 .IX Item "z/OS running EBCDIC Code Page 1047"
1981 Core perl now works on this EBCDIC platform. Earlier perls also worked, but,
1982 even though support wasn\*(Aqt officially withdrawn, recent perls would not compile
1983 and run well. Perl 5.20 would work, but had many bugs which have now been
1984 fixed. Many CPAN modules that ship with Perl still fail tests, including
1985 \&\f(CW\*(C`Pod::Simple\*(C'\fR. However the version of \f(CW\*(C`Pod::Simple\*(C'\fR currently on CPAN should work;
1986 it was fixed too late to include in Perl 5.22. Work is under way to fix many
1987 of the still\-broken CPAN modules, which likely will be installed on CPAN when
1988 completed, so that you may not have to wait until Perl 5.24 to get a working
1989 version.
1990 .SS "Discontinued Platforms"
1991 .IX Subsection "Discontinued Platforms"
1992 .IP NeXTSTEP/OPENSTEP 4
1993 .IX Item "NeXTSTEP/OPENSTEP"
1994 NeXTSTEP was a proprietary operating system bundled with NeXT\*(Aqs
1995 workstations in the early to mid 90s; OPENSTEP was an API specification
1996 that provided a NeXTSTEP\-like environment on a non\-NeXTSTEP system. Both
1997 are now long dead, so support for building Perl on them has been removed.
1998 .SS "Platform\-Specific Notes"
1999 .IX Subsection "Platform-Specific Notes"
2000 .IP EBCDIC 4
2001 .IX Item "EBCDIC"
2002 Special handling is required of the perl interpreter on EBCDIC platforms
2003 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
2004 characters between the
2005 code points for \f(CW"i"\fR and \f(CW"j"\fR. This special handling had only been
2006 invoked when both ends of the range are literals. Now it is also
2007 invoked if any of the \f(CW\*(C`\eN{...}\*(C'\fR forms for specifying a character by
2008 name or Unicode code point is used instead of a literal. See
2009 "Character Ranges" in perlrecharclass.
2010 .IP HP\-UX 4
2011 .IX Item "HP-UX"
2012 The archname now distinguishes use64bitint from use64bitall.
2013 .IP Android 4
2014 .IX Item "Android"
2015 Build support has been improved for cross\-compiling in general and for
2016 Android in particular.
2017 .IP VMS 4
2018 .IX Item "VMS"
2019 .RS 4
2020 .PD 0
2021 .IP \(bu 4
2022 .PD
2023 When spawning a subprocess without waiting, the return value is now
2024 the correct PID.
2025 .IP \(bu 4
2026 Fix a prototype so linking doesn\*(Aqt fail under the VMS C++ compiler.
2027 .IP \(bu 4
2028 \&\f(CW\*(C`finite\*(C'\fR, \f(CW\*(C`finitel\*(C'\fR, and \f(CW\*(C`isfinite\*(C'\fR detection has been added to
2029 \&\f(CW\*(C`configure.com\*(C'\fR, environment handling has had some minor changes, and
2030 a fix for legacy feature checking status.
2031 .RE
2032 .RS 4
2033 .RE
2034 .IP Win32 4
2035 .IX Item "Win32"
2036 .RS 4
2037 .PD 0
2038 .IP \(bu 4
2039 .PD
2040 \&\fIminiperl.exe\fR is now built with \f(CW\*(C`\-fno\-strict\-aliasing\*(C'\fR, allowing 64\-bit
2041 builds to complete on GCC 4.8.
2042 [GH #14556] <https://github.com/Perl/perl5/issues/14556>
2043 .IP \(bu 4
2044 \&\f(CW\*(C`nmake minitest\*(C'\fR now works on Win32. Due to dependency issues you
2045 need to build \f(CW\*(C`nmake test\-prep\*(C'\fR first, and a small number of the
2046 tests fail.
2047 [GH #14318] <https://github.com/Perl/perl5/issues/14318>
2048 .IP \(bu 4
2049 Perl can now be built in C++ mode on Windows by setting the makefile macro
2050 \&\f(CW\*(C`USE_CPLUSPLUS\*(C'\fR to the value "define".
2051 .IP \(bu 4
2052 The list form of piped open has been implemented for Win32. Note: unlike
2053 \&\f(CW\*(C`system LIST\*(C'\fR this does not fall back to the shell.
2054 [GH #13574] <https://github.com/Perl/perl5/issues/13574>
2055 .IP \(bu 4
2056 New \f(CW\*(C`DebugSymbols\*(C'\fR and \f(CW\*(C`DebugFull\*(C'\fR configuration options added to
2057 Windows makefiles.
2058 .IP \(bu 4
2059 Previously, compiling XS modules (including CPAN ones) using Visual C++ for
2060 Win64 resulted in around a dozen warnings per file from \fIhv_func.h\fR. These
2061 warnings have been silenced.
2062 .IP \(bu 4
2063 Support for building without PerlIO has been removed from the Windows
2064 makefiles. Non\-PerlIO builds were all but deprecated in Perl 5.18.0 and are
2065 already not supported by \fIConfigure\fR on POSIX systems.
2066 .IP \(bu 4
2067 Between 2 and 6 milliseconds and seven I/O calls have been saved per attempt
2068 to open a perl module for each path in \f(CW@INC\fR.
2069 .IP \(bu 4
2070 Intel C builds are now always built with C99 mode on.
2071 .IP \(bu 4
2072 \&\f(CW%I64d\fR is now being used instead of \f(CW%lld\fR for MinGW.
2073 .IP \(bu 4
2074 In the experimental \f(CW\*(C`:win32\*(C'\fR layer, a crash in \f(CW\*(C`open\*(C'\fR was fixed. Also
2075 opening \fI/dev/null\fR (which works under Win32 Perl\*(Aqs default \f(CW\*(C`:unix\*(C'\fR
2076 layer) was implemented for \f(CW\*(C`:win32\*(C'\fR.
2077 [GH #13968] <https://github.com/Perl/perl5/issues/13968>
2078 .IP \(bu 4
2079 A new makefile option, \f(CW\*(C`USE_LONG_DOUBLE\*(C'\fR, has been added to the Windows
2080 dmake makefile for gcc builds only. Set this to "define" if you want perl to
2081 use long doubles to give more accuracy and range for floating point numbers.
2082 .RE
2083 .RS 4
2084 .RE
2085 .IP OpenBSD 4
2086 .IX Item "OpenBSD"
2087 On OpenBSD, Perl will now default to using the system \f(CW\*(C`malloc\*(C'\fR due to the
2088 security features it provides. Perl\*(Aqs own malloc wrapper has been in use
2089 since v5.14 due to performance reasons, but the OpenBSD project believes
2090 the tradeoff is worth it and would prefer that users who need the speed
2091 specifically ask for it.
2092 .Sp
2093 [GH #13888] <https://github.com/Perl/perl5/issues/13888>.
2094 .IP Solaris 4
2095 .IX Item "Solaris"
2096 .RS 4
2097 .PD 0
2098 .IP \(bu 4
2099 .PD
2100 We now look for the Sun Studio compiler in both \fI/opt/solstudio*\fR and
2101 \&\fI/opt/solarisstudio*\fR.
2102 .IP \(bu 4
2103 Builds on Solaris 10 with \f(CW\*(C`\-Dusedtrace\*(C'\fR would fail early since make
2104 didn\*(Aqt follow implied dependencies to build \f(CW\*(C`perldtrace.h\*(C'\fR. Added an
2105 explicit dependency to \f(CW\*(C`depend\*(C'\fR.
2106 [GH #13334] <https://github.com/Perl/perl5/issues/13334>
2107 .IP \(bu 4
2108 C99 options have been cleaned up; hints look for \f(CW\*(C`solstudio\*(C'\fR
2109 as well as \f(CW\*(C`SUNWspro\*(C'\fR; and support for native \f(CW\*(C`setenv\*(C'\fR has been added.
2110 .RE
2111 .RS 4
2112 .RE
2113 .SH "Internal Changes"
2114 .IX Header "Internal Changes"
2115 .IP \(bu 4
2116 Experimental support has been added to allow ops in the optree to locate
2117 their parent, if any. This is enabled by the non\-default build option
2118 \&\f(CW\*(C`\-DPERL_OP_PARENT\*(C'\fR. It is envisaged that this will eventually become
2119 enabled by default, so XS code which directly accesses the \f(CW\*(C`op_sibling\*(C'\fR
2120 field of ops should be updated to be future\-proofed.
2121 .Sp
2122 On \f(CW\*(C`PERL_OP_PARENT\*(C'\fR builds, the \f(CW\*(C`op_sibling\*(C'\fR field has been renamed
2123 \&\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
2124 sibling chain, \f(CW\*(C`op_moresib\*(C'\fR is false and \f(CW\*(C`op_sibparent\*(C'\fR points to the
2125 parent (if any) rather than being \f(CW\*(C`NULL\*(C'\fR.
2126 .Sp
2127 To make existing code work transparently whether using \f(CW\*(C`PERL_OP_PARENT\*(C'\fR
2128 or not, a number of new macros and functions have been added that should
2129 be used, rather than directly manipulating \f(CW\*(C`op_sibling\*(C'\fR.
2130 .Sp
2131 For the case of just reading \f(CW\*(C`op_sibling\*(C'\fR to determine the next sibling,
2132 two new macros have been added. A simple scan through a sibling chain
2133 like this:
2134 .Sp
2135 .Vb 1
2136 \& for (; kid\->op_sibling; kid = kid\->op_sibling) { ... }
2137 .Ve
2138 .Sp
2139 should now be written as:
2140 .Sp
2141 .Vb 1
2142 \& for (; OpHAS_SIBLING(kid); kid = OpSIBLING(kid)) { ... }
2143 .Ve
2144 .Sp
2145 For altering optrees, a general\-purpose function \f(CWop_sibling_splice()\fR
2146 has been added, which allows for manipulation of a chain of sibling ops.
2147 By analogy with the Perl function \f(CWsplice()\fR, it allows you to cut out
2148 zero or more ops from a sibling chain and replace them with zero or more
2149 new ops. It transparently handles all the updating of sibling, parent,
2150 op_last pointers etc.
2151 .Sp
2152 If you need to manipulate ops at a lower level, then three new macros,
2153 \&\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
2154 be a low\-level portable way to set \f(CW\*(C`op_sibling\*(C'\fR / \f(CW\*(C`op_sibparent\*(C'\fR while
2155 also updating \f(CW\*(C`op_moresib\*(C'\fR. The first sets the sibling pointer to a new
2156 sibling, the second makes the op the last sibling, and the third
2157 conditionally does the first or second action. Note that unlike
2158 \&\f(CWop_sibling_splice()\fR these macros won\*(Aqt maintain consistency in the
2159 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
2160 appropriate).
2161 .Sp
2162 A C\-level \f(CWPerl_op_parent()\fR function and a Perl\-level \f(CWB::OP::parent()\fR
2163 method have been added. The C function only exists under
2164 \&\f(CW\*(C`PERL_OP_PARENT\*(C'\fR builds (using it is build\-time error on vanilla
2165 perls). \f(CWB::OP::parent()\fR exists always, but on a vanilla build it
2166 always returns \f(CW\*(C`NULL\*(C'\fR. Under \f(CW\*(C`PERL_OP_PARENT\*(C'\fR, they return the parent
2167 of the current op, if any. The variable \f(CW$B::OP::does_parent\fR allows you
2168 to determine whether \f(CW\*(C`B\*(C'\fR supports retrieving an op\*(Aqs parent.
2169 .Sp
2170 \&\f(CW\*(C`PERL_OP_PARENT\*(C'\fR was introduced in 5.21.2, but the interface was
2171 changed considerably in 5.21.11. If you updated your code before the
2172 5.21.11 changes, it may require further revision. The main changes after
2173 5.21.2 were:
2174 .RS 4
2175 .IP \(bu 4
2176 The \f(CW\*(C`OP_SIBLING\*(C'\fR and \f(CW\*(C`OP_HAS_SIBLING\*(C'\fR macros have been renamed
2177 \&\f(CW\*(C`OpSIBLING\*(C'\fR and \f(CW\*(C`OpHAS_SIBLING\*(C'\fR for consistency with other
2178 op\-manipulating macros.
2179 .IP \(bu 4
2180 The \f(CW\*(C`op_lastsib\*(C'\fR field has been renamed \f(CW\*(C`op_moresib\*(C'\fR, and its meaning
2181 inverted.
2182 .IP \(bu 4
2183 The macro \f(CW\*(C`OpSIBLING_set\*(C'\fR has been removed, and has been superseded by
2184 \&\f(CW\*(C`OpMORESIB_set\*(C'\fR \fIet al\fR.
2185 .IP \(bu 4
2186 The \f(CWop_sibling_splice()\fR function now accepts a null \f(CW\*(C`parent\*(C'\fR argument
2187 where the splicing doesn\*(Aqt affect the first or last ops in the sibling
2188 chain
2189 .RE
2190 .RS 4
2191 .RE
2192 .IP \(bu 4
2193 Macros have been created to allow XS code to better manipulate the POSIX locale
2194 category \f(CW\*(C`LC_NUMERIC\*(C'\fR. See "Locale\-related functions and macros" in perlapi.
2195 .IP \(bu 4
2196 The previous \f(CW\*(C`atoi\*(C'\fR \fIet al\fR replacement function, \f(CW\*(C`grok_atou\*(C'\fR, has now been
2197 superseded by \f(CW\*(C`grok_atoUV\*(C'\fR. See perlclib for details.
2198 .IP \(bu 4
2199 A new function, \f(CWPerl_sv_get_backrefs()\fR, has been added which allows you
2200 retrieve the weak references, if any, which point at an SV.
2201 .IP \(bu 4
2202 The \f(CWscreaminstr()\fR function has been removed. Although marked as
2203 public API, it was undocumented and had no usage in CPAN modules. Calling
2204 it has been fatal since 5.17.0.
2205 .IP \(bu 4
2206 The \f(CWnewDEFSVOP()\fR, \f(CWblock_start()\fR, \f(CWblock_end()\fR and \f(CWintro_my()\fR
2207 functions have been added to the API.
2208 .IP \(bu 4
2209 The internal \f(CW\*(C`convert\*(C'\fR function in \fIop.c\fR has been renamed
2210 \&\f(CW\*(C`op_convert_list\*(C'\fR and added to the API.
2211 .IP \(bu 4
2212 The \f(CWsv_magic()\fR function no longer forbids "ext" magic on read\-only
2213 values. After all, perl can\*(Aqt know whether the custom magic will modify
2214 the SV or not.
2215 [GH #14202] <https://github.com/Perl/perl5/issues/14202>.
2216 .IP \(bu 4
2217 Accessing "CvPADLIST" in perlapi on an XSUB is now forbidden.
2218 .Sp
2219 The \f(CW\*(C`CvPADLIST\*(C'\fR field has been reused for a different internal purpose
2220 for XSUBs. So in particular, you can no longer rely on it being NULL as a
2221 test of whether a CV is an XSUB. Use \f(CWCvISXSUB()\fR instead.
2222 .IP \(bu 4
2223 SVs of type \f(CW\*(C`SVt_NV\*(C'\fR are now sometimes bodiless when the build
2224 configuration and platform allow it: specifically, when \f(CWsizeof(NV) <=
2225 sizeof(IV)\fR. "Bodiless" means that the NV value is stored directly in
2226 the head of an SV, without requiring a separate body to be allocated. This
2227 trick has already been used for IVs since 5.9.2 (though in the case of
2228 IVs, it is always used, regardless of platform and build configuration).
2229 .IP \(bu 4
2230 The \f(CW$DB::single\fR, \f(CW$DB::signal\fR and \f(CW$DB::trace\fR variables now have set\- and
2231 get\-magic that stores their values as IVs, and those IVs are used when
2232 testing their values in \f(CWpp_dbstate()\fR. This prevents perl from
2233 recursing infinitely if an overloaded object is assigned to any of those
2234 variables.
2235 [GH #14013] <https://github.com/Perl/perl5/issues/14013>.
2236 .IP \(bu 4
2237 \&\f(CWPerl_tmps_grow()\fR, which is marked as public API but is undocumented, has
2238 been removed from the public API. This change does not affect XS code that
2239 uses the \f(CW\*(C`EXTEND_MORTAL\*(C'\fR macro to pre\-extend the mortal stack.
2240 .IP \(bu 4
2241 Perl\*(Aqs internals no longer sets or uses the \f(CW\*(C`SVs_PADMY\*(C'\fR flag.
2242 \&\f(CWSvPADMY()\fR now returns a true value for anything not marked \f(CW\*(C`PADTMP\*(C'\fR
2243 and \f(CW\*(C`SVs_PADMY\*(C'\fR is now defined as 0.
2244 .IP \(bu 4
2245 The macros \f(CW\*(C`SETsv\*(C'\fR and \f(CW\*(C`SETsvUN\*(C'\fR have been removed. They were no longer used
2246 in the core since commit 6f1401dc2a five years ago, and have not been
2247 found present on CPAN.
2248 .IP \(bu 4
2249 The \f(CW\*(C`SvFAKE\*(C'\fR bit (unused on HVs) got informally reserved by
2250 David Mitchell for future work on vtables.
2251 .IP \(bu 4
2252 The \f(CWsv_catpvn_flags()\fR function accepts \f(CW\*(C`SV_CATBYTES\*(C'\fR and \f(CW\*(C`SV_CATUTF8\*(C'\fR
2253 flags, which specify whether the appended string is bytes or UTF\-8,
2254 respectively. (These flags have in fact been present since 5.16.0, but
2255 were formerly not regarded as part of the API.)
2256 .IP \(bu 4
2257 A new opcode class, \f(CW\*(C`METHOP\*(C'\fR, has been introduced. It holds
2258 information used at runtime to improve the performance
2259 of class/object method calls.
2260 .Sp
2261 \&\f(CW\*(C`OP_METHOD\*(C'\fR and \f(CW\*(C`OP_METHOD_NAMED\*(C'\fR have changed from being
2262 \&\f(CW\*(C`UNOP/SVOP\*(C'\fR to being \f(CW\*(C`METHOP\*(C'\fR.
2263 .IP \(bu 4
2264 \&\f(CWcv_name()\fR is a new API function that can be passed a CV or GV. It
2265 returns an SV containing the name of the subroutine, for use in
2266 diagnostics.
2267 .Sp
2268 [GH #12767] <https://github.com/Perl/perl5/issues/12767>
2269 [GH #13392] <https://github.com/Perl/perl5/issues/13392>
2270 .IP \(bu 4
2271 \&\f(CWcv_set_call_checker_flags()\fR is a new API function that works like
2272 \&\f(CWcv_set_call_checker()\fR, except that it allows the caller to specify
2273 whether the call checker requires a full GV for reporting the subroutine\*(Aqs
2274 name, or whether it could be passed a CV instead. Whatever value is
2275 passed will be acceptable to \f(CWcv_name()\fR. \f(CWcv_set_call_checker()\fR
2276 guarantees there will be a GV, but it may have to create one on the fly,
2277 which is inefficient.
2278 [GH #12767] <https://github.com/Perl/perl5/issues/12767>
2279 .IP \(bu 4
2280 \&\f(CW\*(C`CvGV\*(C'\fR (which is not part of the API) is now a more complex macro, which may
2281 call a function and reify a GV. For those cases where it has been used as a
2282 boolean, \f(CW\*(C`CvHASGV\*(C'\fR has been added, which will return true for CVs that
2283 notionally have GVs, but without reifying the GV. \f(CW\*(C`CvGV\*(C'\fR also returns a GV
2284 now for lexical subs.
2285 [GH #13392] <https://github.com/Perl/perl5/issues/13392>
2286 .IP \(bu 4
2287 The "sync_locale" in perlapi function has been added to the public API.
2288 Changing the program\*(Aqs locale should be avoided by XS code. Nevertheless,
2289 certain non\-Perl libraries called from XS need to do so, such as \f(CW\*(C`Gtk\*(C'\fR.
2290 When this happens, Perl needs to be told that the locale has
2291 changed. Use this function to do so, before returning to Perl.
2292 .IP \(bu 4
2293 The defines and labels for the flags in the \f(CW\*(C`op_private\*(C'\fR field of OPs are now
2294 auto\-generated from data in \fIregen/op_private\fR. The noticeable effect of this
2295 is that some of the flag output of \f(CW\*(C`Concise\*(C'\fR might differ slightly, and the
2296 flag output of \f(CW\*(C`perl\ \-Dx\*(C'\fR may differ considerably (they both use the same set
2297 of labels now). Also, debugging builds now have a new assertion in
2298 \&\f(CWop_free()\fR to ensure that the op doesn\*(Aqt have any unrecognized flags set in
2299 \&\f(CW\*(C`op_private\*(C'\fR.
2300 .IP \(bu 4
2301 The deprecated variable \f(CW\*(C`PL_sv_objcount\*(C'\fR has been removed.
2302 .IP \(bu 4
2303 Perl now tries to keep the locale category \f(CW\*(C`LC_NUMERIC\*(C'\fR set to "C"
2304 except around operations that need it to be set to the program\*(Aqs
2305 underlying locale. This protects the many XS modules that cannot cope
2306 with the decimal radix character not being a dot. Prior to this
2307 release, Perl initialized this category to "C", but a call to
2308 \&\f(CWPOSIX::setlocale()\fR would change it. Now such a call will change the
2309 underlying locale of the \f(CW\*(C`LC_NUMERIC\*(C'\fR category for the program, but the
2310 locale exposed to XS code will remain "C". There are new macros
2311 to manipulate the LC_NUMERIC locale, including
2312 \&\f(CW\*(C`STORE_LC_NUMERIC_SET_TO_NEEDED\*(C'\fR and
2313 \&\f(CW\*(C`STORE_LC_NUMERIC_FORCE_TO_UNDERLYING\*(C'\fR.
2314 See "Locale\-related functions and macros" in perlapi.
2315 .IP \(bu 4
2316 A new macro \f(CW\*(C`isUTF8_CHAR\*(C'\fR has been written which
2317 efficiently determines if the string given by its parameters begins
2318 with a well\-formed UTF\-8 encoded character.
2319 .IP \(bu 4
2320 The following private API functions had their context parameter removed:
2321 \&\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,
2322 \&\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,
2323 \&\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.
2324 .Sp
2325 Note that the prefix\-less versions of those functions that are part of the
2326 public API, such as \f(CWcast_i32()\fR, remain unaffected.
2327 .IP \(bu 4
2328 The \f(CW\*(C`PADNAME\*(C'\fR and \f(CW\*(C`PADNAMELIST\*(C'\fR types are now separate types, and no
2329 longer simply aliases for SV and AV.
2330 [GH #14250] <https://github.com/Perl/perl5/issues/14250>.
2331 .IP \(bu 4
2332 Pad names are now always UTF\-8. The \f(CW\*(C`PadnameUTF8\*(C'\fR macro always returns
2333 true. Previously, this was effectively the case already, but any support
2334 for two different internal representations of pad names has now been
2335 removed.
2336 .IP \(bu 4
2337 A new op class, \f(CW\*(C`UNOP_AUX\*(C'\fR, has been added. This is a subclass of
2338 \&\f(CW\*(C`UNOP\*(C'\fR with an \f(CW\*(C`op_aux\*(C'\fR field added, which points to an array of unions
2339 of UV, SV* etc. It is intended for where an op needs to store more data
2340 than a simple \f(CW\*(C`op_sv\*(C'\fR or whatever. Currently the only op of this type is
2341 \&\f(CW\*(C`OP_MULTIDEREF\*(C'\fR (see next item).
2342 .IP \(bu 4
2343 A new op has been added, \f(CW\*(C`OP_MULTIDEREF\*(C'\fR, which performs one or more
2344 nested array and hash lookups where the key is a constant or simple
2345 variable. For example the expression \f(CW\*(C`$a[0]{$k}[$i]\*(C'\fR, which previously
2346 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
2347 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
2348 \&\f(CW\*(C`delete\*(C'\fR. A non\-simple index expression, such as \f(CW\*(C`[$i+1]\*(C'\fR is still done
2349 using \f(CW\*(C`aelem\*(C'\fR/\f(CW\*(C`helem\*(C'\fR, and single\-level array lookup with a small constant
2350 index is still done using \f(CW\*(C`aelemfast\*(C'\fR.
2351 .SH "Selected Bug Fixes"
2352 .IX Header "Selected Bug Fixes"
2353 .IP \(bu 4
2354 \&\f(CW\*(C`close\*(C'\fR now sets \f(CW$!\fR
2355 .Sp
2356 When an I/O error occurs, the fact that there has been an error is recorded
2357 in the handle. \f(CW\*(C`close\*(C'\fR returns false for such a handle. Previously, the
2358 value of \f(CW$!\fR would be untouched by \f(CW\*(C`close\*(C'\fR, so the common convention of
2359 writing \f(CW\*(C`close\ $fh\ or\ die\ $!\*(C'\fR did not work reliably. Now the handle
2360 records the value of \f(CW$!\fR, too, and \f(CW\*(C`close\*(C'\fR restores it.
2361 .IP \(bu 4
2362 \&\f(CW\*(C`no re\*(C'\fR now can turn off everything that \f(CW\*(C`use re\*(C'\fR enables
2363 .Sp
2364 Previously, running \f(CW\*(C`no re\*(C'\fR would turn off only a few things. Now it
2365 can turn off all the enabled things. For example, the only way to
2366 stop debugging, once enabled, was to exit the enclosing block; that is
2367 now fixed.
2368 .IP \(bu 4
2369 \&\f(CW\*(C`pack("D", $x)\*(C'\fR and \f(CW\*(C`pack("F", $x)\*(C'\fR now zero the padding on x86 long
2370 double builds. Under some build options on GCC 4.8 and later, they used
2371 to either overwrite the zero\-initialized padding, or bypass the
2372 initialized buffer entirely. This caused \fIop/pack.t\fR to fail.
2373 [GH #14554] <https://github.com/Perl/perl5/issues/14554>
2374 .IP \(bu 4
2375 Extending an array cloned from a parent thread could result in "Modification of
2376 a read\-only value attempted" errors when attempting to modify the new elements.
2377 [GH #14605] <https://github.com/Perl/perl5/issues/14605>
2378 .IP \(bu 4
2379 An assertion failure and subsequent crash with \f(CW\*(C`*x=<y>\*(C'\fR has been fixed.
2380 [GH #14493] <https://github.com/Perl/perl5/issues/14493>
2381 .IP \(bu 4
2382 A possible crashing/looping bug related to compiling lexical subs has been
2383 fixed.
2384 [GH #14596] <https://github.com/Perl/perl5/issues/14596>
2385 .IP \(bu 4
2386 UTF\-8 now works correctly in function names, in unquoted HERE\-document
2387 terminators, and in variable names used as array indexes.
2388 [GH #14601] <https://github.com/Perl/perl5/issues/14601>
2389 .IP \(bu 4
2390 Repeated global pattern matches in scalar context on large tainted strings were
2391 exponentially slow depending on the current match position in the string.
2392 [GH #14238] <https://github.com/Perl/perl5/issues/14238>
2393 .IP \(bu 4
2394 Various crashes due to the parser getting confused by syntax errors have been
2395 fixed.
2396 [GH #14496] <https://github.com/Perl/perl5/issues/14496>
2397 [GH #14497] <https://github.com/Perl/perl5/issues/14497>
2398 [GH #14548] <https://github.com/Perl/perl5/issues/14548>
2399 [GH #14564] <https://github.com/Perl/perl5/issues/14564>
2400 .IP \(bu 4
2401 \&\f(CW\*(C`split\*(C'\fR in the scope of lexical \f(CW$_\fR has been fixed not to fail assertions.
2402 [GH #14483] <https://github.com/Perl/perl5/issues/14483>
2403 .IP \(bu 4
2404 \&\f(CW\*(C`my $x : attr\*(C'\fR syntax inside various list operators no longer fails
2405 assertions.
2406 [GH #14500] <https://github.com/Perl/perl5/issues/14500>
2407 .IP \(bu 4
2408 An \f(CW\*(C`@\*(C'\fR sign in quotes followed by a non\-ASCII digit (which is not a valid
2409 identifier) would cause the parser to crash, instead of simply trying the
2410 \&\f(CW\*(C`@\*(C'\fR as literal. This has been fixed.
2411 [GH #14553] <https://github.com/Perl/perl5/issues/14553>
2412 .IP \(bu 4
2413 \&\f(CW\*(C`*bar::=*foo::=*glob_with_hash\*(C'\fR has been crashing since Perl 5.14, but no
2414 longer does.
2415 [GH #14512] <https://github.com/Perl/perl5/issues/14512>
2416 .IP \(bu 4
2417 \&\f(CW\*(C`foreach\*(C'\fR in scalar context was not pushing an item on to the stack, resulting
2418 in bugs. (\f(CW\*(C`print\ 4,\ scalar\ do\ {\ foreach(@x){}\ }\ +\ 1\*(C'\fR would print 5.)
2419 It has been fixed to return \f(CW\*(C`undef\*(C'\fR.
2420 [GH #14569] <https://github.com/Perl/perl5/issues/14569>
2421 .IP \(bu 4
2422 Several cases of data used to store environment variable contents in core C
2423 code being potentially overwritten before being used have been fixed.
2424 [GH #14476] <https://github.com/Perl/perl5/issues/14476>
2425 .IP \(bu 4
2426 Some patterns starting with \f(CW\*(C`/.*..../\*(C'\fR matched against long strings have
2427 been slow since v5.8, and some of the form \f(CW\*(C`/.*..../i\*(C'\fR have been slow
2428 since v5.18. They are now all fast again.
2429 [GH #14475] <https://github.com/Perl/perl5/issues/14475>.
2430 .IP \(bu 4
2431 The original visible value of \f(CW$/\fR is now preserved when it is set to
2432 an invalid value. Previously if you set \f(CW$/\fR to a reference to an
2433 array, for example, perl would produce a runtime error and not set
2434 \&\f(CW\*(C`PL_rs\*(C'\fR, but Perl code that checked \f(CW$/\fR would see the array
2435 reference.
2436 [GH #14245] <https://github.com/Perl/perl5/issues/14245>.
2437 .IP \(bu 4
2438 In a regular expression pattern, a POSIX class, like \f(CW\*(C`[:ascii:]\*(C'\fR, must
2439 be inside a bracketed character class, like \f(CW\*(C`qr/[[:ascii:]]/\*(C'\fR. A
2440 warning is issued when something looking like a POSIX class is not
2441 inside a bracketed class. That warning wasn\*(Aqt getting generated when
2442 the POSIX class was negated: \f(CW\*(C`[:^ascii:]\*(C'\fR. This is now fixed.
2443 .IP \(bu 4
2444 Perl 5.14.0 introduced a bug whereby \f(CW\*(C`eval\ {\ LABEL:\ }\*(C'\fR would crash. This
2445 has been fixed.
2446 [GH #14438] <https://github.com/Perl/perl5/issues/14438>.
2447 .IP \(bu 4
2448 Various crashes due to the parser getting confused by syntax errors have
2449 been fixed.
2450 [GH #14421] <https://github.com/Perl/perl5/issues/14421>.
2451 [GH #14472] <https://github.com/Perl/perl5/issues/14472>.
2452 [GH #14480] <https://github.com/Perl/perl5/issues/14480>.
2453 [GH #14447] <https://github.com/Perl/perl5/issues/14447>.
2454 .IP \(bu 4
2455 Code like \f(CW\*(C`/$a[/\*(C'\fR used to read the next line of input and treat it as
2456 though it came immediately after the opening bracket. Some invalid code
2457 consequently would parse and run, but some code caused crashes, so this is
2458 now disallowed.
2459 [GH #14462] <https://github.com/Perl/perl5/issues/14462>.
2460 .IP \(bu 4
2461 Fix argument underflow for \f(CW\*(C`pack\*(C'\fR.
2462 [GH #14525] <https://github.com/Perl/perl5/issues/14525>.
2463 .IP \(bu 4
2464 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
2465 instead of faulting.
2466 .IP \(bu 4
2467 \&\f(CW\*(C`stat \-t\*(C'\fR is now no longer treated as stackable, just like \f(CW\*(C`\-t stat\*(C'\fR.
2468 [GH #14499] <https://github.com/Perl/perl5/issues/14499>.
2469 .IP \(bu 4
2470 The following no longer causes a SEGV: \f(CW\*(C`qr{x+(y(?0))*}\*(C'\fR.
2471 .IP \(bu 4
2472 Fixed infinite loop in parsing backrefs in regexp patterns.
2473 .IP \(bu 4
2474 Several minor bug fixes in behavior of Infinity and NaN, including
2475 warnings when stringifying Infinity\-like or NaN\-like strings. For example,
2476 "NaNcy" doesn\*(Aqt numify to NaN anymore.
2477 .IP \(bu 4
2478 A bug in regular expression patterns that could lead to segfaults and
2479 other crashes has been fixed. This occurred only in patterns compiled
2480 with \f(CW\*(C`/i\*(C'\fR while taking into account the current POSIX locale (which usually
2481 means they have to be compiled within the scope of \f(CW\*(C`use\ locale\*(C'\fR),
2482 and there must be a string of at least 128 consecutive bytes to match.
2483 [GH #14389] <https://github.com/Perl/perl5/issues/14389>.
2484 .IP \(bu 4
2485 \&\f(CW\*(C`s///g\*(C'\fR now works on very long strings (where there are more than 2
2486 billion iterations) instead of dying with \*(AqSubstitution loop\*(Aq.
2487 [GH #11742] <https://github.com/Perl/perl5/issues/11742>.
2488 [GH #14190] <https://github.com/Perl/perl5/issues/14190>.
2489 .IP \(bu 4
2490 \&\f(CW\*(C`gmtime\*(C'\fR no longer crashes with not\-a\-number values.
2491 [GH #14365] <https://github.com/Perl/perl5/issues/14365>.
2492 .IP \(bu 4
2493 \&\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
2494 scope, could both do a bad write past the end of the stack. They have
2495 both been fixed to extend the stack first.
2496 .IP \(bu 4
2497 \&\f(CWprototype()\fR with no arguments used to read the previous item on the
2498 stack, so \f(CW\*(C`print\ "foo",\ prototype()\*(C'\fR would print foo\*(Aqs prototype.
2499 It has been fixed to infer \f(CW$_\fR instead.
2500 [GH #14376] <https://github.com/Perl/perl5/issues/14376>.
2501 .IP \(bu 4
2502 Some cases of lexical state subs declared inside predeclared subs could
2503 crash, for example when evalling a string including the name of an outer
2504 variable, but no longer do.
2505 .IP \(bu 4
2506 Some cases of nested lexical state subs inside anonymous subs could cause
2507 \&\*(AqBizarre copy\*(Aq errors or possibly even crashes.
2508 .IP \(bu 4
2509 When trying to emit warnings, perl\*(Aqs default debugger (\fIperl5db.pl\fR) was
2510 sometimes giving \*(AqUndefined subroutine &DB::db_warn called\*(Aq instead. This
2511 bug, which started to occur in Perl 5.18, has been fixed.
2512 [GH #14400] <https://github.com/Perl/perl5/issues/14400>.
2513 .IP \(bu 4
2514 Certain syntax errors in substitutions, such as \f(CW\*(C`s/${<>{})//\*(C'\fR, would
2515 crash, and had done so since Perl 5.10. (In some cases the crash did not
2516 start happening till 5.16.) The crash has, of course, been fixed.
2517 [GH #14391] <https://github.com/Perl/perl5/issues/14391>.
2518 .IP \(bu 4
2519 Fix a couple of string grow size calculation overflows; in particular,
2520 a repeat expression like \f(CW\*(C`33\ x\ ~3\*(C'\fR could cause a large buffer
2521 overflow since the new output buffer size was not correctly handled by
2522 \&\f(CWSvGROW()\fR. An expression like this now properly produces a memory wrap
2523 panic.
2524 [GH #14401] <https://github.com/Perl/perl5/issues/14401>.
2525 .IP \(bu 4
2526 \&\f(CW\*(C`formline("@...", "a");\*(C'\fR would crash. The \f(CW\*(C`FF_CHECKNL\*(C'\fR case in
2527 \&\f(CWpp_formline()\fR didn\*(Aqt set the pointer used to mark the chop position,
2528 which led to the \f(CW\*(C`FF_MORE\*(C'\fR case crashing with a segmentation fault.
2529 This has been fixed.
2530 [GH #14388] <https://github.com/Perl/perl5/issues/14388>.
2531 .IP \(bu 4
2532 A possible buffer overrun and crash when parsing a literal pattern during
2533 regular expression compilation has been fixed.
2534 [GH #14416] <https://github.com/Perl/perl5/issues/14416>.
2535 .IP \(bu 4
2536 \&\f(CWfchmod()\fR and \f(CWfutimes()\fR now set \f(CW$!\fR when they fail due to being
2537 passed a closed file handle.
2538 [GH #14073] <https://github.com/Perl/perl5/issues/14073>.
2539 .IP \(bu 4
2540 \&\f(CWop_free()\fR and \f(CWscalarvoid()\fR no longer crash due to a stack overflow
2541 when freeing a deeply recursive op tree.
2542 [GH #11866] <https://github.com/Perl/perl5/issues/11866>.
2543 .IP \(bu 4
2544 In Perl 5.20.0, \f(CW$^N\fR accidentally had the internal UTF\-8 flag turned off
2545 if accessed from a code block within a regular expression, effectively
2546 UTF\-8\-encoding the value. This has been fixed.
2547 [GH #14211] <https://github.com/Perl/perl5/issues/14211>.
2548 .IP \(bu 4
2549 A failed \f(CW\*(C`semctl\*(C'\fR call no longer overwrites existing items on the stack,
2550 which means that \f(CW\*(C`(semctl(\-1,0,0,0))[0]\*(C'\fR no longer gives an
2551 "uninitialized" warning.
2552 .IP \(bu 4
2553 \&\f(CW\*(C`else{foo()}\*(C'\fR with no space before \f(CW\*(C`foo\*(C'\fR is now better at assigning the
2554 right line number to that statement.
2555 [GH #14070] <https://github.com/Perl/perl5/issues/14070>.
2556 .IP \(bu 4
2557 Sometimes the assignment in \f(CW\*(C`@array = split\*(C'\fR gets optimised so that \f(CW\*(C`split\*(C'\fR
2558 itself writes directly to the array. This caused a bug, preventing this
2559 assignment from being used in lvalue context. So
2560 \&\f(CW\*(C`(@a=split//,"foo")=bar()\*(C'\fR was an error. (This bug probably goes back to
2561 Perl 3, when the optimisation was added.) It has now been fixed.
2562 [GH #14183] <https://github.com/Perl/perl5/issues/14183>.
2563 .IP \(bu 4
2564 When an argument list fails the checks specified by a subroutine
2565 signature (which is still an experimental feature), the resulting error
2566 messages now give the file and line number of the caller, not of the
2567 called subroutine.
2568 [GH #13643] <https://github.com/Perl/perl5/issues/13643>.
2569 .IP \(bu 4
2570 The flip\-flop operators (\f(CW\*(C`..\*(C'\fR and \f(CW\*(C`...\*(C'\fR in scalar context) used to maintain
2571 a separate state for each recursion level (the number of times the
2572 enclosing sub was called recursively), contrary to the documentation. Now
2573 each closure has one internal state for each flip\-flop.
2574 [GH #14110] <https://github.com/Perl/perl5/issues/14110>.
2575 .IP \(bu 4
2576 The flip\-flop operator (\f(CW\*(C`..\*(C'\fR in scalar context) would return the same
2577 scalar each time, unless the containing subroutine was called recursively.
2578 Now it always returns a new scalar.
2579 [GH #14110] <https://github.com/Perl/perl5/issues/14110>.
2580 .IP \(bu 4
2581 \&\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
2582 permitted as the first thing in a \f(CW\*(C`map\*(C'\fR or \f(CW\*(C`grep\*(C'\fR block, the block after
2583 \&\f(CW\*(C`print\*(C'\fR or \f(CW\*(C`say\*(C'\fR (or other functions) returning a handle, and within
2584 \&\f(CW\*(C`${...}\*(C'\fR, \f(CW\*(C`@{...}\*(C'\fR, etc.
2585 [GH #14088] <https://github.com/Perl/perl5/issues/14088>.
2586 .IP \(bu 4
2587 The repetition operator \f(CW\*(C`x\*(C'\fR now propagates lvalue context to its left\-hand
2588 argument when used in contexts like \f(CW\*(C`foreach\*(C'\fR. That allows
2589 \&\f(CW\*(C`for(($#that_array)x2)\ {\ ...\ }\*(C'\fR to work as expected if the loop modifies
2590 \&\f(CW$_\fR.
2591 .IP \(bu 4
2592 \&\f(CW\*(C`(...) x ...\*(C'\fR in scalar context used to corrupt the stack if one operand
2593 was an object with "x" overloading, causing erratic behavior.
2594 [GH #13811] <https://github.com/Perl/perl5/issues/13811>.
2595 .IP \(bu 4
2596 Assignment to a lexical scalar is often optimised away; for example in
2597 \&\f(CW\*(C`my $x; $x = $y + $z\*(C'\fR, the assign operator is optimised away and the add
2598 operator writes its result directly to \f(CW$x\fR. Various bugs related to
2599 this optimisation have been fixed. Certain operators on the right\-hand
2600 side would sometimes fail to assign the value at all or assign the wrong
2601 value, or would call STORE twice or not at all on tied variables. The
2602 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
2603 integer\*(C'\fR, \f(CW\*(C`chomp\*(C'\fR, \f(CW\*(C`chr\*(C'\fR and \f(CW\*(C`setpgrp\*(C'\fR.
2604 .IP \(bu 4
2605 List assignments were sometimes buggy if the same scalar ended up on both
2606 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
2607 result would be the wrong value getting assigned.
2608 .IP \(bu 4
2609 \&\f(CWsetpgrp($nonzero)\fR (with one argument) was accidentally changed in 5.16
2610 to mean \f(CWsetpgrp(0)\fR. This has been fixed.
2611 .IP \(bu 4
2612 \&\f(CW\*(C`_\|_SUB_\|_\*(C'\fR could return the wrong value or even corrupt memory under the
2613 debugger (the \f(CW\*(C`\-d\*(C'\fR switch) and in subs containing \f(CW\*(C`eval $string\*(C'\fR.
2614 .IP \(bu 4
2615 When \f(CW\*(C`sub\ ()\ {\ $var\ }\*(C'\fR becomes inlinable, it now returns a different
2616 scalar each time, just as a non\-inlinable sub would, though Perl still
2617 optimises the copy away in cases where it would make no observable
2618 difference.
2619 .IP \(bu 4
2620 \&\f(CW\*(C`my\ sub\ f\ ()\ {\ $var\ }\*(C'\fR and \f(CW\*(C`sub\ ()\ :\ attr\ {\ $var\ }\*(C'\fR are no longer
2621 eligible for inlining. The former would crash; the latter would just
2622 throw the attributes away. An exception is made for the little\-known
2623 \&\f(CW\*(C`:method\*(C'\fR attribute, which does nothing much.
2624 .IP \(bu 4
2625 Inlining of subs with an empty prototype is now more consistent than
2626 before. Previously, a sub with multiple statements, of which all but the last
2627 were optimised away, would be inlinable only if it were an anonymous sub
2628 containing a string \f(CW\*(C`eval\*(C'\fR or \f(CW\*(C`state\*(C'\fR declaration or closing over an
2629 outer lexical variable (or any anonymous sub under the debugger). Now any
2630 sub that gets folded to a single constant after statements have been
2631 optimised away is eligible for inlining. This applies to things like \f(CW\*(C`sub
2632 () { jabber() if DEBUG; 42 }\*(C'\fR.
2633 .Sp
2634 Some subroutines with an explicit \f(CW\*(C`return\*(C'\fR were being made inlinable,
2635 contrary to the documentation, Now \f(CW\*(C`return\*(C'\fR always prevents inlining.
2636 .IP \(bu 4
2637 On some systems, such as VMS, \f(CW\*(C`crypt\*(C'\fR can return a non\-ASCII string. If a
2638 scalar assigned to had contained a UTF\-8 string previously, then \f(CW\*(C`crypt\*(C'\fR
2639 would not turn off the UTF\-8 flag, thus corrupting the return value. This
2640 would happen with \f(CW\*(C`$lexical\ =\ crypt\ ...\*(C'\fR.
2641 .IP \(bu 4
2642 \&\f(CW\*(C`crypt\*(C'\fR no longer calls \f(CW\*(C`FETCH\*(C'\fR twice on a tied first argument.
2643 .IP \(bu 4
2644 An unterminated here\-doc on the last line of a quote\-like operator
2645 (\f(CW\*(C`qq[${ <<END }]\*(C'\fR, \f(CW\*(C`/(?{ <<END })/\*(C'\fR) no longer causes a double free. It
2646 started doing so in 5.18.
2647 .IP \(bu 4
2648 \&\f(CWindex()\fR and \f(CWrindex()\fR no longer crash when used on strings over 2GB in
2649 size.
2650 [GH #13700] <https://github.com/Perl/perl5/issues/13700>.
2651 .IP \(bu 4
2652 A small, previously intentional, memory leak in
2653 \&\f(CW\*(C`PERL_SYS_INIT\*(C'\fR/\f(CW\*(C`PERL_SYS_INIT3\*(C'\fR on Win32 builds was fixed. This might
2654 affect embedders who repeatedly create and destroy perl engines within
2655 the same process.
2656 .IP \(bu 4
2657 \&\f(CWPOSIX::localeconv()\fR now returns the data for the program\*(Aqs underlying
2658 locale even when called from outside the scope of \f(CW\*(C`use\ locale\*(C'\fR.
2659 .IP \(bu 4
2660 \&\f(CWPOSIX::localeconv()\fR now works properly on platforms which don\*(Aqt have
2661 \&\f(CW\*(C`LC_NUMERIC\*(C'\fR and/or \f(CW\*(C`LC_MONETARY\*(C'\fR, or for which Perl has been compiled
2662 to disregard either or both of these locale categories. In such
2663 circumstances, there are now no entries for the corresponding values in
2664 the hash returned by \f(CWlocaleconv()\fR.
2665 .IP \(bu 4
2666 \&\f(CWPOSIX::localeconv()\fR now marks appropriately the values it returns as
2667 UTF\-8 or not. Previously they were always returned as bytes, even if
2668 they were supposed to be encoded as UTF\-8.
2669 .IP \(bu 4
2670 On Microsoft Windows, within the scope of \f(CW\*(C`use\ locale\*(C'\fR, the following
2671 POSIX character classes gave results for many locales that did not
2672 conform to the POSIX standard:
2673 \&\f(CW\*(C`[[:alnum:]]\*(C'\fR,
2674 \&\f(CW\*(C`[[:alpha:]]\*(C'\fR,
2675 \&\f(CW\*(C`[[:blank:]]\*(C'\fR,
2676 \&\f(CW\*(C`[[:digit:]]\*(C'\fR,
2677 \&\f(CW\*(C`[[:graph:]]\*(C'\fR,
2678 \&\f(CW\*(C`[[:lower:]]\*(C'\fR,
2679 \&\f(CW\*(C`[[:print:]]\*(C'\fR,
2680 \&\f(CW\*(C`[[:punct:]]\*(C'\fR,
2681 \&\f(CW\*(C`[[:upper:]]\*(C'\fR,
2682 \&\f(CW\*(C`[[:word:]]\*(C'\fR,
2683 and
2684 \&\f(CW\*(C`[[:xdigit:]]\*(C'\fR.
2685 This was because the underlying Microsoft implementation does not
2686 follow the standard. Perl now takes special precautions to correct for
2687 this.
2688 .IP \(bu 4
2689 Many issues have been detected by Coverity <http://www.coverity.com/> and
2690 fixed.
2691 .IP \(bu 4
2692 \&\f(CWsystem()\fR and friends should now work properly on more Android builds.
2693 .Sp
2694 Due to an oversight, the value specified through \f(CW\*(C`\-Dtargetsh\*(C'\fR to \fIConfigure\fR
2695 would end up being ignored by some of the build process. This caused perls
2696 cross\-compiled for Android to end up with defective versions of \f(CWsystem()\fR,
2697 \&\f(CWexec()\fR and backticks: the commands would end up looking for \f(CW\*(C`/bin/sh\*(C'\fR
2698 instead of \f(CW\*(C`/system/bin/sh\*(C'\fR, and so would fail for the vast majority
2699 of devices, leaving \f(CW$!\fR as \f(CW\*(C`ENOENT\*(C'\fR.
2700 .IP \(bu 4
2701 \&\f(CW\*(C`qr(...\e(...\e)...)\*(C'\fR,
2702 \&\f(CW\*(C`qr[...\e[...\e]...]\*(C'\fR,
2703 and
2704 \&\f(CW\*(C`qr{...\e{...\e}...}\*(C'\fR
2705 now work. Previously it was impossible to escape these three
2706 left\-characters with a backslash within a regular expression pattern
2707 where otherwise they would be considered metacharacters, and the pattern
2708 opening delimiter was the character, and the closing delimiter was its
2709 mirror character.
2710 .IP \(bu 4
2711 \&\f(CW\*(C`s///e\*(C'\fR on tainted UTF\-8 strings corrupted \f(CWpos()\fR. This bug,
2712 introduced in 5.20, is now fixed.
2713 [GH #13948] <https://github.com/Perl/perl5/issues/13948>.
2714 .IP \(bu 4
2715 A non\-word boundary in a regular expression (\f(CW\*(C`\eB\*(C'\fR) did not always
2716 match the end of the string; in particular \f(CW\*(C`q{} =~ /\eB/\*(C'\fR did not
2717 match. This bug, introduced in perl 5.14, is now fixed.
2718 [GH #13917] <https://github.com/Perl/perl5/issues/13917>.
2719 .IP \(bu 4
2720 \&\f(CW\*(C`" P" =~ /(?=.*P)P/\*(C'\fR should match, but did not. This is now fixed.
2721 [GH #13954] <https://github.com/Perl/perl5/issues/13954>.
2722 .IP \(bu 4
2723 Failing to compile \f(CW\*(C`use Foo\*(C'\fR in an \f(CW\*(C`eval\*(C'\fR could leave a spurious
2724 \&\f(CW\*(C`BEGIN\*(C'\fR subroutine definition, which would produce a "Subroutine
2725 BEGIN redefined" warning on the next use of \f(CW\*(C`use\*(C'\fR, or other \f(CW\*(C`BEGIN\*(C'\fR
2726 block.
2727 [GH #13926] <https://github.com/Perl/perl5/issues/13926>.
2728 .IP \(bu 4
2729 \&\f(CW\*(C`method { BLOCK } ARGS\*(C'\fR syntax now correctly parses the arguments if they
2730 begin with an opening brace.
2731 [GH #9085] <https://github.com/Perl/perl5/issues/9085>.
2732 .IP \(bu 4
2733 External libraries and Perl may have different ideas of what the locale is.
2734 This is problematic when parsing version strings if the locale\*(Aqs numeric
2735 separator has been changed. Version parsing has been patched to ensure
2736 it handles the locales correctly.
2737 [GH #13863] <https://github.com/Perl/perl5/issues/13863>.
2738 .IP \(bu 4
2739 A bug has been fixed where zero\-length assertions and code blocks inside of a
2740 regex could cause \f(CW\*(C`pos\*(C'\fR to see an incorrect value.
2741 [GH #14016] <https://github.com/Perl/perl5/issues/14016>.
2742 .IP \(bu 4
2743 Dereferencing of constants now works correctly for typeglob constants. Previously
2744 the glob was stringified and its name looked up. Now the glob itself is used.
2745 [GH #9891] <https://github.com/Perl/perl5/issues/9891>
2746 .IP \(bu 4
2747 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,
2748 the parser no
2749 longer tries to guess whether it is a block or a hash constructor (causing a
2750 syntax error when it guesses the latter), since it can only be a block.
2751 .IP \(bu 4
2752 \&\f(CW\*(C`undef\ $reference\*(C'\fR now frees the referent immediately, instead of hanging on
2753 to it until the next statement.
2754 [GH #14032] <https://github.com/Perl/perl5/issues/14032>
2755 .IP \(bu 4
2756 Various cases where the name of a sub is used (autoload, overloading, error
2757 messages) used to crash for lexical subs, but have been fixed.
2758 .IP \(bu 4
2759 Bareword lookup now tries to avoid vivifying packages if it turns out the
2760 bareword is not going to be a subroutine name.
2761 .IP \(bu 4
2762 Compilation of anonymous constants (\fIe.g.\fR, \f(CW\*(C`sub () { 3 }\*(C'\fR) no longer deletes
2763 any subroutine named \f(CW\*(C`_\|_ANON_\|_\*(C'\fR in the current package. Not only was
2764 \&\f(CW\*(C`*_\|_ANON_\|_{CODE}\*(C'\fR cleared, but there was a memory leak, too. This bug goes
2765 back to Perl 5.8.0.
2766 .IP \(bu 4
2767 Stub declarations like \f(CW\*(C`sub f;\*(C'\fR and \f(CW\*(C`sub f ();\*(C'\fR no longer wipe out constants
2768 of the same name declared by \f(CW\*(C`use constant\*(C'\fR. This bug was introduced in Perl
2769 5.10.0.
2770 .IP \(bu 4
2771 \&\f(CW\*(C`qr/[\eN{named sequence}]/\*(C'\fR now works properly in many instances.
2772 .Sp
2773 Some names
2774 known to \f(CW\*(C`\eN{...}\*(C'\fR refer to a sequence of multiple characters, instead of the
2775 usual single character. Bracketed character classes generally only match
2776 single characters, but now special handling has been added so that they can
2777 match named sequences, but not if the class is inverted or the sequence is
2778 specified as the beginning or end of a range. In these cases, the only
2779 behavior change from before is a slight rewording of the fatal error message
2780 given when this class is part of a \f(CW\*(C`?[...])\*(C'\fR construct. When the \f(CW\*(C`[...]\*(C'\fR
2781 stands alone, the same non\-fatal warning as before is raised, and only the
2782 first character in the sequence is used, again just as before.
2783 .IP \(bu 4
2784 Tainted constants evaluated at compile time no longer cause unrelated
2785 statements to become tainted.
2786 [GH #14059] <https://github.com/Perl/perl5/issues/14059>
2787 .IP \(bu 4
2788 \&\f(CW\*(C`open\ $$fh,\ ...\*(C'\fR, which vivifies a handle with a name like
2789 \&\f(CW"main::_GEN_0"\fR, was not giving the handle the right reference count, so
2790 a double free could happen.
2791 .IP \(bu 4
2792 When deciding that a bareword was a method name, the parser would get confused
2793 if an \f(CW\*(C`our\*(C'\fR sub with the same name existed, and look up the method in the
2794 package of the \f(CW\*(C`our\*(C'\fR sub, instead of the package of the invocant.
2795 .IP \(bu 4
2796 The parser no longer gets confused by \f(CW\*(C`\eU=\*(C'\fR within a double\-quoted string. It
2797 used to produce a syntax error, but now compiles it correctly.
2798 [GH #10882] <https://github.com/Perl/perl5/issues/10882>
2799 .IP \(bu 4
2800 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
2801 treat UTF\-8 encoded files as text. (perlfunc has
2802 been updated to say this.) Previously, it was possible for some files to be
2803 considered UTF\-8 that actually weren\*(Aqt valid UTF\-8. This is now fixed. The
2804 operators now work on EBCDIC platforms as well.
2805 .IP \(bu 4
2806 Under some conditions warning messages raised during regular expression pattern
2807 compilation were being output more than once. This has now been fixed.
2808 .IP \(bu 4
2809 Perl 5.20.0 introduced a regression in which a UTF\-8 encoded regular
2810 expression pattern that contains a single ASCII lowercase letter did not
2811 match its uppercase counterpart. That has been fixed in both 5.20.1 and
2812 5.22.0.
2813 [GH #14051] <https://github.com/Perl/perl5/issues/14051>
2814 .IP \(bu 4
2815 Constant folding could incorrectly suppress warnings if lexical warnings
2816 (\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
2817 false at compile time and true at run time.
2818 .IP \(bu 4
2819 Loading Unicode tables during a regular expression match could cause assertion
2820 failures under debugging builds if the previous match used the very same
2821 regular expression.
2822 [GH #14081] <https://github.com/Perl/perl5/issues/14081>
2823 .IP \(bu 4
2824 Thread cloning used to work incorrectly for lexical subs, possibly causing
2825 crashes or double frees on exit.
2826 .IP \(bu 4
2827 Since Perl 5.14.0, deleting \f(CW$SomePackage::{_\|_ANON_\|_}\fR and then undefining an
2828 anonymous subroutine could corrupt things internally, resulting in
2829 Devel::Peek crashing or B.pm giving nonsensical data. This has been
2830 fixed.
2831 .IP \(bu 4
2832 \&\f(CW\*(C`(caller\ $n)[3]\*(C'\fR now reports names of lexical subs, instead of
2833 treating them as \f(CW"(unknown)"\fR.
2834 .IP \(bu 4
2835 \&\f(CW\*(C`sort subname LIST\*(C'\fR now supports using a lexical sub as the comparison
2836 routine.
2837 .IP \(bu 4
2838 Aliasing (\fIe.g.\fR, via \f(CW\*(C`*x\ =\ *y\*(C'\fR) could confuse list assignments that mention the
2839 two names for the same variable on either side, causing wrong values to be
2840 assigned.
2841 [GH #5788] <https://github.com/Perl/perl5/issues/5788>
2842 .IP \(bu 4
2843 Long here\-doc terminators could cause a bad read on short lines of input. This
2844 has been fixed. It is doubtful that any crash could have occurred. This bug
2845 goes back to when here\-docs were introduced in Perl 3.000 twenty\-five years
2846 ago.
2847 .IP \(bu 4
2848 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
2849 unfortunate side\-effect of also treating \f(CW\*(C`split\ /\eA/\*(C'\fR like \f(CW\*(C`split\ /^/m\*(C'\fR,
2850 which it should not. This has been fixed. (Note, however, that \f(CW\*(C`split\ /^x/\*(C'\fR
2851 does not behave like \f(CW\*(C`split\ /^x/m\*(C'\fR, which is also considered to be a bug and
2852 will be fixed in a future version.)
2853 [GH #14086] <https://github.com/Perl/perl5/issues/14086>
2854 .IP \(bu 4
2855 The little\-known \f(CW\*(C`my\ Class\ $var\*(C'\fR syntax (see fields and attributes)
2856 could get confused in the scope of \f(CW\*(C`use utf8\*(C'\fR if \f(CW\*(C`Class\*(C'\fR were a constant
2857 whose value contained Latin\-1 characters.
2858 .IP \(bu 4
2859 Locking and unlocking values via Hash::Util or \f(CW\*(C`Internals::SvREADONLY\*(C'\fR
2860 no longer has any effect on values that were read\-only to begin with.
2861 Previously, unlocking such values could result in crashes, hangs or
2862 other erratic behavior.
2863 .IP \(bu 4
2864 Some unterminated \f(CW\*(C`(?(...)...)\*(C'\fR constructs in regular expressions would
2865 either crash or give erroneous error messages. \f(CW\*(C`/(?(1)/\*(C'\fR is one such
2866 example.
2867 .IP \(bu 4
2868 \&\f(CW\*(C`pack\ "w",\ $tied\*(C'\fR no longer calls FETCH twice.
2869 .IP \(bu 4
2870 List assignments like \f(CW\*(C`($x,\ $z)\ =\ (1,\ $y)\*(C'\fR now work correctly if \f(CW$x\fR and
2871 \&\f(CW$y\fR have been aliased by \f(CW\*(C`foreach\*(C'\fR.
2872 .IP \(bu 4
2873 Some patterns including code blocks with syntax errors, such as
2874 \&\f(CW\*(C`/\ (?{(^{})/\*(C'\fR, would hang or fail assertions on debugging builds. Now
2875 they produce errors.
2876 .IP \(bu 4
2877 An assertion failure when parsing \f(CW\*(C`sort\*(C'\fR with debugging enabled has been
2878 fixed.
2879 [GH #14087] <https://github.com/Perl/perl5/issues/14087>.
2880 .IP \(bu 4
2881 \&\f(CW\*(C`*a\ =\ *b;\ @a\ =\ split\ //,\ $b[1]\*(C'\fR could do a bad read and produce junk
2882 results.
2883 .IP \(bu 4
2884 In \f(CW\*(C`()\ =\ @array\ =\ split\*(C'\fR, the \f(CW\*(C`()\ =\*(C'\fR at the beginning no longer confuses
2885 the optimizer into assuming a limit of 1.
2886 .IP \(bu 4
2887 Fatal warnings no longer prevent the output of syntax errors.
2888 [GH #14155] <https://github.com/Perl/perl5/issues/14155>.
2889 .IP \(bu 4
2890 Fixed a NaN double\-to\-long\-double conversion error on VMS. For quiet NaNs
2891 (and only on Itanium, not Alpha) negative infinity instead of NaN was
2892 produced.
2893 .IP \(bu 4
2894 Fixed the issue that caused \f(CW\*(C`make distclean\*(C'\fR to incorrectly leave some
2895 files behind.
2896 [GH #14108] <https://github.com/Perl/perl5/issues/14108>.
2897 .IP \(bu 4
2898 AIX now sets the length in \f(CW\*(C`getsockopt\*(C'\fR correctly.
2899 [GH #13484] <https://github.com/Perl/perl5/issues/13484>.
2900 [cpan #91183] <https://rt.cpan.org/Ticket/Display.html?id=91183>.
2901 [cpan #85570] <https://rt.cpan.org/Ticket/Display.html?id=85570>.
2902 .IP \(bu 4
2903 The optimization phase of a regexp compilation could run "forever" and
2904 exhaust all memory under certain circumstances; now fixed.
2905 [GH #13984] <https://github.com/Perl/perl5/issues/13984>.
2906 .IP \(bu 4
2907 The test script \fIt/op/crypt.t\fR now uses the SHA\-256 algorithm if the
2908 default one is disabled, rather than giving failures.
2909 [GH #13715] <https://github.com/Perl/perl5/issues/13715>.
2910 .IP \(bu 4
2911 Fixed an off\-by\-one error when setting the size of a shared array.
2912 [GH #14151] <https://github.com/Perl/perl5/issues/14151>.
2913 .IP \(bu 4
2914 Fixed a bug that could cause perl to enter an infinite loop during
2915 compilation. In particular, a \f(CWwhile(1)\fR within a sublist, \fIe.g.\fR
2916 .Sp
2917 .Vb 1
2918 \& sub foo { () = ($a, my $b, ($c, do { while(1) {} })) }
2919 .Ve
2920 .Sp
2921 The bug was introduced in 5.20.0
2922 [GH #14165] <https://github.com/Perl/perl5/issues/14165>.
2923 .IP \(bu 4
2924 On Win32, if a variable was \f(CW\*(C`local\*(C'\fR\-ized in a pseudo\-process that later
2925 forked, restoring the original value in the child pseudo\-process caused
2926 memory corruption and a crash in the child pseudo\-process (and therefore the
2927 OS process).
2928 [GH #8641] <https://github.com/Perl/perl5/issues/8641>.
2929 .IP \(bu 4
2930 Calling \f(CW\*(C`write\*(C'\fR on a format with a \f(CW\*(C`^**\*(C'\fR field could produce a panic
2931 in \f(CWsv_chop()\fR if there were insufficient arguments or if the variable
2932 used to fill the field was empty.
2933 [GH #14255] <https://github.com/Perl/perl5/issues/14255>.
2934 .IP \(bu 4
2935 Non\-ASCII lexical sub names now appear without trailing junk when they
2936 appear in error messages.
2937 .IP \(bu 4
2938 The \f(CW\*(C`\e@\*(C'\fR subroutine prototype no longer flattens parenthesized arrays
2939 (taking a reference to each element), but takes a reference to the array
2940 itself.
2941 [GH #9111] <https://github.com/Perl/perl5/issues/9111>.
2942 .IP \(bu 4
2943 A block containing nothing except a C\-style \f(CW\*(C`for\*(C'\fR loop could corrupt the
2944 stack, causing lists outside the block to lose elements or have elements
2945 overwritten. This could happen with \f(CW\*(C`map { for(...){...} } ...\*(C'\fR and with
2946 lists containing \f(CW\*(C`do { for(...){...} }\*(C'\fR.
2947 [GH #14269] <https://github.com/Perl/perl5/issues/14269>.
2948 .IP \(bu 4
2949 \&\f(CWscalar()\fR now propagates lvalue context, so that
2950 \&\f(CW\*(C`for(scalar($#foo))\ {\ ...\ }\*(C'\fR can modify \f(CW$#foo\fR through \f(CW$_\fR.
2951 .IP \(bu 4
2952 \&\f(CW\*(C`qr/@array(?{block})/\*(C'\fR no longer dies with "Bizarre copy of ARRAY".
2953 [GH #14292] <https://github.com/Perl/perl5/issues/14292>.
2954 .IP \(bu 4
2955 \&\f(CW\*(C`eval\ \*(Aq$variable\*(Aq\*(C'\fR in nested named subroutines would sometimes look up a
2956 global variable even with a lexical variable in scope.
2957 .IP \(bu 4
2958 In perl 5.20.0, \f(CW\*(C`sort CORE::fake\*(C'\fR where \*(Aqfake\*(Aq is anything other than a
2959 keyword, started chopping off the last 6 characters and treating the result
2960 as a sort sub name. The previous behavior of treating \f(CW\*(C`CORE::fake\*(C'\fR as a
2961 sort sub name has been restored.
2962 [GH #14323] <https://github.com/Perl/perl5/issues/14323>.
2963 .IP \(bu 4
2964 Outside of \f(CW\*(C`use utf8\*(C'\fR, a single\-character Latin\-1 lexical variable is
2965 disallowed. The error message for it, "Can\*(Aqt use global \f(CW$foo\fR...", was
2966 giving garbage instead of the variable name.
2967 .IP \(bu 4
2968 \&\f(CW\*(C`readline\*(C'\fR on a nonexistent handle was causing \f(CW\*(C`${^LAST_FH}\*(C'\fR to produce a
2969 reference to an undefined scalar (or fail an assertion). Now
2970 \&\f(CW\*(C`${^LAST_FH}\*(C'\fR ends up undefined.
2971 .IP \(bu 4
2972 \&\f(CW\*(C`(...) x ...\*(C'\fR in void context now applies scalar context to the left\-hand
2973 argument, instead of the context the current sub was called in.
2974 [GH #14174] <https://github.com/Perl/perl5/issues/14174>.
2975 .SH "Known Problems"
2976 .IX Header "Known Problems"
2977 .IP \(bu 4
2978 \&\f(CW\*(C`pack\*(C'\fR\-ing a NaN on a perl compiled with Visual C 6 does not behave properly,
2979 leading to a test failure in \fIt/op/infnan.t\fR.
2980 [GH #14705] <https://github.com/Perl/perl5/issues/14705>
2981 .IP \(bu 4
2982 A goal is for Perl to be able to be recompiled to work reasonably well on any
2983 Unicode version. In Perl 5.22, though, the earliest such version is Unicode
2984 5.1 (current is 7.0).
2985 .IP \(bu 4
2986 EBCDIC platforms
2987 .RS 4
2988 .IP \(bu 4
2989 The \f(CW\*(C`cmp\*(C'\fR (and hence \f(CW\*(C`sort\*(C'\fR) operators do not necessarily give the
2990 correct results when both operands are UTF\-EBCDIC encoded strings and
2991 there is a mixture of ASCII and/or control characters, along with other
2992 characters.
2993 .IP \(bu 4
2994 Ranges containing \f(CW\*(C`\eN{...}\*(C'\fR in the \f(CW\*(C`tr///\*(C'\fR (and \f(CW\*(C`y///\*(C'\fR)
2995 transliteration operators are treated differently than the equivalent
2996 ranges in regular expression patterns. They should, but don\*(Aqt, cause
2997 the values in the ranges to all be treated as Unicode code points, and
2998 not native ones. ("Version 8 Regular Expressions" in perlre gives
2999 details as to how it should work.)
3000 .IP \(bu 4
3001 Encode and encoding are mostly broken.
3002 .IP \(bu 4
3003 Many CPAN modules that are shipped with core show failing tests.
3004 .IP \(bu 4
3005 \&\f(CW\*(C`pack\*(C'\fR/\f(CW\*(C`unpack\*(C'\fR with \f(CW"U0"\fR format may not work properly.
3006 .RE
3007 .RS 4
3008 .RE
3009 .IP \(bu 4
3010 The following modules are known to have test failures with this version of
3011 Perl. In many cases, patches have been submitted, so there will hopefully be
3012 new releases soon:
3013 .RS 4
3014 .IP \(bu 4
3015 B::Generate version 1.50
3016 .IP \(bu 4
3017 B::Utils version 0.25
3018 .IP \(bu 4
3019 Coro version 6.42
3020 .IP \(bu 4
3021 Dancer version 1.3130
3022 .IP \(bu 4
3023 Data::Alias version 1.18
3024 .IP \(bu 4
3025 Data::Dump::Streamer version 2.38
3026 .IP \(bu 4
3027 Data::Util version 0.63
3028 .IP \(bu 4
3029 Devel::Spy version 0.07
3030 .IP \(bu 4
3031 invoker version 0.34
3032 .IP \(bu 4
3033 Lexical::Var version 0.009
3034 .IP \(bu 4
3035 LWP::ConsoleLogger version 0.000018
3036 .IP \(bu 4
3037 Mason version 2.22
3038 .IP \(bu 4
3039 NgxQueue version 0.02
3040 .IP \(bu 4
3041 Padre version 1.00
3042 .IP \(bu 4
3043 Parse::Keyword 0.08
3044 .RE
3045 .RS 4
3046 .RE
3047 .SH Obituary
3048 .IX Header "Obituary"
3049 Brian McCauley died on May 8, 2015. He was a frequent poster to Usenet, Perl
3050 Monks, and other Perl forums, and made several CPAN contributions under the
3051 nick NOBULL, including to the Perl FAQ. He attended almost every
3052 YAPC::Europe, and indeed, helped organise YAPC::Europe 2006 and the QA
3053 Hackathon 2009. His wit and his delight in intricate systems were
3054 particularly apparent in his love of board games; many Perl mongers will
3055 have fond memories of playing Fluxx and other games with Brian. He will be
3056 missed.
3057 .SH Acknowledgements
3058 .IX Header "Acknowledgements"
3059 Perl 5.22.0 represents approximately 12 months of development since Perl 5.20.0
3060 and contains approximately 590,000 lines of changes across 2,400 files from 94
3061 authors.
3062 .PP
3063 Excluding auto\-generated files, documentation and release tools, there were
3064 approximately 370,000 lines of changes to 1,500 .pm, .t, .c and .h files.
3065 .PP
3066 Perl continues to flourish into its third decade thanks to a vibrant community
3067 of users and developers. The following people are known to have contributed the
3068 improvements that became Perl 5.22.0:
3069 .PP
3070 Aaron Crane, Abhijit Menon\-Sen, Abigail, Alberto Simões, Alex Solovey, Alex
3071 Vandiver, Alexandr Ciornii, Alexandre (Midnite) Jousset, Andreas König,
3072 Andreas Voegele, Andrew Fresh, Andy Dougherty, Anthony Heading, Aristotle
3073 Pagaltzis, brian d foy, Brian Fraser, Chad Granum, Chris \*(AqBinGOs\*(Aq Williams,
3074 Craig A. Berry, Dagfinn Ilmari Mannsåker, Daniel Dragan, Darin McBride, Dave
3075 Rolsky, David Golden, David Mitchell, David Wheeler, Dmitri Tikhonov, Doug
3076 Bell, E. Choroba, Ed J, Eric Herman, Father Chrysostomos, George Greer, Glenn
3077 D. Golden, Graham Knop, H.Merijn Brand, Herbert Breunung, Hugo van der Sanden,
3078 James E Keenan, James McCoy, James Raspass, Jan Dubois, Jarkko Hietaniemi,
3079 Jasmine Ngan, Jerry D. Hedden, Jim Cromie, John Goodyear, kafka, Karen
3080 Etheridge, Karl Williamson, Kent Fredric, kmx, Lajos Veres, Leon Timmermans,
3081 Lukas Mai, Mathieu Arnold, Matthew Horsfall, Max Maischein, Michael Bunk,
3082 Nicholas Clark, Niels Thykier, Niko Tyni, Norman Koch, Olivier Mengué, Peter
3083 John Acklam, Peter Martini, Petr Písař, Philippe Bruhat (BooK), Pierre
3084 Bogossian, Rafael Garcia\-Suarez, Randy Stauner, Reini Urban, Ricardo Signes,
3085 Rob Hoelz, Rostislav Skudnov, Sawyer X, Shirakata Kentaro, Shlomi Fish,
3086 Sisyphus, Slaven Rezic, Smylers, Steffen Müller, Steve Hay, Sullivan Beck,
3087 syber, Tadeusz Sośnierz, Thomas Sibley, Todd Rinaldo, Tony Cook, Vincent Pit,
3088 Vladimir Marek, Yaroslav Kuzmin, Yves Orton, Ævar Arnfjörð Bjarmason.
3089 .PP
3090 The list above is almost certainly incomplete as it is automatically generated
3091 from version control history. In particular, it does not include the names of
3092 the (very much appreciated) contributors who reported issues to the Perl bug
3093 tracker.
3094 .PP
3095 Many of the changes included in this version originated in the CPAN modules
3096 included in Perl\*(Aqs core. We\*(Aqre grateful to the entire CPAN community for
3097 helping Perl to flourish.
3098 .PP
3099 For a more complete list of all of Perl\*(Aqs historical contributors, please see
3100 the \fIAUTHORS\fR file in the Perl source distribution.
3101 .SH "Reporting Bugs"
3102 .IX Header "Reporting Bugs"
3103 If you find what you think is a bug, you might check the articles recently
3104 posted to the comp.lang.perl.misc newsgroup and the perl bug database at
3105 <https://rt.perl.org/>. There may also be information at
3106 <http://www.perl.org/>, the Perl Home Page.
3107 .PP
3108 If you believe you have an unreported bug, please run the perlbug program
3109 included with your release. Be sure to trim your bug down to a tiny but
3110 sufficient test case. Your bug report, along with the output of \f(CW\*(C`perl \-V\*(C'\fR,
3111 will be sent off to [email protected] to be analysed by the Perl porting team.
3112 .PP
3113 If the bug you are reporting has security implications, which make it
3114 inappropriate to send to a publicly archived mailing list, then please send it
3115 to perl5\-security\[email protected]. This points to a closed subscription
3116 unarchived mailing list, which includes all the core committers, who will be
3117 able to help assess the impact of issues, figure out a resolution, and help
3118 co\-ordinate the release of patches to mitigate or fix the problem across all
3119 platforms on which Perl is supported. Please only use this address for
3120 security issues in the Perl core, not for modules independently distributed on
3121 CPAN.
3122 .SH "SEE ALSO"
3123 .IX Header "SEE ALSO"
3124 The \fIChanges\fR file for an explanation of how to view exhaustive details on
3125 what changed.
3126 .PP
3127 The \fIINSTALL\fR file for how to build Perl.
3128 .PP
3129 The \fIREADME\fR file for general stuff.
3130 .PP
3131 The \fIArtistic\fR and \fICopying\fR files for copyright information.