Debian Codegraph @

upstream/opensuse-tumbleweed/man1/perl5400delta.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 "PERL5400DELTA 1"
61 .TH PERL5400DELTA 1 2026-03-09 "perl v5.42.1" "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 perl5400delta \- what is new for perl v5.40.0
68 .SH DESCRIPTION
69 .IX Header "DESCRIPTION"
70 This document describes differences between the 5.38.0 release and the 5.40.0
71 release.
72 .SH "Core Enhancements"
73 .IX Header "Core Enhancements"
74 .ie n .SS "New ""_\|_CLASS_\|_"" Keyword"
75 .el .SS "New \f(CW_\|_CLASS_\|_\fP Keyword"
76 .IX Subsection "New __CLASS__ Keyword"
77 When using the new \f(CW\*(C`class\*(C'\fR feature, code inside a method, \f(CW\*(C`ADJUST\*(C'\fR block or
78 field initializer expression is now permitted to use the new \f(CW\*(C`_\|_CLASS_\|_\*(C'\fR
79 keyword. This yields a class name, similar to \f(CW\*(C`_\|_PACKAGE_\|_\*(C'\fR, but whereas that
80 gives the compile\-time package that the code appears in, the \f(CW\*(C`_\|_CLASS_\|_\*(C'\fR
81 keyword is aware of the actual run\-time class that the object instance is a
82 member of. This makes it useful for method dispatch on that class, especially
83 during constructors, where access to \f(CW$self\fR is not permitted.
84 .PP
85 For more information, see "_\|_CLASS_\|_" in perlfunc.
86 .ie n .SS """:reader"" attribute for field variables"
87 .el .SS "\f(CW:reader\fP attribute for field variables"
88 .IX Subsection ":reader attribute for field variables"
89 When using the \f(CW\*(C`class\*(C'\fR feature, field variables can now take a \f(CW\*(C`:reader\*(C'\fR
90 attribute. This requests that an accessor method be automatically created
91 that simply returns the value of the field variable from the given instance.
92 .PP
93 .Vb 1
94 \& field $name :reader;
95 .Ve
96 .PP
97 Is equivalent to
98 .PP
99 .Vb 2
100 \& field $name;
101 \& method name () { return $name; }
102 .Ve
103 .PP
104 An alternative name can also be provided:
105 .PP
106 .Vb 1
107 \& field $name :reader(get_name);
108 .Ve
109 .PP
110 For more detail, see ":reader" in perlclass.
111 .ie n .SS "Permit a space in ""\-M"" command\-line option"
112 .el .SS "Permit a space in \f(CW\-M\fP command\-line option"
113 .IX Subsection "Permit a space in -M command-line option"
114 When processing command\-line options, perl now allows a space between the
115 \&\f(CW\*(C`\-M\*(C'\fR switch and the name of the module after it.
116 .PP
117 .Vb 1
118 \& $ perl \-M Data::Dumper=Dumper \-E \*(Aqsay Dumper [1,2,3]\*(Aq
119 .Ve
120 .PP
121 This matches the existing behaviour of the \f(CW\*(C`\-I\*(C'\fR option.
122 .ie n .SS "Restrictions to ""use VERSION"" declarations"
123 .el .SS "Restrictions to \f(CWuse VERSION\fP declarations"
124 .IX Subsection "Restrictions to use VERSION declarations"
125 In Perl 5.36, a deprecation warning was added when downgrading a
126 \&\f(CW\*(C`use VERSION\*(C'\fR declaration from one above version 5.11, to below. This has
127 now been made a fatal error.
128 .PP
129 Additionally, it is now a fatal error to issue a subsequent \f(CW\*(C`use VERSION\*(C'\fR
130 declaration when another is in scope, when either version is 5.39 or above.
131 This is to avoid complications surrounding imported lexical functions from
132 builtin. A deprecation warning has also been added for any other
133 subsequent \f(CW\*(C`use VERSION\*(C'\fR declaration below version 5.39, to warn that it
134 will no longer be permitted in Perl version 5.44.
135 .ie n .SS "New ""builtin::inf"" and ""builtin::nan"" functions (experimental)"
136 .el .SS "New \f(CWbuiltin::inf\fP and \f(CWbuiltin::nan\fP functions (experimental)"
137 .IX Subsection "New builtin::inf and builtin::nan functions (experimental)"
138 Two new functions, \f(CW\*(C`inf\*(C'\fR and \f(CW\*(C`nan\*(C'\fR, have been added to the \f(CW\*(C`builtin\*(C'\fR
139 namespace. These act like constants that yield the floating\-point infinity
140 and Not\-a\-Number value respectively.
141 .ie n .SS "New ""^^"" logical xor operator"
142 .el .SS "New \f(CW^^\fP logical xor operator"
143 .IX Subsection "New ^^ logical xor operator"
144 Perl has always had three low\-precedence logical operators \f(CW\*(C`and\*(C'\fR, \f(CW\*(C`or\*(C'\fR and
145 \&\f(CW\*(C`xor\*(C'\fR, as well as three high\-precedence bitwise versions \f(CW\*(C`&\*(C'\fR, \f(CW\*(C`^\*(C'\fR and \f(CW\*(C`|\*(C'\fR.
146 Until this release, while the medium\-precedence logical operators of \f(CW\*(C`&&\*(C'\fR and
147 \&\f(CW\*(C`||\*(C'\fR were also present, there was no exclusive\-or equivalent. This release
148 of Perl adds the final \f(CW\*(C`^^\*(C'\fR operator, completing the set.
149 .PP
150 .Vb 1
151 \& $x ^^ $y and say "One of x or y is true, but not both";
152 .Ve
153 .ie n .SS """try""/""catch"" feature is no longer experimental"
154 .el .SS "\f(CWtry\fP/\f(CWcatch\fP feature is no longer experimental"
155 .IX Subsection "try/catch feature is no longer experimental"
156 Prior to this release, the \f(CW\*(C`try\*(C'\fR/\f(CW\*(C`catch\*(C'\fR feature for handling errors was
157 considered experimental. Introduced in Perl version 5.34.0, this is now
158 considered a stable language feature and its use no longer prints a warning.
159 It still must be enabled with the \*(Aqtry\*(Aq feature.
160 .PP
161 See "Try Catch Exception Handling" in perlsyn.
162 .ie n .SS """for"" iterating over multiple values at a time is no longer experimental"
163 .el .SS "\f(CWfor\fP iterating over multiple values at a time is no longer experimental"
164 .IX Subsection "for iterating over multiple values at a time is no longer experimental"
165 Prior to this release, iterating over multiple values at a time with \f(CW\*(C`for\*(C'\fR was
166 considered experimental. Introduced in Perl version 5.36.0, this is now
167 considered a stable language feature and its use no longer prints a warning.
168 See "Compound Statements" in perlsyn.
169 .ie n .SS """builtin"" module is no longer experimental"
170 .el .SS "\f(CWbuiltin\fP module is no longer experimental"
171 .IX Subsection "builtin module is no longer experimental"
172 Prior to this release, the builtin module and all of its functions were
173 considered experimental. Introduced in Perl version 5.36.0, this module is now
174 considered stable its use no longer prints a warning. However, several of its
175 functions are still considered experimental.
176 .ie n .SS "The "":5.40"" feature bundle adds ""try"""
177 .el .SS "The \f(CW:5.40\fP feature bundle adds \f(CWtry\fP"
178 .IX Subsection "The :5.40 feature bundle adds try"
179 The latest version feature bundle now contains the recently\-stablized feature
180 \&\f(CW\*(C`try\*(C'\fR. As this feature bundle is used by the \f(CW\*(C`\-E\*(C'\fR commandline switch, these
181 are immediately available in \f(CW\*(C`\-E\*(C'\fR scripts.
182 .ie n .SS """use v5.40;"" imports builtin functions"
183 .el .SS "\f(CWuse v5.40;\fP imports builtin functions"
184 .IX Subsection "use v5.40; imports builtin functions"
185 In addition to importing a feature bundle, \f(CW\*(C`use v5.40;\*(C'\fR (or later versions)
186 imports the corresponding builtin version bundle.
187 .SH Security
188 .IX Header "Security"
189 .SS "CVE\-2023\-47038 \- Write past buffer end via illegal user\-defined Unicode property"
190 .IX Subsection "CVE-2023-47038 - Write past buffer end via illegal user-defined Unicode property"
191 This vulnerability was reported directly to the Perl security team by
192 Nathan Mills \f(CW\*(C`[email protected]\*(C'\fR.
193 .PP
194 A crafted regular expression when compiled by perl 5.30.0 through
195 5.38.0 can cause a one\-byte attacker controlled buffer overflow in a
196 heap allocated buffer.
197 .SS "CVE\-2023\-47039 \- Perl for Windows binary hijacking vulnerability"
198 .IX Subsection "CVE-2023-47039 - Perl for Windows binary hijacking vulnerability"
199 This vulnerability was reported to the Intel Product Security Incident
200 Response Team (PSIRT) by GitHub user ycdxsb
201 <https://github.com/ycdxsb/WindowsPrivilegeEscalation>. PSIRT then
202 reported it to the Perl security team.
203 .PP
204 Perl for Windows relies on the system path environment variable to
205 find the shell (\f(CW\*(C`cmd.exe\*(C'\fR). When running an executable which uses
206 Windows Perl interpreter, Perl attempts to find and execute \f(CW\*(C`cmd.exe\*(C'\fR
207 within the operating system. However, due to path search order issues,
208 Perl initially looks for cmd.exe in the current working directory.
209 .PP
210 An attacker with limited privileges can exploit this behavior by
211 placing \f(CW\*(C`cmd.exe\*(C'\fR in locations with weak permissions, such as
212 \&\f(CW\*(C`C:\eProgramData\*(C'\fR. By doing so, when an administrator attempts to use
213 this executable from these compromised locations, arbitrary code can
214 be executed.
215 .SH "Incompatible Changes"
216 .IX Header "Incompatible Changes"
217 .SS "reset EXPR now calls set\-magic on scalars"
218 .IX Subsection "reset EXPR now calls set-magic on scalars"
219 Previously \f(CW\*(C`reset EXPR\*(C'\fR did not call set magic when clearing scalar variables.
220 This meant that changes did not propagate to the underlying internal state
221 where needed, such as for \f(CW$^W\fR, and did not result in an exception where the
222 underlying magic would normally throw an exception, such as for \f(CW$1\fR.
223 .PP
224 This means code that had no effect before may now actually have an effect,
225 including possibly throwing an exception.
226 .PP
227 \&\f(CW\*(C`reset EXPR\*(C'\fR already called set magic when modifying arrays and hashes.
228 .PP
229 This has no effect on plain \f(CW\*(C`reset\*(C'\fR used to reset one\-match searches as with
230 \&\f(CW\*(C`m?pattern?\*(C'\fR.
231 .PP
232 [GH #20763 <https://github.com/Perl/perl5/issues/20763>]
233 .SS "Calling the import method of an unknown package produces a warning"
234 .IX Subsection "Calling the import method of an unknown package produces a warning"
235 Historically, it has been possible to call the \f(CW\*(C`import\*(C'\fR or \f(CW\*(C`unimport\*(C'\fR method of
236 any class, including ones which have not been defined, with an argument and not
237 experience an error. For instance, this code will not throw an error in Perl
238 5.38:
239 .PP
240 .Vb 1
241 \& Class::That::Does::Not::Exist\->import("foo");
242 .Ve
243 .PP
244 However, as of Perl 5.39.1 this is deprecated and will issue a warning. Note
245 that calling these methods with no arguments continues to silently succeed and
246 do nothing. For instance,
247 .PP
248 .Vb 1
249 \& Class::That::Does::Not::Exist\->import();
250 .Ve
251 .PP
252 will continue to not throw an error. This is because every class
253 implicitly inherits from the class UNIVERSAL which now defines an
254 \&\f(CW\*(C`import\*(C'\fR method. In older perls there was no such method defined,
255 and instead the method calls for \f(CW\*(C`import\*(C'\fR and \f(CW\*(C`unimport\*(C'\fR were special
256 cased to not throw errors if there was no such method defined.
257 .PP
258 This change has been added because it makes it easier to detect case typos in
259 \&\f(CW\*(C`use\*(C'\fR statements when running on case\-insensitive file systems. For instance,
260 on Windows or other platforms with case\-insensitive file systems on older perls
261 the following code
262 .PP
263 .Vb 1
264 \& use STRICT \*(Aqrefs\*(Aq;
265 .Ve
266 .PP
267 would silently do nothing as the module is actually called \fIstrict.pm\fR, not
268 \&\fISTRICT.pm\fR, so it would be loaded but its import method would never be called.
269 It will also detect cases where a user passes an argument when using a package
270 that does not provide its own import, for instance most "pure" class
271 definitions do not define an import method.
272 .ie n .SS """return"" no longer allows an indirect object"
273 .el .SS "\f(CWreturn\fP no longer allows an indirect object"
274 .IX Subsection "return no longer allows an indirect object"
275 The \f(CW\*(C`return\*(C'\fR operator syntax now rejects indirect objects. In most
276 cases this would compile and even run, but wasn\*(Aqt documented and could
277 produce confusing results, for example:
278 .PP
279 .Vb 8
280 \& # note that sum hasn\*(Aqt been defined
281 \& sub sum_positive {
282 \& return sum grep $_ > 0, @_;
283 \& # unexpectedly parsed as:
284 \& # return *sum, grep $_ > 0, @_;
285 \& # ... with the bareword acting like an extra (typeglob) argument
286 \& }
287 \& say for sum_positive(\-1, 2, 3)
288 .Ve
289 .PP
290 produced:
291 .PP
292 .Vb 3
293 \& *main::sum
294 \& 2
295 \& 3
296 .Ve
297 .PP
298 [GH #21716 <https://github.com/Perl/perl5/issues/21716>]
299 .ie n .SS "Class barewords no longer resolved as file handles in method calls under ""no feature ""bareword_filehandles"""""
300 .el .SS "Class barewords no longer resolved as file handles in method calls under \f(CWno feature ""bareword_filehandles""\fP"
301 .IX Subsection "Class barewords no longer resolved as file handles in method calls under no feature ""bareword_filehandles"""
302 Under \f(CW\*(C`no feature "bareword_filehandles"\*(C'\fR bareword file handles
303 continued to be resolved in method calls:
304 .PP
305 .Vb 3
306 \& open FH, "<", $somefile or die;
307 \& no feature \*(Aqbareword_filehandles\*(Aq;
308 \& FH\->binmode;
309 .Ve
310 .PP
311 This has been fixed, so the:
312 .PP
313 .Vb 1
314 \& FH\->binmode;
315 .Ve
316 .PP
317 will attempt to resolve \f(CW\*(C`FH\*(C'\fR as a class, typically resulting in a
318 runtime error.
319 .PP
320 The standard file handles such as \f(CW\*(C`STDOUT\*(C'\fR continue to be resolved as
321 a handle:
322 .PP
323 .Vb 2
324 \& no feature \*(Aqbareword_filehandles\*(Aq;
325 \& STDOUT\->flush; # continues to work
326 .Ve
327 .PP
328 Note that once perl resolves a bareword name as a class it will
329 continue to do so:
330 .PP
331 .Vb 12
332 \& package SomeClass {
333 \& sub somemethod{}
334 \& }
335 \& open SomeClass, "<", "somefile" or die;
336 \& # SomeClass resolved as a handle
337 \& SomeClass\->binmode;
338 \& {
339 \& no feature "bareword_filehandles";
340 \& SomeClass\->somemethod;
341 \& }
342 \& # SomeClass resolved as a class
343 \& SomeClass\->binmode;
344 .Ve
345 .PP
346 [GH #19426 <https://github.com/Perl/perl5/issues/19426>]
347 .SH Deprecations
348 .IX Header "Deprecations"
349 .IP \(bu 4
350 Using \f(CW\*(C`goto\*(C'\fR to jump from an outer scope into an inner scope is deprecated
351 and will be removed completely in Perl 5.42. [GH #21601 <https://github.com/Perl/perl5/issues/21601>]
352 .SH "Performance Enhancements"
353 .IX Header "Performance Enhancements"
354 .IP \(bu 4
355 The negation OPs have been modified to support the generic \f(CW\*(C`TARGMY\*(C'\fR optimization.
356 [GH #21442 <https://github.com/Perl/perl5/issues/21442>]
357 .SH "Modules and Pragmata"
358 .IX Header "Modules and Pragmata"
359 .SS "New Modules and Pragmata"
360 .IX Subsection "New Modules and Pragmata"
361 .IP \(bu 4
362 Term::Table 0.018 has been added to the Perl core.
363 .Sp
364 This module is a dependency of Test2::Suite.
365 .IP \(bu 4
366 Test2::Suite 0.000162 has been added to the Perl core.
367 .Sp
368 This distribution contains a comprehensive set of test tools for writing unit
369 tests. It is the successor to Test::More and similar modules. Its
370 inclusion in the Perl core means that CPAN module tests can be written using
371 this suite of tools without extra dependencies.
372 .SS "Updated Modules and Pragmata"
373 .IX Subsection "Updated Modules and Pragmata"
374 .IP \(bu 4
375 Archive::Tar has been upgraded from version 2.40 to 3.02_001.
376 .IP \(bu 4
377 attributes has been upgraded from version 0.35 to 0.36.
378 .IP \(bu 4
379 autodie has been upgraded from version 2.36 to 2.37.
380 .IP \(bu 4
381 B has been upgraded from version 1.88 to 1.89.
382 .IP \(bu 4
383 B::Deparse has been upgraded from version 1.74 to 1.76.
384 .IP \(bu 4
385 Benchmark has been upgraded from version 1.24 to 1.25.
386 .IP \(bu 4
387 bignum has been upgraded from version 0.66 to 0.67.
388 .IP \(bu 4
389 builtin has been upgraded from version 0.008 to 0.014.
390 .Sp
391 builtin now accepts a version bundle as an input argument, requesting it to
392 import all of the functions that are considered a stable part of the module at
393 the given Perl version. For example:
394 .Sp
395 .Vb 1
396 \& use builtin \*(Aq:5.40\*(Aq;
397 .Ve
398 .Sp
399 Added the \f(CWload_module()\fR builtin function as per PPC 0006 <https://github.com/Perl/PPCs/blob/main/ppcs/ppc0006-load-module.md>.
400 .IP \(bu 4
401 bytes has been upgraded from version 1.08 to 1.09.
402 .IP \(bu 4
403 Compress::Raw::Bzip2 has been upgraded from version 2.204_001 to 2.212.
404 .IP \(bu 4
405 Compress::Raw::Zlib has been upgraded from version 2.204_001 to 2.212.
406 .IP \(bu 4
407 CPAN::Meta::Requirements has been upgraded from version 2.140 to 2.143.
408 .IP \(bu 4
409 Data::Dumper has been upgraded from version 2.188 to 2.189.
410 .IP \(bu 4
411 DB_File has been upgraded from version 1.858 to 1.859.
412 .IP \(bu 4
413 Devel::Peek has been upgraded from version 1.33 to 1.34.
414 .IP \(bu 4
415 Devel::PPPort has been upgraded from version 3.71 to 3.72.
416 .IP \(bu 4
417 diagnostics has been upgraded from version 1.39 to 1.40.
418 .IP \(bu 4
419 DynaLoader has been upgraded from version 1.54 to 1.56.
420 .IP \(bu 4
421 Encode has been upgraded from version 3.19 to 3.21.
422 .IP \(bu 4
423 Errno has been upgraded from version 1.37 to 1.38.
424 .Sp
425 The \f(CW\*(C`osvers\*(C'\fR and \f(CW\*(C`archname\*(C'\fR baked into the module to ensure Errno is loaded
426 by the perl that built it are now more comprehensively escaped.
427 [GH #21135 <https://github.com/Perl/perl5/issues/21135>]
428 .IP \(bu 4
429 experimental has been upgraded from version 0.031 to 0.032.
430 .IP \(bu 4
431 Exporter has been upgraded from version 5.77 to 5.78.
432 .IP \(bu 4
433 ExtUtils::CBuilder has been upgraded from version 0.280238 to 0.280240.
434 .IP \(bu 4
435 ExtUtils::Manifest has been upgraded from version 1.73 to 1.75.
436 .IP \(bu 4
437 ExtUtils::Miniperl has been upgraded from version 1.13 to 1.14.
438 .IP \(bu 4
439 Fcntl has been upgraded from version 1.15 to 1.18.
440 .Sp
441 The old module documentation stub has been greatly expanded and revised.
442 .Sp
443 Adds support for the \f(CW\*(C`O_TMPFILE\*(C'\fR flag on Linux.
444 .IP \(bu 4
445 feature has been upgraded from version 1.82 to 1.89.
446 .Sp
447 It now documents the \f(CW\*(C`:all\*(C'\fR feature bundle, and suggests a reason why you may
448 not wish to use it.
449 .IP \(bu 4
450 fields has been upgraded from version 2.24 to 2.25.
451 .IP \(bu 4
452 File::Compare has been upgraded from version 1.1007 to 1.1008.
453 .IP \(bu 4
454 File::Find has been upgraded from version 1.43 to 1.44.
455 .IP \(bu 4
456 File::Glob has been upgraded from version 1.40 to 1.42.
457 .IP \(bu 4
458 File::Spec has been upgraded from version 3.89 to 3.90.
459 .IP \(bu 4
460 File::stat has been upgraded from version 1.13 to 1.14.
461 .IP \(bu 4
462 FindBin has been upgraded from version 1.53 to 1.54.
463 .IP \(bu 4
464 Getopt::Long has been upgraded from version 2.54 to 2.57.
465 .IP \(bu 4
466 Getopt::Std has been upgraded from version 1.13 to 1.14.
467 .Sp
468 Documentation and test improvements only; no change in functionality.
469 .IP \(bu 4
470 Hash::Util has been upgraded from version 0.30 to 0.32.
471 .IP \(bu 4
472 Hash::Util::FieldHash has been upgraded from version 1.26 to 1.27.
473 .IP \(bu 4
474 HTTP::Tiny has been upgraded from version 0.086 to 0.088.
475 .IP \(bu 4
476 I18N::Langinfo has been upgraded from version 0.22 to 0.24.
477 .Sp
478 It now handles the additional locale categories that Linux defines
479 beyond those in the POSIX Standard.
480 .Sp
481 This fixes what is returned for the \f(CW\*(C`ALT_DIGITS\*(C'\fR item, which has never
482 before worked properly in Perl.
483 .IP \(bu 4
484 IO has been upgraded from version 1.52 to 1.55.
485 .Sp
486 Fixed \f(CW\*(C`IO::Handle/blocking\*(C'\fR on Windows, which has been non\-functional
487 since IO 1.32. [GH #17455 <https://github.com/Perl/perl5/issues/17455>]
488 .IP \(bu 4
489 IO\-Compress has been upgraded from version 2.204 to 2.212.
490 .IP \(bu 4
491 IO::Socket::IP has been upgraded from version 0.41_01 to 0.42.
492 .IP \(bu 4
493 IO::Zlib has been upgraded from version 1.14 to 1.15.
494 .IP \(bu 4
495 locale has been upgraded from version 1.10 to 1.12.
496 .IP \(bu 4
497 Math::BigInt has been upgraded from version 1.999837 to 2.003002.
498 .IP \(bu 4
499 Math::BigInt::FastCalc has been upgraded from version 0.5013 to 0.5018.
500 .IP \(bu 4
501 Module::CoreList has been upgraded from version 5.20230520 to 5.20240609.
502 .IP \(bu 4
503 Module::Metadata has been upgraded from version 1.000037 to 1.000038.
504 .IP \(bu 4
505 mro has been upgraded from version 1.28 to 1.29.
506 .IP \(bu 4
507 NDBM_File has been upgraded from version 1.16 to 1.17.
508 .IP \(bu 4
509 Opcode has been upgraded from version 1.64 to 1.65.
510 .IP \(bu 4
511 perl5db.pl has been upgraded from version 1.77 to 1.78.
512 .Sp
513 Made parsing of the \f(CW\*(C`l\*(C'\fR command arguments saner.
514 [GH #21350 <https://github.com/Perl/perl5/issues/21350>]
515 .IP \(bu 4
516 perlfaq has been upgraded from version 5.20210520 to 5.20240218.
517 .IP \(bu 4
518 PerlIO::encoding has been upgraded from version 0.30 to 0.31.
519 .IP \(bu 4
520 PerlIO::scalar has been upgraded from version 0.31 to 0.32.
521 .IP \(bu 4
522 PerlIO::via has been upgraded from version 0.18 to 0.19.
523 .IP \(bu 4
524 Pod::Checker has been upgraded from version 1.75 to 1.77.
525 .IP \(bu 4
526 Pod::Html has been upgraded from version 1.34 to 1.35.
527 .IP \(bu 4
528 Pod::Simple has been upgraded from version 3.43 to 3.45.
529 .IP \(bu 4
530 podlators has been upgraded from version 5.01 to 5.01_02.
531 .IP \(bu 4
532 POSIX has been upgraded from version 2.13 to 2.20.
533 .Sp
534 The \f(CW\*(C`mktime\*(C'\fR function now works correctly on 32\-bit platforms even if the
535 platform\*(Aqs \f(CW\*(C`time_t\*(C'\fR type is larger than 32 bits. [GH #21551 <https://github.com/Perl/perl5/issues/21551>]
536 .Sp
537 The \f(CW\*(C`T_SIGNO\*(C'\fR and \f(CW\*(C`T_FD\*(C'\fR typemap entries have been fixed so they work with
538 any variable name, rather than just the hardcoded \f(CW\*(C`sig\*(C'\fR and \f(CW\*(C`fd\*(C'\fR.
539 .Sp
540 The mappings for \f(CW\*(C`Mode_t\*(C'\fR, \f(CW\*(C`pid_t\*(C'\fR, \f(CW\*(C`Uid_t\*(C'\fR, \f(CW\*(C`Gid_t\*(C'\fR and \f(CW\*(C`Time_t\*(C'\fR have
541 been updated to be integer types; previously they were \f(CW\*(C`NV\*(C'\fR floating\-point.
542 .Sp
543 Adjusted the \fBsignbit()\fR on NaN test to handle the unusual bit pattern
544 returned for NaN by Oracle Developer Studio\*(Aqs compiler. [GH #21533 <https://github.com/Perl/perl5/issues/21533>]
545 .IP \(bu 4
546 re has been upgraded from version 0.44 to 0.47.
547 .IP \(bu 4
548 Safe has been upgraded from version 2.44 to 2.46.
549 .IP \(bu 4
550 SelfLoader has been upgraded from version 1.26 to 1.27.
551 .IP \(bu 4
552 Socket has been upgraded from version 2.036 to 2.038.
553 .IP \(bu 4
554 strict has been upgraded from version 1.12 to 1.13.
555 .IP \(bu 4
556 Test::Harness has been upgraded from version 3.44 to 3.48.
557 .IP \(bu 4
558 Test::Simple has been upgraded from version 1.302194 to 1.302199.
559 .IP \(bu 4
560 Text::Tabs has been upgraded from version 2021.0814 to 2024.001.
561 .IP \(bu 4
562 Text::Wrap has been upgraded from version 2021.0814 to 2024.001.
563 .IP \(bu 4
564 threads has been upgraded from version 2.36 to 2.40.
565 .Sp
566 An internal error has been made slightly more verbose
567 (\f(CW\*(C`Out of memory in perl:threads:ithread_create\*(C'\fR).
568 .IP \(bu 4
569 threads::shared has been upgraded from version 1.68 to 1.69.
570 .IP \(bu 4
571 Tie::File has been upgraded from version 1.07 to 1.09.
572 .Sp
573 Old compatibility code for perl 5.005 that was no longer functional has been
574 removed.
575 .IP \(bu 4
576 Time::gmtime has been upgraded from version 1.04 to 1.05.
577 .IP \(bu 4
578 Time::HiRes has been upgraded from version 1.9775 to 1.9777.
579 .IP \(bu 4
580 Time::Local has been upgraded from version 1.30 to 1.35.
581 .IP \(bu 4
582 Time::localtime has been upgraded from version 1.03 to 1.04.
583 .IP \(bu 4
584 Time::tm has been upgraded from version 1.00 to 1.01.
585 .IP \(bu 4
586 UNIVERSAL has been upgraded from version 1.15 to 1.17.
587 .IP \(bu 4
588 User::grent has been upgraded from version 1.04 to 1.05.
589 .IP \(bu 4
590 User::pwent has been upgraded from version 1.02 to 1.03.
591 .IP \(bu 4
592 version has been upgraded from version 0.9929 to 0.9930.
593 .IP \(bu 4
594 warnings has been upgraded from version 1.65 to 1.69.
595 .IP \(bu 4
596 XS::APItest has been upgraded from version 1.32 to 1.36.
597 .IP \(bu 4
598 XS::Typemap has been upgraded from version 0.19 to 0.20.
599 .SH Documentation
600 .IX Header "Documentation"
601 .SS "Changes to Existing Documentation"
602 .IX Subsection "Changes to Existing Documentation"
603 We have attempted to update the documentation to reflect the changes
604 listed in this document. If you find any we have missed, open an issue
605 at <https://github.com/Perl/perl5/issues>.
606 .PP
607 Additionally, the following selected changes have been made:
608 .PP
609 \fIperlapi\fR
610 .IX Subsection "perlapi"
611 .IP \(bu 4
612 Corrected the documentation for \f(CW\*(C`Perl_form\*(C'\fR,
613 \&\f(CW\*(C`form_nocontext\*(C'\fR, and \f(CW\*(C`vform\*(C'\fR, which claimed that any later call to one
614 of them will destroy the previous returns from any. This hasn\*(Aqt been true
615 since 5.6.0, except it does remain true if these are called during global
616 destruction. With that caveat, the return of each of these is a fresh
617 string in a temporary that will automatically be freed by a call to
618 "\f(CW\*(C`FREETMPS\*(C'\fR" in perlapi or at places such as statement boundaries.
619 .IP \(bu 4
620 Several internal functions now have documentation \- the various \f(CW\*(C`newSUB\*(C'\fR
621 functions, \f(CWnewANONLIST()\fR, \f(CWnewANONHASH()\fR, \f(CWnewSVREF()\fR and similar.
622 .PP
623 \fIperlclass\fR
624 .IX Subsection "perlclass"
625 .IP \(bu 4
626 Added a list of known bugs in the experimental \f(CW\*(C`class\*(C'\fR feature.
627 .PP
628 \fIperlfunc\fR
629 .IX Subsection "perlfunc"
630 .IP \(bu 4
631 The documentation for \f(CW\*(C`local\*(C'\fR,
632 \&\f(CW\*(C`my\*(C'\fR, \f(CW\*(C`our\*(C'\fR, and
633 \&\f(CW\*(C`state\*(C'\fR, has been updated to include examples
634 and descriptions of their effects within a statement.
635 .PP
636 \fIperlguts\fR
637 .IX Subsection "perlguts"
638 .IP \(bu 4
639 A new section has been added which describes the experimental
640 reference\-counted argument stack build option (\f(CW\*(C`PERL_RC_STACK\*(C'\fR).
641 .PP
642 \fIperlclib\fR
643 .IX Subsection "perlclib"
644 .IP \(bu 4
645 Extensive guidance has been added for interfacing with the standard C
646 library, including many more functions to avoid, and how to cope with
647 locales and threads.
648 .PP
649 \fIperlhacktips\fR
650 .IX Subsection "perlhacktips"
651 .IP \(bu 4
652 Document we can\*(Aqt use compound literals or array designators due to C++
653 compatibility. [GH #21073 <https://github.com/Perl/perl5/issues/21073>]
654 .IP \(bu 4
655 Document new functions \f(CWsv_mark_arenas()\fR and \f(CWsv_sweep_arenas()\fR
656 (which only exist on \f(CW\*(C`DEBUGGING\*(C'\fR builds)
657 .IP \(bu 4
658 Added brief documentation for some tools useful when developing perl
659 itself on Windows or Cygwin.
660 .PP
661 \fIperllol\fR
662 .IX Subsection "perllol"
663 .IP \(bu 4
664 Removed indirect object syntax in \f(CW\*(C`Dumpvalue\*(C'\fR example
665 .PP
666 \fIperlre\fR
667 .IX Subsection "perlre"
668 .IP \(bu 4
669 Removed statement suggesting \f(CW\*(C`/p\*(C'\fR is a no\-op.
670 .PP
671 \fIperlref\fR
672 .IX Subsection "perlref"
673 .IP \(bu 4
674 Documented ref assignment in list context (as part of the \f(CW\*(C`refaliasing\*(C'\fR feature)
675 .PP
676 \fIperlop\fR
677 .IX Subsection "perlop"
678 .IP \(bu 4
679 The section on the empty pattern \f(CW\*(C`//\*(C'\fR has been amended to mention that the current dynamic scope is
680 used to find the last successful match.
681 .PP
682 \fIperlport\fR
683 .IX Subsection "perlport"
684 .IP \(bu 4
685 The \f(CW\*(C`\-S\*(C'\fR file test has been meaningful on Win32 since 5.37.6
686 .IP \(bu 4
687 The \f(CW\*(C`\-l\*(C'\fR file test is now meaningful on Win32
688 .IP \(bu 4
689 Some strange behaviour with \f(CW\*(C`.\*(C'\fR at the end of names under Windows has been documented
690 .PP
691 \fIperlvar\fR
692 .IX Subsection "perlvar"
693 .IP \(bu 4
694 Added documentation for an alternative to \f(CW\*(C`${^CAPTURE}\*(C'\fR
695 .SH Diagnostics
696 .IX Header "Diagnostics"
697 The following additions or changes have been made to diagnostic output,
698 including warnings and fatal error messages. For the complete list of
699 diagnostic messages, see perldiag.
700 .SS "New Diagnostics"
701 .IX Subsection "New Diagnostics"
702 \fINew Errors\fR
703 .IX Subsection "New Errors"
704 .IP \(bu 4
705 Cannot use _\|_CLASS_\|_ outside of a method or field initializer expression
706 .Sp
707 (F) A \f(CW\*(C`_\|_CLASS_\|_\*(C'\fR expression yields the class name of the object instance
708 executing the current method, and therefore it can only be placed inside an
709 actual method (or method\-like expression, such as a field initializer
710 expression).
711 .IP \(bu 4
712 get_layers: unknown argument \*(Aq%s\*(Aq
713 .Sp
714 (F) You called \fBPerlIO::get_layers()\fR with an unknown argument. Legal
715 arguments are provided in key/value pairs, with the keys being one
716 of \f(CW\*(C`input\*(C'\fR, \f(CW\*(C`output\*(C'\fR or \f(CW\*(C`detail\*(C'\fR, followed by a boolean.
717 .IP \(bu 4
718 UNIVERSAL does not export anything
719 .Sp
720 (F) You asked UNIVERSAL to export something, but UNIVERSAL is the
721 base class for all classes and contains no exportable symbols.
722 .IP \(bu 4
723 Builtin version bundle "%s" is not supported by Perl
724 .Sp
725 (F) You attempted to \f(CW\*(C`use builtin :ver\*(C'\fR for a version number that is either
726 older than 5.39 (when the ability was added), or newer than the current perl
727 version.
728 .IP \(bu 4
729 Invalid version bundle "%s"
730 .Sp
731 (F) A version number that is used to specify an import bundle during a
732 \&\f(CW\*(C`use builtin ...\*(C'\fR statement must be formatted as \f(CW\*(C`:MAJOR.MINOR\*(C'\fR with an
733 optional third component, which is ignored. Each component must be a number
734 of 1 to 3 digits. No other characters are permitted. The value that was
735 specified does not conform to these rules.
736 .IP \(bu 4
737 Missing comma after first argument to return
738 .Sp
739 (F) While certain operators allow you to specify a filehandle or an
740 "indirect object" before the argument list, \f(CW\*(C`return\*(C'\fR isn\*(Aqt one of
741 them.
742 .IP \(bu 4
743 Out of memory during vec in lvalue context
744 .Sp
745 (F) An attempt was made to extend a string beyond the largest possible memory
746 allocation by assigning to \f(CWvec()\fR called with a large second argument.
747 .Sp
748 (This case used to throw a generic \f(CW\*(C`Out of memory!\*(C'\fR error.)
749 .IP \(bu 4
750 Cannot create an object of incomplete class "%s"
751 .Sp
752 (F) An attempt was made to create an object of a class where the start
753 of the class definition has been seen, but the class has not been
754 completed.
755 .Sp
756 This can happen for a failed eval, or if you attempt to create an
757 object at compile time before the class is complete:
758 .Sp
759 .Vb 2
760 \& eval "class Foo {"; Foo\->new; # error
761 \& class Bar { BEGIN { Bar\->new } }; # error
762 .Ve
763 .Sp
764 Previously perl would assert or crash. [GH #22159 <https://github.com/Perl/perl5/issues/22159>]
765 .PP
766 \fINew Warnings\fR
767 .IX Subsection "New Warnings"
768 .IP \(bu 4
769 Forked open \*(Aq%s\*(Aq not meaningful in <>
770 .Sp
771 (S inplace) You had \f(CW\*(C`|\-\*(C'\fR or \f(CW\*(C`\-|\*(C'\fR in \f(CW@ARGV\fR and tried to use \f(CW\*(C`<>\*(C'\fR to read from it.
772 .Sp
773 Previously this would fork and produce a confusing error message. [GH #21176 <https://github.com/Perl/perl5/issues/21176>]
774 .IP \(bu 4
775 Attempt to call undefined \f(CW%s\fR method with arguments ("%s"%s) via package "%s" (Perhaps you forgot to load the package?)
776 .Sp
777 (D deprecated::missing_import_called_with_args) You called the
778 \&\f(CWimport()\fR or \f(CWunimport()\fR method of a class that has no import method
779 defined in its inheritance graph, and passed an argument to the method.
780 This is very often the sign of a misspelled package name in a use or
781 require statement that has silently succeeded due to a case insensitive
782 file system.
783 .Sp
784 Another common reason this may happen is when mistakenly attempting to
785 import or unimport a symbol from a class definition or package which
786 does not use \f(CW\*(C`Exporter\*(C'\fR or otherwise define its own \f(CW\*(C`import\*(C'\fR or
787 \&\f(CW\*(C`unimport\*(C'\fR method.
788 .SS "Changes to Existing Diagnostics"
789 .IX Subsection "Changes to Existing Diagnostics"
790 .IP \(bu 4
791 Name "%s::%s" used only once: possible typo
792 .Sp
793 This warning now honors being marked as fatal. [GH #13814 <https://github.com/Perl/perl5/issues/13814>]
794 .IP \(bu 4
795 Out of memory in perl:%s
796 .Sp
797 There used to be several places in the perl core that would print a generic
798 \&\f(CW\*(C`Out of memory!\*(C'\fR message and abort when memory allocation failed, giving no
799 indication which program it was that ran out of memory. These have been
800 modified to include the word \f(CW\*(C`perl\*(C'\fR and the general area of the allocation
801 failure, e.g. \f(CW\*(C`Out of memory in perl:util:safesysrealloc\*(C'\fR. [GH #21672 <https://github.com/Perl/perl5/issues/21672>]
802 .IP \(bu 4
803 Possible precedence issue with control flow operator (%s)
804 .Sp
805 This warning now mentions the name of the control flow operator that triggered
806 the diagnostic (e.g. \f(CW\*(C`return\*(C'\fR, \f(CW\*(C`exit\*(C'\fR, \f(CW\*(C`die\*(C'\fR, etc).
807 .Sp
808 It also covers more cases: Previously, the warning was only triggered if a
809 low\-precedence logical operator (like \f(CW\*(C`and\*(C'\fR, \f(CW\*(C`or\*(C'\fR, \f(CW\*(C`xor\*(C'\fR) was involved. Now
810 it is also shown for misleading code like this:
811 .Sp
812 .Vb 2
813 \& exit $x ? 0 : 1; # actually parses as: exit($x) ? 0 : 1;
814 \& exit $x == 0; # actually parses as: exit($x) == 0;
815 .Ve
816 .IP \(bu 4
817 Use of uninitialized value%s
818 .Sp
819 This warning is now slightly more accurate in cases involving \f(CW\*(C`length\*(C'\fR,
820 \&\f(CW\*(C`pop\*(C'\fR, \f(CW\*(C`shift\*(C'\fR, or \f(CW\*(C`splice\*(C'\fR:
821 .Sp
822 .Vb 6
823 \& my $x;
824 \& length($x) == 0
825 \& # Before:
826 \& # Use of uninitialized value $x in numeric eq (==) at ...
827 \& # Now:
828 \& # Use of uninitialized value length($x) in numeric eq (==) at ...
829 .Ve
830 .Sp
831 That is, the warning no longer implies that \f(CW$x\fR was used directly as an
832 operand of \f(CW\*(C`==\*(C'\fR, which it wasn\*(Aqt.
833 .Sp
834 Similarly:
835 .Sp
836 .Vb 6
837 \& my @xs;
838 \& shift @xs == 0
839 \& # Before:
840 \& # Use of uninitialized value within @xs in numeric eq (==) at ...
841 \& # Now:
842 \& # Use of uninitialized value shift(@xs) in numeric eq (==) at ...
843 .Ve
844 .Sp
845 This is more accurate because there never was an \f(CW\*(C`undef\*(C'\fR within \f(CW@xs\fR as the
846 warning implied. (The warning for \f(CW\*(C`pop\*(C'\fR works analogously.)
847 .Sp
848 Finally:
849 .Sp
850 .Vb 6
851 \& my @xs = (1, 2, 3);
852 \& splice(@xs, 0, 0) == 0
853 \& # Before:
854 \& # Use of uninitialized value within @xs in numeric eq (==) at ...
855 \& # Now:
856 \& # Use of uninitialized value in numeric eq (==) at ...
857 .Ve
858 .Sp
859 That is, in cases where \f(CW\*(C`splice\*(C'\fR returns \f(CW\*(C`undef\*(C'\fR, it no longer
860 unconditionally blames its first argument. This was misleading because
861 \&\f(CW\*(C`splice\*(C'\fR can return \f(CW\*(C`undef\*(C'\fR even if none of its arguments contain \f(CW\*(C`undef\*(C'\fR.
862 .Sp
863 [GH #21930 <https://github.com/Perl/perl5/issues/21930>]
864 .IP \(bu 4
865 Old package separator "\*(Aq" deprecated
866 .Sp
867 Prevent this warning appearing spuriously when checking the heuristic for the
868 You need to quote "%s" warning.
869 .Sp
870 [GH #22145 <https://github.com/Perl/perl5/issues/22145>]
871 .SH "Configuration and Compilation"
872 .IX Header "Configuration and Compilation"
873 .IP \(bu 4
874 \&\f(CW\*(C`microperl\*(C'\fR, long broken and of unclear present purpose, has been removed
875 as promised in Perl 5.18.
876 .IP \(bu 4
877 Fix here\-doc used for code to probe \f(CW\*(C`LC_ALL\*(C'\fR syntax for disparate
878 locales introduced in 5.39.2. [GH #21451 <https://github.com/Perl/perl5/issues/21451>]
879 .IP \(bu 4
880 You can now separately enable high water mark checks for non\-DEBUGGING
881 or disable them for DEBUGGING builds with \f(CW\*(C`\-Accflags=\-DPERL_USE_HWM\*(C'\fR
882 or \f(CW\*(C`\-Accflags=\-DPERL_NO_HWM\*(C'\fR respectively. The default remains the
883 same. [GH #16607 <https://github.com/Perl/perl5/issues/16607>]
884 .SH Testing
885 .IX Header "Testing"
886 Tests were added and changed to reflect the other additions and
887 changes in this release. Furthermore, these significant changes were
888 made:
889 .IP \(bu 4
890 Update \fInm\fR output parsing for Darwin in \fIt/porting/libperl.t\fR to handle
891 changes in the output of nm on Darwin.
892 [GH #21117 <https://github.com/Perl/perl5/issues/21117>]
893 .IP \(bu 4
894 \&\fIt/op/magic.t\fR would fail when \f(CW\*(C`ps\*(C'\fR was the BusyBox implementation,
895 since that doesn\*(Aqt support the \f(CW\*(C`\-p\*(C'\fR flag and otherwise ignores a
896 process id on the command\-line. This caused \fITEST\fR failures on
897 BusyBox systems such as Alpine Linux. [GH #17542 <https://github.com/Perl/perl5/issues/17542>]
898 .IP \(bu 4
899 \&\fIporting/globvar.t\fR now uses the more portable \f(CW\*(C`nm \-P ...\*(C'\fR to fetch
900 the names defined in an object file. The parsing of the names found
901 in the object is now separated from processing them to handle the
902 duplication between local and global definitions on AIX. [GH #21637 <https://github.com/Perl/perl5/issues/21637>]
903 .IP \(bu 4
904 A test was added to \fIlib/locale_threads.t\fR that extensively stress
905 tests locale handling. It turns out that the libc implementations on
906 various platforms have bugs in this regard, including Linux, Windows,
907 *BSD derivatives including Darwin, and others. Experimental versions of
908 this test have been used in the past few years to find bugs in the Perl
909 implementation and in those platforms, as well as to develop workarounds
910 in the Perl implementation, where feasible, for the platform bugs.
911 Multiple bug report tickets have been filed against platforms, and some
912 have been fixed. The test checks that platforms that purport to support
913 thread\-safe locale handling actually do so (and that perl works properly
914 on those that do; The read\-only variable \f(CW\*(C`${^SAFE_LOCALES}\*(C'\fR is set to
915 1 if perl thinks the platform can handle this, whatever the platform\*(Aqs
916 documentation says).
917 .Sp
918 Also tested for is if the various locale categories can indeed be set
919 independently to disparate locales. (An example of where you might want
920 to do this is if you are a Western Canadian living and working in
921 Holland. You likely will want to have the \f(CW\*(C`LC_MONETARY\*(C'\fR locale be
922 set to where you are living, but have the other parts of your locale
923 retain your native English values. Later, as you get a bit more
924 comfortable with Dutch, and in order to communicate better with your
925 colleagues, you might want to change \f(CW\*(C`LC_TIME\*(C'\fR and \f(CW\*(C`LC_NUMERIC\*(C'\fR to
926 Dutch, while leaving \f(CW\*(C`LC_CTYPE\*(C'\fR and \f(CW\*(C`LC_COLLATE\*(C'\fR set to English
927 indefinitely.)
928 .IP \(bu 4
929 The test \fIt/porting/libperl.t\fR will no longer run in maint releases.
930 This test is sensitive to changes in the output of \fInm\fR on various
931 platforms, and tarballs aren\*(Aqt updated as we update this test in
932 blead. [GH #21677 <https://github.com/Perl/perl5/issues/21677>]
933 .SH "Platform Support"
934 .IX Header "Platform Support"
935 .SS "New Platforms"
936 .IX Subsection "New Platforms"
937 .IP "Serenity OS" 4
938 .IX Item "Serenity OS"
939 Out of the box support for Serenity OS was added.
940 .SS "Platform\-Specific Notes"
941 .IX Subsection "Platform-Specific Notes"
942 .IP Windows 4
943 .IX Item "Windows"
944 Eliminated several header build warnings under MSVC with \f(CW\*(C`/W4\*(C'\fR to reduce noise
945 for embedders. [GH #21031 <https://github.com/Perl/perl5/issues/21031>]
946 .Sp
947 Work around a bug in most 32\-bit Mingw builds, where the generated
948 code, including the code in the gcc support library, assumes 16\-byte
949 stack alignment, which 32\-bit Windows does not preserve. [GH #21313 <https://github.com/Perl/perl5/issues/21313>]
950 .Sp
951 Enable \f(CW\*(C`copysign\*(C'\fR, \f(CW\*(C`signbit\*(C'\fR, \f(CW\*(C`acosh\*(C'\fR, \f(CW\*(C`asinh\*(C'\fR, \f(CW\*(C`atanh\*(C'\fR, \f(CW\*(C`exp2\*(C'\fR,
952 \&\f(CW\*(C`tgamma\*(C'\fR in the bundled configuration used for MSVC. [GH #21610 <https://github.com/Perl/perl5/issues/21610>]
953 .Sp
954 The build process no longer supports Visual Studio 2013. This was
955 failing to build at a very basic level and there have been no reports
956 of such failures. [GH #21624 <https://github.com/Perl/perl5/issues/21624>]
957 .IP Linux 4
958 .IX Item "Linux"
959 The hints file has been updated to handle the Intel oneAPI DPC++/C++ compiler.
960 .IP MacOS/Darwin 4
961 .IX Item "MacOS/Darwin"
962 Don\*(Aqt set \f(CW\*(C`MACOSX_DEPLOYMENT_TARGET\*(C'\fR when building on OS X 10.5. [GH
963 #21367 <https://github.com/Perl/perl5/issues/21367>]
964 .IP VMS 4
965 .IX Item "VMS"
966 Fixed the configure "installation prefix" prompt to accept a string rather than
967 yes/no.
968 .Sp
969 Fixed compilation by defining proper value for
970 \&\f(CW\*(C`perl_lc_all_category_positions_init\*(C'\fR.
971 .Sp
972 Increased buffer size when reading \fIconfig_H.SH\fR to fix compilation under
973 clang.
974 .IP "Oracle Developer Studio (Solaris, Oracle Linux)" 4
975 .IX Item "Oracle Developer Studio (Solaris, Oracle Linux)"
976 Due to an apparent code generation bug, the default optimization level
977 for the Oracle Developer Studio (formerly Sun Workshop) compiler is
978 now \f(CW\*(C`\-xO1\*(C'\fR. [GH #21535 <https://github.com/Perl/perl5/issues/21535>]
979 .SH "Internal Changes"
980 .IX Header "Internal Changes"
981 .IP \(bu 4
982 \&\f(CW\*(C`PERL_RC_STACK\*(C'\fR build option added.
983 .Sp
984 This new build option is highly experimental and is not enabled by
985 default. Perl can be built with it by using the \fIConfigure\fR option
986 \&\f(CW\*(C`\-Accflags=\*(Aq\-DPERL_RC_STACK\*(Aq\*(C'\fR.
987 .Sp
988 It makes the argument stack bump the reference count of SVs pushed onto
989 it. It is mostly functional, but currently slow and incomplete.
990 .Sp
991 It is intended in the long term that this build option will become
992 the default option, and then finally the only option; but this will be
993 many releases away.
994 .Sp
995 In particular, there is currently no support within XS code for using
996 these new features. So under this build option, all XS functions are
997 called via a backwards\-compatibility wrapper which slows down such calls.
998 .Sp
999 In future releases, better support for XS code is intended to be added.
1000 It is expected that straightforward XS code will eventually be able to
1001 make use of a reference\-counted stack without modification, with any heavy
1002 lifting being handled by the XS compiler (\f(CW\*(C`xsubpp\*(C'\fR) and the macros which
1003 it outputs. But code which implements \fBPP()\fR functions will eventually have
1004 to be modified to use a new PP API: \fBrpp_foo()\fR rather than \fBPUSHs()\fR etc. But
1005 this new API is not yet stable, nor has it yet been back\-ported via
1006 \&\f(CW\*(C`Devel::PPPort\*(C'\fR.
1007 .Sp
1008 See perlguts for more
1009 details.
1010 .IP \(bu 4
1011 A new API function has been added that simplifies C (or XS) code that creates
1012 \&\f(CW\*(C`LISTOP\*(C'\fR optree fragments. \f(CWnewLISTOPn()\fR is a variadic function that takes
1013 a \f(CW\*(C`NULL\*(C'\fR\-terminated list of child op pointers, and constructs a new checked
1014 \&\f(CW\*(C`LISTOP\*(C'\fR to contain them all. This is simpler than creating a new plain
1015 \&\f(CW\*(C`OP_LIST\*(C'\fR, adding each child individually, and finally calling
1016 \&\f(CWop_convert_list()\fR in most code fragments.
1017 .IP \(bu 4
1018 The \f(CWeval_sv()\fR API now accepts the \f(CW\*(C`G_USEHINTS\*(C'\fR flag, which uses
1019 the hints such as strict and features from \f(CW\*(C`PL_curcop\*(C'\fR instead of the
1020 default, which is to use default hints, e.g. no \f(CW\*(C`use vX.XX;\*(C'\fR, no
1021 strict, default features.
1022 .Sp
1023 Beware if you use this flag in XS code: your evaluated code will need
1024 to support whatever strictness or features are in effect at the point
1025 your XS function is called.
1026 .Sp
1027 [GH #21415 <https://github.com/Perl/perl5/issues/21415>]
1028 .IP \(bu 4
1029 \&\f(CW\*(C`PERL_VERSION_LE\*(C'\fR has been fixed to properly check for "less than or equal"
1030 rather than "less than".
1031 .IP \(bu 4
1032 \&\f(CW\*(C`dAX\*(C'\fR, \f(CW\*(C`dITEMS\*(C'\fR and hence \f(CW\*(C`dXSARGS\*(C'\fR now declare \f(CW\*(C`AX\*(C'\fR and \f(CW\*(C`items\*(C'\fR
1033 as \f(CW\*(C`Stack_off_t\*(C'\fR rather than \f(CW\*(C`SSize_t\*(C'\fR. This reverts back to
1034 compatibility with pre\-64\-bit stack support for default builds of perl
1035 where \f(CW\*(C`Stack_off_t\*(C'\fR is \f(CW\*(C`I32\*(C'\fR. [GH #21782 <https://github.com/Perl/perl5/issues/21782>]
1036 .IP \(bu 4
1037 A new function is now available to \f(CW\*(C`XS\*(C'\fR code, "sv_langinfo" in perlapi.
1038 This provides the same information as the existing
1039 "Perl_langinfo8" in perlapi, but returns an SV instead of a \f(CW\*(C`char\ *\*(C'\fR,
1040 so that programmers don\*(Aqt have to concern themselves with the UTF\-8ness
1041 of the result. This new function is now the preferred interface for
1042 \&\f(CW\*(C`XS\*(C'\fR code to the \fBnl_langinfo\fR\|(3) \f(CW\*(C`libc\*(C'\fR function. From Perl space,
1043 this information continues to be provided by the I18N::Langinfo
1044 module.
1045 .IP \(bu 4
1046 glibc has an undocumented equivalent function to \fBquerylocale()\fR, which
1047 our experience indicates is reliable. When this is function is used,
1048 it removes the need for perl to keep its own records, hence is more
1049 efficient and guaranteed to be accurate. Use of this function can be
1050 disabled by defining the \f(CW\*(C`NO_NL_LOCALE_NAME\*(C'\fR build option
1051 .SH "Selected Bug Fixes"
1052 .IX Header "Selected Bug Fixes"
1053 .IP \(bu 4
1054 The delimiter \f(CW\*(C`SYRIAC COLON SKEWED LEFT/RIGHT\*(C'\fR pair has been removed
1055 from the ones recognized by the \f(CW\*(C`extra_paired_delimiters\*(C'\fR feature.
1056 (See "Quote and Quote\-like Operators" in perlop.) This is because those
1057 characters are normally written right\-to\-left, and this could be
1058 visually confusing [GH #22228 <https://github.com/Perl/perl5/issues/22228>].
1059 The change was actually to forbid any right\-to\-left delimiters, but this
1060 pair is the only current instance that meets this criterion. By policy,
1061 this change means that the \f(CW\*(C`extra_paired_delimiters\*(C'\fR feature cannot be
1062 considered to have been stable long enough for its experimental status to
1063 be removed.
1064 .IP \(bu 4
1065 \&\f(CW\*(C`use 5.36;\*(C'\fR or later didn\*(Aqt enable the post parse reporting of Name
1066 "%s::%s" used only once: possible typo warnings when enabling warnings.
1067 [GH #21271 <https://github.com/Perl/perl5/issues/21271>]
1068 .IP \(bu 4
1069 Fix a crash or assertion when cleaning up a closure that refers to an
1070 outside \f(CW\*(C`our\*(C'\fR sub. [GH #21067 <https://github.com/Perl/perl5/issues/21067>]
1071 .IP \(bu 4
1072 Fixed a number of issues where \f(CW\*(C`I32\*(C'\fR was used as a string offset or
1073 size rather than \f(CW\*(C`SSize_t\*(C'\fR or \f(CW\*(C`STRLEN\*(C'\fR/\f(CW\*(C`size_t\*(C'\fR [GH #21012 <https://github.com/Perl/perl5/issues/21012>]
1074 .IP \(bu 4
1075 \&\f(CW\*(C`~$str\*(C'\fR when \f(CW$str\fR was more than 2GB in size would do nothing or
1076 produce an incomplete result.
1077 .IP \(bu 4
1078 String repeat, \f(CW\*(C`$str x $count\*(C'\fR, didn\*(Aqt handle \f(CW$str\fR over 2GB in
1079 size, throwing an error. Now such strings are repeated.
1080 .IP \(bu 4
1081 Complex substitution after the 2GB point in a string could access
1082 incorrect or invalid offsets in the string.
1083 .IP \(bu 4
1084 \&\fBsv_utf8_decode()\fR would truncate the SVs \fBpos()\fR value. This wasn\*(Aqt
1085 visible via \fButf8::decode()\fR.
1086 .IP \(bu 4
1087 When compiling a constant folded hash key, the length was truncated
1088 when creating the shared SV. Since hash keys over 2GB are not
1089 supported, throw a compilation error instead.
1090 .IP \(bu 4
1091 \&\fBmsgrcv()\fR incorrectly called get magic on the buffer SV and failed to
1092 call set magic on completion.
1093 [GH #21012 <https://github.com/Perl/perl5/issues/21012>]
1094 .IP \(bu 4
1095 \&\fBmsgrcv()\fR used the size parameter to resize the buffer before
1096 validating it. [GH #21012 <https://github.com/Perl/perl5/issues/21012>]
1097 .IP \(bu 4
1098 Inheriting from a class that was hierarchically an ancestor of the new
1099 class, eg. \f(CW\*(C` class A::B :isa(A) { ... } \*(C'\fR, would not attempt to load
1100 the parent class. [GH #21332 <https://github.com/Perl/perl5/issues/21332>]
1101 .IP \(bu 4
1102 Declared references can now be used with \f(CW\*(C`state\*(C'\fR variables.
1103 [GH #21351 <https://github.com/Perl/perl5/issues/21351>]
1104 .IP \(bu 4
1105 Trailing elements in an \f(CW\*(C`unshift\*(C'\fRed and resized array will now always be
1106 initialized. [GH #21265 <https://github.com/Perl/perl5/issues/21265>]
1107 .IP \(bu 4
1108 Make \f(CW\*(C`use 5.036\*(C'\fR respect the \-X flag
1109 .Sp
1110 perl\*(Aqs \-X flag disables all warnings globally, but «use 5.036» didn\*(Aqt
1111 respect that until now. [GH #21431 <https://github.com/Perl/perl5/issues/21431>]
1112 .IP \(bu 4
1113 Fixed an OP leak when an error was produced for initializer for a class
1114 field. [GH #20812 <https://github.com/Perl/perl5/issues/20812>]
1115 .IP \(bu 4
1116 Fixed a leak of the return value when smartmatching against a code reference.
1117 .IP \(bu 4
1118 Fixed a slowdown in repeated substitution replacements using special
1119 variables, such as \f(CW\*(C`s/....x$1/g\*(C'\fR. It actually makes all string
1120 concatenations involving such "magic" variables less slow, but the
1121 slowdown was more noticeable on repeated substitutions due to extra memory
1122 usage that was only freed after the last iteration. The slowdown started
1123 in perl 5.28.0 \- which generally sped up string concatenation but slowed
1124 down when using special variables.
1125 [GH #21360 <https://github.com/Perl/perl5/issues/21360>]
1126 .IP \(bu 4
1127 Lexical names from the enclosing scope in a lexical sub or closure
1128 weren\*(Aqt visible to code executed by calling \f(CW\*(C`eval EXPR;\*(C'\fR from the
1129 \&\f(CW\*(C`DB\*(C'\fR package. This was introduced in 5.18 in an attempt to prevent
1130 subs from retaining a reference to their outer scope, but this broke
1131 the special behaviour of \f(CW\*(C`eval EXPR;\*(C'\fR in package DB.
1132 .Sp
1133 This incidentally fixed a TODO test for \f(CW\*(C`B::Deparse\*(C'\fR.
1134 [GH #19370 <https://github.com/Perl/perl5/pull/19370>]
1135 .IP \(bu 4
1136 Optionally support an argument stack over 2**32 entries on 64\-bit
1137 platforms. This requires 32GB of memory just for the argument stack
1138 pointers itself, so you will require a significantly more memory to
1139 take advantage of this.
1140 .Sp
1141 To enable this add \f(CW\*(C`\-Accflags=\-DPERL_STACK_OFFSET_SSIZET\*(C'\fR or
1142 equivalent to the \f(CW\*(C`Configure\*(C'\fR command\-line.
1143 .Sp
1144 [GH #20917 <https://github.com/Perl/perl5/issues/20917>]
1145 [GH #21523 <https://github.com/Perl/perl5/issues/21523>]
1146 .IP \(bu 4
1147 Fixed various problems with \fBjoin()\fR where modifications to the
1148 separator could be handled inconsistently, or could access released
1149 memory. Changes to the separator from magic or overloading for values
1150 in the \f(CW\*(C`LIST\*(C'\fR no longer have an effect on the resulting joined
1151 string.
1152 [GH #21458 <https://github.com/Perl/perl5/issues/21458>]
1153 .IP \(bu 4
1154 Don\*(Aqt clear the integer flag \f(CW\*(C`IOK\*(C'\fR from lines in the \f(CW\*(C`@{"_<$sourcefile"}\*(C'\fR array when a \f(CW\*(C`dbstate\*(C'\fR op is removed for that
1155 line. This was broken when fixing
1156 [GH #19198 <https://github.com/Perl/perl5/issues/19198>].
1157 [GH #21564 <https://github.com/Perl/perl5/issues/21564>]
1158 .IP \(bu 4
1159 Many bug fixes have been made for using locales under threads and in
1160 embedded perls. And workarounds for libc bugs have been added. As a
1161 result thread\-safe locale handling is now the default under OpenBSD, and
1162 MingW when compiled with UCRT.
1163 .Sp
1164 However, testing has shown that Darwin\*(Aqs implementation of thread\-safe
1165 locale handling has bugs. So now Perl doesn\*(Aqt attempt to use the
1166 thread\-safe operations when compiled on Darwin.
1167 .Sp
1168 As before, you can check to see if your program is running with
1169 thread\-safe locales by checking if the value of \f(CW\*(C`${^SAFE_LOCALES}\*(C'\fR is
1170 1.
1171 .IP \(bu 4
1172 Various bugs have been fixed when perl is configured with
1173 \&\f(CW\*(C`\-Accflags=\-DNO_LOCALE_NUMERIC\*(C'\fR or any other locale category (or
1174 categories).
1175 .IP \(bu 4
1176 Not all locale categories need be set to the same locale. Perl now
1177 works around bugs in the libc implementations of locale handling on some
1178 platforms that previously could result in mojibake.
1179 .IP \(bu 4
1180 \&\f(CW\*(C`LC_ALL\*(C'\fR is represented in one of two ways when not all locale
1181 categories are set to the same locale. On some platforms, such as Linux
1182 and Windows, the representation is of the form of a series of
1183 \&\f(CW\*(Aqcategory=locale\-name\*(Aq\fR pairs. On other platforms, such as *BSD, the
1184 representation is positional like \f(CW\*(C`\fR\f(CIname1\fR\f(CW\ /\ \fR\f(CIname2\fR\f(CW\ /\ ...\ \*(C'\fR.
1185 \&\fIname1\fR is always for a particular category as defined by the platform,
1186 as are the other names. The sequence that separates the names
1187 (the \f(CW\*(C`\ /\ \*(C'\fR above) also varies by platform. Previously, perl had
1188 problems with platforms that used the positional notation. This is now
1189 fixed.
1190 .IP \(bu 4
1191 A bug has been fixed in the regexp engine with an optimisation that applies
1192 to the \f(CW\*(C`+\*(C'\fR quantifier where it was followed by a \f(CW\*(C`(*SKIP)\*(C'\fR pattern.
1193 .Sp
1194 [GH #21534 <https://github.com/Perl/perl5/issues/21534>]
1195 .IP \(bu 4
1196 The tmps (mortal) stack now grows exponentially. Previously it grew
1197 linearly, so if it was growing incrementally, such as through many
1198 calls to \fBsv_2mortal()\fR, on a system where \fBrealloc()\fR is O(size), the
1199 performance would be O(n*n). With exponential grows this changes to
1200 amortized O(n). [GH #21654 <https://github.com/Perl/perl5/issues/21654>]
1201 .IP \(bu 4
1202 Lexical subs now have a new stub in the pad for each recursive call
1203 into the containing function. This fixes two problems:
1204 .RS 4
1205 .IP \(bu 4
1206 If the lexical sub called the containing function, a "Can\*(Aqt undef
1207 active subroutine" error would be thrown. For example:
1208 .Sp
1209 .Vb 8
1210 \& use v5.36.0;
1211 \& sub outer($oc) {
1212 \& my sub inner ($c) {
1213 \& outer($c\-1) if $c; # Can\*(Aqt undef active subroutine
1214 \& }
1215 \& inner($oc);
1216 \& }
1217 \& outer(2);
1218 .Ve
1219 .Sp
1220 [GH #18606 <https://github.com/Perl/perl5/issues/18606>]
1221 .IP \(bu 4
1222 If the lexical sub was called from a recursive call into the
1223 containing function, this would overwrite the bindings to the closed
1224 over variables in the lexical sub, so calls into the lexical sub from
1225 the outer recursive call would have access to the variables from the
1226 inner recursive call:
1227 .Sp
1228 .Vb 11
1229 \& use v5.36.0;
1230 \& sub outer ($x) {
1231 \& my sub inner ($label) {
1232 \& say "$label $x";
1233 \& }
1234 \& inner("first");
1235 \& outer("inner") if $x eq "outer";
1236 \& # this call to inner() sees the wrong $x
1237 \& inner("second");
1238 \& }
1239 \& outer("outer");
1240 .Ve
1241 .Sp
1242 [GH #21987 <https://github.com/Perl/perl5/issues/21987>]
1243 .RE
1244 .RS 4
1245 .RE
1246 .IP \(bu 4
1247 \&\fBprepare_export_lexical()\fR was separately saving \f(CW\*(C`PL_comppad\*(C'\fR and
1248 \&\f(CW\*(C`PL_curpad\*(C'\fR, this could result in \f(CW\*(C`PL_curpad\*(C'\fR being restored to a no
1249 longer valid value, resulting in a panic when importing lexicals in
1250 some cases. [GH #21981 <https://github.com/Perl/perl5/issues/21981>]
1251 .IP \(bu 4
1252 A string \fBeval()\fR operation in the scope of a \f(CW\*(C`use VERSION\*(C'\fR declaration would
1253 sometimes emit spurious "Downgrading a use VERSION declaration" warnings due
1254 to an inconsistency in the way the version number was stored. This is now
1255 fixed.
1256 [GH #22121 <https://github.com/Perl/perl5/issues/22121>]
1257 .SH "Known Problems"
1258 .IX Header "Known Problems"
1259 .IP \(bu 4
1260 perlivp is missing streamzip on Windows
1261 .Sp
1262 The \f(CW\*(C`streamzip\*(C'\fR utility does not get installed on Windows but should
1263 get installed.
1264 .SH "Errata From Previous Releases"
1265 .IX Header "Errata From Previous Releases"
1266 .IP \(bu 4
1267 perl5300delta has been updated to include the removal of the \f(CW\*(C`arybase\*(C'\fR module that happened at
1268 the same time as the removal of \f(CW$[\fR.
1269 .SH Acknowledgements
1270 .IX Header "Acknowledgements"
1271 Perl 5.40.0 represents approximately 11 months of development since Perl
1272 5.38.0 and contains approximately 160,000 lines of changes across 1,500
1273 files from 75 authors.
1274 .PP
1275 Excluding auto\-generated files, documentation and release tools, there were
1276 approximately 110,000 lines of changes to 1,200 .pm, .t, .c and .h files.
1277 .PP
1278 Perl continues to flourish into its fourth decade thanks to a vibrant
1279 community of users and developers. The following people are known to have
1280 contributed the improvements that became Perl 5.40.0:
1281 .PP
1282 Abe Timmerman, Alexander Kanavin, Amory Meltzer, Aristotle Pagaltzis, Arne
1283 Johannessen, Beckett Normington, Bernard Quatermass, Bernd, Bruno Meneguele,
1284 Chad Granum, Chris \*(AqBinGOs\*(Aq Williams, Christoph Lamprecht, Craig A. Berry,
1285 Dagfinn Ilmari Mannsåker, Dan Book, Dan Church, Daniel Böhmer, Dan
1286 Jacobson, Dan Kogai, David Golden, David Mitchell, E. Choroba, Elvin
1287 Aslanov, Erik Huelsmann, Eugen Konkov, Gianni Ceccarelli, Graham Knop, Greg
1288 Kennedy, guoguangwu, Hauke D, H.Merijn Brand, Hugo van der Sanden, iabyn,
1289 Jake Hamby, Jakub Wilk, James E Keenan, James Raspass, Joe McMahon, Johan
1290 Vromans, John Karr, Karen Etheridge, Karl Williamson, Leon Timmermans, Lukas
1291 Mai, Marco Fontani, Marek Rouchal, Martijn Lievaart, Mathias Kende, Matthew
1292 Horsfall, Max Maischein, Nicolas Mendoza, Nicolas R, OpossumPetya, Paul
1293 Evans, Paul Marquess, Peter John Acklam, Philippe Bruhat (BooK), Raul E
1294 Rangel, Renee Baecker, Ricardo Signes, Richard Leach, Scott Baker, Sevan
1295 Janiyan, Sisyphus, Steve Hay, TAKAI Kousuke, Todd Rinaldo, Tomasz Konojacki,
1296 Tom Hughes, Tony Cook, William Lyu, x\-yuri, Yves Orton, Zakariyya Mughal,
1297 Дилян Палаузов.
1298 .PP
1299 The list above is almost certainly incomplete as it is automatically
1300 generated from version control history. In particular, it does not include
1301 the names of the (very much appreciated) contributors who reported issues to
1302 the Perl bug tracker.
1303 .PP
1304 Many of the changes included in this version originated in the CPAN modules
1305 included in Perl\*(Aqs core. We\*(Aqre grateful to the entire CPAN community for
1306 helping Perl to flourish.
1307 .PP
1308 For a more complete list of all of Perl\*(Aqs historical contributors, please
1309 see the \fIAUTHORS\fR file in the Perl source distribution.
1310 .SH "Reporting Bugs"
1311 .IX Header "Reporting Bugs"
1312 If you find what you think is a bug, you might check the perl bug database
1313 at <https://github.com/Perl/perl5/issues>. There may also be information at
1314 <https://www.perl.org/>, the Perl Home Page.
1315 .PP
1316 If you believe you have an unreported bug, please open an issue at
1317 <https://github.com/Perl/perl5/issues>. Be sure to trim your bug down to a
1318 tiny but sufficient test case.
1319 .PP
1320 If the bug you are reporting has security implications which make it
1321 inappropriate to send to a public issue tracker, then see
1322 "SECURITY VULNERABILITY CONTACT INFORMATION" in perlsec
1323 for details of how to report the issue.
1324 .SH "Give Thanks"
1325 .IX Header "Give Thanks"
1326 If you wish to thank the Perl 5 Porters for the work we had done in Perl 5,
1327 you can do so by running the \f(CW\*(C`perlthanks\*(C'\fR program:
1328 .PP
1329 .Vb 1
1330 \& perlthanks
1331 .Ve
1332 .PP
1333 This will send an email to the Perl 5 Porters list with your show of thanks.
1334 .SH "SEE ALSO"
1335 .IX Header "SEE ALSO"
1336 The \fIChanges\fR file for an explanation of how to view exhaustive details on
1337 what changed.
1338 .PP
1339 The \fIINSTALL\fR file for how to build Perl.
1340 .PP
1341 The \fIREADME\fR file for general stuff.
1342 .PP
1343 The \fIArtistic\fR and \fICopying\fR files for copyright information.