Debian Codegraph @

upstream/debian-unstable/man1/perl5240delta.1

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man 5.0102 (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 .\"
57 .IX Title "PERL5240DELTA 1"
58 .TH PERL5240DELTA 1 2025-11-16 "perl v5.40.1" "Perl Programmers Reference Guide"
59 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
60 .\" way too many mistakes in technical documents.
61 .if n .ad l
62 .nh
63 .SH NAME
64 perl5240delta \- what is new for perl v5.24.0
65 .SH DESCRIPTION
66 .IX Header "DESCRIPTION"
67 This document describes the differences between the 5.22.0 release and the
68 5.24.0 release.
69 .SH "Core Enhancements"
70 .IX Header "Core Enhancements"
71 .SS "Postfix dereferencing is no longer experimental"
72 .IX Subsection "Postfix dereferencing is no longer experimental"
73 Using the \f(CW\*(C`postderef\*(C'\fR and \f(CW\*(C`postderef_qq\*(C'\fR features no longer emits a
74 warning. Existing code that disables the \f(CW\*(C`experimental::postderef\*(C'\fR warning
75 category that they previously used will continue to work. The \f(CW\*(C`postderef\*(C'\fR
76 feature has no effect; all Perl code can use postfix dereferencing,
77 regardless of what feature declarations are in scope. The \f(CW5.24\fR feature
78 bundle now includes the \f(CW\*(C`postderef_qq\*(C'\fR feature.
79 .SS "Unicode 8.0 is now supported"
80 .IX Subsection "Unicode 8.0 is now supported"
81 For details on what is in this release, see
82 <http://www.unicode.org/versions/Unicode8.0.0/>.
83 .SS "perl will now croak when closing an in-place output file fails"
84 .IX Subsection "perl will now croak when closing an in-place output file fails"
85 Until now, failure to close the output file for an in-place edit was not
86 detected, meaning that the input file could be clobbered without the edit being
87 successfully completed. Now, when the output file cannot be closed
88 successfully, an exception is raised.
89 .ie n .SS "New ""\eb{lb}"" boundary in regular expressions"
90 .el .SS "New \f(CW\eb{lb}\fP boundary in regular expressions"
91 .IX Subsection "New b{lb} boundary in regular expressions"
92 \&\f(CW\*(C`lb\*(C'\fR stands for Line Break. It is a Unicode property
93 that determines where a line of text is suitable to break (typically so
94 that it can be output without overflowing the available horizontal
95 space). This capability has long been furnished by the
96 Unicode::LineBreak module, but now a light-weight, non-customizable
97 version that is suitable for many purposes is in core Perl.
98 .ie n .SS """qr/(?[ ])/"" now works in UTF\-8 locales"
99 .el .SS "\f(CWqr/(?[ ])/\fP now works in UTF\-8 locales"
100 .IX Subsection "qr/(?[ ])/ now works in UTF-8 locales"
101 Extended Bracketed Character Classes
102 now will successfully compile when \f(CW\*(C`use\ locale\*(C'\fR is in effect. The compiled
103 pattern will use standard Unicode rules. If the runtime locale is not a
104 UTF\-8 one, a warning is raised and standard Unicode rules are used
105 anyway. No tainting is done since the outcome does not actually depend
106 on the locale.
107 .ie n .SS "Integer shift (""<<"" and "">>"") now more explicitly defined"
108 .el .SS "Integer shift (\f(CW<<\fP and \f(CW>>\fP) now more explicitly defined"
109 .IX Subsection "Integer shift (<< and >>) now more explicitly defined"
110 Negative shifts are reverse shifts: left shift becomes right shift,
111 and right shift becomes left shift.
112 .PP
113 Shifting by the number of bits in a native integer (or more) is zero,
114 except when the "overshift" is right shifting a negative value under
115 \&\f(CW\*(C`use integer\*(C'\fR, in which case the result is \-1 (arithmetic shift).
116 .PP
117 Until now negative shifting and overshifting have been undefined
118 because they have relied on whatever the C implementation happens
119 to do. For example, for the overshift a common C behavior is
120 "modulo shift":
121 .PP
122 .Vb 1
123 \& 1 >> 64 == 1 >> (64 % 64) == 1 >> 0 == 1 # Common C behavior.
124 \&
125 \& # And the same for <<, while Perl now produces 0 for both.
126 .Ve
127 .PP
128 Now these behaviors are well-defined under Perl, regardless of what
129 the underlying C implementation does. Note, however, that you are still
130 constrained by the native integer width: you need to know how far left you
131 can go. You can use for example:
132 .PP
133 .Vb 2
134 \& use Config;
135 \& my $wordbits = $Config{uvsize} * 8; # Or $Config{uvsize} << 3.
136 .Ve
137 .PP
138 If you need a more bits on the left shift, you can use for example
139 the \f(CW\*(C`bigint\*(C'\fR pragma, or the \f(CW\*(C`Bit::Vector\*(C'\fR module from CPAN.
140 .SS "printf and sprintf now allow reordered precision arguments"
141 .IX Subsection "printf and sprintf now allow reordered precision arguments"
142 That is, \f(CW\*(C`sprintf \*(Aq|%.*2$d|\*(Aq, 2, 3\*(C'\fR now returns \f(CW\*(C`|002|\*(C'\fR. This extends
143 the existing reordering mechanism (which allows reordering for arguments
144 that are used as format fields, widths, and vector separators).
145 .ie n .SS "More fields provided to ""sigaction"" callback with ""SA_SIGINFO"""
146 .el .SS "More fields provided to \f(CWsigaction\fP callback with \f(CWSA_SIGINFO\fP"
147 .IX Subsection "More fields provided to sigaction callback with SA_SIGINFO"
148 When passing the \f(CW\*(C`SA_SIGINFO\*(C'\fR flag to sigaction, the
149 \&\f(CW\*(C`errno\*(C'\fR, \f(CW\*(C`status\*(C'\fR, \f(CW\*(C`uid\*(C'\fR, \f(CW\*(C`pid\*(C'\fR, \f(CW\*(C`addr\*(C'\fR and \f(CW\*(C`band\*(C'\fR fields are now
150 included in the hash passed to the handler, if supported by the
151 platform.
152 .SS "Hashbang redirection to Perl 6"
153 .IX Subsection "Hashbang redirection to Perl 6"
154 Previously perl would redirect to another interpreter if it found a
155 hashbang path unless the path contains "perl" (see perlrun). To improve
156 compatibility with Perl 6 this behavior has been extended to also redirect
157 if "perl" is followed by "6".
158 .SH Security
159 .IX Header "Security"
160 .ie n .SS "Set proper umask before calling mkstemp(3)"
161 .el .SS "Set proper umask before calling \f(CWmkstemp(3)\fP"
162 .IX Subsection "Set proper umask before calling mkstemp(3)"
163 In 5.22 perl started setting umask to 0600 before calling \f(CWmkstemp(3)\fR
164 and restoring it afterwards. This wrongfully tells \f(CWopen(2)\fR to strip
165 the owner read and write bits from the given mode before applying it,
166 rather than the intended negation of leaving only those bits in place.
167 .PP
168 Systems that use mode 0666 in \f(CWmkstemp(3)\fR (like old versions of
169 glibc) create a file with permissions 0066, leaving world read and
170 write permissions regardless of current umask.
171 .PP
172 This has been fixed by using umask 0177 instead. [perl #127322]
173 .SS "Fix out of boundary access in Win32 path handling"
174 .IX Subsection "Fix out of boundary access in Win32 path handling"
175 This is CVE\-2015\-8608. For more information see
176 [GH #15067] <https://github.com/Perl/perl5/issues/15067>
177 .SS "Fix loss of taint in canonpath"
178 .IX Subsection "Fix loss of taint in canonpath"
179 This is CVE\-2015\-8607. For more information see
180 [GH #15084] <https://github.com/Perl/perl5/issues/15084>
181 .ie n .SS "Avoid accessing uninitialized memory in win32 crypt()"
182 .el .SS "Avoid accessing uninitialized memory in win32 \f(CWcrypt()\fP"
183 .IX Subsection "Avoid accessing uninitialized memory in win32 crypt()"
184 Added validation that will detect both a short salt and invalid characters
185 in the salt.
186 [GH #15091] <https://github.com/Perl/perl5/issues/15091>
187 .ie n .SS "Remove duplicate environment variables from ""environ"""
188 .el .SS "Remove duplicate environment variables from \f(CWenviron\fP"
189 .IX Subsection "Remove duplicate environment variables from environ"
190 Previously, if an environment variable appeared more than once in
191 \&\f(CW\*(C`environ[]\*(C'\fR, \f(CW%ENV\fR would contain the last entry for that name,
192 while a typical \f(CWgetenv()\fR would return the first entry. We now
193 make sure \f(CW%ENV\fR contains the same as what \f(CW\*(C`getenv\*(C'\fR returns.
194 .PP
195 Second, we remove duplicates from \f(CW\*(C`environ[]\*(C'\fR, so if a setting
196 with that name is set in \f(CW%ENV\fR, we won't pass an unsafe value
197 to a child process.
198 .PP
199 [CVE\-2016\-2381]
200 .SH "Incompatible Changes"
201 .IX Header "Incompatible Changes"
202 .ie n .SS "The ""autoderef"" feature has been removed"
203 .el .SS "The \f(CWautoderef\fP feature has been removed"
204 .IX Subsection "The autoderef feature has been removed"
205 The experimental \f(CW\*(C`autoderef\*(C'\fR feature (which allowed calling \f(CW\*(C`push\*(C'\fR,
206 \&\f(CW\*(C`pop\*(C'\fR, \f(CW\*(C`shift\*(C'\fR, \f(CW\*(C`unshift\*(C'\fR, \f(CW\*(C`splice\*(C'\fR, \f(CW\*(C`keys\*(C'\fR, \f(CW\*(C`values\*(C'\fR, and \f(CW\*(C`each\*(C'\fR on
207 a scalar argument) has been deemed unsuccessful. It has now been removed;
208 trying to use the feature (or to disable the \f(CW\*(C`experimental::autoderef\*(C'\fR
209 warning it previously triggered) now yields an exception.
210 .ie n .SS "Lexical $_ has been removed"
211 .el .SS "Lexical \f(CW$_\fP has been removed"
212 .IX Subsection "Lexical $_ has been removed"
213 \&\f(CW\*(C`my $_\*(C'\fR was introduced in Perl 5.10, and subsequently caused much confusion
214 with no obvious solution. In Perl 5.18.0, it was made experimental on the
215 theory that it would either be removed or redesigned in a less confusing (but
216 backward-incompatible) way. Over the following years, no alternatives were
217 proposed. The feature has now been removed and will fail to compile.
218 .ie n .SS """qr/\eb{wb}/"" is now tailored to Perl expectations"
219 .el .SS "\f(CWqr/\eb{wb}/\fP is now tailored to Perl expectations"
220 .IX Subsection "qr/b{wb}/ is now tailored to Perl expectations"
221 This is now more suited to be a drop-in replacement for plain \f(CW\*(C`\eb\*(C'\fR, but
222 giving better results for parsing natural language. Previously it
223 strictly followed the current Unicode rules which calls for it to match
224 between each white space character. Now it doesn't generally match
225 within spans of white space, behaving like \f(CW\*(C`\eb\*(C'\fR does. See
226 "\eb{wb}" in perlrebackslash
227 .SS "Regular expression compilation errors"
228 .IX Subsection "Regular expression compilation errors"
229 Some regular expression patterns that had runtime errors now
230 don't compile at all.
231 .PP
232 Almost all Unicode properties using the \f(CW\*(C`\ep{}\*(C'\fR and \f(CW\*(C`\eP{}\*(C'\fR regular
233 expression pattern constructs are now checked for validity at pattern
234 compilation time, and invalid ones will cause the program to not
235 compile. In earlier releases, this check was often deferred until run
236 time. Whenever an error check is moved from run\- to compile time,
237 erroneous code is caught 100% of the time, whereas before it would only
238 get caught if and when the offending portion actually gets executed,
239 which for unreachable code might be never.
240 .ie n .SS """qr/\eN{}/"" now disallowed under ""use re ""strict"""""
241 .el .SS "\f(CWqr/\eN{}/\fP now disallowed under \f(CWuse re ""strict""\fP"
242 .IX Subsection "qr/N{}/ now disallowed under use re ""strict"""
243 An empty \f(CW\*(C`\eN{}\*(C'\fR makes no sense, but for backwards compatibility is
244 accepted as doing nothing, though a deprecation warning is raised by
245 default. But now this is a fatal error under the experimental feature
246 "'strict' mode" in re.
247 .SS "Nested declarations are now disallowed"
248 .IX Subsection "Nested declarations are now disallowed"
249 A \f(CW\*(C`my\*(C'\fR, \f(CW\*(C`our\*(C'\fR, or \f(CW\*(C`state\*(C'\fR declaration is no longer allowed inside
250 of another \f(CW\*(C`my\*(C'\fR, \f(CW\*(C`our\*(C'\fR, or \f(CW\*(C`state\*(C'\fR declaration.
251 .PP
252 For example, these are now fatal:
253 .PP
254 .Vb 2
255 \& my ($x, my($y));
256 \& our (my $x);
257 .Ve
258 .PP
259 [GH #14799] <https://github.com/Perl/perl5/issues/14799>
260 .PP
261 [GH #13548] <https://github.com/Perl/perl5/issues/13548>
262 .ie n .SS "The ""/\eC/"" character class has been removed"
263 .el .SS "The \f(CW/\eC/\fP character class has been removed"
264 .IX Subsection "The /C/ character class has been removed"
265 This regular expression character class was deprecated in v5.20.0 and has
266 produced a deprecation warning since v5.22.0. It is now a compile-time
267 error. If you need to examine the individual bytes that make up a
268 UTF8\-encoded character, then use \f(CWutf8::encode()\fR on the string (or a
269 copy) first.
270 .ie n .SS "chdir(\*(Aq\*(Aq) no longer chdirs home"
271 .el .SS "\f(CWchdir(\*(Aq\*(Aq)\fP no longer chdirs home"
272 .IX Subsection "chdir() no longer chdirs home"
273 Using \f(CWchdir(\*(Aq\*(Aq)\fR or \f(CWchdir(undef)\fR to chdir home has been deprecated since
274 perl v5.8, and will now fail. Use \f(CWchdir()\fR instead.
275 .SS "ASCII characters in variable names must now be all visible"
276 .IX Subsection "ASCII characters in variable names must now be all visible"
277 It was legal until now on ASCII platforms for variable names to contain
278 non-graphical ASCII control characters (ordinals 0 through 31, and 127,
279 which are the C0 controls and \f(CW\*(C`DELETE\*(C'\fR). This usage has been
280 deprecated since v5.20, and as of now causes a syntax error. The
281 variables these names referred to are special, reserved by Perl for
282 whatever use it may choose, now, or in the future. Each such variable
283 has an alternative way of spelling it. Instead of the single
284 non-graphic control character, a two character sequence beginning with a
285 caret is used, like \f(CW$^]\fR and \f(CW\*(C`${^GLOBAL_PHASE}\*(C'\fR. Details are at
286 perlvar. It remains legal, though unwise and deprecated (raising a
287 deprecation warning), to use certain non-graphic non-ASCII characters in
288 variables names when not under \f(CW\*(C`use\ utf8\*(C'\fR. No code should do this,
289 as all such variables are reserved by Perl, and Perl doesn't currently
290 define any of them (but could at any time, without notice).
291 .ie n .SS "An off by one issue in $Carp::MaxArgNums has been fixed"
292 .el .SS "An off by one issue in \f(CW$Carp::MaxArgNums\fP has been fixed"
293 .IX Subsection "An off by one issue in $Carp::MaxArgNums has been fixed"
294 \&\f(CW$Carp::MaxArgNums\fR is supposed to be the number of arguments to display.
295 Prior to this version, it was instead showing \f(CW$Carp::MaxArgNums\fR + 1 arguments,
296 contrary to the documentation.
297 .ie n .SS "Only blanks and tabs are now allowed within ""[...]"" within ""(?[...])"""
298 .el .SS "Only blanks and tabs are now allowed within \f(CW[...]\fP within \f(CW(?[...])\fP"
299 .IX Subsection "Only blanks and tabs are now allowed within [...] within (?[...])"
300 The experimental Extended Bracketed Character Classes can contain regular
301 bracketed character classes within them. These differ from regular ones in
302 that white space is generally ignored, unless escaped by preceding it with a
303 backslash. The white space that is ignored is now limited to just tab \f(CW\*(C`\et\*(C'\fR
304 and SPACE characters. Previously, it was any white space. See
305 "Extended Bracketed Character Classes" in perlrecharclass.
306 .SH Deprecations
307 .IX Header "Deprecations"
308 .ie n .SS "Using code points above the platform's ""IV_MAX"" is now deprecated"
309 .el .SS "Using code points above the platform's \f(CWIV_MAX\fP is now deprecated"
310 .IX Subsection "Using code points above the platform's IV_MAX is now deprecated"
311 Unicode defines code points in the range \f(CW\*(C`0..0x10FFFF\*(C'\fR. Some standards
312 at one time defined them up to 2**31 \- 1, but Perl has allowed them to
313 be as high as anything that will fit in a word on the platform being
314 used. However, use of those above the platform's \f(CW\*(C`IV_MAX\*(C'\fR is broken in
315 some constructs, notably \f(CW\*(C`tr///\*(C'\fR, regular expression patterns involving
316 quantifiers, and in some arithmetic and comparison operations, such as
317 being the upper limit of a loop. Now the use of such code points raises
318 a deprecation warning, unless that warning category is turned off.
319 \&\f(CW\*(C`IV_MAX\*(C'\fR is typically 2**31 \-1 on 32\-bit platforms, and 2**63\-1 on
320 64\-bit ones.
321 .SS "Doing bitwise operations on strings containing code points above 0xFF is deprecated"
322 .IX Subsection "Doing bitwise operations on strings containing code points above 0xFF is deprecated"
323 The string bitwise operators treat their operands as strings of bytes,
324 and values beyond 0xFF are nonsensical in this context. To operate on
325 encoded bytes, first encode the strings. To operate on code points'
326 numeric values, use \f(CW\*(C`split\*(C'\fR and \f(CW\*(C`map ord\*(C'\fR. In the future, this
327 warning will be replaced by an exception.
328 .ie n .SS "sysread(), syswrite(), recv() and send() are deprecated on :utf8 handles"
329 .el .SS "\f(CWsysread()\fP, \f(CWsyswrite()\fP, \f(CWrecv()\fP and \f(CWsend()\fP are deprecated on :utf8 handles"
330 .IX Subsection "sysread(), syswrite(), recv() and send() are deprecated on :utf8 handles"
331 The \f(CWsysread()\fR, \f(CWrecv()\fR, \f(CWsyswrite()\fR and \f(CWsend()\fR operators
332 are deprecated on handles that have the \f(CW\*(C`:utf8\*(C'\fR layer, either
333 explicitly, or implicitly, eg., with the \f(CW:encoding(UTF\-16LE)\fR layer.
334 .PP
335 Both \f(CWsysread()\fR and \f(CWrecv()\fR currently use only the \f(CW\*(C`:utf8\*(C'\fR flag for the
336 stream, ignoring the actual layers. Since \f(CWsysread()\fR and \f(CWrecv()\fR do no
337 UTF\-8 validation they can end up creating invalidly encoded scalars.
338 .PP
339 Similarly, \f(CWsyswrite()\fR and \f(CWsend()\fR use only the \f(CW\*(C`:utf8\*(C'\fR flag, otherwise
340 ignoring any layers. If the flag is set, both write the value UTF\-8
341 encoded, even if the layer is some different encoding, such as the
342 example above.
343 .PP
344 Ideally, all of these operators would completely ignore the \f(CW\*(C`:utf8\*(C'\fR
345 state, working only with bytes, but this would result in silently
346 breaking existing code. To avoid this a future version of perl will
347 throw an exception when any of \f(CWsysread()\fR, \f(CWrecv()\fR, \f(CWsyswrite()\fR or \f(CWsend()\fR
348 are called on handle with the \f(CW\*(C`:utf8\*(C'\fR layer.
349 .SH "Performance Enhancements"
350 .IX Header "Performance Enhancements"
351 .IP \(bu 4
352 The overhead of scope entry and exit has been considerably reduced, so
353 for example subroutine calls, loops and basic blocks are all faster now.
354 This empty function call now takes about a third less time to execute:
355 .Sp
356 .Vb 1
357 \& sub f{} f();
358 .Ve
359 .IP \(bu 4
360 Many languages, such as Chinese, are caseless. Perl now knows about
361 most common ones, and skips much of the work when
362 a program tries to change case in them (like \f(CWucfirst()\fR) or match
363 caselessly (\f(CW\*(C`qr//i\*(C'\fR). This will speed up a program, such as a web
364 server, that can operate on multiple languages, while it is operating on a
365 caseless one.
366 .IP \(bu 4
367 \&\f(CW\*(C`/fixed\-substr/\*(C'\fR has been made much faster.
368 .Sp
369 On platforms with a libc \f(CWmemchr()\fR implementation which makes good use of
370 underlying hardware support, patterns which include fixed substrings will now
371 often be much faster; for example with glibc on a recent x86_64 CPU, this:
372 .Sp
373 .Vb 2
374 \& $s = "a" x 1000 . "wxyz";
375 \& $s =~ /wxyz/ for 1..30000
376 .Ve
377 .Sp
378 is now about 7 times faster. On systems with slow \f(CWmemchr()\fR, e.g. 32\-bit ARM
379 Raspberry Pi, there will be a small or little speedup. Conversely, some
380 pathological cases, such as \f(CW\*(C`"ab" x 1000 =~ /aa/\*(C'\fR will be slower now; up to 3
381 times slower on the rPi, 1.5x slower on x86_64.
382 .IP \(bu 4
383 Faster addition, subtraction and multiplication.
384 .Sp
385 Since 5.8.0, arithmetic became slower due to the need to support
386 64\-bit integers. To deal with 64\-bit integers, a lot more corner
387 cases need to be checked, which adds time. We now detect common
388 cases where there is no need to check for those corner cases,
389 and special-case them.
390 .IP \(bu 4
391 Preincrement, predecrement, postincrement, and postdecrement have been
392 made faster by internally splitting the functions which handled multiple
393 cases into different functions.
394 .IP \(bu 4
395 Creating Perl debugger data structures (see "Debugger Internals" in perldebguts)
396 for XSUBs and const subs has been removed. This removed one glob/scalar combo
397 for each unique \f(CW\*(C`.c\*(C'\fR file that XSUBs and const subs came from. On startup
398 (\f(CW\*(C`perl \-e"0"\*(C'\fR) about half a dozen glob/scalar debugger combos were created.
399 Loading XS modules created more glob/scalar combos. These things were
400 being created regardless of whether the perl debugger was being used,
401 and despite the fact that it can't debug C code anyway
402 .IP \(bu 4
403 On Win32, \f(CW\*(C`stat\*(C'\fRing or \f(CW\*(C`\-X\*(C'\fRing a path, if the file or directory does not
404 exist, is now 3.5x faster than before.
405 .IP \(bu 4
406 Single arguments in list assign are now slightly faster:
407 .Sp
408 .Vb 2
409 \& ($x) = (...);
410 \& (...) = ($x);
411 .Ve
412 .IP \(bu 4
413 Less peak memory is now used when compiling regular expression patterns.
414 .SH "Modules and Pragmata"
415 .IX Header "Modules and Pragmata"
416 .SS "Updated Modules and Pragmata"
417 .IX Subsection "Updated Modules and Pragmata"
418 .IP \(bu 4
419 arybase has been upgraded from version 0.10 to 0.11.
420 .IP \(bu 4
421 Attribute::Handlers has been upgraded from version 0.97 to 0.99.
422 .IP \(bu 4
423 autodie has been upgraded from version 2.26 to 2.29.
424 .IP \(bu 4
425 autouse has been upgraded from version 1.08 to 1.11.
426 .IP \(bu 4
427 B has been upgraded from version 1.58 to 1.62.
428 .IP \(bu 4
429 B::Deparse has been upgraded from version 1.35 to 1.37.
430 .IP \(bu 4
431 base has been upgraded from version 2.22 to 2.23.
432 .IP \(bu 4
433 Benchmark has been upgraded from version 1.2 to 1.22.
434 .IP \(bu 4
435 bignum has been upgraded from version 0.39 to 0.42.
436 .IP \(bu 4
437 bytes has been upgraded from version 1.04 to 1.05.
438 .IP \(bu 4
439 Carp has been upgraded from version 1.36 to 1.40.
440 .IP \(bu 4
441 Compress::Raw::Bzip2 has been upgraded from version 2.068 to 2.069.
442 .IP \(bu 4
443 Compress::Raw::Zlib has been upgraded from version 2.068 to 2.069.
444 .IP \(bu 4
445 Config::Perl::V has been upgraded from version 0.24 to 0.25.
446 .IP \(bu 4
447 CPAN::Meta has been upgraded from version 2.150001 to 2.150005.
448 .IP \(bu 4
449 CPAN::Meta::Requirements has been upgraded from version 2.132 to 2.140.
450 .IP \(bu 4
451 CPAN::Meta::YAML has been upgraded from version 0.012 to 0.018.
452 .IP \(bu 4
453 Data::Dumper has been upgraded from version 2.158 to 2.160.
454 .IP \(bu 4
455 Devel::Peek has been upgraded from version 1.22 to 1.23.
456 .IP \(bu 4
457 Devel::PPPort has been upgraded from version 3.31 to 3.32.
458 .IP \(bu 4
459 Dumpvalue has been upgraded from version 1.17 to 1.18.
460 .IP \(bu 4
461 DynaLoader has been upgraded from version 1.32 to 1.38.
462 .IP \(bu 4
463 Encode has been upgraded from version 2.72 to 2.80.
464 .IP \(bu 4
465 encoding has been upgraded from version 2.14 to 2.17.
466 .IP \(bu 4
467 encoding::warnings has been upgraded from version 0.11 to 0.12.
468 .IP \(bu 4
469 English has been upgraded from version 1.09 to 1.10.
470 .IP \(bu 4
471 Errno has been upgraded from version 1.23 to 1.25.
472 .IP \(bu 4
473 experimental has been upgraded from version 0.013 to 0.016.
474 .IP \(bu 4
475 ExtUtils::CBuilder has been upgraded from version 0.280221 to 0.280225.
476 .IP \(bu 4
477 ExtUtils::Embed has been upgraded from version 1.32 to 1.33.
478 .IP \(bu 4
479 ExtUtils::MakeMaker has been upgraded from version 7.04_01 to 7.10_01.
480 .IP \(bu 4
481 ExtUtils::ParseXS has been upgraded from version 3.28 to 3.31.
482 .IP \(bu 4
483 ExtUtils::Typemaps has been upgraded from version 3.28 to 3.31.
484 .IP \(bu 4
485 feature has been upgraded from version 1.40 to 1.42.
486 .IP \(bu 4
487 fields has been upgraded from version 2.17 to 2.23.
488 .IP \(bu 4
489 File::Find has been upgraded from version 1.29 to 1.34.
490 .IP \(bu 4
491 File::Glob has been upgraded from version 1.24 to 1.26.
492 .IP \(bu 4
493 File::Path has been upgraded from version 2.09 to 2.12_01.
494 .IP \(bu 4
495 File::Spec has been upgraded from version 3.56 to 3.63.
496 .IP \(bu 4
497 Filter::Util::Call has been upgraded from version 1.54 to 1.55.
498 .IP \(bu 4
499 Getopt::Long has been upgraded from version 2.45 to 2.48.
500 .IP \(bu 4
501 Hash::Util has been upgraded from version 0.18 to 0.19.
502 .IP \(bu 4
503 Hash::Util::FieldHash has been upgraded from version 1.15 to 1.19.
504 .IP \(bu 4
505 HTTP::Tiny has been upgraded from version 0.054 to 0.056.
506 .IP \(bu 4
507 I18N::Langinfo has been upgraded from version 0.12 to 0.13.
508 .IP \(bu 4
509 if has been upgraded from version 0.0604 to 0.0606.
510 .IP \(bu 4
511 IO has been upgraded from version 1.35 to 1.36.
512 .IP \(bu 4
513 IO-Compress has been upgraded from version 2.068 to 2.069.
514 .IP \(bu 4
515 IPC::Open3 has been upgraded from version 1.18 to 1.20.
516 .IP \(bu 4
517 IPC::SysV has been upgraded from version 2.04 to 2.06_01.
518 .IP \(bu 4
519 List::Util has been upgraded from version 1.41 to 1.42_02.
520 .IP \(bu 4
521 locale has been upgraded from version 1.06 to 1.08.
522 .IP \(bu 4
523 Locale::Codes has been upgraded from version 3.34 to 3.37.
524 .IP \(bu 4
525 Math::BigInt has been upgraded from version 1.9997 to 1.999715.
526 .IP \(bu 4
527 Math::BigInt::FastCalc has been upgraded from version 0.31 to 0.40.
528 .IP \(bu 4
529 Math::BigRat has been upgraded from version 0.2608 to 0.260802.
530 .IP \(bu 4
531 Module::CoreList has been upgraded from version 5.20150520 to 5.20160320.
532 .IP \(bu 4
533 Module::Metadata has been upgraded from version 1.000026 to 1.000031.
534 .IP \(bu 4
535 mro has been upgraded from version 1.17 to 1.18.
536 .IP \(bu 4
537 ODBM_File has been upgraded from version 1.12 to 1.14.
538 .IP \(bu 4
539 Opcode has been upgraded from version 1.32 to 1.34.
540 .IP \(bu 4
541 parent has been upgraded from version 0.232 to 0.234.
542 .IP \(bu 4
543 Parse::CPAN::Meta has been upgraded from version 1.4414 to 1.4417.
544 .IP \(bu 4
545 Perl::OSType has been upgraded from version 1.008 to 1.009.
546 .IP \(bu 4
547 perlfaq has been upgraded from version 5.021009 to 5.021010.
548 .IP \(bu 4
549 PerlIO::encoding has been upgraded from version 0.21 to 0.24.
550 .IP \(bu 4
551 PerlIO::mmap has been upgraded from version 0.014 to 0.016.
552 .IP \(bu 4
553 PerlIO::scalar has been upgraded from version 0.22 to 0.24.
554 .IP \(bu 4
555 PerlIO::via has been upgraded from version 0.15 to 0.16.
556 .IP \(bu 4
557 Pod::Functions has been upgraded from version 1.09 to 1.10.
558 .IP \(bu 4
559 Pod::Perldoc has been upgraded from version 3.25 to 3.25_02.
560 .IP \(bu 4
561 Pod::Simple has been upgraded from version 3.29 to 3.32.
562 .IP \(bu 4
563 Pod::Usage has been upgraded from version 1.64 to 1.68.
564 .IP \(bu 4
565 POSIX has been upgraded from version 1.53 to 1.65.
566 .IP \(bu 4
567 Scalar::Util has been upgraded from version 1.41 to 1.42_02.
568 .IP \(bu 4
569 SDBM_File has been upgraded from version 1.13 to 1.14.
570 .IP \(bu 4
571 SelfLoader has been upgraded from version 1.22 to 1.23.
572 .IP \(bu 4
573 Socket has been upgraded from version 2.018 to 2.020_03.
574 .IP \(bu 4
575 Storable has been upgraded from version 2.53 to 2.56.
576 .IP \(bu 4
577 strict has been upgraded from version 1.09 to 1.11.
578 .IP \(bu 4
579 Term::ANSIColor has been upgraded from version 4.03 to 4.04.
580 .IP \(bu 4
581 Term::Cap has been upgraded from version 1.15 to 1.17.
582 .IP \(bu 4
583 Test has been upgraded from version 1.26 to 1.28.
584 .IP \(bu 4
585 Test::Harness has been upgraded from version 3.35 to 3.36.
586 .IP \(bu 4
587 Thread::Queue has been upgraded from version 3.05 to 3.08.
588 .IP \(bu 4
589 threads has been upgraded from version 2.01 to 2.06.
590 .IP \(bu 4
591 threads::shared has been upgraded from version 1.48 to 1.50.
592 .IP \(bu 4
593 Tie::File has been upgraded from version 1.01 to 1.02.
594 .IP \(bu 4
595 Tie::Scalar has been upgraded from version 1.03 to 1.04.
596 .IP \(bu 4
597 Time::HiRes has been upgraded from version 1.9726 to 1.9732.
598 .IP \(bu 4
599 Time::Piece has been upgraded from version 1.29 to 1.31.
600 .IP \(bu 4
601 Unicode::Collate has been upgraded from version 1.12 to 1.14.
602 .IP \(bu 4
603 Unicode::Normalize has been upgraded from version 1.18 to 1.25.
604 .IP \(bu 4
605 Unicode::UCD has been upgraded from version 0.61 to 0.64.
606 .IP \(bu 4
607 UNIVERSAL has been upgraded from version 1.12 to 1.13.
608 .IP \(bu 4
609 utf8 has been upgraded from version 1.17 to 1.19.
610 .IP \(bu 4
611 version has been upgraded from version 0.9909 to 0.9916.
612 .IP \(bu 4
613 warnings has been upgraded from version 1.32 to 1.36.
614 .IP \(bu 4
615 Win32 has been upgraded from version 0.51 to 0.52.
616 .IP \(bu 4
617 Win32API::File has been upgraded from version 0.1202 to 0.1203.
618 .IP \(bu 4
619 XS::Typemap has been upgraded from version 0.13 to 0.14.
620 .IP \(bu 4
621 XSLoader has been upgraded from version 0.20 to 0.21.
622 .SH Documentation
623 .IX Header "Documentation"
624 .SS "Changes to Existing Documentation"
625 .IX Subsection "Changes to Existing Documentation"
626 \fIperlapi\fR
627 .IX Subsection "perlapi"
628 .IP \(bu 4
629 The process of using undocumented globals has been documented, namely, that one
630 should send email to perl5\[email protected] <mailto:[email protected]>
631 first to get the go-ahead for documenting and using an undocumented function or
632 global variable.
633 .PP
634 \fIperlcall\fR
635 .IX Subsection "perlcall"
636 .IP \(bu 4
637 A number of cleanups have been made to perlcall, including:
638 .RS 4
639 .IP \(bu 4
640 use \f(CW\*(C`EXTEND(SP, n)\*(C'\fR and \f(CWPUSHs()\fR instead of \f(CWXPUSHs()\fR where applicable
641 and update prose to match
642 .IP \(bu 4
643 add POPu, POPul and POPpbytex to the "complete list of POP macros"
644 and clarify the documentation for some of the existing entries, and
645 a note about side-effects
646 .IP \(bu 4
647 add API documentation for POPu and POPul
648 .IP \(bu 4
649 use ERRSV more efficiently
650 .IP \(bu 4
651 approaches to thread-safety storage of SVs.
652 .RE
653 .RS 4
654 .RE
655 .PP
656 \fIperlfunc\fR
657 .IX Subsection "perlfunc"
658 .IP \(bu 4
659 The documentation of \f(CW\*(C`hex\*(C'\fR has been revised to clarify valid inputs.
660 .IP \(bu 4
661 Better explain meaning of negative PIDs in \f(CW\*(C`waitpid\*(C'\fR.
662 [GH #15108] <https://github.com/Perl/perl5/issues/15108>
663 .IP \(bu 4
664 General cleanup: there's more consistency now (in POD usage, grammar, code
665 examples), better practices in code examples (use of \f(CW\*(C`my\*(C'\fR, removal of bareword
666 filehandles, dropped usage of \f(CW\*(C`&\*(C'\fR when calling subroutines, ...), etc.
667 .PP
668 \fIperlguts\fR
669 .IX Subsection "perlguts"
670 .IP \(bu 4
671 A new section has been added, "Dynamic Scope and the Context
672 Stack" in perlguts, which explains how the perl context stack works.
673 .PP
674 \fIperllocale\fR
675 .IX Subsection "perllocale"
676 .IP \(bu 4
677 A stronger caution about using locales in threaded applications is
678 given. Locales are not thread-safe, and you can get wrong results or
679 even segfaults if you use them there.
680 .PP
681 \fIperlmodlib\fR
682 .IX Subsection "perlmodlib"
683 .IP \(bu 4
684 We now recommend contacting the module-authors list or PAUSE in seeking
685 guidance on the naming of modules.
686 .PP
687 \fIperlop\fR
688 .IX Subsection "perlop"
689 .IP \(bu 4
690 The documentation of \f(CW\*(C`qx//\*(C'\fR now describes how \f(CW$?\fR is affected.
691 .PP
692 \fIperlpolicy\fR
693 .IX Subsection "perlpolicy"
694 .IP \(bu 4
695 This note has been added to perlpolicy:
696 .Sp
697 .Vb 3
698 \& While civility is required, kindness is encouraged; if you have any
699 \& doubt about whether you are being civil, simply ask yourself, "Am I
700 \& being kind?" and aspire to that.
701 .Ve
702 .PP
703 \fIperlreftut\fR
704 .IX Subsection "perlreftut"
705 .IP \(bu 4
706 Fix some examples to be strict clean.
707 .PP
708 \fIperlrebackslash\fR
709 .IX Subsection "perlrebackslash"
710 .IP \(bu 4
711 Clarify that in languages like Japanese and Thai, dictionary lookup
712 is required to determine word boundaries.
713 .PP
714 \fIperlsub\fR
715 .IX Subsection "perlsub"
716 .IP \(bu 4
717 Updated to note that anonymous subroutines can have signatures.
718 .PP
719 \fIperlsyn\fR
720 .IX Subsection "perlsyn"
721 .IP \(bu 4
722 Fixed a broken example where \f(CW\*(C`=\*(C'\fR was used instead of
723 \&\f(CW\*(C`==\*(C'\fR in conditional in do/while example.
724 .PP
725 \fIperltie\fR
726 .IX Subsection "perltie"
727 .IP \(bu 4
728 The usage of \f(CW\*(C`FIRSTKEY\*(C'\fR and \f(CW\*(C`NEXTKEY\*(C'\fR has been clarified.
729 .PP
730 \fIperlunicode\fR
731 .IX Subsection "perlunicode"
732 .IP \(bu 4
733 Discourage use of 'In' as a prefix signifying the Unicode Block property.
734 .PP
735 \fIperlvar\fR
736 .IX Subsection "perlvar"
737 .IP \(bu 4
738 The documentation of \f(CW$@\fR was reworded to clarify that it is not just for
739 syntax errors in \f(CW\*(C`eval\*(C'\fR.
740 [GH #14572] <https://github.com/Perl/perl5/issues/14572>
741 .IP \(bu 4
742 The specific true value of \f(CW$!{E...}\fR is now documented, noting that it is
743 subject to change and not guaranteed.
744 .IP \(bu 4
745 Use of \f(CW$OLD_PERL_VERSION\fR is now discouraged.
746 .PP
747 \fIperlxs\fR
748 .IX Subsection "perlxs"
749 .IP \(bu 4
750 The documentation of \f(CW\*(C`PROTOTYPES\*(C'\fR has been corrected; they are \fIdisabled\fR
751 by default, not \fIenabled\fR.
752 .SH Diagnostics
753 .IX Header "Diagnostics"
754 The following additions or changes have been made to diagnostic output,
755 including warnings and fatal error messages. For the complete list of
756 diagnostic messages, see perldiag.
757 .SS "New Diagnostics"
758 .IX Subsection "New Diagnostics"
759 \fINew Errors\fR
760 .IX Subsection "New Errors"
761 .IP \(bu 4
762 \&\f(CW%s\fR must not be a named sequence in transliteration operator
763 .IP \(bu 4
764 Can't find Unicode property definition "%s" in regex;
765 .IP \(bu 4
766 Can't redeclare "%s" in "%s"
767 .IP \(bu 4
768 Character following \ep must be '{' or a single-character Unicode property name in regex;
769 .IP \(bu 4
770 Empty \e%c in regex; marked by <\-\- HERE in m/%s/
771 .IP \(bu 4
772 Illegal user-defined property name
773 .IP \(bu 4
774 Invalid number '%s' for \-C option.
775 .IP \(bu 4
776 Sequence (?... not terminated in regex; marked by <\-\-\ HERE in m/%s/
777 .IP \(bu 4
778 Sequence (?P<... not terminated in regex; marked by <\-\- HERE in m/%s/
779 .IP \(bu 4
780 Sequence (?P>... not terminated in regex; marked by <\-\- HERE in m/%s/
781 .PP
782 \fINew Warnings\fR
783 .IX Subsection "New Warnings"
784 .IP \(bu 4
785 Assuming NOT a POSIX class since \f(CW%s\fR in regex; marked by <\-\- HERE in m/%s/
786 .IP \(bu 4
787 %s() is deprecated on :utf8 handles
788 .SS "Changes to Existing Diagnostics"
789 .IX Subsection "Changes to Existing Diagnostics"
790 .IP \(bu 4
791 Accessing the \f(CW\*(C`IO\*(C'\fR part of a glob as \f(CW\*(C`FILEHANDLE\*(C'\fR instead of \f(CW\*(C`IO\*(C'\fR is no
792 longer deprecated. It is discouraged to encourage uniformity (so that, for
793 example, one can grep more easily) but it will not be removed.
794 [GH #15105] <https://github.com/Perl/perl5/issues/15105>
795 .IP \(bu 4
796 The diagnostic \f(CW\*(C`Hexadecimal float: internal error\*(C'\fR has been changed to
797 \&\f(CW\*(C`Hexadecimal float: internal error (%s)\*(C'\fR to include more information.
798 .IP \(bu 4
799 Can't modify non-lvalue subroutine call of &%s
800 .Sp
801 This error now reports the name of the non-lvalue subroutine you attempted to
802 use as an lvalue.
803 .IP \(bu 4
804 When running out of memory during an attempt the increase the stack
805 size, previously, perl would die using the cryptic message
806 \&\f(CW\*(C`panic: av_extend_guts() negative count (\-9223372036854775681)\*(C'\fR.
807 This has been fixed to show the prettier message:
808 Out of memory during stack extend
809 .SH "Configuration and Compilation"
810 .IX Header "Configuration and Compilation"
811 .IP \(bu 4
812 \&\f(CW\*(C`Configure\*(C'\fR now acts as if the \f(CW\*(C`\-O\*(C'\fR option is always passed, allowing command
813 line options to override saved configuration. This should eliminate confusion
814 when command line options are ignored for no obvious reason. \f(CW\*(C`\-O\*(C'\fR is now
815 permitted, but ignored.
816 .IP \(bu 4
817 Bison 3.0 is now supported.
818 .IP \(bu 4
819 \&\fIConfigure\fR no longer probes for \fIlibnm\fR by default. Originally
820 this was the "New Math" library, but the name has been re-used by the
821 GNOME NetworkManager.
822 [GH #15115] <https://github.com/Perl/perl5/issues/15115>
823 .IP \(bu 4
824 Added \fIConfigure\fR probes for \f(CW\*(C`newlocale\*(C'\fR, \f(CW\*(C`freelocale\*(C'\fR, and \f(CW\*(C`uselocale\*(C'\fR.
825 .IP \(bu 4
826 \&\f(CW\*(C`PPPort.so/PPPort.dll\*(C'\fR no longer get installed, as they are
827 not used by \f(CW\*(C`PPPort.pm\*(C'\fR, only by its test files.
828 .IP \(bu 4
829 It is now possible to specify which compilation date to show on
830 \&\f(CW\*(C`perl \-V\*(C'\fR output, by setting the macro \f(CW\*(C`PERL_BUILD_DATE\*(C'\fR.
831 .IP \(bu 4
832 Using the \f(CW\*(C`NO_HASH_SEED\*(C'\fR define in combination with the default hash algorithm
833 \&\f(CW\*(C`PERL_HASH_FUNC_ONE_AT_A_TIME_HARD\*(C'\fR resulted in a fatal error while compiling
834 the interpreter, since Perl 5.17.10. This has been fixed.
835 .IP \(bu 4
836 \&\fIConfigure\fR should handle spaces in paths a little better.
837 .IP \(bu 4
838 No longer generate EBCDIC POSIX-BC tables. We don't believe anyone is
839 using Perl and POSIX-BC at this time, and by not generating these tables
840 it saves time during development, and makes the resulting tar ball smaller.
841 .IP \(bu 4
842 The GNU Make makefile for Win32 now supports parallel builds. [perl #126632]
843 .IP \(bu 4
844 You can now build perl with MSVC++ on Win32 using GNU Make. [perl #126632]
845 .IP \(bu 4
846 The Win32 miniperl now has a real \f(CW\*(C`getcwd\*(C'\fR which increases build performance
847 resulting in \f(CWgetcwd()\fR being 605x faster in Win32 miniperl.
848 .IP \(bu 4
849 Configure now takes \f(CW\*(C`\-Dusequadmath\*(C'\fR into account when calculating the
850 \&\f(CW\*(C`alignbytes\*(C'\fR configuration variable. Previously the mis-calculated
851 \&\f(CW\*(C`alignbytes\*(C'\fR could cause alignment errors on debugging builds. [perl
852 #127894]
853 .SH Testing
854 .IX Header "Testing"
855 .IP \(bu 4
856 A new test (\fIt/op/aassign.t\fR) has been added to test the list assignment operator
857 \&\f(CW\*(C`OP_AASSIGN\*(C'\fR.
858 .IP \(bu 4
859 Parallel building has been added to the dmake \f(CW\*(C`makefile.mk\*(C'\fR makefile. All
860 Win32 compilers are supported.
861 .SH "Platform Support"
862 .IX Header "Platform Support"
863 .SS "Platform-Specific Notes"
864 .IX Subsection "Platform-Specific Notes"
865 .IP AmigaOS 4
866 .IX Item "AmigaOS"
867 .RS 4
868 .PD 0
869 .IP \(bu 4
870 .PD
871 The AmigaOS port has been reintegrated into the main tree, based off of
872 Perl 5.22.1.
873 .RE
874 .RS 4
875 .RE
876 .IP Cygwin 4
877 .IX Item "Cygwin"
878 .RS 4
879 .PD 0
880 .IP \(bu 4
881 .PD
882 Tests are more robust against unusual cygdrive prefixes.
883 [GH #15076] <https://github.com/Perl/perl5/issues/15076>
884 .RE
885 .RS 4
886 .RE
887 .IP EBCDIC 4
888 .IX Item "EBCDIC"
889 .RS 4
890 .PD 0
891 .IP "UTF-EBCDIC extended" 4
892 .IX Item "UTF-EBCDIC extended"
893 .PD
894 UTF-EBCDIC is like UTF\-8, but for EBCDIC platforms. It now has been
895 extended so that it can represent code points up to 2 ** 64 \- 1 on
896 platforms with 64\-bit words. This brings it into parity with UTF\-8.
897 This enhancement requires an incompatible change to the representation
898 of code points in the range 2 ** 30 to 2 ** 31 \-1 (the latter was the
899 previous maximum representable code point). This means that a file that
900 contains one of these code points, written out with previous versions of
901 perl cannot be read in, without conversion, by a perl containing this
902 change. We do not believe any such files are in existence, but if you
903 do have one, submit a ticket at [email protected] <mailto:[email protected]>,
904 and we will write a conversion script for you.
905 .ie n .IP "EBCDIC cmp() and sort() fixed for UTF-EBCDIC strings" 4
906 .el .IP "EBCDIC \f(CWcmp()\fR and \f(CWsort()\fR fixed for UTF-EBCDIC strings" 4
907 .IX Item "EBCDIC cmp() and sort() fixed for UTF-EBCDIC strings"
908 Comparing two strings that were both encoded in UTF\-8 (or more
909 precisely, UTF-EBCDIC) did not work properly until now. Since \f(CWsort()\fR
910 uses \f(CWcmp()\fR, this fixes that as well.
911 .ie n .IP "EBCDIC ""tr///"" and ""y///"" fixed for ""\eN{}"", and ""use\ utf8"" ranges" 4
912 .el .IP "EBCDIC \f(CWtr///\fR and \f(CWy///\fR fixed for \f(CW\eN{}\fR, and \f(CWuse\ utf8\fR ranges" 4
913 .IX Item "EBCDIC tr/// and y/// fixed for N{}, and use utf8 ranges"
914 Perl v5.22 introduced the concept of portable ranges to regular
915 expression patterns. A portable range matches the same set of
916 characters no matter what platform is being run on. This concept is now
917 extended to \f(CW\*(C`tr///\*(C'\fR. See
918 \&\f(CW\*(C`tr///\*(C'\fR.
919 .Sp
920 There were also some problems with these operations under \f(CW\*(C`use\ utf8\*(C'\fR, which are now fixed
921 .RE
922 .RS 4
923 .RE
924 .IP FreeBSD 4
925 .IX Item "FreeBSD"
926 .RS 4
927 .PD 0
928 .IP \(bu 4
929 .PD
930 Use the \f(CWfdclose()\fR function from FreeBSD if it is available.
931 [GH #15082] <https://github.com/Perl/perl5/issues/15082>
932 .RE
933 .RS 4
934 .RE
935 .IP IRIX 4
936 .IX Item "IRIX"
937 .RS 4
938 .PD 0
939 .IP \(bu 4
940 .PD
941 Under some circumstances IRIX stdio \f(CWfgetc()\fR and \f(CWfread()\fR set the errno to
942 \&\f(CW\*(C`ENOENT\*(C'\fR, which made no sense according to either IRIX or POSIX docs. Errno
943 is now cleared in such cases.
944 [GH #14557] <https://github.com/Perl/perl5/issues/14557>
945 .IP \(bu 4
946 Problems when multiplying long doubles by infinity have been fixed.
947 [GH #14993] <https://github.com/Perl/perl5/issues/14993>
948 .RE
949 .RS 4
950 .RE
951 .IP "MacOS X" 4
952 .IX Item "MacOS X"
953 .RS 4
954 .PD 0
955 .IP \(bu 4
956 .PD
957 Until now OS X builds of perl have specified a link target of 10.3 (Panther,
958 2003) but have not specified a compiler target. From now on, builds of perl on
959 OS X 10.6 or later (Snow Leopard, 2008) by default capture the current OS X
960 version and specify that as the explicit build target in both compiler and
961 linker flags, thus preserving binary compatibility for extensions built later
962 regardless of changes in OS X, SDK, or compiler and linker versions. To
963 override the default value used in the build and preserved in the flags,
964 specify \f(CW\*(C`export MACOSX_DEPLOYMENT_TARGET=10.N\*(C'\fR before configuring and building
965 perl, where 10.N is the version of OS X you wish to target. In OS X 10.5 or
966 earlier there is no change to the behavior present when those systems were
967 current; the link target is still OS X 10.3 and there is no explicit compiler
968 target.
969 .IP \(bu 4
970 Builds with both \-DDEBUGGING and threading enabled would fail with a
971 "panic: free from wrong pool" error when built or tested from Terminal
972 on OS X. This was caused by perl's internal management of the
973 environment conflicting with an atfork handler using the libc
974 \&\f(CWsetenv()\fR function to update the environment.
975 .Sp
976 Perl now uses \f(CWsetenv()\fR/\f(CWunsetenv()\fR to update the environment on OS X.
977 [GH #14955] <https://github.com/Perl/perl5/issues/14955>
978 .RE
979 .RS 4
980 .RE
981 .IP Solaris 4
982 .IX Item "Solaris"
983 .RS 4
984 .PD 0
985 .IP \(bu 4
986 .PD
987 All Solaris variants now build a shared libperl
988 .Sp
989 Solaris and variants like OpenIndiana now always build with the shared
990 Perl library (Configure \-Duseshrplib). This was required for the
991 OpenIndiana builds, but this has also been the setting for Oracle/Sun
992 Perl builds for several years.
993 .RE
994 .RS 4
995 .RE
996 .IP Tru64 4
997 .IX Item "Tru64"
998 .RS 4
999 .PD 0
1000 .IP \(bu 4
1001 .PD
1002 Workaround where Tru64 balks when prototypes are listed as
1003 \&\f(CW\*(C`PERL_STATIC_INLINE\*(C'\fR, but where the test is build with
1004 \&\f(CW\*(C`\-DPERL_NO_INLINE_FUNCTIONS\*(C'\fR.
1005 .RE
1006 .RS 4
1007 .RE
1008 .IP VMS 4
1009 .IX Item "VMS"
1010 .RS 4
1011 .PD 0
1012 .IP \(bu 4
1013 .PD
1014 On VMS, the math function prototypes in \f(CW\*(C`math.h\*(C'\fR are now visible under C++.
1015 Now building the POSIX extension with C++ will no longer crash.
1016 .IP \(bu 4
1017 VMS has had \f(CW\*(C`setenv\*(C'\fR/\f(CW\*(C`unsetenv\*(C'\fR since v7.0 (released in 1996),
1018 \&\f(CW\*(C`Perl_vmssetenv\*(C'\fR now always uses \f(CW\*(C`setenv\*(C'\fR/\f(CW\*(C`unsetenv\*(C'\fR.
1019 .IP \(bu 4
1020 Perl now implements its own \f(CW\*(C`killpg\*(C'\fR by scanning for processes in the
1021 specified process group, which may not mean exactly the same thing as a Unix
1022 process group, but allows us to send a signal to a parent (or master) process
1023 and all of its sub-processes. At the perl level, this means we can now send a
1024 negative pid like so:
1025 .Sp
1026 .Vb 1
1027 \& kill SIGKILL, \-$pid;
1028 .Ve
1029 .Sp
1030 to signal all processes in the same group as \f(CW$pid\fR.
1031 .IP \(bu 4
1032 For those \f(CW%ENV\fR elements based on the CRTL environ array, we've always
1033 preserved case when setting them but did look-ups only after upcasing the
1034 key first, which made lower\- or mixed-case entries go missing. This problem
1035 has been corrected by making \f(CW%ENV\fR elements derived from the environ array
1036 case-sensitive on look-up as well as case-preserving on store.
1037 .IP \(bu 4
1038 Environment look-ups for \f(CW\*(C`PERL5LIB\*(C'\fR and \f(CW\*(C`PERLLIB\*(C'\fR previously only
1039 considered logical names, but now consider all sources of \f(CW%ENV\fR as
1040 determined by \f(CW\*(C`PERL_ENV_TABLES\*(C'\fR and as documented in "%ENV" in perlvms.
1041 .IP \(bu 4
1042 The minimum supported version of VMS is now v7.3\-2, released in 2003. As a
1043 side effect of this change, VAX is no longer supported as the terminal
1044 release of OpenVMS VAX was v7.3 in 2001.
1045 .RE
1046 .RS 4
1047 .RE
1048 .IP Win32 4
1049 .IX Item "Win32"
1050 .RS 4
1051 .PD 0
1052 .IP \(bu 4
1053 .PD
1054 A new build option \f(CW\*(C`USE_NO_REGISTRY\*(C'\fR has been added to the makefiles. This
1055 option is off by default, meaning the default is to do Windows registry
1056 lookups. This option stops Perl from looking inside the registry for anything.
1057 For what values are looked up in the registry see perlwin32. Internally, in
1058 C, the name of this option is \f(CW\*(C`WIN32_NO_REGISTRY\*(C'\fR.
1059 .IP \(bu 4
1060 The behavior of Perl using \f(CW\*(C`HKEY_CURRENT_USER\eSoftware\ePerl\*(C'\fR and
1061 \&\f(CW\*(C`HKEY_LOCAL_MACHINE\eSoftware\ePerl\*(C'\fR to lookup certain values, including \f(CW%ENV\fR
1062 vars starting with \f(CW\*(C`PERL\*(C'\fR has changed. Previously, the 2 keys were checked
1063 for entries at all times through the perl process's life time even if
1064 they did not
1065 exist. For performance reasons, now, if the root key (i.e.
1066 \&\f(CW\*(C`HKEY_CURRENT_USER\eSoftware\ePerl\*(C'\fR or \f(CW\*(C`HKEY_LOCAL_MACHINE\eSoftware\ePerl\*(C'\fR) does
1067 not exist at process start time, it will not be checked again for \f(CW%ENV\fR
1068 override entries for the remainder of the perl process's life. This more
1069 closely matches Unix behavior in that the environment is copied or inherited
1070 on startup and changing the variable in the parent process or another process
1071 or editing \fI.bashrc\fR will not change the environmental variable in other
1072 existing, running, processes.
1073 .IP \(bu 4
1074 One glob fetch was removed for each \f(CW\*(C`\-X\*(C'\fR or \f(CW\*(C`stat\*(C'\fR call whether done from
1075 Perl code or internally from Perl's C code. The glob being looked up was
1076 \&\f(CW\*(C`${^WIN32_SLOPPY_STAT}\*(C'\fR which is a special variable. This makes \f(CW\*(C`\-X\*(C'\fR and
1077 \&\f(CW\*(C`stat\*(C'\fR slightly faster.
1078 .IP \(bu 4
1079 During miniperl's process startup, during the build process, 4 to 8 IO calls
1080 related to the process starting \fI.pl\fR and the \fIbuildcustomize.pl\fR file were
1081 removed from the code opening and executing the first 1 or 2 \fI.pl\fR files.
1082 .IP \(bu 4
1083 Builds using Microsoft Visual C++ 2003 and earlier no longer produce
1084 an "INTERNAL COMPILER ERROR" message. [perl #126045]
1085 .IP \(bu 4
1086 Visual C++ 2013 builds will now execute on XP and higher. Previously they would
1087 only execute on Vista and higher.
1088 .IP \(bu 4
1089 You can now build perl with GNU Make and GCC. [perl #123440]
1090 .IP \(bu 4
1091 \&\f(CW\*(C`truncate($filename, $size)\*(C'\fR now works for files over 4GB in size.
1092 [perl #125347]
1093 .IP \(bu 4
1094 Parallel building has been added to the dmake \f(CW\*(C`makefile.mk\*(C'\fR makefile. All
1095 Win32 compilers are supported.
1096 .IP \(bu 4
1097 Building a 64\-bit perl with a 64\-bit GCC but a 32\-bit gmake would
1098 result in an invalid \f(CW$Config{archname}\fR for the resulting perl.
1099 [perl #127584]
1100 .IP \(bu 4
1101 Errors set by Winsock functions are now put directly into \f(CW$^E\fR, and the
1102 relevant \f(CW\*(C`WSAE*\*(C'\fR error codes are now exported from the Errno and POSIX
1103 modules for testing this against.
1104 .Sp
1105 The previous behavior of putting the errors (converted to POSIX-style \f(CW\*(C`E*\*(C'\fR
1106 error codes since Perl 5.20.0) into \f(CW$!\fR was buggy due to the non-equivalence
1107 of like-named Winsock and POSIX error constants, a relationship between which
1108 has unfortunately been established in one way or another since Perl 5.8.0.
1109 .Sp
1110 The new behavior provides a much more robust solution for checking Winsock
1111 errors in portable software without accidentally matching POSIX tests that were
1112 intended for other OSes and may have different meanings for Winsock.
1113 .Sp
1114 The old behavior is currently retained, warts and all, for backwards
1115 compatibility, but users are encouraged to change any code that tests \f(CW$!\fR
1116 against \f(CW\*(C`E*\*(C'\fR constants for Winsock errors to instead test \f(CW$^E\fR against
1117 \&\f(CW\*(C`WSAE*\*(C'\fR constants. After a suitable deprecation period, the old behavior may
1118 be removed, leaving \f(CW$!\fR unchanged after Winsock function calls, to avoid any
1119 possible confusion over which error variable to check.
1120 .RE
1121 .RS 4
1122 .RE
1123 .IP ppc64el 4
1124 .IX Item "ppc64el"
1125 .RS 4
1126 .PD 0
1127 .IP "floating point" 4
1128 .IX Item "floating point"
1129 .PD
1130 The floating point format of ppc64el (Debian naming for little-endian
1131 PowerPC) is now detected correctly.
1132 .RE
1133 .RS 4
1134 .RE
1135 .SH "Internal Changes"
1136 .IX Header "Internal Changes"
1137 .IP \(bu 4
1138 The implementation of perl's context stack system, and its internal API,
1139 have been heavily reworked. Note that no significant changes have been
1140 made to any external APIs, but XS code which relies on such internal
1141 details may need to be fixed. The main changes are:
1142 .RS 4
1143 .IP \(bu 4
1144 The \f(CWPUSHBLOCK()\fR, \f(CWPOPSUB()\fR etc. macros have been replaced with static
1145 inline functions such as \f(CWcx_pushblock()\fR, \f(CWcx_popsub()\fR etc. These use
1146 function args rather than implicitly relying on local vars such as
1147 \&\f(CW\*(C`gimme\*(C'\fR and \f(CW\*(C`newsp\*(C'\fR being available. Also their functionality has
1148 changed: in particular, \f(CWcx_popblock()\fR no longer decrements
1149 \&\f(CW\*(C`cxstack_ix\*(C'\fR. The ordering of the steps in the \f(CW\*(C`pp_leave*\*(C'\fR functions
1150 involving \f(CWcx_popblock()\fR, \f(CWcx_popsub()\fR etc. has changed. See the new
1151 documentation, "Dynamic Scope and the Context Stack" in perlguts, for
1152 details on how to use them.
1153 .IP \(bu 4
1154 Various macros, which now consistently have a CX_ prefix, have been added:
1155 .Sp
1156 .Vb 1
1157 \& CX_CUR(), CX_LEAVE_SCOPE(), CX_POP()
1158 .Ve
1159 .Sp
1160 or renamed:
1161 .Sp
1162 .Vb 1
1163 \& CX_POP_SAVEARRAY(), CX_DEBUG(), CX_PUSHSUBST(), CX_POPSUBST()
1164 .Ve
1165 .IP \(bu 4
1166 \&\f(CWcx_pushblock()\fR now saves \f(CW\*(C`PL_savestack_ix\*(C'\fR and \f(CW\*(C`PL_tmps_floor\*(C'\fR, so
1167 \&\f(CW\*(C`pp_enter*\*(C'\fR and \f(CW\*(C`pp_leave*\*(C'\fR no longer do
1168 .Sp
1169 .Vb 1
1170 \& ENTER; SAVETMPS; ....; LEAVE
1171 .Ve
1172 .IP \(bu 4
1173 \&\f(CWcx_popblock()\fR now also restores \f(CW\*(C`PL_curpm\*(C'\fR.
1174 .IP \(bu 4
1175 In \f(CWdounwind()\fR for every context type, the current savestack frame is
1176 now processed before each context is popped; formerly this was only done
1177 for sub-like context frames. This action has been removed from
1178 \&\f(CWcx_popsub()\fR and placed into its own macro, \f(CWCX_LEAVE_SCOPE(cx)\fR, which
1179 must be called before \f(CWcx_popsub()\fR etc.
1180 .Sp
1181 \&\f(CWdounwind()\fR now also does a \f(CWcx_popblock()\fR on the last popped frame
1182 (formerly it only did the \f(CWcx_popsub()\fR etc. actions on each frame).
1183 .IP \(bu 4
1184 The temps stack is now freed on scope exit; previously, temps created
1185 during the last statement of a block wouldn't be freed until the next
1186 \&\f(CW\*(C`nextstate\*(C'\fR following the block (apart from an existing hack that did
1187 this for recursive subs in scalar context); and in something like
1188 \&\f(CW\*(C`f(g())\*(C'\fR, the temps created by the last statement in \f(CWg()\fR would
1189 formerly not be freed until the statement following the return from
1190 \&\f(CWf()\fR.
1191 .IP \(bu 4
1192 Most values that were saved on the savestack on scope entry are now
1193 saved in suitable new fields in the context struct, and saved and
1194 restored directly by \f(CWcx_pushfoo()\fR and \f(CWcx_popfoo()\fR, which is much
1195 faster.
1196 .IP \(bu 4
1197 Various context struct fields have been added, removed or modified.
1198 .IP \(bu 4
1199 The handling of \f(CW@_\fR in \f(CWcx_pushsub()\fR and \f(CWcx_popsub()\fR has been
1200 considerably tidied up, including removing the \f(CW\*(C`argarray\*(C'\fR field from the
1201 context struct, and extracting out some common (but rarely used) code into
1202 a separate function, \f(CWclear_defarray()\fR. Also, useful subsets of
1203 \&\f(CWcx_popsub()\fR which had been unrolled in places like \f(CW\*(C`pp_goto\*(C'\fR have been
1204 gathered into the new functions \f(CWcx_popsub_args()\fR and
1205 \&\f(CWcx_popsub_common()\fR.
1206 .IP \(bu 4
1207 \&\f(CW\*(C`pp_leavesub\*(C'\fR and \f(CW\*(C`pp_leavesublv\*(C'\fR now use the same function as the rest
1208 of the \f(CW\*(C`pp_leave*\*(C'\fR's to process return args.
1209 .IP \(bu 4
1210 \&\f(CW\*(C`CXp_FOR_PAD\*(C'\fR and \f(CW\*(C`CXp_FOR_GV\*(C'\fR flags have been added, and
1211 \&\f(CW\*(C`CXt_LOOP_FOR\*(C'\fR has been split into \f(CW\*(C`CXt_LOOP_LIST\*(C'\fR, \f(CW\*(C`CXt_LOOP_ARY\*(C'\fR.
1212 .IP \(bu 4
1213 Some variables formerly declared by \f(CW\*(C`dMULTICALL\*(C'\fR (but not documented) have
1214 been removed.
1215 .RE
1216 .RS 4
1217 .RE
1218 .IP \(bu 4
1219 The obscure \f(CW\*(C`PL_timesbuf\*(C'\fR variable, effectively a vestige of Perl 1, has
1220 been removed. It was documented as deprecated in Perl 5.20, with a statement
1221 that it would be removed early in the 5.21.x series; that has now finally
1222 happened.
1223 [GH #13632] <https://github.com/Perl/perl5/issues/13632>
1224 .IP \(bu 4
1225 An unwarranted assertion in \f(CWPerl_newATTRSUB_x()\fR has been removed. If
1226 a stub subroutine
1227 definition with a prototype has been seen, then any subsequent stub (or
1228 definition) of the same subroutine with an attribute was causing an assertion
1229 failure because of a null pointer.
1230 [GH #15081] <https://github.com/Perl/perl5/issues/15081>
1231 .IP \(bu 4
1232 \&\f(CW\*(C`::\*(C'\fR has been replaced by \f(CW\*(C`_\|_\*(C'\fR in \f(CW\*(C`ExtUtils::ParseXS\*(C'\fR, like it's done for
1233 parameters/return values. This is more consistent, and simplifies writing XS
1234 code wrapping C++ classes into a nested Perl namespace (it requires only
1235 a typedef for \f(CW\*(C`Foo_\|_Bar\*(C'\fR rather than two, one for \f(CW\*(C`Foo_Bar\*(C'\fR and the other
1236 for \f(CW\*(C`Foo::Bar\*(C'\fR).
1237 .IP \(bu 4
1238 The \f(CWto_utf8_case()\fR function is now deprecated. Instead use
1239 \&\f(CW\*(C`toUPPER_utf8\*(C'\fR, \f(CW\*(C`toTITLE_utf8\*(C'\fR, \f(CW\*(C`toLOWER_utf8\*(C'\fR, and \f(CW\*(C`toFOLD_utf8\*(C'\fR.
1240 (See <http://nntp.perl.org/group/perl.perl5.porters/233287>.)
1241 .IP \(bu 4
1242 Perl core code and the threads extension have been annotated so that,
1243 if Perl is configured to use threads, then during compile-time clang (3.6
1244 or later) will warn about suspicious uses of mutexes.
1245 See <http://clang.llvm.org/docs/ThreadSafetyAnalysis.html> for more
1246 information.
1247 .IP \(bu 4
1248 The \f(CWsignbit()\fR emulation has been enhanced. This will help older
1249 and/or more exotic platforms or configurations.
1250 .IP \(bu 4
1251 Most EBCDIC-specific code in the core has been unified with non-EBCDIC
1252 code, to avoid repetition and make maintenance easier.
1253 .IP \(bu 4
1254 MSWin32 code for \f(CW$^X\fR has been moved out of the \fIwin32\fR directory to
1255 \&\fIcaretx.c\fR, where other operating systems set that variable.
1256 .IP \(bu 4
1257 \&\f(CWsv_ref()\fR is now part of the API.
1258 .IP \(bu 4
1259 "sv_backoff" in perlapi had its return type changed from \f(CW\*(C`int\*(C'\fR to \f(CW\*(C`void\*(C'\fR. It
1260 previously has always returned \f(CW0\fR since Perl 5.000 stable but that was
1261 undocumented. Although \f(CW\*(C`sv_backoff\*(C'\fR is marked as public API, XS code is not
1262 expected to be impacted since the proper API call would be through public API
1263 \&\f(CW\*(C`sv_setsv(sv, &PL_sv_undef)\*(C'\fR, or quasi-public \f(CW\*(C`SvOOK_off\*(C'\fR, or non-public
1264 \&\f(CW\*(C`SvOK_off\*(C'\fR calls, and the return value of \f(CW\*(C`sv_backoff\*(C'\fR was previously a
1265 meaningless constant that can be rewritten as \f(CW\*(C`(sv_backoff(sv),0)\*(C'\fR.
1266 .IP \(bu 4
1267 The \f(CW\*(C`EXTEND\*(C'\fR and \f(CW\*(C`MEXTEND\*(C'\fR macros have been improved to avoid various issues
1268 with integer truncation and wrapping. In particular, some casts formerly used
1269 within the macros have been removed. This means for example that passing an
1270 unsigned \f(CW\*(C`nitems\*(C'\fR argument is likely to raise a compiler warning now
1271 (it's always been documented to require a signed value; formerly int,
1272 lately SSize_t).
1273 .IP \(bu 4
1274 \&\f(CW\*(C`PL_sawalias\*(C'\fR and \f(CW\*(C`GPf_ALIASED_SV\*(C'\fR have been removed.
1275 .IP \(bu 4
1276 \&\f(CW\*(C`GvASSIGN_GENERATION\*(C'\fR and \f(CW\*(C`GvASSIGN_GENERATION_set\*(C'\fR have been removed.
1277 .SH "Selected Bug Fixes"
1278 .IX Header "Selected Bug Fixes"
1279 .IP \(bu 4
1280 It now works properly to specify a user-defined property, such as
1281 .Sp
1282 .Vb 1
1283 \& qr/\ep{mypkg1::IsMyProperty}/i
1284 .Ve
1285 .Sp
1286 with \f(CW\*(C`/i\*(C'\fR caseless matching, an explicit package name, and
1287 \&\fIIsMyProperty\fR not defined at the time of the pattern compilation.
1288 .IP \(bu 4
1289 Perl's \f(CWmemcpy()\fR, \f(CWmemmove()\fR, \f(CWmemset()\fR and \f(CWmemcmp()\fR fallbacks are now
1290 more compatible with the originals. [perl #127619]
1291 .IP \(bu 4
1292 Fixed the issue where a \f(CW\*(C`s///r\*(C'\fR) with \fB\-DPERL_NO_COW\fR attempts
1293 to modify the source SV, resulting in the program dying. [perl #127635]
1294 .IP \(bu 4
1295 Fixed an EBCDIC-platform-only case where a pattern could fail to match. This
1296 occurred when matching characters from the set of C1 controls when the
1297 target matched string was in UTF\-8.
1298 .IP \(bu 4
1299 Narrow the filename check in \fIstrict.pm\fR and \fIwarnings.pm\fR. Previously,
1300 it assumed that if the filename (without the \fI.pmc?\fR extension) differed
1301 from the package name, if was a misspelled use statement (i.e. \f(CW\*(C`use Strict\*(C'\fR
1302 instead of \f(CW\*(C`use strict\*(C'\fR). We now check whether there's really a
1303 miscapitalization happening, and not some other issue.
1304 .IP \(bu 4
1305 Turn an assertion into a more user friendly failure when parsing
1306 regexes. [perl #127599]
1307 .IP \(bu 4
1308 Correctly raise an error when trying to compile patterns with
1309 unterminated character classes while there are trailing backslashes.
1310 [perl #126141].
1311 .IP \(bu 4
1312 Line numbers larger than 2**31\-1 but less than 2**32 are no longer
1313 returned by \f(CWcaller()\fR as negative numbers. [perl #126991]
1314 .IP \(bu 4
1315 \&\f(CW\*(C`unless ( \fR\f(CIassignment\fR\f(CW )\*(C'\fR now properly warns when syntax
1316 warnings are enabled. [perl #127122]
1317 .IP \(bu 4
1318 Setting an \f(CW\*(C`ISA\*(C'\fR glob to an array reference now properly adds
1319 \&\f(CW\*(C`isaelem\*(C'\fR magic to any existing elements. Previously modifying such
1320 an element would not update the ISA cache, so method calls would call
1321 the wrong function. Perl would also crash if the \f(CW\*(C`ISA\*(C'\fR glob was
1322 destroyed, since new code added in 5.23.7 would try to release the
1323 \&\f(CW\*(C`isaelem\*(C'\fR magic from the elements. [perl #127351]
1324 .IP \(bu 4
1325 If a here-doc was found while parsing another operator, the parser had
1326 already read end of file, and the here-doc was not terminated, perl
1327 could produce an assertion or a segmentation fault. This now reliably
1328 complains about the unterminated here-doc. [perl #125540]
1329 .IP \(bu 4
1330 \&\f(CWuntie()\fR would sometimes return the last value returned by the \f(CWUNTIE()\fR
1331 handler as well as its normal value, messing up the stack. [perl
1332 #126621]
1333 .IP \(bu 4
1334 Fixed an operator precedence problem when \f(CW\*(C` castflags & 2\*(C'\fR is true.
1335 [perl #127474]
1336 .IP \(bu 4
1337 Caching of DESTROY methods could result in a non-pointer or a
1338 non-STASH stored in the \f(CWSvSTASH()\fR slot of a stash, breaking the B
1339 \&\f(CWSTASH()\fR method. The DESTROY method is now cached in the MRO metadata
1340 for the stash. [perl #126410]
1341 .IP \(bu 4
1342 The AUTOLOAD method is now called when searching for a DESTROY method,
1343 and correctly sets \f(CW$AUTOLOAD\fR too. [perl #124387] [perl #127494]
1344 .IP \(bu 4
1345 Avoid parsing beyond the end of the buffer when processing a \f(CW\*(C`#line\*(C'\fR
1346 directive with no filename. [perl #127334]
1347 .IP \(bu 4
1348 Perl now raises a warning when a regular expression pattern looks like
1349 it was supposed to contain a POSIX class, like \f(CW\*(C`qr/[[:alpha:]]/\*(C'\fR, but
1350 there was some slight defect in its specification which causes it to
1351 instead be treated as a regular bracketed character class. An example
1352 would be missing the second colon in the above like this:
1353 \&\f(CW\*(C`qr/[[:alpha]]/\*(C'\fR. This compiles to match a sequence of two characters.
1354 The second is \f(CW"]"\fR, and the first is any of: \f(CW"["\fR, \f(CW":"\fR, \f(CW"a"\fR,
1355 \&\f(CW"h"\fR, \f(CW"l"\fR, or \f(CW"p"\fR. This is unlikely to be the intended
1356 meaning, and now a warning is raised. No warning is raised unless the
1357 specification is very close to one of the 14 legal POSIX classes. (See
1358 "POSIX Character Classes" in perlrecharclass.)
1359 [perl #8904]
1360 .IP \(bu 4
1361 Certain regex patterns involving a complemented POSIX class in an
1362 inverted bracketed character class, and matching something else
1363 optionally would improperly fail to match. An example of one that could
1364 fail is \f(CW\*(C`qr/_?[^\eWbar]\ex{100}/\*(C'\fR. This has been fixed.
1365 [perl #127537]
1366 .IP \(bu 4
1367 Perl 5.22 added support to the C99 hexadecimal floating point notation,
1368 but sometimes misparses hex floats. This has been fixed.
1369 [perl #127183]
1370 .IP \(bu 4
1371 A regression that allowed undeclared barewords in hash keys to work despite
1372 strictures has been fixed.
1373 [GH #15099] <https://github.com/Perl/perl5/issues/15099>
1374 .IP \(bu 4
1375 Calls to the placeholder \f(CW&PL_sv_yes\fR used internally when an \f(CWimport()\fR
1376 or \f(CWunimport()\fR method isn't found now correctly handle scalar context.
1377 [GH #14902] <https://github.com/Perl/perl5/issues/14902>
1378 .IP \(bu 4
1379 Report more context when we see an array where we expect to see an
1380 operator and avoid an assertion failure.
1381 [GH #14472] <https://github.com/Perl/perl5/issues/14472>
1382 .IP \(bu 4
1383 Modifying an array that was previously a package \f(CW@ISA\fR no longer
1384 causes assertion failures or crashes.
1385 [GH #14492] <https://github.com/Perl/perl5/issues/14492>
1386 .IP \(bu 4
1387 Retain binary compatibility across plain and DEBUGGING perl builds.
1388 [GH #15122] <https://github.com/Perl/perl5/issues/15122>
1389 .IP \(bu 4
1390 Avoid leaking memory when setting \f(CW$ENV{foo}\fR on darwin.
1391 [GH #14955] <https://github.com/Perl/perl5/issues/14955>
1392 .IP \(bu 4
1393 \&\f(CW\*(C`/...\eG/\*(C'\fR no longer crashes on utf8 strings. When \f(CW\*(C`\eG\*(C'\fR is a fixed number
1394 of characters from the start of the regex, perl needs to count back that
1395 many characters from the current \f(CWpos()\fR position and start matching from
1396 there. However, it was counting back bytes rather than characters, which
1397 could lead to panics on utf8 strings.
1398 .IP \(bu 4
1399 In some cases operators that return integers would return negative
1400 integers as large positive integers.
1401 [GH #15049] <https://github.com/Perl/perl5/issues/15049>
1402 .IP \(bu 4
1403 The \f(CWpipe()\fR operator would assert for DEBUGGING builds instead of
1404 producing the correct error message. The condition asserted on is
1405 detected and reported on correctly without the assertions, so the
1406 assertions were removed.
1407 [GH #15015] <https://github.com/Perl/perl5/issues/15015>
1408 .IP \(bu 4
1409 In some cases, failing to parse a here-doc would attempt to use freed
1410 memory. This was caused by a pointer not being restored correctly.
1411 [GH #15009] <https://github.com/Perl/perl5/issues/15009>
1412 .IP \(bu 4
1413 \&\f(CW\*(C`@x = sort { *a = 0; $a <=> $b } 0 .. 1\*(C'\fR no longer frees the GP
1414 for *a before restoring its SV slot.
1415 [GH #14595] <https://github.com/Perl/perl5/issues/14595>
1416 .IP \(bu 4
1417 Multiple problems with the new hexadecimal floating point printf
1418 format \f(CW%a\fR were fixed:
1419 [GH #15032] <https://github.com/Perl/perl5/issues/15032>,
1420 [GH #15033] <https://github.com/Perl/perl5/issues/15033>,
1421 [GH #15074] <https://github.com/Perl/perl5/issues/15074>
1422 .IP \(bu 4
1423 Calling \f(CWmg_set()\fR in \f(CWleave_scope()\fR no longer leaks.
1424 .IP \(bu 4
1425 A regression from Perl v5.20 was fixed in which debugging output of regular
1426 expression compilation was wrong. (The pattern was correctly compiled, but
1427 what got displayed for it was wrong.)
1428 .IP \(bu 4
1429 \&\f(CW\*(C`\eb{sb}\*(C'\fR works much better. In Perl v5.22.0, this new construct didn't
1430 seem to give the expected results, yet passed all the tests in the
1431 extensive suite furnished by Unicode. It turns out that it was because
1432 these were short input strings, and the failures had to do with longer
1433 inputs.
1434 .IP \(bu 4
1435 Certain syntax errors in
1436 "Extended Bracketed Character Classes" in perlrecharclass caused panics
1437 instead of the proper error message. This has now been fixed. [perl
1438 #126481]
1439 .IP \(bu 4
1440 Perl 5.20 added a message when a quantifier in a regular
1441 expression was useless, but then caused the parser to skip it;
1442 this caused the surplus quantifier to be silently ignored, instead
1443 of throwing an error. This is now fixed. [perl #126253]
1444 .IP \(bu 4
1445 The switch to building non-XS modules last in win32/makefile.mk (introduced
1446 by design as part of the changes to enable parallel building) caused the
1447 build of POSIX to break due to problems with the version module. This
1448 is now fixed.
1449 .IP \(bu 4
1450 Improved parsing of hex float constants.
1451 .IP \(bu 4
1452 Fixed an issue with \f(CW\*(C`pack\*(C'\fR where \f(CW\*(C`pack "H"\*(C'\fR (and \f(CW\*(C`pack "h"\*(C'\fR)
1453 could read past the source when given a non\-utf8 source, and a utf8 target.
1454 [perl #126325]
1455 .IP \(bu 4
1456 Fixed several cases where perl would abort due to a segmentation fault,
1457 or a C\-level assert. [perl #126615], [perl #126602], [perl #126193].
1458 .IP \(bu 4
1459 There were places in regular expression patterns where comments (\f(CW\*(C`(?#...)\*(C'\fR)
1460 weren't allowed, but should have been. This is now fixed.
1461 [GH #12755] <https://github.com/Perl/perl5/issues/12755>
1462 .IP \(bu 4
1463 Some regressions from Perl 5.20 have been fixed, in which some syntax errors in
1464 \&\f(CW\*(C`(?[...])\*(C'\fR constructs
1465 within regular expression patterns could cause a segfault instead of a proper
1466 error message.
1467 [GH #14933] <https://github.com/Perl/perl5/issues/14933>
1468 [GH #14996] <https://github.com/Perl/perl5/issues/14996>
1469 .IP \(bu 4
1470 Another problem with
1471 \&\f(CW\*(C`(?[...])\*(C'\fR
1472 constructs has been fixed wherein things like \f(CW\*(C`\ec]\*(C'\fR could cause panics.
1473 [GH #14934] <https://github.com/Perl/perl5/issues/14934>
1474 .IP \(bu 4
1475 Some problems with attempting to extend the perl stack to around 2G or 4G
1476 entries have been fixed. This was particularly an issue on 32\-bit perls built
1477 to use 64\-bit integers, and was easily noticeable with the list repetition
1478 operator, e.g.
1479 .Sp
1480 .Vb 1
1481 \& @a = (1) x $big_number
1482 .Ve
1483 .Sp
1484 Formerly perl may have crashed, depending on the exact value of \f(CW$big_number\fR;
1485 now it will typically raise an exception.
1486 [GH #14880] <https://github.com/Perl/perl5/issues/14880>
1487 .IP \(bu 4
1488 In a regex conditional expression \f(CW\*(C`(?(condition)yes\-pattern|no\-pattern)\*(C'\fR, if
1489 the condition is \f(CW\*(C`(?!)\*(C'\fR then perl failed the match outright instead of
1490 matching the no-pattern. This has been fixed.
1491 [GH #14947] <https://github.com/Perl/perl5/issues/14947>
1492 .IP \(bu 4
1493 The special backtracking control verbs \f(CW\*(C`(*VERB:ARG)\*(C'\fR now all allow an optional
1494 argument and set \f(CW\*(C`REGERROR\*(C'\fR/\f(CW\*(C`REGMARK\*(C'\fR appropriately as well.
1495 [GH #14937] <https://github.com/Perl/perl5/issues/14937>
1496 .IP \(bu 4
1497 Several bugs, including a segmentation fault, have been fixed with the boundary
1498 checking constructs (introduced in Perl 5.22) \f(CW\*(C`\eb{gcb}\*(C'\fR, \f(CW\*(C`\eb{sb}\*(C'\fR, \f(CW\*(C`\eb{wb}\*(C'\fR,
1499 \&\f(CW\*(C`\eB{gcb}\*(C'\fR, \f(CW\*(C`\eB{sb}\*(C'\fR, and \f(CW\*(C`\eB{wb}\*(C'\fR. All the \f(CW\*(C`\eB{}\*(C'\fR ones now match an empty
1500 string; none of the \f(CW\*(C`\eb{}\*(C'\fR ones do.
1501 [GH #14976] <https://github.com/Perl/perl5/issues/14976>
1502 .IP \(bu 4
1503 Duplicating a closed file handle for write no longer creates a
1504 filename of the form \fIGLOB(0xXXXXXXXX)\fR. [perl #125115]
1505 .IP \(bu 4
1506 Warning fatality is now ignored when rewinding the stack. This
1507 prevents infinite recursion when the now fatal error also causes
1508 rewinding of the stack. [perl #123398]
1509 .IP \(bu 4
1510 In perl v5.22.0, the logic changed when parsing a numeric parameter to the \-C
1511 option, such that the successfully parsed number was not saved as the option
1512 value if it parsed to the end of the argument. [perl #125381]
1513 .IP \(bu 4
1514 The PadlistNAMES macro is an lvalue again.
1515 .IP \(bu 4
1516 Zero \-DPERL_TRACE_OPS memory for sub-threads.
1517 .Sp
1518 \&\f(CWperl_clone_using()\fR was missing Zero init of PL_op_exec_cnt[]. This
1519 caused sub-threads in threaded \-DPERL_TRACE_OPS builds to spew exceedingly
1520 large op-counts at destruct. These counts would print \f(CW%x\fR as "ABABABAB",
1521 clearly a mem-poison value.
1522 .IP \(bu 4
1523 A leak in the XS typemap caused one scalar to be leaked each time a \f(CW\*(C`FILE *\*(C'\fR
1524 or a \f(CW\*(C`PerlIO *\*(C'\fR was \f(CW\*(C`OUTPUT:\*(C'\fRed or imported to Perl, since perl 5.000. These
1525 particular typemap entries are thought to be extremely rarely used by XS
1526 modules. [perl #124181]
1527 .IP \(bu 4
1528 \&\f(CWalarm()\fR and \f(CWsleep()\fR will now warn if the argument is a negative number
1529 and return undef. Previously they would pass the negative value to the
1530 underlying C function which may have set up a timer with a surprising value.
1531 .IP \(bu 4
1532 Perl can again be compiled with any Unicode version. This used to
1533 (mostly) work, but was lost in v5.18 through v5.20. The property
1534 \&\f(CW\*(C`Name_Alias\*(C'\fR did not exist prior to Unicode 5.0. Unicode::UCD
1535 incorrectly said it did. This has been fixed.
1536 .IP \(bu 4
1537 Very large code-points (beyond Unicode) in regular expressions no
1538 longer cause a buffer overflow in some cases when converted to UTF\-8.
1539 [GH #14858] <https://github.com/Perl/perl5/issues/14858>
1540 .IP \(bu 4
1541 The integer overflow check for the range operator (...) in list
1542 context now correctly handles the case where the size of the range is
1543 larger than the address space. This could happen on 32\-bits with
1544 \&\-Duse64bitint.
1545 [GH #14843] <https://github.com/Perl/perl5/issues/14843>
1546 .IP \(bu 4
1547 A crash with \f(CW\*(C`%::=(); J\->${\e"::"}\*(C'\fR has been fixed.
1548 [GH #14790] <https://github.com/Perl/perl5/issues/14790>
1549 .IP \(bu 4
1550 \&\f(CW\*(C`qr/(?[ () ])/\*(C'\fR no longer segfaults, giving a syntax error message instead.
1551 [perl #125805]
1552 .IP \(bu 4
1553 Regular expression possessive quantifier v5.20 regression now fixed.
1554 \&\f(CW\*(C`qr/\*(C'\fR\fIPAT\fR\f(CW\*(C`{\*(C'\fR\fImin\fR,\fImax\fR\f(CW\*(C`}+\*(C'\fR\f(CW\*(C`/\*(C'\fR is supposed to behave identically
1555 to \f(CW\*(C`qr/(?>\*(C'\fR\fIPAT\fR\f(CW\*(C`{\*(C'\fR\fImin\fR,\fImax\fR\f(CW\*(C`})/\*(C'\fR. Since v5.20, this didn't
1556 work if \fImin\fR and \fImax\fR were equal. [perl #125825]
1557 .IP \(bu 4
1558 \&\f(CW\*(C`BEGIN <>\*(C'\fR no longer segfaults and properly produces an error
1559 message. [perl #125341]
1560 .IP \(bu 4
1561 In \f(CW\*(C`tr///\*(C'\fR an illegal backwards range like \f(CW\*(C`tr/\ex{101}\-\ex{100}//\*(C'\fR was
1562 not always detected, giving incorrect results. This is now fixed.
1563 .SH Acknowledgements
1564 .IX Header "Acknowledgements"
1565 Perl 5.24.0 represents approximately 11 months of development since Perl 5.24.0
1566 and contains approximately 360,000 lines of changes across 1,800 files from 75
1567 authors.
1568 .PP
1569 Excluding auto-generated files, documentation and release tools, there were
1570 approximately 250,000 lines of changes to 1,200 .pm, .t, .c and .h files.
1571 .PP
1572 Perl continues to flourish into its third decade thanks to a vibrant community
1573 of users and developers. The following people are known to have contributed the
1574 improvements that became Perl 5.24.0:
1575 .PP
1576 Aaron Crane, Aaron Priven, Abigail, Achim Gratz, Alexander D'Archangel, Alex
1577 Vandiver, Andreas König, Andy Broad, Andy Dougherty, Aristotle Pagaltzis,
1578 Chase Whitener, Chas. Owens, Chris 'BinGOs' Williams, Craig A. Berry, Dagfinn
1579 Ilmari Mannsåker, Dan Collins, Daniel Dragan, David Golden, David Mitchell,
1580 Doug Bell, Dr.Ruud, Ed Avis, Ed J, Father Chrysostomos, Herbert Breunung,
1581 H.Merijn Brand, Hugo van der Sanden, Ivan Pozdeev, James E Keenan, Jan Dubois,
1582 Jarkko Hietaniemi, Jerry D. Hedden, Jim Cromie, John Peacock, John SJ Anderson,
1583 Karen Etheridge, Karl Williamson, kmx, Leon Timmermans, Ludovic E. R.
1584 Tolhurst-Cleaver, Lukas Mai, Martijn Lievaart, Matthew Horsfall, Mattia Barbon,
1585 Max Maischein, Mohammed El-Afifi, Nicholas Clark, Nicolas R., Niko Tyni, Peter
1586 John Acklam, Peter Martini, Peter Rabbitson, Pip Cet, Rafael Garcia-Suarez,
1587 Reini Urban, Ricardo Signes, Sawyer X, Shlomi Fish, Sisyphus, Stanislaw Pusep,
1588 Steffen Müller, Stevan Little, Steve Hay, Sullivan Beck, Thomas Sibley, Todd
1589 Rinaldo, Tom Hukins, Tony Cook, Unicode Consortium, Victor Adam, Vincent Pit,
1590 Vladimir Timofeev, Yves Orton, Zachary Storer, Zefram.
1591 .PP
1592 The list above is almost certainly incomplete as it is automatically generated
1593 from version control history. In particular, it does not include the names of
1594 the (very much appreciated) contributors who reported issues to the Perl bug
1595 tracker.
1596 .PP
1597 Many of the changes included in this version originated in the CPAN modules
1598 included in Perl's core. We're grateful to the entire CPAN community for
1599 helping Perl to flourish.
1600 .PP
1601 For a more complete list of all of Perl's historical contributors, please see
1602 the \fIAUTHORS\fR file in the Perl source distribution.
1603 .SH "Reporting Bugs"
1604 .IX Header "Reporting Bugs"
1605 If you find what you think is a bug, you might check the articles recently
1606 posted to the comp.lang.perl.misc newsgroup and the perl bug database at
1607 https://rt.perl.org/ . There may also be information at
1608 http://www.perl.org/ , the Perl Home Page.
1609 .PP
1610 If you believe you have an unreported bug, please run the perlbug program
1611 included with your release. Be sure to trim your bug down to a tiny but
1612 sufficient test case. Your bug report, along with the output of \f(CW\*(C`perl \-V\*(C'\fR,
1613 will be sent off to [email protected] to be analysed by the Perl porting team.
1614 .PP
1615 If the bug you are reporting has security implications which make it
1616 inappropriate to send to a publicly archived mailing list, then see
1617 "SECURITY VULNERABILITY CONTACT INFORMATION" in perlsec
1618 for details of how to report the issue.
1619 .SH "SEE ALSO"
1620 .IX Header "SEE ALSO"
1621 The \fIChanges\fR file for an explanation of how to view exhaustive details on
1622 what changed.
1623 .PP
1624 The \fIINSTALL\fR file for how to build Perl.
1625 .PP
1626 The \fIREADME\fR file for general stuff.
1627 .PP
1628 The \fIArtistic\fR and \fICopying\fR files for copyright information.