Debian Codegraph @

upstream/fedora-44/man1/perl5360delta.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 "PERL5360DELTA 1"
61 .TH PERL5360DELTA 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 perl5360delta \- what is new for perl v5.36.0
68 .SH DESCRIPTION
69 .IX Header "DESCRIPTION"
70 This document describes differences between the 5.34.0 release and the 5.36.0
71 release.
72 .SH "Core Enhancements"
73 .IX Header "Core Enhancements"
74 .ie n .SS """use v5.36"""
75 .el .SS "\f(CWuse v5.36\fP"
76 .IX Subsection "use v5.36"
77 As always, \f(CW\*(C`use v5.36\*(C'\fR turns on the feature bundle for that version of Perl.
78 .PP
79 The 5.36 bundle enables the \f(CW\*(C`signatures\*(C'\fR feature. Introduced in Perl version
80 5.20.0, and modified several times since, the subroutine signatures feature is
81 now no longer considered experimental. It is now considered a stable language
82 feature and no longer prints a warning.
83 .PP
84 .Vb 1
85 \& use v5.36;
86 \&
87 \& sub add ($x, $y) {
88 \& return $x + $y;
89 \& }
90 .Ve
91 .PP
92 Despite this, certain elements of signatured subroutines remain experimental;
93 see below.
94 .PP
95 The 5.36 bundle enables the \f(CW\*(C`isa\*(C'\fR feature. Introduced in Perl version 5.32.0,
96 this operator has remained unchanged since then. The operator is now considered
97 a stable language feature. For more detail see "Class Instance
98 Operator" in perlop.
99 .PP
100 The 5.36 bundle also \fIdisables\fR the features \f(CW\*(C`indirect\*(C'\fR, and
101 \&\f(CW\*(C`multidimensional\*(C'\fR. These will forbid, respectively: the use of "indirect"
102 method calls (like \f(CW\*(C`$x = new Class;\*(C'\fR); the use of a list expression as a hash
103 key to simulate sparse multidimensional arrays. The specifics of these changes
104 can be found in feature, but the short version is: this is a bit like having
105 more \f(CW\*(C`use strict\*(C'\fR turned on, disabling features that cause more trouble than
106 they\*(Aqre worth.
107 .PP
108 Furthermore, \f(CW\*(C`use v5.36\*(C'\fR will also enable warnings as if you\*(Aqd written \f(CW\*(C`use
109 warnings\*(C'\fR.
110 .PP
111 Finally, with this release, the experimental \f(CW\*(C`switch\*(C'\fR feature, present in
112 every feature bundle since they were introduced in v5.10, has been removed from
113 the v5.36 bundle. If you want to use it (against our advice), you\*(Aqll have to
114 enable it explicitly.
115 .SS "\-g command\-line flag"
116 .IX Subsection "-g command-line flag"
117 A new command\-line flag, \-g, is available. It is a simpler alias for \-0777.
118 .PP
119 For more information, see "\-g" in perlrun.
120 .SS "Unicode 14.0 is supported"
121 .IX Subsection "Unicode 14.0 is supported"
122 See <https://www.unicode.org/versions/Unicode14.0.0/> for details.
123 .SS "regex sets are no longer considered experimental"
124 .IX Subsection "regex sets are no longer considered experimental"
125 Prior to this release, the regex sets feature (officially named
126 "Extended Bracketed Character Classes") was considered experimental.
127 Introduced in Perl version 5.18.0, and modified several times since,
128 this is now considered a stable language feature and its use no longer
129 prints a warning. See "Extended Bracketed Character
130 Classes" in perlrecharclass.
131 .SS "Variable length lookbehind is mostly no longer considered experimental"
132 .IX Subsection "Variable length lookbehind is mostly no longer considered experimental"
133 Prior to this release, any form of variable length lookbehind was
134 considered experimental. With this release the experimental status has
135 been reduced to cover only lookbehind that contains capturing parenthesis.
136 This is because it is not clear if
137 .PP
138 .Vb 1
139 \& "aaz"=~/(?=z)(?<=(a|aa))/
140 .Ve
141 .PP
142 should match and leave \f(CW$1\fR equaling "a" or "aa". Currently it will match
143 the longest possible alternative, "aa". While we are confident that the overall
144 construct will now match only when it should, we are not confident that we
145 will keep the current "longest match" behavior.
146 .SS "SIGFPE no longer deferred"
147 .IX Subsection "SIGFPE no longer deferred"
148 Floating\-point exceptions are now delivered immediately, in the same way
149 as other "fault"\-like signals such as SIGSEGV. This means one has at
150 least a chance to catch such a signal with a \f(CW$SIG{FPE}\fR handler, e.g.
151 so that \f(CW\*(C`die\*(C'\fR can report the line in perl that triggered it.
152 .SS "Stable boolean tracking"
153 .IX Subsection "Stable boolean tracking"
154 The "true" and "false" boolean values, often accessed by constructions like
155 \&\f(CW\*(C`!!0\*(C'\fR and \f(CW\*(C`!!1\*(C'\fR, as well as being returned from many core functions and
156 operators, now remember their boolean nature even through assignment into
157 variables. The new function \f(CWis_bool()\fR in builtin can check whether
158 a value has boolean nature.
159 .PP
160 This is likely to be useful when interoperating with other languages or
161 data\-type serialisation, among other places.
162 .SS "iterating over multiple values at a time (experimental)"
163 .IX Subsection "iterating over multiple values at a time (experimental)"
164 You can now iterate over multiple values at a time by specifying a list of
165 lexicals within parentheses. For example,
166 .PP
167 .Vb 2
168 \& for my ($key, $value) (%hash) { ... }
169 \& for my ($left, $right, $gripping) (@moties) { ... }
170 .Ve
171 .PP
172 Prior to perl v5.36, attempting to specify a list after \f(CW\*(C`for my\*(C'\fR was a syntax
173 error.
174 .PP
175 This feature is currently experimental and will cause a warning of category
176 \&\f(CW\*(C`experimental::for_list\*(C'\fR. For more detail see "Compound Statements" in perlsyn.
177 See also "builtin::indexed" in this document, which is a handy companion to
178 n\-at\-a\-time foreach.
179 .SS "builtin functions (experimental)"
180 .IX Subsection "builtin functions (experimental)"
181 A new core module builtin has been added, which provides documentation for
182 new always\-present functions that are built into the interpreter.
183 .PP
184 .Vb 1
185 \& say "Reference type of arrays is ", builtin::reftype([]);
186 .Ve
187 .PP
188 It also provides a lexical import mechanism for providing short name versions
189 of these functions.
190 .PP
191 .Vb 2
192 \& use builtin \*(Aqreftype\*(Aq;
193 \& say "Reference type of arrays is ", reftype([]);
194 .Ve
195 .PP
196 This builtin function mechanism and the functions it provides are all
197 currently \fBexperimental\fR. We expect that \f(CW\*(C`builtin\*(C'\fR itself will cease to be
198 experimental in the near future, but that individual functions in it may become
199 stable on an ongoing basis. Other functions will be added to \f(CW\*(C`builtin\*(C'\fR over
200 time.
201 .PP
202 For details, see builtin, but here\*(Aqs a summary of builtin functions in
203 v5.36:
204 .IP builtin::trim 4
205 .IX Item "builtin::trim"
206 This function treats its argument as a string, returning the result of removing
207 all white space at its beginning and ending.
208 .IP builtin::indexed 4
209 .IX Item "builtin::indexed"
210 This function returns a list twice as big as its argument list, where each item
211 is preceded by its index within that list. This is primarily useful for using
212 the new \f(CW\*(C`foreach\*(C'\fR syntax with multiple iterator variables to iterate over an
213 array or list, while also tracking the index of each item:
214 .Sp
215 .Vb 1
216 \& use builtin \*(Aqindexed\*(Aq;
217 \&
218 \& foreach my ($index, $val) (indexed @array) {
219 \& ...
220 \& }
221 .Ve
222 .IP "builtin::true, builtin::false, builtin::is_bool" 4
223 .IX Item "builtin::true, builtin::false, builtin::is_bool"
224 \&\f(CW\*(C`true\*(C'\fR and \f(CW\*(C`false\*(C'\fR return boolean true and false values. Perl is still perl,
225 and doesn\*(Aqt have strict typing of booleans, but these values will be known to
226 have been created as booleans. \f(CW\*(C`is_bool\*(C'\fR will tell you whether a value was
227 known to have been created as a boolean.
228 .IP "builtin::weaken, builtin::unweaken, builtin::is_weak" 4
229 .IX Item "builtin::weaken, builtin::unweaken, builtin::is_weak"
230 These functions will, respectively: weaken a reference; strengthen a reference;
231 and return whether a reference is weak. (A weak reference is not counted for
232 garbage collection purposes. See perlref.) These can take the place of
233 some similar routines in Scalar::Util.
234 .IP "builtin::blessed, builtin::refaddr, builtin::reftype" 4
235 .IX Item "builtin::blessed, builtin::refaddr, builtin::reftype"
236 These functions provide more data about references (or non\-references,
237 actually!) and can take the place of similar routines found in Scalar::Util.
238 .IP "builtin::ceil, builtin::floor" 4
239 .IX Item "builtin::ceil, builtin::floor"
240 \&\f(CW\*(C`ceil\*(C'\fR returns the smallest integer greater than or equal to its argument.
241 \&\f(CW\*(C`floor\*(C'\fR returns the largest integer less than or equal to its argument. These
242 can take the place of similar routines found in POSIX.
243 .ie n .SS """defer"" blocks (experimental)"
244 .el .SS "\f(CWdefer\fP blocks (experimental)"
245 .IX Subsection "defer blocks (experimental)"
246 This release adds support for \f(CW\*(C`defer\*(C'\fR blocks, which are blocks of code
247 prefixed by the \f(CW\*(C`defer\*(C'\fR modifier. They provide a section of code which runs
248 at a later time, during scope exit.
249 .PP
250 In brief, when a \f(CW\*(C`defer\*(C'\fR block is reached at runtime, its body is set aside to
251 be run when the enclosing scope is exited. It is unlike a UNITCHECK (among
252 other reasons) in that if the block \fIcontaining\fR the \f(CW\*(C`defer\*(C'\fR block is exited
253 before the block is reached, it will not be run.
254 .PP
255 \&\f(CW\*(C`defer\*(C'\fR blocks can be used to take the place of "scope guard" objects where an
256 object is passed a code block to be run by its destructor.
257 .PP
258 For more information, see "defer blocks" in perlsyn.
259 .ie n .SS "try/catch can now have a ""finally"" block (experimental)"
260 .el .SS "try/catch can now have a \f(CWfinally\fP block (experimental)"
261 .IX Subsection "try/catch can now have a finally block (experimental)"
262 The experimental \f(CW\*(C`try\*(C'\fR/\f(CW\*(C`catch\*(C'\fR syntax has been extended to support an
263 optional third block introduced by the \f(CW\*(C`finally\*(C'\fR keyword.
264 .PP
265 .Vb 10
266 \& try {
267 \& attempt();
268 \& print "Success\en";
269 \& }
270 \& catch ($e) {
271 \& print "Failure\en";
272 \& }
273 \& finally {
274 \& print "This happens regardless\en";
275 \& }
276 .Ve
277 .PP
278 This provides code which runs at the end of the \f(CW\*(C`try\*(C'\fR/\f(CW\*(C`catch\*(C'\fR construct,
279 even if aborted by an exception or control\-flow keyword. They are similar
280 to \f(CW\*(C`defer\*(C'\fR blocks.
281 .PP
282 For more information, see "Try Catch Exception Handling" in perlsyn.
283 .SS "non\-ASCII delimiters for quote\-like operators (experimental)"
284 .IX Subsection "non-ASCII delimiters for quote-like operators (experimental)"
285 Perl traditionally has allowed just four pairs of string/pattern
286 delimiters: \f(CW\*(C`(\ )\*(C'\fR \f(CW\*(C`{\ }\*(C'\fR \f(CW\*(C`[\ ]\*(C'\fR and \f(CW\*(C`<\ >\*(C'\fR, all in the
287 ASCII range. Unicode has hundreds more possibilities, and using this
288 feature enables many of them. When enabled, you can say \f(CW\*(C`qr«\ »\*(C'\fR for
289 example, or \f(CW\*(C`use\ utf8;\ q𝄃string𝄂\*(C'\fR. See "The
290 \&\*(Aqextra_paired_delimiters\*(Aq feature" in feature for details.
291 .ie n .SS "@_ is now experimental within signatured subs"
292 .el .SS "\f(CW@_\fP is now experimental within signatured subs"
293 .IX Subsection "@_ is now experimental within signatured subs"
294 Even though subroutine signatures are now stable, use of the legacy arguments
295 array (\f(CW@_\fR) with a subroutine that has a signature \fIremains\fR experimental,
296 with its own warning category. Silencing the \f(CW\*(C`experimental::signatures\*(C'\fR
297 warning category is not sufficient to dismiss this. The new warning is emitted
298 with the category name \f(CW\*(C`experimental::args_array_with_signatures\*(C'\fR.
299 .PP
300 Any subroutine that has a signature and tries to make use of the defaults
301 argument array or an element thereof (\f(CW@_\fR or \f(CW$_[INDEX]\fR), either
302 explicitly or implicitly (such as \f(CW\*(C`shift\*(C'\fR or \f(CW\*(C`pop\*(C'\fR with no argument) will
303 provoke a warning at compile\-time:
304 .PP
305 .Vb 1
306 \& use v5.36;
307 \&
308 \& sub f ($x, $y = 123) {
309 \& say "The first argument is $_[0]";
310 \& }
311 .Ve
312 .PP
313
314 .PP
315 .Vb 2
316 \& Use of @_ in array element with signatured subroutine is experimental
317 \& at file.pl line 4.
318 .Ve
319 .PP
320 The behaviour of code which attempts to do this is no longer specified, and
321 may be subject to change in a future version.
322 .SH "Incompatible Changes"
323 .IX Header "Incompatible Changes"
324 .SS "A physically empty sort is now a compile\-time error"
325 .IX Subsection "A physically empty sort is now a compile-time error"
326 .Vb 3
327 \& @a = sort @empty; # unaffected
328 \& @a = sort; # now a compile\-time error
329 \& @a = sort (); # also a compile\-time error
330 .Ve
331 .PP
332 A bare sort used to be a weird way to create an empty list; now it croaks
333 at compile time. This change is intended to free up some of the syntax space
334 for possible future enhancements to \f(CW\*(C`sort\*(C'\fR.
335 .SH Deprecations
336 .IX Header "Deprecations"
337 .ie n .SS """use VERSION"" (where VERSION is below v5.11) after ""use v5.11"" is deprecated"
338 .el .SS "\f(CWuse VERSION\fP (where VERSION is below v5.11) after \f(CWuse v5.11\fP is deprecated"
339 .IX Subsection "use VERSION (where VERSION is below v5.11) after use v5.11 is deprecated"
340 When in the scope of \f(CW\*(C`use v5.11\*(C'\fR or later, a \f(CW\*(C`use vX\*(C'\fR line where \fIX\fR is
341 lower than v5.11 will now issue a warning:
342 .PP
343 .Vb 1
344 \& Downgrading a use VERSION declaration to below v5.11 is deprecated
345 .Ve
346 .PP
347 For example:
348 .PP
349 .Vb 4
350 \& use v5.14;
351 \& say "The say statement is permitted";
352 \& use v5.8; # This will print a warning
353 \& print "We must use print\en";
354 .Ve
355 .PP
356 This is because the Perl team plans to change the behavior in this case. Since
357 Perl v5.12 (and parts of v5.11), strict is enabled \fIunless it had previously
358 been disabled\fR. In other words:
359 .PP
360 .Vb 3
361 \& no strict;
362 \& use v5.12; # will not enable strict, because "no strict" preceded it
363 \& $x = 1; # permitted, despite no "my" declaration
364 .Ve
365 .PP
366 In the future, this behavior will be eliminated and \f(CW\*(C`use VERSION\*(C'\fR will
367 \&\fIalways\fR enable strict for versions v5.12 and later.
368 .PP
369 Code which wishes to mix versions in this manner should use lexical scoping
370 with block syntax to ensure that the differently versioned regions remain
371 lexically isolated.
372 .PP
373 .Vb 4
374 \& {
375 \& use v5.14;
376 \& say "The say statement is permitted";
377 \& }
378 \&
379 \& {
380 \& use v5.8; # No warning is emitted
381 \& print "We must use print\en";
382 \& }
383 .Ve
384 .PP
385 Of course, this is probably not something you ever need to do! If the first
386 block compiles, it means you\*(Aqre using perl v5.14.0 or later.
387 .SH "Performance Enhancements"
388 .IX Header "Performance Enhancements"
389 .IP \(bu 4
390 We now probe for compiler support for C11 thread local storage, and where
391 available use this for "implicit context" for XS extensions making API calls for
392 a threaded Perl build. This requires fewer function calls at the C level than
393 POSIX thread specific storage. We continue to use the pthreads approach if
394 the C11 approach is not available.
395 .Sp
396 \&\fIConfigure\fR run with the defaults will build an unthreaded Perl (which is
397 slightly faster), but most operating systems ship a threaded Perl.
398 .IP \(bu 4
399 Perl can now be configured to no longer allocate keys for large hashes
400 from the shared string table.
401 .Sp
402 The same internal datatype (\f(CW\*(C`PVHV\*(C'\fR) is used for all of
403 .RS 4
404 .IP \(bu 4
405 Symbol tables
406 .IP \(bu 4
407 Objects (by default)
408 .IP \(bu 4
409 Associative arrays
410 .RE
411 .RS 4
412 .Sp
413 The shared string table was originally added to improve performance for blessed
414 hashes used as objects, because every object instance has the same keys, so it
415 is an optimisation to share memory between them. It also makes sense for symbol
416 tables, where derived classes will have the same keys (typically method names),
417 and the OP trees built for method calls can also share memory. The shared
418 string table behaves roughly like a cache for hash keys.
419 .Sp
420 But for hashes actually used as associative arrays \- mapping keys to values \-
421 typically the keys are not re\-used in other hashes. For example, "seen" hashes
422 are keyed by object IDs (or addresses), and logically these keys won\*(Aqt repeat
423 in other hashes.
424 .Sp
425 Storing these "used just once" keys in the shared string table increases CPU
426 and RAM use for no gain. For such keys the shared string table behaves as a
427 cache with a 0% hit rate. Storing all the keys there increases the total size
428 of the shared string table, as well as increasing the number of times it is
429 resized as it grows. \fBWorse\fR \- in any environment that has "copy on write"
430 memory for child process (such as a pre\-forking server), the memory pages used
431 for the shared string table rapidly need to be copied as the child process
432 manipulates hashes. Hence if most of the shared string table is such that keys
433 are used only in one place, there is no benefit from re\-use within the perl
434 interpreter, but a high cost due to more pages for the OS to copy.
435 .Sp
436 The perl interpreter can now be Configured to disable shared hash keys
437 for "large" hashes (that are neither objects nor symbol tables). To do
438 so, add \f(CW\*(C`\-Accflags=\*(Aq\-DPERL_USE_UNSHARED_KEYS_IN_LARGE_HASHES\*(Aq\*(C'\fR to
439 your \fIConfigure\fR options. "Large" is a heuristic \-\- currently the
440 heuristic is that sharing is disabled when adding a key to a hash
441 triggers allocation of more storage, and the hash has more than 42 keys.
442 .Sp
443 This \fBmight\fR cause slightly increased memory usage for programs that create
444 (unblessed) data structures that contain multiple large hashes that share the
445 same keys. But generally our testing suggests that for the specific cases
446 described it is a win, and other code is unaffected.
447 .RE
448 .IP \(bu 4
449 In certain scenarios, creation of new scalars is now noticeably faster.
450 .Sp
451 For example, the following code is now executing ~30% faster:
452 .Sp
453 .Vb 4
454 \& $str = "A" x 64;
455 \& for (0..1_000_000) {
456 \& @svs = split //, $str
457 \& }
458 .Ve
459 .Sp
460 (You can read more about this one in [perl
461 #19414] <https://github.com/Perl/perl5/pull/19414>.)
462 .SH "Modules and Pragmata"
463 .IX Header "Modules and Pragmata"
464 .SS "Updated Modules and Pragmata"
465 .IX Subsection "Updated Modules and Pragmata"
466 .IP \(bu 4
467 Archive::Tar has been upgraded from version 2.38 to 2.40.
468 .IP \(bu 4
469 Attribute::Handlers has been upgraded from version 1.01 to 1.02.
470 .IP \(bu 4
471 attributes has been upgraded from version 0.33 to 0.34.
472 .IP \(bu 4
473 B has been upgraded from version 1.82 to 1.83.
474 .IP \(bu 4
475 B::Concise has been upgraded from version 1.004 to 1.006.
476 .IP \(bu 4
477 B::Deparse has been upgraded from version 1.56 to 1.64.
478 .IP \(bu 4
479 bignum has been upgraded from version 0.51 to 0.65.
480 .IP \(bu 4
481 charnames has been upgraded from version 1.48 to 1.50.
482 .IP \(bu 4
483 Compress::Raw::Bzip2 has been upgraded from version 2.101 to 2.103.
484 .IP \(bu 4
485 Compress::Raw::Zlib has been upgraded from version 2.101 to 2.105.
486 .IP \(bu 4
487 CPAN has been upgraded from version 2.28 to 2.33.
488 .IP \(bu 4
489 Data::Dumper has been upgraded from version 2.179 to 2.184.
490 .IP \(bu 4
491 DB_File has been upgraded from version 1.855 to 1.857.
492 .IP \(bu 4
493 Devel::Peek has been upgraded from version 1.30 to 1.32.
494 .IP \(bu 4
495 Devel::PPPort has been upgraded from version 3.62 to 3.68.
496 .IP \(bu 4
497 diagnostics has been upgraded from version 1.37 to 1.39.
498 .IP \(bu 4
499 Digest has been upgraded from version 1.19 to 1.20.
500 .IP \(bu 4
501 DynaLoader has been upgraded from version 1.50 to 1.52.
502 .IP \(bu 4
503 Encode has been upgraded from version 3.08 to 3.17.
504 .IP \(bu 4
505 Errno has been upgraded from version 1.33 to 1.36.
506 .IP \(bu 4
507 experimental has been upgraded from version 0.024 to 0.028.
508 .IP \(bu 4
509 Exporter has been upgraded from version 5.76 to 5.77.
510 .IP \(bu 4
511 ExtUtils::MakeMaker has been upgraded from version 7.62 to 7.64.
512 .IP \(bu 4
513 ExtUtils::Miniperl has been upgraded from version 1.10 to 1.11.
514 .IP \(bu 4
515 ExtUtils::ParseXS has been upgraded from version 3.43 to 3.45.
516 .IP \(bu 4
517 ExtUtils::Typemaps has been upgraded from version 3.43 to 3.45.
518 .IP \(bu 4
519 Fcntl has been upgraded from version 1.14 to 1.15.
520 .IP \(bu 4
521 feature has been upgraded from version 1.64 to 1.72.
522 .IP \(bu 4
523 File::Compare has been upgraded from version 1.1006 to 1.1007.
524 .IP \(bu 4
525 File::Copy has been upgraded from version 2.35 to 2.39.
526 .IP \(bu 4
527 File::Fetch has been upgraded from version 1.00 to 1.04.
528 .IP \(bu 4
529 File::Find has been upgraded from version 1.39 to 1.40.
530 .IP \(bu 4
531 File::Glob has been upgraded from version 1.33 to 1.37.
532 .IP \(bu 4
533 File::Spec has been upgraded from version 3.80 to 3.84.
534 .IP \(bu 4
535 File::stat has been upgraded from version 1.09 to 1.12.
536 .IP \(bu 4
537 FindBin has been upgraded from version 1.52 to 1.53.
538 .IP \(bu 4
539 GDBM_File has been upgraded from version 1.19 to 1.23.
540 .IP \(bu 4
541 Hash::Util has been upgraded from version 0.25 to 0.28.
542 .IP \(bu 4
543 Hash::Util::FieldHash has been upgraded from version 1.21 to 1.26.
544 .IP \(bu 4
545 HTTP::Tiny has been upgraded from version 0.076 to 0.080.
546 .IP \(bu 4
547 I18N::Langinfo has been upgraded from version 0.19 to 0.21.
548 .IP \(bu 4
549 if has been upgraded from version 0.0609 to 0.0610.
550 .IP \(bu 4
551 IO has been upgraded from version 1.46 to 1.50.
552 .IP \(bu 4
553 IO\-Compress has been upgraded from version 2.102 to 2.106.
554 .IP \(bu 4
555 IPC::Open3 has been upgraded from version 1.21 to 1.22.
556 .IP \(bu 4
557 JSON::PP has been upgraded from version 4.06 to 4.07.
558 .IP \(bu 4
559 libnet has been upgraded from version 3.13 to 3.14.
560 .IP \(bu 4
561 Locale::Maketext has been upgraded from version 1.29 to 1.31.
562 .IP \(bu 4
563 Math::BigInt has been upgraded from version 1.999818 to 1.999830.
564 .IP \(bu 4
565 Math::BigInt::FastCalc has been upgraded from version 0.5009 to 0.5012.
566 .IP \(bu 4
567 Math::BigRat has been upgraded from version 0.2614 to 0.2621.
568 .IP \(bu 4
569 Module::CoreList has been upgraded from version 5.20210520 to 5.20220520.
570 .IP \(bu 4
571 mro has been upgraded from version 1.25_001 to 1.26.
572 .IP \(bu 4
573 NEXT has been upgraded from version 0.68 to 0.69.
574 .IP \(bu 4
575 Opcode has been upgraded from version 1.50 to 1.57.
576 .IP \(bu 4
577 open has been upgraded from version 1.12 to 1.13.
578 .IP \(bu 4
579 overload has been upgraded from version 1.33 to 1.35.
580 .IP \(bu 4
581 perlfaq has been upgraded from version 5.20210411 to 5.20210520.
582 .IP \(bu 4
583 PerlIO has been upgraded from version 1.11 to 1.12.
584 .IP \(bu 4
585 Pod::Functions has been upgraded from version 1.13 to 1.14.
586 .IP \(bu 4
587 Pod::Html has been upgraded from version 1.27 to 1.33.
588 .IP \(bu 4
589 Pod::Simple has been upgraded from version 3.42 to 3.43.
590 .IP \(bu 4
591 POSIX has been upgraded from version 1.97 to 2.03.
592 .IP \(bu 4
593 re has been upgraded from version 0.41 to 0.43.
594 .IP \(bu 4
595 Scalar::Util has been upgraded from version 1.55 to 1.62.
596 .IP \(bu 4
597 sigtrap has been upgraded from version 1.09 to 1.10.
598 .IP \(bu 4
599 Socket has been upgraded from version 2.031 to 2.033.
600 .IP \(bu 4
601 sort has been upgraded from version 2.04 to 2.05.
602 .IP \(bu 4
603 Storable has been upgraded from version 3.23 to 3.26.
604 .IP \(bu 4
605 Sys::Hostname has been upgraded from version 1.23 to 1.24.
606 .IP \(bu 4
607 Test::Harness has been upgraded from version 3.43 to 3.44.
608 .IP \(bu 4
609 Test::Simple has been upgraded from version 1.302183 to 1.302190.
610 .IP \(bu 4
611 Text::ParseWords has been upgraded from version 3.30 to 3.31.
612 .IP \(bu 4
613 Text::Tabs has been upgraded from version 2013.0523 to 2021.0814.
614 .IP \(bu 4
615 Text::Wrap has been upgraded from version 2013.0523 to 2021.0814.
616 .IP \(bu 4
617 threads has been upgraded from version 2.26 to 2.27.
618 .IP \(bu 4
619 threads::shared has been upgraded from version 1.62 to 1.64.
620 .IP \(bu 4
621 Tie::Handle has been upgraded from version 4.2 to 4.3.
622 .IP \(bu 4
623 Tie::Hash has been upgraded from version 1.05 to 1.06.
624 .IP \(bu 4
625 Tie::Scalar has been upgraded from version 1.05 to 1.06.
626 .IP \(bu 4
627 Tie::SubstrHash has been upgraded from version 1.00 to 1.01.
628 .IP \(bu 4
629 Time::HiRes has been upgraded from version 1.9767 to 1.9770.
630 .IP \(bu 4
631 Unicode::Collate has been upgraded from version 1.29 to 1.31.
632 .IP \(bu 4
633 Unicode::Normalize has been upgraded from version 1.28 to 1.31.
634 .IP \(bu 4
635 Unicode::UCD has been upgraded from version 0.75 to 0.78.
636 .IP \(bu 4
637 UNIVERSAL has been upgraded from version 1.13 to 1.14.
638 .IP \(bu 4
639 version has been upgraded from version 0.9928 to 0.9929.
640 .IP \(bu 4
641 VMS::Filespec has been upgraded from version 1.12 to 1.13.
642 .IP \(bu 4
643 VMS::Stdio has been upgraded from version 2.45 to 2.46.
644 .IP \(bu 4
645 warnings has been upgraded from version 1.51 to 1.58.
646 .IP \(bu 4
647 Win32 has been upgraded from version 0.57 to 0.59.
648 .IP \(bu 4
649 XS::APItest has been upgraded from version 1.16 to 1.22.
650 .IP \(bu 4
651 XS::Typemap has been upgraded from version 0.18 to 0.19.
652 .IP \(bu 4
653 XSLoader has been upgraded from version 0.30 to 0.31.
654 .SH Documentation
655 .IX Header "Documentation"
656 .SS "New Documentation"
657 .IX Subsection "New Documentation"
658 \fIPorting/vote_admin_guide.pod\fR
659 .IX Subsection "Porting/vote_admin_guide.pod"
660 .PP
661 This document provides the process for administering an election or vote
662 within the Perl Core Team.
663 .SS "Changes to Existing Documentation"
664 .IX Subsection "Changes to Existing Documentation"
665 We have attempted to update the documentation to reflect the changes
666 listed in this document. If you find any we have missed, open an issue
667 at <https://github.com/Perl/perl5/issues>.
668 .PP
669 Additionally, the following selected changes have been made:
670 .PP
671 \fIperlapi\fR
672 .IX Subsection "perlapi"
673 .IP \(bu 4
674 This has been cleaned up some, and more than 80% of the (previously
675 many) undocumented functions have now either been documented or deemed
676 to have been inappropriately marked as API.
677 .Sp
678 As always, Patches Welcome!
679 .PP
680 \fIperldeprecation\fR
681 .IX Subsection "perldeprecation"
682 .IP \(bu 4
683 notes the new location for functions moved from Pod::Html to
684 Pod::Html::Util that are no longer intended to be used outside of core.
685 .PP
686 \fIperlexperiment\fR
687 .IX Subsection "perlexperiment"
688 .IP \(bu 4
689 notes the \f(CW\*(C`:win32\*(C'\fR IO pseudolayer is removed (this happened in 5.35.2).
690 .PP
691 \fIperlgov\fR
692 .IX Subsection "perlgov"
693 .IP \(bu 4
694 The election process has been finetuned to allow the vote to be skipped if there
695 are no more candidates than open seats.
696 .IP \(bu 4
697 A special election is now allowed to be postponed for up to twelve weeks, for
698 example until a normal election.
699 .PP
700 \fIperlop\fR
701 .IX Subsection "perlop"
702 .IP \(bu 4
703 now notes that an invocant only needs to be an object or class name
704 for method calls, not for subroutine references.
705 .PP
706 \fIperlre\fR
707 .IX Subsection "perlre"
708 .IP \(bu 4
709 Updated to discourage the use of the /d regexp modifier.
710 .PP
711 \fIperlrun\fR
712 .IX Subsection "perlrun"
713 .IP \(bu 4
714 \&\fB\-?\fR is now a synonym for \fB\-h\fR
715 .IP \(bu 4
716 \&\fB\-g\fR is now a synonym for \fB\-0777\fR
717 .SH Diagnostics
718 .IX Header "Diagnostics"
719 The following additions or changes have been made to diagnostic output,
720 including warnings and fatal error messages. For the complete list of
721 diagnostic messages, see perldiag.
722 .SS "New Diagnostics"
723 .IX Subsection "New Diagnostics"
724 \fINew Errors\fR
725 .IX Subsection "New Errors"
726 .IP \(bu 4
727 Can\*(Aqt "%s" out of a "defer" block
728 .Sp
729 (F) An attempt was made to jump out of the scope of a defer block by using
730 a control\-flow statement such as \f(CW\*(C`return\*(C'\fR, \f(CW\*(C`goto\*(C'\fR or a loop control. This is
731 not permitted.
732 .IP \(bu 4
733 Can\*(Aqt modify \f(CW%s\fR in \f(CW%s\fR (for scalar
734 assignment to \f(CW\*(C`undef\*(C'\fR)
735 .Sp
736 Attempting to perform a scalar assignment to \f(CW\*(C`undef\*(C'\fR, for example via
737 \&\f(CW\*(C`undef = $foo;\*(C'\fR, previously triggered a fatal runtime error with the
738 message "Modification of a read\-only value attempted."
739 It is more helpful to detect such attempted assignments prior to runtime, so
740 they are now compile time errors, resulting in the message "Can\*(Aqt modify undef
741 operator in scalar assignment".
742 .IP \(bu 4
743 panic: newFORLOOP, \f(CW%s\fR
744 .Sp
745 The parser failed an internal consistency check while trying to parse
746 a \f(CW\*(C`foreach\*(C'\fR loop.
747 .PP
748 \fINew Warnings\fR
749 .IX Subsection "New Warnings"
750 .IP \(bu 4
751 Built\-in function \*(Aq%s\*(Aq is experimental
752 .Sp
753 A call is being made to a function in the \f(CW\*(C`builtin::\*(C'\fR namespace, which is
754 currently experimental.
755 .IP \(bu 4
756 defer is experimental
757 .Sp
758 The \f(CW\*(C`defer\*(C'\fR block modifier is experimental. If you want to use the feature,
759 disable the warning with \f(CW\*(C`no warnings \*(Aqexperimental::defer\*(Aq\*(C'\fR, but know that in
760 doing so you are taking the risk that your code may break in a future Perl
761 version.
762 .IP \(bu 4
763 Downgrading a use VERSION declaration to below v5.11 is deprecated
764 .Sp
765 This warning is emitted on a \f(CW\*(C`use VERSION\*(C'\fR statement that
766 requests a version below v5.11 (when the effects of \f(CW\*(C`use strict\*(C'\fR would be
767 disabled), after a previous declaration of one having a larger number (which
768 would have enabled these effects)
769 .IP \(bu 4
770 for my (...) is experimental
771 .Sp
772 This warning is emitted if you use \f(CW\*(C`for\*(C'\fR to iterate multiple values at
773 a time. This syntax is currently experimental and its behaviour may
774 change in future releases of Perl.
775 .IP \(bu 4
776 Implicit use of \f(CW@_\fR in \f(CW%s\fR with signatured subroutine is experimental
777 .Sp
778 An expression that implicitly involves the \f(CW@_\fR arguments array was found in
779 a subroutine that uses a signature.
780 .IP \(bu 4
781 Use of \f(CW@_\fR in \f(CW%s\fR with signatured subroutine is experimental
782 .Sp
783 An expression involving the \f(CW@_\fR arguments array was found in a subroutine that uses a signature.
784 .IP \(bu 4
785 Wide character in \f(CW$0\fR
786 .Sp
787 Attempts to put wide characters into the program name (\f(CW$0\fR) now provoke this
788 warning.
789 .SS "Changes to Existing Diagnostics"
790 .IX Subsection "Changes to Existing Diagnostics"
791 .IP \(bu 4
792 \&\*(Aq/\*(Aq does not take a repeat count in \f(CW%s\fR
793 .Sp
794 This warning used to not include the \f(CW\*(C`in %s\*(C'\fR.
795 .IP \(bu 4
796 Subroutine \f(CW%s\fR redefined
797 .Sp
798 Localized subroutine redefinitions no longer trigger this warning.
799 .IP \(bu 4
800 unexpected constant lvalue entersub entry via type/targ \f(CW%d:\fR%d" now has a panic prefix
801 .Sp
802 This makes it consistent with other checks of internal consistency when
803 compiling a subroutine.
804 .IP \(bu 4
805 Useless use of sort in scalar context is now in the new \f(CW\*(C`scalar\*(C'\fR category.
806 .Sp
807 When \f(CW\*(C`sort\*(C'\fR is used in scalar context, it provokes a warning that doing this
808 is not useful. This warning used to be in the \f(CW\*(C`void\*(C'\fR category. A new category
809 for warnings about scalar context has now been added, called \f(CW\*(C`scalar\*(C'\fR.
810 .IP \(bu 4
811 Removed a number of diagnostics
812 .Sp
813 Many diagnostics that have been removed from the perl core across many years
814 have now \fIalso\fR been removed from the documentation.
815 .SH "Configuration and Compilation"
816 .IX Header "Configuration and Compilation"
817 .IP \(bu 4
818 The Perl C source code now uses some C99 features, which we have verified are
819 supported by all compilers we target. This means that Perl\*(Aqs headers now
820 contain some code that is legal in C99 but not C89.
821 .Sp
822 This may cause problems for some XS modules that unconditionally add
823 \&\f(CW\*(C`\-Werror=declaration\-after\-statement\*(C'\fR to their C compiler flags if compiling
824 with gcc or clang. Earlier versions of Perl support long obsolete compilers
825 that are strict in rejecting certain C99 features, particularly mixed
826 declarations and code, and hence it makes sense for XS module authors to audit
827 that their code does not violate this. However, doing this is now only
828 possible on these earlier versions of Perl, hence these modules need to be
829 changed to only add this flag for \f(CW\*(C`$] < 5.035005\*(C'\fR.
830 .IP \(bu 4
831 The makedepend step is now run in parallel by using make
832 .Sp
833 When using MAKEFLAGS=\-j8, this significantly reduces the time required for:
834 .Sp
835 .Vb 1
836 \& sh ./makedepend MAKE=make cflags
837 .Ve
838 .IP \(bu 4
839 \&\fIConfigure\fR now tests whether \f(CW\*(C`#include <xlocale.h>\*(C'\fR is required
840 to use the POSIX 1003 thread\-safe locale functions or some related
841 extensions. This prevents problems where a non\-public \fIxlocale.h\fR is
842 removed in a library update, or \fIxlocale.h\fR isn\*(Aqt intended for public
843 use. (github #18936 <https://github.com/Perl/perl5/pull/18936>)
844 .SH Testing
845 .IX Header "Testing"
846 Tests were added and changed to reflect the other additions and changes
847 in this release.
848 .SH "Platform Support"
849 .IX Header "Platform Support"
850 .SS Windows
851 .IX Subsection "Windows"
852 .IP \(bu 4
853 Support for old MSVC++ (pre\-VC12) has been removed
854 .Sp
855 These did not support C99 and hence can no longer be used to compile perl.
856 .IP \(bu 4
857 Support for compiling perl on Windows using Microsoft Visual Studio 2022
858 (containing Visual C++ 14.3) has been added.
859 .IP \(bu 4
860 The :win32 IO layer has been removed. This experimental replacement for the
861 :unix layer never reached maturity in its nearly two decades of existence.
862 .SS VMS
863 .IX Subsection "VMS"
864 .ie n .IP """keys %ENV"" on VMS returns consistent results" 4
865 .el .IP "\f(CWkeys %ENV\fR on VMS returns consistent results" 4
866 .IX Item "keys %ENV on VMS returns consistent results"
867 On VMS entries in the \f(CW%ENV\fR hash are loaded from the OS environment on
868 first access, hence the first iteration of \f(CW%ENV\fR requires the entire
869 environment to be scanned to find all possible keys. This initialisation had
870 always been done correctly for full iteration, but previously was not
871 happening for \f(CW%ENV\fR in scalar context, meaning that \f(CW\*(C`scalar %ENV\*(C'\fR would
872 return 0 if called before any other \f(CW%ENV\fR access, or would only return the
873 count of keys accessed if there had been no iteration.
874 .Sp
875 These bugs are now fixed \- \f(CW%ENV\fR and \f(CW\*(C`keys %ENV\*(C'\fR in scalar context now
876 return the correct result \- the count of all keys in the environment.
877 .SS "Discontinued Platforms"
878 .IX Subsection "Discontinued Platforms"
879 .IP "AT&T UWIN" 4
880 .IX Item "AT&T UWIN"
881 UWIN is a UNIX compatibility layer for Windows. It was last released
882 in 2012 and has been superseded by Cygwin these days.
883 .IP DOS/DJGPP 4
884 .IX Item "DOS/DJGPP"
885 DJGPP is a port of the GNU toolchain to 32\-bit x86 systems running
886 DOS. The last known attempt to build Perl on it was on 5.20, which
887 only got as far as building miniperl.
888 .IP NetWare 4
889 .IX Item "NetWare"
890 Support code for Novell NetWare has been removed. NetWare was a
891 server operating system by Novell. The port was last updated in July
892 2002, and the platform itself in May 2009.
893 .Sp
894 Unrelated changes accidentally broke the build for the NetWare port in
895 September 2009, and in 12 years no\-one has reported this.
896 .SS "Platform\-Specific Notes"
897 .IX Subsection "Platform-Specific Notes"
898 .IP z/OS 4
899 .IX Item "z/OS"
900 This update enables us to build EBCDIC static/dynamic and 31\-bit/64\-bit
901 addressing mode Perl. The number of tests that pass is consistent with the
902 baseline before these updates.
903 .Sp
904 These changes also provide the base support to be able to provide ASCII
905 static/dynamic and 31\-bit/64\-bit addressing mode Perl.
906 .Sp
907 The z/OS (previously called OS/390) README was updated to describe ASCII and
908 EBCDIC builds.
909 .SH "Internal Changes"
910 .IX Header "Internal Changes"
911 .IP \(bu 4
912 Since the removal of PERL_OBJECT in Perl 5.8, PERL_IMPLICIT_CONTEXT and
913 MULTIPLICITY have been synonymous and they were being used interchangeably.
914 To simplify the code, all instances of PERL_IMPLICIT_CONTEXT have been
915 replaced with MULTIPLICITY.
916 .Sp
917 PERL_IMPLICIT_CONTEXT will remain defined for compatibility with XS modules.
918 .IP \(bu 4
919 The API constant formerly named \f(CW\*(C`G_ARRAY\*(C'\fR, indicating list context, has now
920 been renamed to a more accurate \f(CW\*(C`G_LIST\*(C'\fR. A compatibility macro \f(CW\*(C`G_ARRAY\*(C'\fR has
921 been added to allow existing code to work unaffected. New code should be
922 written using the new constant instead. This is supported by \f(CW\*(C`Devel::PPPort\*(C'\fR
923 version 3.63.
924 .IP \(bu 4
925 Macros have been added to \fIperl.h\fR to facilitate version comparisons:
926 \&\f(CW\*(C`PERL_GCC_VERSION_GE\*(C'\fR, \f(CW\*(C`PERL_GCC_VERSION_GT\*(C'\fR, \f(CW\*(C`PERL_GCC_VERSION_LE\*(C'\fR and
927 \&\f(CW\*(C`PERL_GCC_VERSION_LT\*(C'\fR.
928 .Sp
929 Inline functions have been added to \fIembed.h\fR to determine the position of
930 the least significant 1 bit in a word: \f(CW\*(C`lsbit_pos32\*(C'\fR and \f(CW\*(C`lsbit_pos64\*(C'\fR.
931 .IP \(bu 4
932 \&\f(CW\*(C`Perl_ptr_table_clear\*(C'\fR has been deleted. This has been marked as deprecated
933 since v5.14.0 (released in 2011), and is not used by any code on CPAN.
934 .IP \(bu 4
935 Added new boolean macros and functions. See "Stable boolean tracking" for
936 related information and perlapi for documentation.
937 .RS 4
938 .IP \(bu 4
939 sv_setbool
940 .IP \(bu 4
941 sv_setbool_mg
942 .IP \(bu 4
943 SvIsBOOL
944 .RE
945 .RS 4
946 .RE
947 .IP \(bu 4
948 Added 4 missing functions for dealing with RVs:
949 .RS 4
950 .IP \(bu 4
951 sv_setrv_noinc
952 .IP \(bu 4
953 sv_setrv_noinc_mg
954 .IP \(bu 4
955 sv_setrv_inc
956 .IP \(bu 4
957 sv_setrv_inc_mg
958 .RE
959 .RS 4
960 .RE
961 .IP \(bu 4
962 \&\f(CWxs_handshake()\fR\*(Aqs two failure modes now provide distinct messages.
963 .IP \(bu 4
964 Memory for hash iterator state (\f(CW\*(C`struct xpvhv_aux\*(C'\fR) is now allocated as part
965 of the hash body, instead of as part of the block of memory allocated for the
966 main hash array.
967 .IP \(bu 4
968 A new \fBphase_name()\fR interface provides access to the name for each interpreter
969 phase (i.e., PL_phase value).
970 .IP \(bu 4
971 The \f(CW\*(C`pack\*(C'\fR behavior of \f(CW\*(C`U\*(C'\fR has changed for EBCDIC.
972 .IP \(bu 4
973 New equality\-test functions \f(CW\*(C`sv_numeq\*(C'\fR and \f(CW\*(C`sv_streq\*(C'\fR have been added, along
974 with \f(CW\*(C`..._flags\*(C'\fR\-suffixed variants. These expose a simple and consistent API
975 to perform numerical or string comparison which is aware of operator
976 overloading.
977 .IP \(bu 4
978 Reading the string form of an integer value no longer sets the flag \f(CW\*(C`SVf_POK\*(C'\fR.
979 The string form is still cached internally, and still re\-read directly by the
980 macros \f(CWSvPV(sv)\fR \fIetc\fR (inline, without calling a C function). XS code that
981 already calls the APIs to get values will not be affected by this change. XS
982 code that accesses flags directly instead of using API calls to express its
983 intent \fImight\fR break, but such code likely is already buggy if passed some
984 other values, such as floating point values or objects with string overloading.
985 .Sp
986 This small change permits code (such as JSON serializers) to reliably determine
987 between
988 .RS 4
989 .IP \(bu 4
990 a value that was initially \fBwritten\fR as an integer, but then \fBread\fR as a string
991 .Sp
992 .Vb 2
993 \& my $answer = 42;
994 \& print "The answer is $answer\en";
995 .Ve
996 .IP \(bu 4
997 that same value that was initially \fBwritten\fR as a string, but then \fBread\fR as an integer
998 .Sp
999 .Vb 3
1000 \& my $answer = "42";
1001 \& print "That doesn\*(Aqt look right\en"
1002 \& unless $answer == 6 * 9;
1003 .Ve
1004 .RE
1005 .RS 4
1006 .Sp
1007 For the first case (originally written as an integer), we now have:
1008 .Sp
1009 .Vb 6
1010 \& use Devel::Peek;
1011 \& my $answer = 42;
1012 \& Dump ($answer);
1013 \& my $void = "$answer";
1014 \& print STDERR "\en";
1015 \& Dump($answer)
1016 \&
1017 \&
1018 \& SV = IV(0x562538925778) at 0x562538925788
1019 \& REFCNT = 1
1020 \& FLAGS = (IOK,pIOK)
1021 \& IV = 42
1022 \&
1023 \& SV = PVIV(0x5625389263c0) at 0x562538925788
1024 \& REFCNT = 1
1025 \& FLAGS = (IOK,pIOK,pPOK)
1026 \& IV = 42
1027 \& PV = 0x562538919b50 "42"\e0
1028 \& CUR = 2
1029 \& LEN = 10
1030 .Ve
1031 .Sp
1032 For the second (originally written as a string), we now have:
1033 .Sp
1034 .Vb 6
1035 \& use Devel::Peek;
1036 \& my $answer = "42";
1037 \& Dump ($answer);
1038 \& my $void = $answer == 6 * 9;
1039 \& print STDERR "\en";
1040 \& Dump($answer)\*(Aq
1041 \&
1042 \&
1043 \& SV = PV(0x5586ffe9bfb0) at 0x5586ffec0788
1044 \& REFCNT = 1
1045 \& FLAGS = (POK,IsCOW,pPOK)
1046 \& PV = 0x5586ffee7fd0 "42"\e0
1047 \& CUR = 2
1048 \& LEN = 10
1049 \& COW_REFCNT = 1
1050 \&
1051 \& SV = PVIV(0x5586ffec13c0) at 0x5586ffec0788
1052 \& REFCNT = 1
1053 \& FLAGS = (IOK,POK,IsCOW,pIOK,pPOK)
1054 \& IV = 42
1055 \& PV = 0x5586ffee7fd0 "42"\e0
1056 \& CUR = 2
1057 \& LEN = 10
1058 \& COW_REFCNT = 1
1059 .Ve
1060 .Sp
1061 (One can\*(Aqt rely on the presence or absence of the flag \f(CW\*(C`SVf_IsCOW\*(C'\fR to
1062 determine the history of operations on a scalar.)
1063 .Sp
1064 Previously both cases would be indistinguishable, with all 4 flags set:
1065 .Sp
1066 .Vb 7
1067 \& SV = PVIV(0x55d4d62edaf0) at 0x55d4d62f0930
1068 \& REFCNT = 1
1069 \& FLAGS = (IOK,POK,pIOK,pPOK)
1070 \& IV = 42
1071 \& PV = 0x55d4d62e1740 "42"\e0
1072 \& CUR = 2
1073 \& LEN = 10
1074 .Ve
1075 .Sp
1076 (and possibly \f(CW\*(C`SVf_IsCOW\*(C'\fR, but not always)
1077 .Sp
1078 This now means that if XS code \fIreally\fR needs to determine which form a value
1079 was first written as, it should implement logic roughly
1080 .Sp
1081 .Vb 6
1082 \& if (flags & SVf_IOK|SVf_NOK) && !(flags & SVf_POK)
1083 \& serialize as number
1084 \& else if (flags & SVf_POK)
1085 \& serialize as string
1086 \& else
1087 \& the existing guesswork ...
1088 .Ve
1089 .Sp
1090 Note that this doesn\*(Aqt cover "dualvars" \- scalars that report different
1091 values when asked for their string form or number form (such as \f(CW$!\fR).
1092 Most serialization formats cannot represent such duplicity.
1093 .Sp
1094 \&\fIThe existing guesswork\fR remains because as well as dualvars, values might
1095 be \f(CW\*(C`undef\*(C'\fR, references, overloaded references, typeglobs and other things that
1096 Perl itself can represent but do not map one\-to\-one into external formats, so
1097 need some amount of approximation or encapsulation.
1098 .RE
1099 .IP \(bu 4
1100 \&\f(CW\*(C`sv_dump\*(C'\fR (and Devel::Peek’s \f(CW\*(C`Dump\*(C'\fR function) now escapes high\-bit
1101 octets in the PV as hex rather than octal. Since most folks understand hex
1102 more readily than octal, this should make these dumps a bit more legible.
1103 This does \fBnot\fR affect any other diagnostic interfaces like \f(CW\*(C`pv_display\*(C'\fR.
1104 .SH "Selected Bug Fixes"
1105 .IX Header "Selected Bug Fixes"
1106 .IP \(bu 4
1107 \&\fButime()\fR now correctly sets errno/\f(CW$!\fR when called on a closed handle.
1108 .IP \(bu 4
1109 The flags on the OPTVAL parameter to \fBsetsockopt()\fR were previously
1110 checked before magic was called, possibly treating a numeric value as
1111 a packed buffer or vice versa. It also ignored the UTF\-8 flag,
1112 potentially treating the internal representation of an upgraded SV as
1113 the bytes to supply to the \fBsetsockopt()\fR system call. (github #18660 <https://github.com/Perl/perl5/issues/18660>)
1114 .IP \(bu 4
1115 Only set IOKp, not IOK on $) and $(.
1116 This was issue #18955 <https://github.com/Perl/perl5/issues/18955>: This will prevent serializers from serializing these
1117 variables as numbers (which loses the additional groups).
1118 This restores behaviour from 5.16
1119 .IP \(bu 4
1120 Use of the \f(CW\*(C`mktables\*(C'\fR debugging facility would cause perl to croak since
1121 v5.31.10; this problem has now been fixed.
1122 .IP \(bu 4
1123 \&\f(CW\*(C`makedepend\*(C'\fR logic is now compatible with BSD make (fixes
1124 GH #19046 <https://github.com/Perl/perl5/issues/19046>).
1125 .IP \(bu 4
1126 Calling \f(CW\*(C`untie\*(C'\fR on a tied hash that is partway through iteration now frees the
1127 iteration state immediately.
1128 .Sp
1129 Iterating a tied hash causes perl to store a copy of the current hash key to
1130 track the iteration state, with this stored copy passed as the second parameter
1131 to \f(CW\*(C`NEXTKEY\*(C'\fR. This internal state is freed immediately when tie hash iteration
1132 completes, or if the hash is destroyed, but due to an implementation oversight,
1133 it was not freed if the hash was untied. In that case, the internal copy of the
1134 key would persist until the earliest of
1135 .RS 4
1136 .IP 1. 4
1137 \&\f(CW\*(C`tie\*(C'\fR was called again on the same hash
1138 .IP 2. 4
1139 The (now untied) hash was iterated (ie passed to any of \f(CW\*(C`keys\*(C'\fR, \f(CW\*(C`values\*(C'\fR or
1140 \&\f(CW\*(C`each\*(C'\fR)
1141 .IP 3. 4
1142 The hash was destroyed.
1143 .RE
1144 .RS 4
1145 .Sp
1146 This inconsistency is now fixed \- the internal state is now freed immediately by
1147 \&\f(CW\*(C`untie\*(C'\fR.
1148 .Sp
1149 As the precise timing of this behaviour can be observed with pure Perl code
1150 (the timing of \f(CW\*(C`DESTROY\*(C'\fR on objects returned from \f(CW\*(C`FIRSTKEY\*(C'\fR and \f(CW\*(C`NEXTKEY\*(C'\fR)
1151 it\*(Aqs just possible that some code is sensitive to it.
1152 .RE
1153 .IP \(bu 4
1154 The \f(CWInternals::getcwd()\fR function added for bootstrapping miniperl
1155 in perl 5.30.0 is now only available in miniperl. [github #19122]
1156 .IP \(bu 4
1157 Setting a breakpoint on a BEGIN or equivalently a \f(CW\*(C`use\*(C'\fR statement
1158 could cause a memory write to a freed \f(CW\*(C`dbstate\*(C'\fR op.
1159 [GH #19198 <https://github.com/Perl/perl5/issues/19198>]
1160 .IP \(bu 4
1161 When bareword filehandles are disabled, the parser was interpreting
1162 any bareword as a filehandle, even when immediately followed by parens.
1163 .SH "Errata From Previous Releases"
1164 .IX Header "Errata From Previous Releases"
1165 .IP \(bu 4
1166 perl5300delta mistakenly identified a CVE whose correct identification is
1167 CVE\-2015\-1592.
1168 .SH Obituaries
1169 .IX Header "Obituaries"
1170 Raun "Spider" Boardman (SPIDB on CPAN), author of at least 66 commits to the
1171 Perl 5 core distribution between 1996 and 2002, passed away May 24, 2021 from
1172 complications of COVID. He will be missed.
1173 .PP
1174 David H. Adler (DHA) passed away on November 16, 2021. In 1997, David
1175 co\-founded NY.pm, the first Perl user group, and in 1998 co\-founded Perl
1176 Mongers to help establish other user groups across the globe. He was a
1177 frequent attendee at Perl conferences in both North America and Europe and well
1178 known for his role in organizing \fIBad Movie Night\fR celebrations at those
1179 conferences. He also contributed to the work of the Perl Foundation, including
1180 administering the White Camel awards for community service. He will be missed.
1181 .SH Acknowledgements
1182 .IX Header "Acknowledgements"
1183 Perl 5.36.0 represents approximately a year of development since Perl
1184 5.34.0 and contains approximately 250,000 lines of changes across 2,000
1185 files from 82 authors.
1186 .PP
1187 Excluding auto\-generated files, documentation and release tools, there were
1188 approximately 190,000 lines of changes to 1,300 .pm, .t, .c and .h files.
1189 .PP
1190 Perl continues to flourish into its fourth decade thanks to a vibrant
1191 community of users and developers. The following people are known to have
1192 contributed the improvements that became Perl 5.36.0:
1193 .PP
1194 Alyssa Ross, Andrew Fresh, Aristotle Pagaltzis, Asher Mancinelli, Atsushi
1195 Sugawara, Ben Cornett, Bernd, Biswapriyo Nath, Brad Barden, Bram, Branislav
1196 Zahradník, brian d foy, Chad Granum, Chris \*(AqBinGOs\*(Aq Williams, Christian
1197 Walde (Mithaldu), Christopher Yeleighton, Craig A. Berry, cuishuang, Curtis
1198 Poe, Dagfinn Ilmari Mannsåker, Dan Book, Daniel Laügt, Dan Jacobson, Dan
1199 Kogai, Dave Cross, Dave Lambley, David Cantrell, David Golden, David
1200 Marshall, David Mitchell, E. Choroba, Eugen Konkov, Felipe Gasper, François
1201 Perrad, Graham Knop, H.Merijn Brand, Hugo van der Sanden, Ilya Sashcheka,
1202 Ivan Panchenko, Jakub Wilk, James E Keenan, James Raspass, Karen Etheridge,
1203 Karl Williamson, Leam Hall, Leon Timmermans, Magnus Woldrich, Matthew
1204 Horsfall, Max Maischein, Michael G Schwern, Michiel Beijen, Mike Fulton,
1205 Neil Bowers, Nicholas Clark, Nicolas R, Niyas Sait, Olaf Alders, Paul Evans,
1206 Paul Marquess, Petar\-Kaleychev, Pete Houston, Renee Baecker, Ricardo Signes,
1207 Richard Leach, Robert Rothenberg, Sawyer X, Scott Baker, Sergey Poznyakoff,
1208 Sergey Zhmylove, Sisyphus, Slaven Rezic, Steve Hay, Sven Kirmess, TAKAI
1209 Kousuke, Thibault Duponchelle, Todd Rinaldo, Tomasz Konojacki, Tomoyuki
1210 Sadahiro, Tony Cook, Unicode Consortium, Yves Orton, Михаил
1211 Козачков.
1212 .PP
1213 The list above is almost certainly incomplete as it is automatically
1214 generated from version control history. In particular, it does not include
1215 the names of the (very much appreciated) contributors who reported issues to
1216 the Perl bug tracker.
1217 .PP
1218 Many of the changes included in this version originated in the CPAN modules
1219 included in Perl\*(Aqs core. We\*(Aqre grateful to the entire CPAN community for
1220 helping Perl to flourish.
1221 .PP
1222 For a more complete list of all of Perl\*(Aqs historical contributors, please
1223 see the AUTHORS file in the Perl source distribution.
1224 .SH "Reporting Bugs"
1225 .IX Header "Reporting Bugs"
1226 If you find what you think is a bug, you might check the perl bug database
1227 at <https://github.com/Perl/perl5/issues>. There may also be information at
1228 <http://www.perl.org/>, the Perl Home Page.
1229 .PP
1230 If you believe you have an unreported bug, please open an issue at
1231 <https://github.com/Perl/perl5/issues>. Be sure to trim your bug down to a
1232 tiny but sufficient test case.
1233 .PP
1234 If the bug you are reporting has security implications which make it
1235 inappropriate to send to a public issue tracker, then see
1236 "SECURITY VULNERABILITY CONTACT INFORMATION" in perlsec
1237 for details of how to report the issue.
1238 .SH "Give Thanks"
1239 .IX Header "Give Thanks"
1240 If you wish to thank the Perl 5 Porters for the work we had done in Perl 5,
1241 you can do so by running the \f(CW\*(C`perlthanks\*(C'\fR program:
1242 .PP
1243 .Vb 1
1244 \& perlthanks
1245 .Ve
1246 .PP
1247 This will send an email to the Perl 5 Porters list with your show of thanks.
1248 .SH "SEE ALSO"
1249 .IX Header "SEE ALSO"
1250 The \fIChanges\fR file for an explanation of how to view exhaustive details on
1251 what changed.
1252 .PP
1253 The \fIINSTALL\fR file for how to build Perl.
1254 .PP
1255 The \fIREADME\fR file for general stuff.
1256 .PP
1257 The \fIArtistic\fR and \fICopying\fR files for copyright information.