Debian Codegraph @

upstream/opensuse-tumbleweed/man1/perl5380delta.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 "PERL5380DELTA 1"
61 .TH PERL5380DELTA 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 perl5380delta \- what is new for perl v5.38.0
68 .SH DESCRIPTION
69 .IX Header "DESCRIPTION"
70 This document describes differences between the 5.36.0 release and the 5.38.0
71 release.
72 .SH "Core Enhancements"
73 .IX Header "Core Enhancements"
74 .ie n .SS "New ""class"" Feature"
75 .el .SS "New \f(CWclass\fP Feature"
76 .IX Subsection "New class Feature"
77 A new \fBexperimental\fR syntax is now available for defining object classes,
78 where per\-instance data is stored in "field" variables that behave like
79 lexicals.
80 .PP
81 .Vb 1
82 \& use feature \*(Aqclass\*(Aq;
83 \&
84 \& class Point
85 \& {
86 \& field $x;
87 \& field $y;
88 \&
89 \& method zero { $x = $y = 0; }
90 \& }
91 .Ve
92 .PP
93 This is described in more detail in perlclass. Notes on the internals of
94 its implementation and other related details can be found in perlclassguts.
95 .PP
96 This remains a new and experimental feature, and is very much still under
97 development. It will be the subject of much further addition, refinement and
98 alteration in future releases. As it is experimental, it yields warnings in
99 the \f(CW\*(C`experimental::class\*(C'\fR category. These can be silenced by a
100 \&\f(CW\*(C`no warnings\*(C'\fR statement.
101 .PP
102 .Vb 2
103 \& use feature \*(Aqclass\*(Aq;
104 \& no warnings \*(Aqexperimental::class\*(Aq;
105 .Ve
106 .SS "Unicode 15.0 is supported"
107 .IX Subsection "Unicode 15.0 is supported"
108 See <https://www.unicode.org/versions/Unicode15.0.0/> for details.
109 .SS "Deprecation warnings now have specific subcategories"
110 .IX Subsection "Deprecation warnings now have specific subcategories"
111 All deprecation warnings now have their own specific deprecation category which
112 can be disabled individually. You can see a list of all deprecated features in
113 perldeprecation, and in warnings. The following list is from warnings:
114 .PP
115 .Vb 10
116 \& +\- deprecated \-\-\-\-+
117 \& | |
118 \& | +\- deprecated::apostrophe_as_package_separator
119 \& | |
120 \& | +\- deprecated::delimiter_will_be_paired
121 \& | |
122 \& | +\- deprecated::dot_in_inc
123 \& | |
124 \& | +\- deprecated::goto_construct
125 \& | |
126 \& | +\- deprecated::smartmatch
127 \& | |
128 \& | +\- deprecated::unicode_property_name
129 \& | |
130 \& | +\- deprecated::version_downgrade
131 .Ve
132 .PP
133 It is still possible to disable all deprecation warnings in a single
134 statement with
135 .PP
136 .Vb 1
137 \& no warnings \*(Aqdeprecated\*(Aq;
138 .Ve
139 .PP
140 but now is possible to have a finer grained control. As has historically been
141 the case these warnings are automatically enabled with
142 .PP
143 .Vb 1
144 \& use warnings;
145 .Ve
146 .SS "%{^HOOK} API introduced"
147 .IX Subsection "%{^HOOK} API introduced"
148 For various reasons it can be difficult to create subroutine wrappers
149 for some of perl\*(Aqs keywords. Any keyword which has an undefined
150 prototype simply cannot be wrapped with a subroutine, and some keywords
151 which perl permits to be wrapped are in practice very tricky to wrap.
152 For example \f(CW\*(C`require\*(C'\fR is tricky to wrap, it is possible but doing so
153 changes the stack depth, and the standard methods of exporting assume
154 that they will be exporting to a package at certain stack depth up the
155 stack, and the wrapper will thus change where functions are exported to
156 unless implemented with a great deal of care. This can be very awkward
157 to deal with.
158 .PP
159 Accordingly we have introduced a new hash called \f(CW\*(C`%{^HOOK}\*(C'\fR which is
160 intended to facilitate such cases. When a keyword supports any kind of
161 special hook then the hook will live in this new hash. Hooks in this
162 hash will be named after the function they are called by, followed by
163 two underbars and then the phase they are executed in, currently either
164 before or after the keyword is executed.
165 .PP
166 In this initial release we support two hooks \f(CW\*(C`require_\|_before\*(C'\fR and
167 \&\f(CW\*(C`require_\|_after\*(C'\fR. These are provided to make it easier to perform tasks
168 before and after a require statement.
169 .PP
170 See perlvar for more details.
171 .SS PERL_RAND_SEED
172 .IX Subsection "PERL_RAND_SEED"
173 Added a new environment variable \f(CW\*(C`PERL_RAND_SEED\*(C'\fR which can be used to
174 cause a perl program which uses \f(CW\*(C`rand\*(C'\fR without using \f(CWsrand()\fR
175 explicitly or which uses \f(CWsrand()\fR with no arguments to be repeatable.
176 See perlrun. This feature can be disabled at compile time by passing
177 .PP
178 .Vb 1
179 \& \-Accflags=\-DNO_PERL_RAND_SEED
180 .Ve
181 .PP
182 to \fIConfigure\fR during the build process.
183 .SS "Defined\-or and logical\-or assignment default expressions in signatures"
184 .IX Subsection "Defined-or and logical-or assignment default expressions in signatures"
185 The default expression for a subroutine signature parameter can now be
186 assigned using the \f(CW\*(C`//=\*(C'\fR or \f(CW\*(C`||=\*(C'\fR operators, to apply the defaults whenever
187 the caller provided an undefined or false value (respectively), rather than
188 simply when the parameter is missing entirely. For more detail see the
189 documentation in perlsub.
190 .ie n .SS "@INC Hook Enhancements and $INC and INCDIR"
191 .el .SS "\f(CW@INC\fP Hook Enhancements and \f(CW$INC\fP and INCDIR"
192 .IX Subsection "@INC Hook Enhancements and $INC and INCDIR"
193 The internals for \f(CW@INC\fR hooks have been hardened to handle various
194 edge cases and should no longer segfault or throw assert failures when
195 hooks modify \f(CW@INC\fR during a require operation. As part of this we
196 now ensure that any given hook is executed at most once during a require
197 call, and that any duplicate directories do not trigger additional
198 directory probes.
199 .PP
200 To provide developers more control over dynamic module lookup, a new hook
201 method \f(CW\*(C`INCDIR\*(C'\fR is now supported. An object supporting this method may be
202 injected into the \f(CW@INC\fR array, and when it is encountered in the module
203 search process it will be executed, just like how INC hooks are executed,
204 and its return value used as a list of directories to search for the
205 module. Returning an empty list acts as a no\-op. Note that since any
206 references returned by this hook will be stringified and used as strings,
207 you may not return a hook to be executed later via this API.
208 .PP
209 When an \f(CW@INC\fR hook (either \f(CW\*(C`INC\*(C'\fR or \f(CW\*(C`INCDIR\*(C'\fR) is called during
210 require, the \f(CW$INC\fR variable will be localized to be the value of the
211 index of \f(CW@INC\fR that the hook came from. If the hook wishes to override
212 what the "next" index in \f(CW@INC\fR should be it may update \f(CW$INC\fR to be one
213 less than the desired index (\f(CW\*(C`undef\*(C'\fR is equivalent to \f(CW\-1\fR). This
214 allows an \f(CW@INC\fR hook to completely rewrite the \f(CW@INC\fR array and have
215 perl restart its directory probes from the beginning of \f(CW@INC\fR.
216 .PP
217 Blessed CODE references in \f(CW@INC\fR that do not support the \f(CW\*(C`INC\*(C'\fR or
218 \&\f(CW\*(C`INCDIR\*(C'\fR methods will no longer trigger an exception, and instead will
219 be treated the same as unblessed coderefs are, and executed as though
220 they were an \f(CW\*(C`INC\*(C'\fR hook.
221 .ie n .SS "Forbidden control flow out of ""defer"" or ""finally"" now detected at compile\-time"
222 .el .SS "Forbidden control flow out of \f(CWdefer\fP or \f(CWfinally\fP now detected at compile\-time"
223 .IX Subsection "Forbidden control flow out of defer or finally now detected at compile-time"
224 It is forbidden to attempt to leave a \f(CW\*(C`defer\*(C'\fR or \f(CW\*(C`finally\*(C'\fR block by means
225 of control flow such as \f(CW\*(C`return\*(C'\fR or \f(CW\*(C`goto\*(C'\fR. Previous versions of perl could
226 only detect this when actually attempted at runtime.
227 .PP
228 This version of perl adds compile\-time detection for many cases that can be
229 statically determined. This may mean that code which compiled successfully on
230 a previous version of perl is now reported as a compile\-time error with this
231 one. This only happens in cases where it would have been an error to actually
232 execute the code anyway; the error simply happens at an earlier time.
233 .SS "Optimistic Eval in Patterns"
234 .IX Subsection "Optimistic Eval in Patterns"
235 The use of \f(CW\*(C`(?{ ... })\*(C'\fR and \f(CW\*(C`(??{ ... })\*(C'\fR in a pattern disables various
236 optimisations globally in that pattern. This may or may not be desired by the
237 programmer. This release adds the \f(CW\*(C`(*{ ... })\*(C'\fR
238 equivalent. The only difference is that it does not and will never disable
239 any optimisations in the regex engine. This may make it more unstable in the
240 sense that it may be called more or less times in the future, however the
241 number of times it executes will truly match how the regex engine functions.
242 For example, certain types of optimisation are disabled when \f(CW\*(C`(?{ ... })\*(C'\fR is
243 included in a pattern, so that patterns which are O(N) in normal use become
244 O(N*N) with a \f(CW\*(C`(?{ ... })\*(C'\fR pattern in them. Switching to \f(CW\*(C`(*{ ... })\*(C'\fR means
245 the pattern will stay O(N).
246 .SS "REG_INF has been raised from 65,536 to 2,147,483,647"
247 .IX Subsection "REG_INF has been raised from 65,536 to 2,147,483,647"
248 Many regex quantifiers used to be limited to \f(CW\*(C`U16_MAX\*(C'\fR in the past, but are
249 now limited to \f(CW\*(C`I32_MAX\*(C'\fR, thus it is now possible to write
250 \&\f(CW\*(C`/(?:word){1000000}/\*(C'\fR for example. Note that doing so may cause the regex
251 engine to run longer and use more memory.
252 .SS "New API functions optimize_optree and finalize_optree"
253 .IX Subsection "New API functions optimize_optree and finalize_optree"
254 There are two new API functions for operating on optree fragments, ensuring
255 you can invoke the required parts of the optree\-generation process that might
256 otherwise not get invoked (e.g. when creating a custom LOGOP). To get access
257 to these functions, you first need to set a \f(CW\*(C`#define\*(C'\fR to opt\-in to using
258 these functions.
259 .PP
260 .Vb 1
261 \& #define PERL_USE_VOLATILE_API
262 .Ve
263 .PP
264 These functions are closely tied to the internals of how the interpreter
265 works, and could be altered or removed at any time if other internal changes
266 make that necessary.
267 .ie n .SS "Some ""goto""s are now permitted in ""defer"" and ""finally"" blocks"
268 .el .SS "Some \f(CWgoto\fPs are now permitted in \f(CWdefer\fP and \f(CWfinally\fP blocks"
269 .IX Subsection "Some gotos are now permitted in defer and finally blocks"
270 Perl version 5.36.0 added \f(CW\*(C`defer\*(C'\fR blocks and permitted the \f(CW\*(C`finally\*(C'\fR keyword
271 to also add similar behaviour to \f(CW\*(C`try\*(C'\fR/\f(CW\*(C`catch\*(C'\fR syntax. These did not permit
272 any \f(CW\*(C`goto\*(C'\fR expression within the body, as it could have caused control flow
273 to jump out of the block. Now, some \f(CW\*(C`goto\*(C'\fR expressions are allowed, if they
274 have a constant target label, and that label is found within the block.
275 .PP
276 .Vb 1
277 \& use feature \*(Aqdefer\*(Aq;
278 \&
279 \& defer {
280 \& goto LABEL;
281 \& print "This does not execute\en";
282 \& LABEL: print "This does\en";
283 \& }
284 .Ve
285 .SS "New regexp variable ${^LAST_SUCCESSFUL_PATTERN}"
286 .IX Subsection "New regexp variable ${^LAST_SUCCESSFUL_PATTERN}"
287 This allows access to the last successful pattern that matched in the current
288 scope. Many aspects of the regex engine refer to the "last successful
289 pattern". The empty pattern reuses it, and all of the magic regex vars relate
290 to it. This allows access to its pattern. The following code
291 .PP
292 .Vb 3
293 \& if (m/foo/ || m/bar/) {
294 \& s//PQR/;
295 \& }
296 .Ve
297 .PP
298 can be rewritten as follows
299 .PP
300 .Vb 3
301 \& if (m/foo/ || m/bar/) {
302 \& s/${^LAST_SUCCESSFUL_PATTERN}/PQR/;
303 \& }
304 .Ve
305 .PP
306 and it will do the exactly same thing.
307 .SS "Locale category LC_NAME now supported on participating platforms"
308 .IX Subsection "Locale category LC_NAME now supported on participating platforms"
309 On platforms that have the GNU extension \f(CW\*(C`LC_NAME\*(C'\fR category, you may now use
310 it as the category parameter to "setlocale" in POSIX to set and query its locale.
311 .SH "Incompatible Changes"
312 .IX Header "Incompatible Changes"
313 .SS "\fBreadline()\fP no longer clears the stream error and eof flags"
314 .IX Subsection "readline() no longer clears the stream error and eof flags"
315 \&\f(CWreadline()\fR, also spelled \f(CW\*(C`<>\*(C'\fR, would clear the handle\*(Aqs error
316 and eof flags after an error occurred on the stream.
317 .PP
318 In nearly all cases this clear is no longer done, so the error and
319 eof flags now properly reflect the status of the stream after
320 \&\fBreadline()\fR.
321 .PP
322 Since the error flag is no longer cleared calling \fBclose()\fR on the
323 stream may fail and if the stream was not explicitly closed, the
324 implicit close of the stream may produce a warning.
325 .PP
326 This has resulted in two main types of problems in downstream CPAN
327 modules, and these may also occur in your code:
328 .IP \(bu 4
329 If your code reads to end of file, and then rebinds the handle to a
330 new file descriptor, previously since the eof flag wasn\*(Aqt set you
331 could continue to read from the stream. You now need to clear the eof
332 flag yourself with \f(CW\*(C`$handle\->clearerr()\*(C'\fR to continue reading.
333 .IP \(bu 4
334 If your code encounters an error on the stream while reading with
335 \&\fBreadline()\fR you will need to call \f(CW\*(C`$handle\->clearerr\*(C'\fR to continue
336 reading. The one case this occurred the underlying file descriptor was
337 marked non\-blocking, so the \fBread()\fR system call was failing with
338 \&\f(CW\*(C`EAGAIN\*(C'\fR, which resulted in the error flag being set on the stream.
339 .PP
340 The only case where error and eof flags continue to cleared on
341 error is when reading from the child process for \fBglob()\fR in
342 \&\fIminiperl\fR. This allows it to correctly report errors from the child
343 process on \fBclose()\fR. This is unlikely to be an issue during normal
344 perl development.
345 .PP
346 [GH #20060 <https://github.com/Perl/perl5/issues/20060>]
347 .ie n .SS """INIT"" blocks no longer run after an exit() in ""BEGIN"""
348 .el .SS "\f(CWINIT\fP blocks no longer run after an \f(CWexit()\fP in \f(CWBEGIN\fP"
349 .IX Subsection "INIT blocks no longer run after an exit() in BEGIN"
350 \&\f(CW\*(C`INIT\*(C'\fR blocks will no longer run after an \f(CWexit()\fR performed inside of
351 a \f(CW\*(C`BEGIN\*(C'\fR. This means that the combination of the \f(CW\*(C`\-v\*(C'\fR option and the
352 \&\f(CW\*(C`\-c\*(C'\fR option no longer executes a compile check as well as showing the
353 perl version. The \f(CW\*(C`\-v\*(C'\fR option executes an \fBexit\fR\|(0) after printing the
354 version information inside of a \f(CW\*(C`BEGIN\*(C'\fR block, and the \f(CW\*(C`\-c\*(C'\fR check is
355 implemented by using \f(CW\*(C`INIT\*(C'\fR hooks, resulting in the \f(CW\*(C`\-v\*(C'\fR option taking
356 precedence.
357 .PP
358 [GH #1537 <https://github.com/Perl/perl5/issues/1537>]
359 [GH #20181 <https://github.com/Perl/perl5/issues/20181>]
360 .SS "Syntax errors no longer produce ""phantom error messages"""
361 .IX Subsection "Syntax errors no longer produce ""phantom error messages"""
362 Generally perl will continue parsing the source code even after
363 encountering a compile error. In many cases this is helpful, for
364 instance with misspelled variable names it is helpful to show as many
365 examples of the error as possible. But in the case of syntax errors
366 continuing often produces bizarre error messages and may even cause
367 segmentation faults during the compile process. In this release the
368 compiler will halt at the first syntax error encountered. This means
369 that any code expecting to see the specific error messages we used to
370 produce will be broken. The error that is emitted will be one of the
371 diagnostics that used to be produced, but in some cases some messages
372 that used to be produced will no longer be displayed.
373 .PP
374 See "Changes to Existing Diagnostics" for more details.
375 .ie n .SS utf8::upgrade()
376 .el .SS \f(CWutf8::upgrade()\fP
377 .IX Subsection "utf8::upgrade()"
378 Starting in this release, if the input string is \f(CW\*(C`undef\*(C'\fR, it remains
379 \&\f(CW\*(C`undef\*(C'\fR. Previously it would be changed into a defined, zero\-length
380 string.
381 .SS "Changes to ""thread\-safe"" locales"
382 .IX Subsection "Changes to ""thread-safe"" locales"
383 Perl 5.28 introduced "thread\-safe" locales on systems that supported
384 them, namely modern Windows, and systems supporting POSIX 2008 locale
385 operations. These systems accomplish this by having per\-thread locales,
386 while continuing to support the older global locale operations for code
387 that doesn\*(Aqt take the steps necessary to use the newer per\-thread ones.
388 .PP
389 It turns out that some POSIX 2008 platforms have or have had buggy
390 implementations, which forced perl to not use them. The
391 \&\f(CW\*(C`${^SAFE_LOCALES}\*(C'\fR scalar variable contains 0 or 1 to indicate whether
392 or not the current platform is considered by perl to have a working
393 thread\-safe implementation. Some implementations have been fixed
394 already, but FreeBSD and Cygwin have been newly discovered to be
395 sufficiently buggy that the thread\-safe operations are no longer used by
396 perl, starting in this release. Hence, \f(CW\*(C`${^SAFE_LOCALES}\*(C'\fR is now 0 for
397 them. Older versions of perl can be configured to avoid these buggy
398 implementations by adding the \fIConfigure\fR option
399 \&\f(CW\*(C`\-DNO_POSIX_2008_LOCALE\*(C'\fR.
400 .PP
401 And v5.38 fixes a bug in all previous perls that led to locales not
402 being fully thread\-safe. The first thread that finishes caused
403 the main thread (named \f(CW\*(C`thread0\*(C'\fR) to revert to the global locale in
404 effect at startup, discarding whatever the thread\*(Aqs locale had been
405 previously set to. If any other thread had switched to the global
406 locale by calling \f(CWswitch_to_global_locale()\fR in XS code, those threads
407 would all share the global locale, and \f(CW\*(C`thread0\*(C'\fR would not be
408 thread\-safe.
409 .SH Deprecations
410 .IX Header "Deprecations"
411 .ie n .SS "Use of ""\*(Aq"" as a package name separator is deprecated"
412 .el .SS "Use of \f(CW\*(Aq\fP as a package name separator is deprecated"
413 .IX Subsection "Use of ' as a package name separator is deprecated"
414 Using \f(CW\*(C`\*(Aq\*(C'\fR as package separator in a variable named in a double\-quoted
415 string has warned since 5.28. It is now deprecated in both string
416 interpolation and non\-interpolated contexts, and will be removed in
417 Perl 5.42.
418 .SS "Switch and Smart Match operator"
419 .IX Subsection "Switch and Smart Match operator"
420 The "switch" feature and the smartmatch operator, \f(CW\*(C`~~\*(C'\fR, were introduced in
421 v5.10. Their behavior was significantly changed in v5.10.1. When the
422 "experiment" system was added in v5.18.0, switch and smartmatch were
423 retroactively declared experimental. Over the years, proposals to fix or
424 supplement the features have come and gone.
425 .PP
426 In v5.38.0, we are declaring the experiment a failure. Some future system may
427 take the conceptual place of smartmatch, but it has not yet been designed or
428 built.
429 .PP
430 These features will be entirely removed from perl in v5.42.0.
431 .SH "Performance Enhancements"
432 .IX Header "Performance Enhancements"
433 .IP \(bu 4
434 Additional optree optimizations for common OP patterns. For example, multiple
435 simple OPs replaced by a single streamlined OP, so as to be more efficient at
436 runtime. [GH #19943 <https://github.com/Perl/perl5/pull/19943>],
437 [GH #20063 <https://github.com/Perl/perl5/pull/20063>],
438 [GH #20077 <https://github.com/Perl/perl5/pull/20077>].
439 .IP \(bu 4
440 Creating an anonymous sub no longer generates an \f(CW\*(C`srefgen\*(C'\fR op, the
441 reference generation is now done in the \f(CW\*(C`anoncode\*(C'\fR or \f(CW\*(C`anonconst\*(C'\fR
442 op, saving runtime. [GH #20290 <https://github.com/Perl/perl5/pull/20290>]
443 .SH "Modules and Pragmata"
444 .IX Header "Modules and Pragmata"
445 .SS "Updated Modules and Pragmata"
446 .IX Subsection "Updated Modules and Pragmata"
447 .IP \(bu 4
448 Added the \f(CWis_tainted()\fR builtin function. [GH #19854 <https://github.com/Perl/perl5/issues/19854>]
449 .IP \(bu 4
450 Added the \f(CWexport_lexically()\fR builtin function as per PPC 0020 <https://github.com/Perl/PPCs/blob/main/ppcs/ppc0020-lexical-export.md>. [GH #19895 <https://github.com/Perl/perl5/issues/19895>]
451 .IP \(bu 4
452 Support for PPC 0018 <https://github.com/Perl/PPCs/blob/main/ppcs/ppc0018-module-true.md>, \f(CW\*(C`use feature "module_true";\*(C'\fR has been added to
453 the default feature bundle for v5.38 and later. It may also be used
454 explicitly. When enabled inside of a module the module does not need
455 to return true explicitly, and in fact the return will be forced to
456 a simple true value regardless of what it originally was.
457 .IP \(bu 4
458 Attribute::Handlers has been upgraded from version 1.02 to 1.03.
459 .IP \(bu 4
460 attributes has been upgraded from version 0.34 to 0.35.
461 .IP \(bu 4
462 autodie has been upgraded from version 2.34 to 2.36.
463 .IP \(bu 4
464 B has been upgraded from version 1.83 to 1.88.
465 .IP \(bu 4
466 B::Concise has been upgraded from version 1.006 to 1.007.
467 .IP \(bu 4
468 B::Deparse has been upgraded from version 1.64 to 1.74.
469 .IP \(bu 4
470 Benchmark has been upgraded from version 1.23 to 1.24.
471 .IP \(bu 4
472 bignum has been upgraded from version 0.65 to 0.66.
473 .IP \(bu 4
474 Carp has been upgraded from version 1.52 to 1.54.
475 .IP \(bu 4
476 Class::Struct has been upgraded from version 0.66 to 0.68.
477 .IP \(bu 4
478 Compress::Raw::Bzip2 has been upgraded from version 2.103 to 2.204_001.
479 .IP \(bu 4
480 Compress::Raw::Zlib has been upgraded from version 2.105 to 2.204_001.
481 .IP \(bu 4
482 Config::Perl::V has been upgraded from version 0.33 to 0.36.
483 .IP \(bu 4
484 CPAN has been upgraded from version 2.33 to 2.36.
485 .IP \(bu 4
486 Data::Dumper has been upgraded from version 2.184 to 2.188.
487 .IP \(bu 4
488 DB_File has been upgraded from version 1.857 to 1.858.
489 .IP \(bu 4
490 Devel::Peek has been upgraded from version 1.32 to 1.33.
491 .IP \(bu 4
492 Devel::PPPort has been upgraded from version 3.68 to 3.71.
493 .IP \(bu 4
494 Digest::MD5 has been upgraded from version 2.58 to 2.58_01.
495 .IP \(bu 4
496 Digest::SHA has been upgraded from version 6.02 to 6.04.
497 .IP \(bu 4
498 DynaLoader has been upgraded from version 1.52 to 1.54.
499 .IP \(bu 4
500 Encode has been upgraded from version 3.17 to 3.19.
501 .IP \(bu 4
502 encoding::warnings has been upgraded from version 0.13 to 0.14.
503 .IP \(bu 4
504 Env has been upgraded from version 1.05 to 1.06.
505 .IP \(bu 4
506 Errno has been upgraded from version 1.36 to 1.37.
507 .IP \(bu 4
508 experimental has been upgraded from version 0.028 to 0.031.
509 .IP \(bu 4
510 ExtUtils::CBuilder has been upgraded from version 0.280236 to 0.280238.
511 .IP \(bu 4
512 ExtUtils::Install has been upgraded from version 2.20 to 2.22.
513 .IP \(bu 4
514 ExtUtils::MakeMaker has been upgraded from version 7.64 to 7.70.
515 .IP \(bu 4
516 ExtUtils::Miniperl has been upgraded from version 1.11 to 1.13.
517 .IP \(bu 4
518 ExtUtils::ParseXS has been upgraded from version 3.45 to 3.51.
519 .IP \(bu 4
520 ExtUtils::PL2Bat has been upgraded from version 0.004 to 0.005.
521 .IP \(bu 4
522 ExtUtils::Typemaps has been upgraded from version 3.45 to 3.51.
523 .IP \(bu 4
524 feature has been upgraded from version 1.72 to 1.82.
525 .IP \(bu 4
526 File::Basename has been upgraded from version 2.85 to 2.86.
527 .IP \(bu 4
528 File::Copy has been upgraded from version 2.39 to 2.41.
529 .IP \(bu 4
530 File::Find has been upgraded from version 1.40 to 1.43.
531 .IP \(bu 4
532 File::Glob has been upgraded from version 1.37 to 1.40.
533 .IP \(bu 4
534 File::Spec has been upgraded from version 3.84 to 3.89.
535 .IP \(bu 4
536 File::stat has been upgraded from version 1.12 to 1.13.
537 .IP \(bu 4
538 FileHandle has been upgraded from version 2.03 to 2.05.
539 .IP \(bu 4
540 Filter::Util::Call has been upgraded from version 1.60 to 1.64.
541 .IP \(bu 4
542 GDBM_File has been upgraded from version 1.23 to 1.24.
543 .IP \(bu 4
544 Getopt::Long has been upgraded from version 2.52 to 2.54.
545 .IP \(bu 4
546 Hash::Util has been upgraded from version 0.28 to 0.30.
547 .IP \(bu 4
548 HTTP::Tiny has been upgraded from version 0.080 to 0.083.
549 .IP \(bu 4
550 I18N::Langinfo has been upgraded from version 0.21 to 0.22.
551 .IP \(bu 4
552 IO has been upgraded from version 1.50 to 1.52.
553 .IP \(bu 4
554 IO\-Compress has been upgraded from version 2.106 to 2.204.
555 .IP \(bu 4
556 IO::Socket::IP has been upgraded from version 0.41 to 0.41_01.
557 .Sp
558 On DragonflyBSD, detect \fBsetsockopt()\fR not actually clearing
559 \&\f(CW\*(C`IPV6_V6ONLY\*(C'\fR even when \fBsetsockopt()\fR returns success. [cpan
560 #148293 <https://rt.cpan.org/Ticket/Display.html?id=148293>]
561 .IP \(bu 4
562 IO::Zlib has been upgraded from version 1.11 to 1.14.
563 .IP \(bu 4
564 JSON::PP has been upgraded from version 4.07 to 4.16.
565 .IP \(bu 4
566 libnet has been upgraded from version 3.14 to 3.15.
567 .IP \(bu 4
568 Locale::Maketext has been upgraded from version 1.31 to 1.33.
569 .IP \(bu 4
570 Math::BigInt has been upgraded from version 1.999830 to 1.999837.
571 .IP \(bu 4
572 Math::BigInt::FastCalc has been upgraded from version 0.5012 to 0.5013.
573 .IP \(bu 4
574 Math::BigRat has been upgraded from version 0.2621 to 0.2624.
575 .IP \(bu 4
576 Math::Complex has been upgraded from version 1.5902 to 1.62.
577 .IP \(bu 4
578 Memoize has been upgraded from version 1.03_01 to 1.16.
579 .IP \(bu 4
580 MIME::Base64 has been upgraded from version 3.16 to 3.16_01.
581 .IP \(bu 4
582 Module::CoreList has been upgraded from version 5.20220520 to 5.20230520.
583 .IP \(bu 4
584 mro has been upgraded from version 1.26 to 1.28.
585 .IP \(bu 4
586 NDBM_File has been upgraded from version 1.15 to 1.16.
587 .IP \(bu 4
588 Net::Ping has been upgraded from version 2.74 to 2.76.
589 .IP \(bu 4
590 ODBM_File has been upgraded from version 1.17 to 1.18.
591 .IP \(bu 4
592 Opcode has been upgraded from version 1.57 to 1.64.
593 .IP \(bu 4
594 overload has been upgraded from version 1.35 to 1.37.
595 .IP \(bu 4
596 parent has been upgraded from version 0.238 to 0.241.
597 .IP \(bu 4
598 PerlIO::via::QuotedPrint has been upgraded from version 0.09 to 0.10.
599 .IP \(bu 4
600 Pod::Checker has been upgraded from version 1.74 to 1.75.
601 .IP \(bu 4
602 Pod::Html has been upgraded from version 1.33 to 1.34.
603 .IP \(bu 4
604 Pod::Usage has been upgraded from version 2.01 to 2.03.
605 .IP \(bu 4
606 podlators has been upgraded from version 4.14 to 5.01.
607 .IP \(bu 4
608 POSIX has been upgraded from version 2.03 to 2.13.
609 .IP \(bu 4
610 re has been upgraded from version 0.43 to 0.44.
611 .IP \(bu 4
612 Safe has been upgraded from version 2.43 to 2.44.
613 .IP \(bu 4
614 Scalar::Util has been upgraded from version 1.62 to 1.63.
615 .IP \(bu 4
616 SDBM_File has been upgraded from version 1.15 to 1.17.
617 .IP \(bu 4
618 Socket has been upgraded from version 2.033 to 2.036.
619 .IP \(bu 4
620 Storable has been upgraded from version 3.26 to 3.32.
621 .IP \(bu 4
622 Sys::Hostname has been upgraded from version 1.24 to 1.25.
623 .IP \(bu 4
624 Term::Cap has been upgraded from version 1.17 to 1.18.
625 .IP \(bu 4
626 Test::Simple has been upgraded from version 1.302190 to 1.302194.
627 .IP \(bu 4
628 Text::Balanced has been upgraded from version 2.04 to 2.06.
629 .IP \(bu 4
630 threads has been upgraded from version 2.27 to 2.36.
631 .IP \(bu 4
632 threads::shared has been upgraded from version 1.64 to 1.68.
633 .IP \(bu 4
634 Tie::File has been upgraded from version 1.06 to 1.07.
635 .IP \(bu 4
636 Time::HiRes has been upgraded from version 1.9770 to 1.9775.
637 .IP \(bu 4
638 Time::Piece has been upgraded from version 1.3401 to 1.3401_01.
639 .IP \(bu 4
640 Unicode::Normalize has been upgraded from version 1.31 to 1.32.
641 .IP \(bu 4
642 UNIVERSAL has been upgraded from version 1.14 to 1.15.
643 .IP \(bu 4
644 User::grent has been upgraded from version 1.03 to 1.04.
645 .IP \(bu 4
646 User::pwent has been upgraded from version 1.01 to 1.02.
647 .IP \(bu 4
648 utf8 has been upgraded from version 1.24 to 1.25.
649 .IP \(bu 4
650 warnings has been upgraded from version 1.58 to 1.65.
651 .IP \(bu 4
652 XS::APItest has been upgraded from version 1.22 to 1.32.
653 .IP \(bu 4
654 XSLoader has been upgraded from version 0.31 to 0.32.
655 .SH Documentation
656 .IX Header "Documentation"
657 .SS "New Documentation"
658 .IX Subsection "New Documentation"
659 \fIperlclass\fR
660 .IX Subsection "perlclass"
661 .PP
662 Describes the new \f(CW\*(C`class\*(C'\fR feature.
663 .PP
664 \fIperlclassguts\fR
665 .IX Subsection "perlclassguts"
666 .PP
667 Describes the internals of the new \f(CW\*(C`class\*(C'\fR feature.
668 .SS "Changes to Existing Documentation"
669 .IX Subsection "Changes to Existing Documentation"
670 We have attempted to update the documentation to reflect the changes
671 listed in this document. If you find any we have missed, open an issue
672 at <https://github.com/Perl/perl5/issues>.
673 .PP
674 Additionally, the following selected changes have been made:
675 .PP
676 \fIperlapi\fR
677 .IX Subsection "perlapi"
678 .IP \(bu 4
679 Documented \f(CW\*(C`hv_ksplit\*(C'\fR
680 .IP \(bu 4
681 Documented \f(CW\*(C`hv_name_set\*(C'\fR
682 .IP \(bu 4
683 \&\f(CW\*(C`hv_store\*(C'\fR and \f(CW\*(C`hv_stores\*(C'\fR
684 documentation have been greatly improved.
685 .IP \(bu 4
686 Documented \f(CW\*(C`gv_autoload_pv\*(C'\fR
687 .IP \(bu 4
688 Documented \f(CW\*(C`gv_autoload_pvn\*(C'\fR
689 .IP \(bu 4
690 Documented \f(CW\*(C`gv_autoload_sv\*(C'\fR
691 .IP \(bu 4
692 Documented \f(CW\*(C`gv_name_set\*(C'\fR
693 .IP \(bu 4
694 Documented \f(CW\*(C`start_subparse\*(C'\fR
695 .IP \(bu 4
696 Documented \f(CW\*(C`SV_CHECK_THINKFIRST_COW_DROP\*(C'\fR
697 .IP \(bu 4
698 Documented \f(CW\*(C`SV_CHECK_THINKFIRST\*(C'\fR
699 .IP \(bu 4
700 Documented \f(CW\*(C`SvPV_shrink_to_cur\*(C'\fR
701 .IP \(bu 4
702 Documented \f(CW\*(C`save_aelem\*(C'\fR
703 .IP \(bu 4
704 Documented \f(CW\*(C`save_aelem_flags\*(C'\fR
705 .IP \(bu 4
706 Documented \f(CW\*(C`save_helem\*(C'\fR
707 .IP \(bu 4
708 Documented \f(CW\*(C`save_helem_flags\*(C'\fR
709 .PP
710 \fIperldeprecation\fR
711 .IX Subsection "perldeprecation"
712 .IP \(bu 4
713 Added information about unscheduled deprecations and their categories.
714 .IP \(bu 4
715 Added category information for existing scheduled deprecations.
716 .IP \(bu 4
717 Added smartmatch and apostrophe as a package separator deprecation data.
718 .PP
719 \fIperlintern\fR
720 .IX Subsection "perlintern"
721 .IP \(bu 4
722 Documented \f(CW\*(C`save_pushptr\*(C'\fR
723 .IP \(bu 4
724 Documented \f(CW\*(C`save_scalar_at\*(C'\fR
725 .IP \(bu 4
726 Entries have been added to perlguts for the new \f(CW\*(C`newAV_alloc_x\*(C'\fR, \f(CW\*(C`newAV_alloc_xz\*(C'\fR and
727 \&\f(CW*_simple\fR functions.
728 .IP \(bu 4
729 References to the now\-defunct PrePAN service have been removed from
730 perlcommunity and perlmodstyle.
731 .IP \(bu 4
732 A section on symbol naming has been added to perlhacktips.
733 .IP \(bu 4
734 perlexperiment has been edited to properly reference the warning categories
735 for the defer block modifier and extra paired delimiters for quote\-like
736 operators.
737 .PP
738 \fIperlexperiment\fR
739 .IX Subsection "perlexperiment"
740 .IP \(bu 4
741 Smartmatch has been moved from experimental status to deprecated status.
742 Unfortunately the experiment did not work out.
743 .PP
744 \fIperlfunc\fR
745 .IX Subsection "perlfunc"
746 .IP \(bu 4
747 Some wording improvements have been made for the \f(CW\*(C`ucfirst\*(C'\fR, \f(CW\*(C`push\*(C'\fR,
748 \&\f(CW\*(C`unshift\*(C'\fR and \f(CW\*(C`bless\*(C'\fR functions, as well as additional examples added.
749 .PP
750 \fIperlhacktips\fR
751 .IX Subsection "perlhacktips"
752 .IP \(bu 4
753 A new section, "Writing safer macros" in perlhacktips has been added to discuss
754 pitfalls and solutions to using C macros in C and XS code.
755 .IP \(bu 4
756 A new section, "Choosing good symbol names" in perlhacktips, has been added to
757 discuss unexpected gotchas with names.
758 .PP
759 \fIperlop\fR
760 .IX Subsection "perlop"
761 .IP \(bu 4
762 Document the behavior of matching the empty pattern better and specify
763 its relationship to the new \f(CW\*(C`${^LAST_SUCCESSFUL_PATTERN}\*(C'\fR properly.
764 .PP
765 \fIperlvar\fR
766 .IX Subsection "perlvar"
767 .IP \(bu 4
768 Added a section on "Scoping Rules of Regex Variables", and other wording
769 improvements made throughout.
770 .IP \(bu 4
771 Added information on the new \f(CW\*(C`%{^HOOK}\*(C'\fR interface, and the new
772 \&\f(CW\*(C`require_\|_before\*(C'\fR and \f(CW\*(C`require_\|_after\*(C'\fR hooks which it exposes.
773 .IP \(bu 4
774 Correct information on the regex variables \f(CW\*(C`${^PREMATCH}\*(C'\fR, \f(CW\*(C`${^MATCH}\*(C'\fR
775 and \f(CW\*(C`${^POSTMATCH}\*(C'\fR, all of which were incorrectly documented due to an
776 oversight. Specifically they only work properly after a regex operation
777 that used the /p modifier to enable them.
778 .IP \(bu 4
779 Added information on the new regex variable \f(CW\*(C`${^LAST_SUCCESSFUL_PATTERN}\*(C'\fR,
780 which represents the pattern of the last successful regex match in scope.
781 .SH Diagnostics
782 .IX Header "Diagnostics"
783 The following additions or changes have been made to diagnostic output,
784 including warnings and fatal error messages. For the complete list of
785 diagnostic messages, see perldiag.
786 .SS "New Diagnostics"
787 .IX Subsection "New Diagnostics"
788 \fINew Errors\fR
789 .IX Subsection "New Errors"
790 .IP \(bu 4
791 A new syntax error has been added for the error that a \f(CW\*(C`catch\*(C'\fR block does
792 not have its required variable declaration. See
793 catch block requires a (VAR)
794 .IP \(bu 4
795 Too many nested BEGIN blocks, maximum of \f(CW%d\fR allowed
796 .IP \(bu 4
797 Execution of \f(CW%s\fR aborted due to compilation errors.
798 .IP \(bu 4
799 Can\*(Aqt locate object method "INC", nor "INCDIR" nor string overload via
800 package "%s" \f(CW%s\fR in \f(CW@INC\fR
801 .IP \(bu 4
802 Attempt to bless into a class
803 .Sp
804 (F) You are attempting to call \f(CW\*(C`bless\*(C'\fR with a package name that is a
805 new\-style \f(CW\*(C`class\*(C'\fR. This is not necessary, as instances created by the
806 constructor are already in the correct class. Instances cannot be created
807 by other means, such as \f(CW\*(C`bless\*(C'\fR.
808 .IP \(bu 4
809 Cannot assign :param(%s) to field \f(CW%s\fR because that name is already in use
810 .Sp
811 (F) An attempt was made to apply a parameter name to a field, when the name
812 is already being used by another field in the same class, or one of its
813 parent classes. This would cause a name clash so is not allowed.
814 .IP \(bu 4
815 Cannot create class \f(CW%s\fR as it already has a non\-empty \f(CW@ISA\fR
816 .Sp
817 (F) An attempt was made to create a class out of a package that already has
818 an \f(CW@ISA\fR array, and the array is not empty. This is not permitted, as it
819 would lead to a class with inconsistent inheritance.
820 .IP \(bu 4
821 Cannot invoke a method of "%s" on an instance of "%s"
822 .Sp
823 (F) You tried to directly call a \f(CW\*(C`method\*(C'\fR subroutine of one class by passing
824 in a value that is an instance of a different class. This is not permitted,
825 as the method would not have access to the correct instance fields.
826 .IP \(bu 4
827 Cannot invoke method on a non\-instance
828 .Sp
829 (F) You tried to directly call a \f(CW\*(C`method\*(C'\fR subroutine of a class by passing
830 in a value that is not an instance of that class. This is not permitted, as
831 the method would not then have access to its instance fields.
832 .IP \(bu 4
833 Cannot \*(Aq%s\*(Aq outside of a \*(Aqclass\*(Aq
834 .Sp
835 (F) You attempted to use one of the keywords that only makes sense inside
836 a \f(CW\*(C`class\*(C'\fR definition, at a location that is not inside such a class.
837 .IP \(bu 4
838 Cannot reopen existing class "%s"
839 .Sp
840 (F) You tried to begin a \f(CW\*(C`class\*(C'\fR definition for a class that already exists.
841 A class may only have one definition block.
842 .IP \(bu 4
843 Can\*(Aqt bless an object reference
844 .Sp
845 (F) You attempted to call \f(CW\*(C`bless\*(C'\fR on a value that already refers to a real
846 object instance.
847 .IP \(bu 4
848 can\*(Aqt convert empty path
849 .Sp
850 (F) On Cygwin, you called a path conversion function with an empty path.
851 Only non\-empty paths are legal.
852 .IP \(bu 4
853 Class already has a superclass, cannot add another
854 .Sp
855 (F) You attempted to specify a second superclass for a \f(CW\*(C`class\*(C'\fR by using
856 the \f(CW\*(C`:isa\*(C'\fR attribute, when one is already specified. Unlike classes
857 whose instances are created with \f(CW\*(C`bless\*(C'\fR, classes created via the
858 \&\f(CW\*(C`class\*(C'\fR keyword cannot have more than one superclass.
859 .IP \(bu 4
860 Class attribute \f(CW%s\fR requires a value
861 .Sp
862 (F) You specified an attribute for a class that would require a value to
863 be passed in parentheses, but did not provide one. Remember that
864 whitespace is \fBnot\fR permitted between the attribute name and its value;
865 you must write this as
866 .Sp
867 .Vb 1
868 \& class Example::Class :attr(VALUE) ...
869 .Ve
870 .IP \(bu 4
871 Class :isa attribute requires a class but "%s" is not one
872 .Sp
873 (F) When creating a subclass using the \f(CW\*(C`class\*(C'\fR \f(CW\*(C`:isa\*(C'\fR attribute, the
874 named superclass must also be a real class created using the \f(CW\*(C`class\*(C'\fR
875 keyword.
876 .IP \(bu 4
877 Field already has a parameter name, cannot add another
878 .Sp
879 (F) A field may have at most one application of the \f(CW\*(C`:param\*(C'\fR attribute to
880 assign a parameter name to it; once applied a second one is not allowed.
881 .IP \(bu 4
882 Field attribute \f(CW%s\fR requires a value
883 .Sp
884 (F) You specified an attribute for a field that would require a value to
885 be passed in parentheses, but did not provide one. Remember that
886 whitespace is \fBnot\fR permitted between the attribute name and its value;
887 you must write this as
888 .Sp
889 .Vb 1
890 \& field $var :attr(VALUE) ...
891 .Ve
892 .IP \(bu 4
893 Field \f(CW%s\fR is not accessible outside a method
894 .Sp
895 (F) An attempt was made to access a field variable of a class from code
896 that does not appear inside the body of a \f(CW\*(C`method\*(C'\fR subroutine. This is not
897 permitted, as only methods will have access to the fields of an instance.
898 .IP \(bu 4
899 Field \f(CW%s\fR of "%s" is not accessible in a method of "%s"
900 .Sp
901 (F) An attempt was made to access a field variable of a class, from a
902 method of another class nested inside the one that actually defined it.
903 This is not permitted, as only methods defined by a given class are
904 permitted to access fields of that class.
905 .IP \(bu 4
906 Only scalar fields can take a :param attribute
907 .Sp
908 (F) You tried to apply the \f(CW\*(C`:param\*(C'\fR attribute to an array or hash field.
909 Currently this is not permitted.
910 .IP \(bu 4
911 Required parameter \*(Aq%s\*(Aq is missing for \f(CW%s\fR constructor
912 .Sp
913 (F) You called the constructor for a class that has a required named
914 parameter, but did not pass that parameter at all.
915 .IP \(bu 4
916 Unexpected characters while parsing class :isa attribute: \f(CW%s\fR
917 .Sp
918 (F) You tried to specify something other than a single class name with an
919 optional trailing version number as the value for a \f(CW\*(C`class\*(C'\fR \f(CW\*(C`:isa\*(C'\fR
920 attribute. This confused the parser.
921 .IP \(bu 4
922 Unrecognized class attribute \f(CW%s\fR
923 .Sp
924 (F) You attempted to add a named attribute to a \f(CW\*(C`class\*(C'\fR definition, but
925 perl does not recognise the name of the requested attribute.
926 .IP \(bu 4
927 Unrecognized field attribute \f(CW%s\fR
928 .Sp
929 (F) You attempted to add a named attribute to a \f(CW\*(C`field\*(C'\fR definition, but
930 perl does not recognise the name of the requested attribute.
931 .IP \(bu 4
932 ${^HOOK}{%s} may only be a CODE reference or undef
933 .IP \(bu 4
934 Attempt to set unknown hook \*(Aq%s\*(Aq in %{^HOOK}
935 .IP \(bu 4
936 Missing or undefined argument to \f(CW%s\fR via %{^HOOK}{require_\|_before}
937 .IP \(bu 4
938 Too many capture groups (limit is \f(CW%d\fR) in regex m/%s/
939 .PP
940 \fINew Warnings\fR
941 .IX Subsection "New Warnings"
942 .IP \(bu 4
943 Unknown locale category \f(CW%d\fR
944 .Sp
945 This is a shortened form of an already existing diagnostic, for use when
946 there is no new locale being switched to. The previous diagnostic was
947 misleading in such circumstances.
948 .IP \(bu 4
949 Locale \*(Aq%s\*(Aq is unsupported, and may crash the interpreter.
950 .IP \(bu 4
951 Treating \f(CW%s::INIT\fR block as BEGIN block as workaround
952 .IP \(bu 4
953 Filehandle STD%s reopened as \f(CW%s\fR only for input
954 .IP \(bu 4
955 \&\f(CW%s\fR on BEGIN block ignored
956 .IP \(bu 4
957 ADJUST is experimental
958 .Sp
959 (S experimental::class) This warning is emitted if you use the \f(CW\*(C`ADJUST\*(C'\fR
960 keyword of \f(CW\*(C`use feature \*(Aqclass\*(Aq\*(C'\fR. This keyword is currently
961 experimental and its behaviour may change in future releases of Perl.
962 .IP \(bu 4
963 class is experimental
964 .Sp
965 (S experimental::class) This warning is emitted if you use the \f(CW\*(C`class\*(C'\fR
966 keyword of \f(CW\*(C`use feature \*(Aqclass\*(Aq\*(C'\fR. This keyword is currently
967 experimental and its behaviour may change in future releases of Perl.
968 .IP \(bu 4
969 Method \f(CW%s\fR redefined
970 .Sp
971 (W redefine) You redefined a method. To suppress this warning, say
972 .Sp
973 .Vb 4
974 \& {
975 \& no warnings \*(Aqredefine\*(Aq;
976 \& *name = method { ... };
977 \& }
978 .Ve
979 .IP \(bu 4
980 Odd number of elements in hash field initialization
981 .Sp
982 (W misc) You specified an odd number of elements to initialise a hash
983 field of an object. Hashes are initialised from a list of key/value
984 pairs so there must be a corresponding value to every key. The final
985 missing value will be filled in with undef instead.
986 .IP \(bu 4
987 Old package separator "\*(Aq" deprecated
988 .Sp
989 (W deprecated, syntax) You used the old package separator "\*(Aq" in a
990 variable, subroutine or package name. Support for the old package
991 separator will be removed in Perl 5.40.
992 .IP \(bu 4
993 field is experimental
994 .Sp
995 (S experimental::class) This warning is emitted if you use the \f(CW\*(C`field\*(C'\fR
996 keyword of \f(CW\*(C`use feature \*(Aqclass\*(Aq\*(C'\fR. This keyword is currently
997 experimental and its behaviour may change in future releases of Perl.
998 .IP \(bu 4
999 method is experimental
1000 .Sp
1001 (S experimental::class) This warning is emitted if you use the \f(CW\*(C`method\*(C'\fR
1002 keyword of \f(CW\*(C`use feature \*(Aqclass\*(Aq\*(C'\fR. This keyword is currently
1003 experimental and its behaviour may change in future releases of Perl.
1004 .IP \(bu 4
1005 Can\*(Aqt call destructor for 0x%p in global destruction
1006 .SS "Changes to Existing Diagnostics"
1007 .IX Subsection "Changes to Existing Diagnostics"
1008 .IP \(bu 4
1009 The compiler will now stop parsing on the first syntax error it
1010 encounters. Historically the compiler would attempt to "skip past" the
1011 error and continue parsing so that it could list multiple errors. For
1012 things like undeclared variables under strict this makes sense. For
1013 syntax errors however it has been found that continuing tends to result
1014 in a storm of unrelated or bizarre errors that mostly just obscure the
1015 true error. In extreme cases it can even lead to segfaults and other
1016 incorrect behavior.
1017 .Sp
1018 Therefore we have reformed the continuation logic so that the parse will
1019 stop after the first seen syntax error. Semantic errors like undeclared
1020 variables will not stop the parse, so you may still see multiple errors
1021 when compiling code. However if there is a syntax error it will be the
1022 last error message reported by perl and all of the errors that you see
1023 will be something that actually needs to be fixed.
1024 .IP \(bu 4
1025 Error messages that output class or package names have been modified to
1026 output double quoted strings with various characters escaped so as to
1027 make the exact value clear to a reader. The exact rules on which
1028 characters are escaped may change over time but currently are that
1029 printable ASCII codepoints, with the exception of \f(CW\*(C`"\*(C'\fR and \f(CW\*(C`\e\*(C'\fR, and
1030 Unicode word characters whose codepoint is over 255 are output raw, and
1031 any other symbols are escaped much as Data::Dumper might escape them,
1032 using \f(CW\*(C`\en\*(C'\fR for newline and \f(CW\*(C`\e"\*(C'\fR for double quotes, etc. Codepoints in
1033 the range 128\-255 are always escaped as they can cause trouble on
1034 Unicode terminals when output raw.
1035 .Sp
1036 In older versions of perl the one liner
1037 .Sp
1038 .Vb 1
1039 \& $ perl \-le\*(Aq"thing\en"\->foo()\*(Aq
1040 .Ve
1041 .Sp
1042 would output the following error message exactly as shown here, with
1043 text spread over multiple lines because the "\en" would be emitted as
1044 a raw newline character:
1045 .Sp
1046 .Vb 3
1047 \& Can\*(Aqt locate object method "foo" via package "thing
1048 \& " (perhaps you forgot to load "thing
1049 \& "?) at \-e line 1.
1050 .Ve
1051 .Sp
1052 As of this release we would output this instead (as one line):
1053 .Sp
1054 .Vb 2
1055 \& Can\*(Aqt locate object method "foo" via package "thing\en"
1056 \& (perhaps you forgot to load "thing\en"?) at \-e line 1.
1057 .Ve
1058 .Sp
1059 Notice the newline in the package name has been quoted and escaped, and
1060 thus the error message is a single line. The text is shown here wrapped
1061 to two lines only for readability.
1062 .IP \(bu 4
1063 When package or class names in errors are very large the middle excess
1064 portion will be elided from the message. As of this release error messages
1065 will show only up to the first 128 characters and the last 128 characters
1066 in a package or class name in error messages. For example
1067 .Sp
1068 .Vb 1
1069 \& $ perl \-le\*(Aq("Foo" x 1000)\->new()\*(Aq
1070 .Ve
1071 .Sp
1072 will output the following as one line:
1073 .Sp
1074 .Vb 10
1075 \& Can\*(Aqt locate object method "new" via package "FooFooFooFooFooFooFoo
1076 \& FooFooFooFooFooFooFooFooFooFooFooFooFooFooFooFooFooFooFooFooFooFoo
1077 \& FooFooFooFooFooFooFooFooFooFooFooFooFooFo"..."oFooFooFooFooFooFooFoo
1078 \& FooFooFooFooFooFooFooFooFooFooFooFooFooFooFooFooFooFooFooFooFooFoo
1079 \& FooFooFooFooFooFooFooFooFooFooFooFooFoo" (perhaps you forgot to load
1080 \& "FooFooFooFooFooFooFooFooFooFooFooFooFooFooFooFooFooFooFooFooFooFoo
1081 \& FooFooFooFooFooFooFooFooFooFooFooFooFooFooFooFooFooFooFooFooFo"...
1082 \& "oFooFooFooFooFooFooFooFooFooFooFooFooFooFooFooFooFooFooFooFooFooFoo
1083 \& FooFooFooFooFooFooFooFooFooFooFooFooFooFooFooFooFooFooFooFoo"?)
1084 \& at \-e line 1.
1085 .Ve
1086 .Sp
1087 Notice the \f(CW "prefix"..."suffix" \fR form of the package name in this case.
1088 In previous versions of perl the complete string would have been shown
1089 making the error message over 6k long and there was no upper limit on the
1090 length of the error message at all. If you accidentally used a 1MB string
1091 as a class name then the error message would be over 2MB long. In this perl
1092 the upper limit should be around 2k when eliding and escaping are taken into
1093 account.
1094 .IP \(bu 4
1095 Removed \f(CW\*(C`Complex regular subexpression recursion limit (%d) exceeded\*(C'\fR
1096 .Sp
1097 The regular expression engine has not used recursion in some time. This
1098 warning no longer makes sense.
1099 .Sp
1100 See [GH #19636 <https://github.com/Perl/perl5/pull/19636>].
1101 .IP \(bu 4
1102 Various warnings that used to produce parenthesized hints underneath the
1103 main warning message and after its "location data" were chanaged to put
1104 the hint inline with the main message. For instance:
1105 .Sp
1106 .Vb 2
1107 \& Bareword found where operator expected at \-e line 1, near "foo bar"
1108 \& (Do you need to predeclare foo?)
1109 .Ve
1110 .Sp
1111 will now look like this but as one line:
1112 .Sp
1113 .Vb 2
1114 \& Bareword found where operator expected (Do you need to predeclare
1115 \& foo?) at \-e line 1, near "foo bar"
1116 .Ve
1117 .Sp
1118 as a result such warnings will no longer trigger \f(CW$SIG{_\|_WARN_\|_}\fR
1119 twice, and the hint will be visible when fatal warnings is in effect.
1120 .IP \(bu 4
1121 The error message that is produced when a \f(CW\*(C`require\*(C'\fR or \f(CW\*(C`use\*(C'\fR statement
1122 fails has been changed. It used to contain the words \f(CW\*(C`@INC contains:\*(C'\fR,
1123 and it used to show the state of \f(CW@INC\fR *after* the require had
1124 completed and failed. The error message has been changed to say \f(CW\*(C`@INC
1125 entries checked:\*(C'\fR and to reflect the actual directories or hooks that
1126 were executed during the require statement. For example:
1127 .Sp
1128 .Vb 4
1129 \& perl \-e\*(Aqpush @INC, sub {@INC=()}; eval "require Frobnitz"
1130 \& or die $@\*(Aq
1131 \& Can\*(Aqt locate Frobnitz.pm in @INC (you may need to install the
1132 \& Frobnitz module) (@INC contains:) at (eval 1) line 1.
1133 .Ve
1134 .Sp
1135 Will change to (with some output elided for clarity):
1136 .Sp
1137 .Vb 7
1138 \& perl \-e\*(Aqpush @INC, sub {@INC=()}; eval "require Frobnitz"
1139 \& or die $@\*(Aq
1140 \& Can\*(Aqt locate Frobnitz.pm in @INC (you may need to install the
1141 \& Frobnitz module) (@INC entries checked:
1142 \& .../site_perl/5.38.0/x86_64\-linux .../site_perl/5.38.0
1143 \& .../5.38.0/x86_64\-linux .../5.38.0 CODE(0x562745e684b8))
1144 \& at (eval 1) line 1.
1145 .Ve
1146 .Sp
1147 thus showing the actual directories checked. Code that checks for
1148 \&\f(CW\*(C`@INC contains:\*(C'\fR in error messages should be hardened against any future
1149 wording changes between the \f(CW@INC\fR and \f(CW\*(C`:\*(C'\fR, for instance use
1150 \&\f(CW\*(C`qr/\e@INC[ \ew]+:/\*(C'\fR instead of using \f(CW\*(C`qr/\e@INC contains:/\*(C'\fR or
1151 \&\f(CW\*(C`qr/\e@INC entries checked:/\*(C'\fR in tests as this will ensure both forward
1152 and backward compatibility.
1153 .IP \(bu 4
1154 Old package separator used in string
1155 .Sp
1156 This diagnostic is now also part of the \f(CW\*(C`deprecated\*(C'\fR category.
1157 .IP \(bu 4
1158 given is deprecated replaces \f(CW\*(C`given is experimental\*(C'\fR.
1159 .IP \(bu 4
1160 when is deprecated replaces \f(CW\*(C`when is experimental\*(C'\fR.
1161 .IP \(bu 4
1162 Smartmatch is deprecated replaces \f(CW\*(C`Smartmatch is experimental\*(C'\fR.
1163 .SH "Configuration and Compilation"
1164 .IX Header "Configuration and Compilation"
1165 .IP \(bu 4
1166 \&\f(CW\*(C`make \-j6 minitest\*(C'\fR could fail due to a build conflict in building
1167 \&\f(CW\*(C`$(MINIPERL_EXE)\*(C'\fR between the main make process and a child process.
1168 [GH #19829 <https://github.com/Perl/perl5/issues/19829>]
1169 .IP \(bu 4
1170 Properly populate osvers on Dragonfly BSD when the hostname isn\*(Aqt set.
1171 .IP \(bu 4
1172 Fix typos for C99 macro name \f(CW\*(C`PRIX64\*(C'\fR.
1173 .IP \(bu 4
1174 Remove ancient and broken GCC for VMS support
1175 .IP \(bu 4
1176 Remove vestigial reference to \f(CW\*(C`/VAXC\*(C'\fR qualifier
1177 .IP \(bu 4
1178 Remove sharedperl option on VMS
1179 .IP \(bu 4
1180 VMS now has mkostemp
1181 .IP \(bu 4
1182 \&\f(CW\*(C`Configure\*(C'\fR now properly handles quoted elements outputted by gcc.
1183 [GH #20606 <https://github.com/Perl/perl5/issues/20606>]
1184 .IP \(bu 4
1185 \&\f(CW\*(C`Configure\*(C'\fR probed for the return type of \fBmalloc()\fR and \fBfree()\fR by
1186 testing whether declarations for those functions produced a function
1187 type mismatch with the implementation. On Solaris, with a C++
1188 compiler, this check always failed, since Solaris instead imports
1189 \&\fBmalloc()\fR and \fBfree()\fR from \f(CW\*(C`std::\*(C'\fR with \f(CW\*(C`using\*(C'\fR for C++ builds. Since
1190 the return types of \fBmalloc()\fR and \fBfree()\fR are well defined by the C
1191 standard, skip probing for them. \f(CW\*(C`Configure\*(C'\fR command\-line arguments
1192 and hints can still override these type in the unlikely case that is
1193 needed. [GH #20806 <https://github.com/Perl/perl5/issues/20806>]
1194 .SH Testing
1195 .IX Header "Testing"
1196 Tests were added and changed to reflect the other additions and
1197 changes in this release. Furthermore, these significant changes were
1198 made:
1199 .IP \(bu 4
1200 Unicode normalization tests have been added.
1201 .IP \(bu 4
1202 t/test.pl: Add ability to cancel a watchdog timer
1203 .SH "Platform Support"
1204 .IX Header "Platform Support"
1205 .SS "Discontinued Platforms"
1206 .IX Subsection "Discontinued Platforms"
1207 .IP Ultrix 4
1208 .IX Item "Ultrix"
1209 Support code for DEC Ultrix has been removed. Ultrix was the native
1210 Unix\-like operating system for various Digital Equipment Corporation
1211 machines. Its final release was in 1995.
1212 .SS "Platform\-Specific Notes"
1213 .IX Subsection "Platform-Specific Notes"
1214 .IP DragonflyBSD 4
1215 .IX Item "DragonflyBSD"
1216 Skip tests to workaround an apparent bug in \f(CWsetproctitle()\fR.
1217 [GH #19894 <https://github.com/Perl/perl5/issues/19894>]
1218 .IP FreeBSD 4
1219 .IX Item "FreeBSD"
1220 FreeBSD no longer uses thread\-safe locale operations, to avoid a bug in
1221 FreeBSD <https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=265950>
1222 .Sp
1223 Replace the first part of archname with \f(CW\*(C`uname \-p\*(C'\fR
1224 [GH #19791 <https://github.com/Perl/perl5/issues/19791>]
1225 .IP Solaris 4
1226 .IX Item "Solaris"
1227 Avoid some compiler and compilation issues on NetBSD/Solaris from regexec.c and regcomp.c.
1228 .IP Synology 4
1229 .IX Item "Synology"
1230 Update Synology Readme for DSM 7.
1231 .IP Windows 4
1232 .IX Item "Windows"
1233 Fix win32 memory alignment needed for gcc\-12 from vmem.h.
1234 .Sp
1235 \&\fButimes()\fR on Win32 would print a message to stderr if it failed to
1236 convert a supplied \f(CW\*(C`time_t\*(C'\fR to a \f(CW\*(C`FILETIME\*(C'\fR.
1237 [GH #19668 <https://github.com/Perl/perl5/issues/19668>]
1238 .Sp
1239 In some cases, timestamps returned by \fBstat()\fR and
1240 \&\fBlstat()\fR failed to take daylight saving time into account.
1241 [GH #20018 <https://github.com/Perl/perl5/issues/20018>]
1242 [GH #20061 <https://github.com/Perl/perl5/issues/20061>]
1243 .Sp
1244 \&\fBstat()\fR now works on \f(CW\*(C`AF_UNIX\*(C'\fR socket files.
1245 [GH #20204 <https://github.com/Perl/perl5/issues/20204>]
1246 .Sp
1247 \&\fBreadlink()\fR now returns the \f(CW\*(C`PrintName\*(C'\fR from a symbolic link reparse
1248 point instead of the \f(CW\*(C`SubstituteName\*(C'\fR, which should make it better
1249 match the name the link was created with.
1250 [GH #20271 <https://github.com/Perl/perl5/pull/20271>]
1251 .Sp
1252 \&\fBlstat()\fR on Windows now returns the length of the link target as the
1253 size of the file, as it does on POSIX systems.
1254 [GH #20476 <https://github.com/Perl/perl5/issues/20476>]
1255 .Sp
1256 \&\fBsymlink()\fR on Windows now replaces any \f(CW\*(C`/\*(C'\fR in the target with \f(CW\*(C`\e\*(C'\fR,
1257 since Windows does not recognise \f(CW\*(C`/\*(C'\fR in symbolic links. The reverse
1258 translation is \fBnot\fR done by \fBreadlink()\fR.
1259 [GH #20506 <https://github.com/Perl/perl5/issues/20506>]
1260 .Sp
1261 \&\fBsymlink()\fR where the target was an absolute path to a directory was
1262 incorrectly created as a file symbolic link.
1263 [GH #20533 <https://github.com/Perl/perl5/issues/20533>]
1264 .Sp
1265 \&\f(CW\*(C`POSIX::dup2\*(C'\fR no longer creates broken sockets. [GH
1266 #20920 <https://github.com/Perl/perl5/issues/20920>]
1267 .Sp
1268 Closing a busy pipe could cause Perl to hang. [GH
1269 #19963 <https://github.com/Perl/perl5/issues/19963>]
1270 .SH "Internal Changes"
1271 .IX Header "Internal Changes"
1272 .IP \(bu 4
1273 Removed many deprecated C functions.
1274 .Sp
1275 These have been deprecated for a long time. See
1276 <https://github.com/perl/perl5/commit/7008caa915ad99e650acf2aea40612b5e48b7ba2>
1277 for a full list.
1278 .IP \(bu 4
1279 \&\f(CW\*(C`get_op_descs\*(C'\fR, \f(CW\*(C`get_op_names\*(C'\fR, \f(CW\*(C`get_opargs\*(C'\fR, \f(CW\*(C`get_no_modify\*(C'\fR and
1280 \&\f(CW\*(C`get_ppaddr\*(C'\fR have been marked deprecated.
1281 .IP \(bu 4
1282 \&\f(CW\*(C`hv_free_ent\*(C'\fR has been marked as internal API.
1283 .IP \(bu 4
1284 \&\f(CW\*(C`save_pushptr\*(C'\fR, \f(CW\*(C`save_pushptrptr\*(C'\fR, and \f(CW\*(C`save_pushi32ptr\*(C'\fR have been marked
1285 as internal API.
1286 .IP \(bu 4
1287 New bool related functions and macros have been added to complement the new
1288 bool type introduced in 5.36:
1289 .Sp
1290 The functions are:
1291 .RS 4
1292 .ie n .IP """newSVbool(const bool bool_val)""" 4
1293 .el .IP "\f(CWnewSVbool(const bool bool_val)\fR" 4
1294 .IX Item "newSVbool(const bool bool_val)"
1295 .PD 0
1296 .ie n .IP newSV_true() 4
1297 .el .IP \f(CWnewSV_true()\fR 4
1298 .IX Item "newSV_true()"
1299 .ie n .IP newSV_false() 4
1300 .el .IP \f(CWnewSV_false()\fR 4
1301 .IX Item "newSV_false()"
1302 .ie n .IP """sv_set_true(SV *sv)""" 4
1303 .el .IP "\f(CWsv_set_true(SV *sv)\fR" 4
1304 .IX Item "sv_set_true(SV *sv)"
1305 .ie n .IP """sv_set_false(SV *sv)""" 4
1306 .el .IP "\f(CWsv_set_false(SV *sv)\fR" 4
1307 .IX Item "sv_set_false(SV *sv)"
1308 .ie n .IP """sv_set_bool(SV *sv, const bool bool_val)""" 4
1309 .el .IP "\f(CWsv_set_bool(SV *sv, const bool bool_val)\fR" 4
1310 .IX Item "sv_set_bool(SV *sv, const bool bool_val)"
1311 .PD
1312 .RE
1313 .RS 4
1314 .Sp
1315 The macros are:
1316 .ie n .IP SvIandPOK(sv) 4
1317 .el .IP \f(CWSvIandPOK(sv)\fR 4
1318 .IX Item "SvIandPOK(sv)"
1319 .PD 0
1320 .ie n .IP SvIandPOK_off(sv) 4
1321 .el .IP \f(CWSvIandPOK_off(sv)\fR 4
1322 .IX Item "SvIandPOK_off(sv)"
1323 .ie n .IP """SvIandPOK_on""" 4
1324 .el .IP \f(CWSvIandPOK_on\fR 4
1325 .IX Item "SvIandPOK_on"
1326 .PD
1327 .RE
1328 .RS 4
1329 .RE
1330 .IP \(bu 4
1331 Perl is no longer manipulating the \f(CW\*(C`environ\*(C'\fR array directly. The variable
1332 \&\f(CW\*(C`PL_use_safe_putenv\*(C'\fR has been removed and \f(CW\*(C`PERL_USE_SAFE_PUTENV\*(C'\fR is always
1333 defined. This means XS modules can now call \f(CW\*(C`setenv\*(C'\fR and \f(CW\*(C`putenv\*(C'\fR without
1334 causing segfaults. [perl #19399 <https://github.com/Perl/perl5/issues/19399>]
1335 .IP \(bu 4
1336 Internal C API functions are now hidden with \f(CW\*(C`_\|_attribute_\|_((hidden))\*(C'\fR on the
1337 platforms that support it. This means they are no longer callable from XS
1338 modules on those platforms.
1339 .Sp
1340 It should be noted that those functions have always been hidden on Windows. This
1341 change merely brings that to the other platforms.
1342 [perl #19655 <https://github.com/Perl/perl5/pull/19655>]
1343 .IP \(bu 4
1344 New formatting symbols were added for printing values declared as \f(CW\*(C`U32\*(C'\fR or
1345 \&\f(CW\*(C`I32\*(C'\fR:
1346 .RS 4
1347 .ie n .IP "I32df \-\- Like %d" 4
1348 .el .IP "I32df \-\- Like \f(CW%d\fR" 4
1349 .IX Item "I32df -- Like %d"
1350 .PD 0
1351 .ie n .IP "U32of \-\- Like %o" 4
1352 .el .IP "U32of \-\- Like \f(CW%o\fR" 4
1353 .IX Item "U32of -- Like %o"
1354 .ie n .IP "U32uf \-\- Like %u" 4
1355 .el .IP "U32uf \-\- Like \f(CW%u\fR" 4
1356 .IX Item "U32uf -- Like %u"
1357 .ie n .IP "U32xf \-\- Like %x" 4
1358 .el .IP "U32xf \-\- Like \f(CW%x\fR" 4
1359 .IX Item "U32xf -- Like %x"
1360 .ie n .IP "U32Xf \-\- Like %X" 4
1361 .el .IP "U32Xf \-\- Like \f(CW%X\fR" 4
1362 .IX Item "U32Xf -- Like %X"
1363 .PD
1364 .RE
1365 .RS 4
1366 .Sp
1367 These are used in the same way already existing similar symbols, such as
1368 \&\f(CW\*(C`IVdf\*(C'\fR, are used. See "I/O Formats" in perlapi.
1369 .RE
1370 .IP \(bu 4
1371 new \*(AqHvHasAUX\*(Aq macro
1372 .IP \(bu 4
1373 regexec.c: Add some branch predictions reorder conds
1374 .IP \(bu 4
1375 locale: Change macro name to be C conformant
1376 .IP \(bu 4
1377 Rename the \f(CW\*(C`PADNAMEt_*\*(C'\fR constants to \f(CW\*(C`PADNAMEf_*\*(C'\fR
1378 .IP \(bu 4
1379 Changes all the API macros that retrieve a PV into a call to an
1380 inline function so as to evaluate the parameter just once.
1381 .IP \(bu 4
1382 regexec.c: multiple code refactor to make the code more readable
1383 .IP \(bu 4
1384 perl.h: Change macro name to be C conformant
1385 (remove leading _ from NOT_IN_NUMERIC macros)
1386 .IP \(bu 4
1387 regcomp.h: add new \f(CW\*(C`BITMAP_BIT\*(C'\fR macro in addition to the existing \f(CW\*(C`BITMAP_BYTE\*(C'\fR
1388 and \f(CW\*(C`BITMAP_TEST\*(C'\fR ones.
1389 .IP \(bu 4
1390 Create new regnode type ANYOFH.
1391 populate_ANYOF_from_invlist was renamed to populate_bitmap_from_invlist
1392 .IP \(bu 4
1393 regex: Refactor bitmap vs non\-bitmap of qr/[]/
1394 .IP \(bu 4
1395 regcomp.c: add new functions to convert from an inversion list to a bitmap (and vice versa)
1396 \&\f(CW\*(C`populate_bitmap_from_invlist\*(C'\fR and \f(CW\*(C`populate_invlist_from_bitmap\*(C'\fR.
1397 .IP \(bu 4
1398 Add \f(CWnewAVav()\fR to create an AV from an existing AV.
1399 Add \f(CWnewAVhv()\fR to create an AV using keys and values from an existing HV.
1400 .IP \(bu 4
1401 Fix definition of \f(CW\*(C`Perl_atof\*(C'\fR.
1402 .IP \(bu 4
1403 Fix undefined behavior with overflow related \f(CW\*(C`OPTIMIZE_INFTY\*(C'\fR and delta
1404 in \fIregcomp.c\fR.
1405 .IP \(bu 4
1406 Fix regnode pointer alignment issue in \fIregcomp.h\fR.
1407 .IP \(bu 4
1408 The \f(CW\*(C`CVf_METHOD\*(C'\fR CV flag and associated \f(CW\*(C`CvMETHOD\*(C'\fR macro has been renamed to
1409 \&\f(CW\*(C`CVf_NOWARN_AMBIGUOUS\*(C'\fR and \f(CW\*(C`CvNOWARN_AMBIGUOUS\*(C'\fR. This closer reflects its
1410 actual behaviour (it suppresses a warning that would otherwise be generated
1411 about ambiguous names), in order to be less confusing with \f(CW\*(C`CvIsMETHOD\*(C'\fR,
1412 which indicates that a CV is a \f(CW\*(C`method\*(C'\fR subroutine relating to the \f(CW\*(C`class\*(C'\fR
1413 feature.
1414 .IP \(bu 4
1415 The \f(CW\*(C`OPf_SPECIAL\*(C'\fR flag is no longer set on the \f(CW\*(C`OP_ENTERSUB\*(C'\fR op
1416 constructed to call the \f(CW\*(C`VERSION\*(C'\fR, \f(CW\*(C`import\*(C'\fR and \f(CW\*(C`unimport\*(C'\fR methods
1417 as part of a \f(CW\*(C`use\*(C'\fR statement and attribute application, nor when
1418 assigning to an \f(CW\*(C`:lvalue\*(C'\fR subroutine.
1419 .IP \(bu 4
1420 A new CV flag \f(CW\*(C`CVf_REFCOUNTED_ANYSV\*(C'\fR has been added, which indicates that the
1421 CV is an XSUB and stores an SV pointer in the \f(CW\*(C`CvXSUBANY.any_sv\*(C'\fR union field.
1422 Perl core operations such as cloning or destroying the CV will maintain the
1423 reference count of the pointed\-to SV, destroying it when required.
1424 .IP \(bu 4
1425 A new API function "\f(CW\*(C`Perl_localeconv\*(C'\fR" in perlapi is added. This is the
1426 same as \f(CW\*(C`POSIX::localeconv\*(C'\fR (returning a hash of
1427 the \f(CWlocaleconv()\fR fields), but directly callable from XS code.
1428 .IP \(bu 4
1429 A new API function, "\f(CW\*(C`Perl_langinfo8\*(C'\fR" in perlapi is added. This is the
1430 same as plain "\f(CW\*(C`Perl_langinfo\*(C'\fR" in perlapi, but with an extra parameter
1431 that allows the caller to simply and reliably know if the returned
1432 string is UTF\-8.
1433 .IP \(bu 4
1434 We have introduced a limit on the number of nested \f(CW\*(C`eval EXPR\*(C'\fR/\f(CW\*(C`BEGIN\*(C'\fR
1435 blocks and \f(CW\*(C`require\*(C'\fR/\f(CW\*(C`BEGIN\*(C'\fR (and thus \f(CW\*(C`use\*(C'\fR statements as well) to
1436 prevent C stack overflows. This variable can also be used to forbid
1437 \&\f(CW\*(C`BEGIN\*(C'\fR blocks from executing during \f(CW\*(C`eval EXPR\*(C'\fR compilation. The
1438 limit defaults to \f(CW1000\fR but can be overridden by setting the
1439 \&\f(CW\*(C`${^MAX_NESTED_EVAL_BEGIN_BLOCKS}\*(C'\fR variable. The default itself can be
1440 changed at compile time with
1441 .Sp
1442 .Vb 1
1443 \& \-Accflags=\*(Aq\-DPERL_MAX_NESTED_EVAL_BEGIN_BLOCKS_DEFAULT=12345\*(Aq
1444 .Ve
1445 .Sp
1446 Note that this value relates to the size of your C stack and if you
1447 choose an inappropriately large value Perl may segfault, be conservative
1448 about what you choose.
1449 .IP \(bu 4
1450 A new magic type \f(CW\*(C`PERL_MAGIC_extvalue\*(C'\fR has been added. This is available for
1451 use like \f(CW\*(C`PERL_MAGIC_ext\*(C'\fR, but is a value magic: upon localization the new
1452 value will not be magical.
1453 .IP \(bu 4
1454 The \f(CWSSNEW()\fR, \f(CWSSNEWt()\fR, \f(CWSSNEWa()\fR and \f(CWSSNEWat()\fR APIs now
1455 return a \f(CW\*(C`SSize_t\*(C'\fR value. The \f(CWSSPTR()\fR and \f(CWSSPTRt()\fR macros now
1456 expect a \f(CW\*(C`SSize_t\*(C'\fR parameter, and enforce that on debugging builds.
1457 [GH #20411 <https://github.com/Perl/perl5/issues/20411>]
1458 .IP \(bu 4
1459 Filenames in cops are now refcounted under threads.
1460 Under threads we were copying the filenames into each opcode. This is because in
1461 theory opcodes created in one thread can be destroyed in another.
1462 The change adds a new struct/type \f(CW\*(C`RCPV\*(C'\fR, which is a refcounted
1463 string using shared memory. This is implemented in such a way that code
1464 that previously used a char * can continue to do so, as the refcounting
1465 data is located a specific offset before the char * pointer itself.
1466 .IP \(bu 4
1467 Added \f(CW\*(C`HvNAMEf\*(C'\fR and \f(CW\*(C`HvNAMEf_QUOTEDPREFIX\*(C'\fR special formats. They take an
1468 \&\f(CW\*(C`HV *\*(C'\fR as an argument and use \f(CWHvNAME()\fR and related macros to determine the
1469 string, its length, and whether it is utf8.
1470 .IP \(bu 4
1471 The underlying \f(CW\*(C`Perl_dowantarray\*(C'\fR function implementing the
1472 long\-deprecated \f(CW\*(C`GIMME\*(C'\fR macro has been marked as
1473 deprecated, so that use of the macro emits a compile\-time warning.
1474 \&\f(CW\*(C`GIMME\*(C'\fR has been documented as deprecated in favour of
1475 \&\f(CW\*(C`GIMME_V\*(C'\fR since Perl v5.6.0, but had not
1476 previously issued a warning.
1477 .IP \(bu 4
1478 The API function "utf8_length" in perlapi is now more efficient.
1479 .IP \(bu 4
1480 Added \f(CWSAVERCPV()\fR and \f(CWSAVEFREERCPV()\fR for better support for working
1481 with \f(CW\*(C`RCPV\*(C'\fR (reference counted string/pointer value) structures which
1482 currently are used in opcodes to share filename and warning bit data in
1483 a memory efficient manner.
1484 .IP \(bu 4
1485 Added \f(CWMORTALSVFUNC_SV()\fR and \f(CWMORTALDESTRUCTOR_SV()\fR macros, which
1486 make it possible to create a destructor which is fired at the end of
1487 the current statement. This uses the \f(CW\*(C`PERL_MAGIC_destruct\*(C'\fR magic to
1488 use "free" magic to trigger an action when a variable is freed. The
1489 action can be specified as a C function or as a Perl code reference.
1490 .IP \(bu 4
1491 Added the \f(CW\*(C`%{^HOOK}\*(C'\fR api and related \f(CW\*(C`PERL_MAGIC_hook\*(C'\fR and
1492 \&\f(CW\*(C`PERL_MAGIC_hookelem\*(C'\fR for providing ways to hook selected perl functions
1493 which for one reason or another are problematic to wrap with a customized
1494 subroutine.
1495 .IP \(bu 4
1496 Added support for \f(CW\*(C`${^HOOK}{require_\|_before}\*(C'\fR which can be used to
1497 rewrite the filename that \f(CW\*(C`require\*(C'\fR will try to load, and also to block
1498 \&\f(CW\*(C`require\*(C'\fR from loading a specific module, even via fully qualified
1499 filename. The hook can also be used to perform "pre\-require" and
1500 "post\-require" actions.
1501 .IP \(bu 4
1502 Added support for \f(CW\*(C`${^HOOK}{require_\|_after}\*(C'\fR which can be used to
1503 track what modules have been required after the fact.
1504 .IP \(bu 4
1505 Regular expression opcodes (regops) now use a standardized structure
1506 layout that uses unions to expose data in different format. This means
1507 it should be much easier to extend or modify regops to use more memory.
1508 This has been used to make a number of regops track how many parens
1509 they contain.
1510 .SH "Selected Bug Fixes"
1511 .IX Header "Selected Bug Fixes"
1512 .IP \(bu 4
1513 Avoid recursion and stack overflow parsing \*(Aqpack\*(Aq template
1514 .Sp
1515 [GH #16319 <https://github.com/Perl/perl5/issues/16319>]
1516 .IP \(bu 4
1517 An \fBeval()\fR as the last statement in a regex code block could trigger an
1518 interpreter panic; e.g.
1519 .Sp
1520 .Vb 1
1521 \& /(?{ ...; eval {....}; })/
1522 .Ve
1523 .Sp
1524 [GH #19680 <https://github.com/Perl/perl5/issues/19680>]
1525 .IP \(bu 4
1526 Disabling the \f(CW\*(C`bareword_filehandles\*(C'\fR feature no longer treats \f(CW\*(C`print
1527 Class\->method\*(C'\fR as an error. [GH #19704 <https://github.com/Perl/perl5/issues/19704>]
1528 .IP \(bu 4
1529 When a Perl subroutine tail\-calls an XS subroutine using \f(CW\*(C`goto &xs_sub\*(C'\fR,
1530 the XS subroutine can now correctly determine its calling context.
1531 Previously it was always reported as scalar.
1532 .Sp
1533 In addition, where the Perl subroutine is freed at the same time:
1534 .Sp
1535 .Vb 1
1536 \& sub foo { *foo = sub {}; goto &xs_sub }
1537 .Ve
1538 .Sp
1539 this formerly could lead to crashes if the XS subroutine tried to use the
1540 value of \f(CW\*(C`PL_op\*(C'\fR, since this was being set to NULL. This is now fixed.
1541 .Sp
1542 [GH #19936 <https://github.com/Perl/perl5/issues/19936>]
1543 .IP \(bu 4
1544 \&\fBsetsockopt()\fR now uses the mechanism added in 5.36 to better
1545 distinguish between numeric and string values supplied as the
1546 \&\f(CW\*(C`OPTVAL\*(C'\fR parameter. [GH #18761 <https://github.com/Perl/perl5/issues/18761>]
1547 .IP \(bu 4
1548 4\-argument \f(CWselect()\fR now rejects strings with code points above
1549 255. Additionally, for code points 128\-255, this operator will now always
1550 give the corresponding octet to the OS, regardless of how Perl stores
1551 such code points in memory. (Previously Perl leaked its internal string
1552 storage to the OS.) [GH #19882 <https://github.com/Perl/perl5/issues/19882>]
1553 .IP \(bu 4
1554 Fix panic issue from \f(CW\*(C`val {} inside /(?{...})/\*(C'\fR [GH #19390 <https://github.com/Perl/perl5/issues/19390>]
1555 .IP \(bu 4
1556 Fix multiple compiler warnings from \fIregexp.c\fR, \fIlocale.c\fR
1557 [GH #19915 <https://github.com/Perl/perl5/issues/19915>]
1558 .IP \(bu 4
1559 Fix a bug with querying locales on platforms that don\*(Aqt have \f(CW\*(C`LC_NUMERIC\*(C'\fR
1560 [GH #19890 <https://github.com/Perl/perl5/issues/19890>]
1561 .IP \(bu 4
1562 Prevent undefined behaviour in \f(CWS_maybe_multideref()\fR.
1563 .IP \(bu 4
1564 Avoid signed integer overflow in \f(CW\*(C`use integer\*(C'\fR ops.
1565 .IP \(bu 4
1566 Avoid adding an offset to a NULL pointer in \f(CW\*(C`hv_delete_common\*(C'\fR.
1567 .IP \(bu 4
1568 PerlIO::get_layers will now accept IO references too
1569 .Sp
1570 Previously it would only take glob references or names of globs. Now it will
1571 also accept IO references.
1572 .IP \(bu 4
1573 Fixes to memory handling for \f(CW\*(C`PL_splitstr\*(C'\fR:
1574 .RS 4
1575 .IP \(bu 4
1576 If a thread was created the allocated string would be freed twice.
1577 .IP \(bu 4
1578 If two \f(CW\*(C`\-F\*(C'\fR switches were supplied the memory allocated for the first
1579 switch wouldn\*(Aqt be freed.
1580 .RE
1581 .RS 4
1582 .RE
1583 .IP \(bu 4
1584 Correctly handle \f(CW\*(C`OP_ANONCODE\*(C'\fR ops generated by CPAN modules that
1585 don\*(Aqt include the OPf_REF flag when propagating lvalue context.
1586 [GH #20532 <https://github.com/Perl/perl5/pull/20532>]
1587 .IP \(bu 4
1588 POSIX::strxfrm now uses the \f(CW\*(C`LC_CTYPE\*(C'\fR locale category
1589 to specify its collation, ignoring any differing \f(CW\*(C`LC_COLLATE\*(C'\fR. It
1590 doesn\*(Aqt make sense for a string to be encoded in one locale (say,
1591 ISO\-8859\-6, Arabic) and to collate it based on another (like ISO\-8859\-7,
1592 Greek). Perl assumes that the current \f(CW\*(C`LC_CTYPE\*(C'\fR locale correctly
1593 represents the encoding, and collates accordingly.
1594 .Sp
1595 Also, embedded \f(CW\*(C`NUL\*(C'\fR characters are now allowed in the input.
1596 .Sp
1597 If locale collation is not enabled on the platform (\f(CW\*(C`LC_COLLATE\*(C'\fR), the
1598 input is returned unchanged.
1599 .IP \(bu 4
1600 Double FETCH during stringification of tied scalars returning an
1601 overloaded object have been fixed. The FETCH method should only be
1602 called once, but prior to this release was actually called twice.
1603 [GH #20574 <https://github.com/Perl/perl5/pull/20574>]
1604 .IP \(bu 4
1605 Writing to a magic variables associated with the selected output
1606 handle, \f(CW$^\fR, \f(CW$~\fR, \f(CW$=\fR, \f(CW\*(C`$\-\*(C'\fR and \f(CW$%\fR, no longer crashes perl
1607 if the IO object has been cleared from the selected output
1608 handle. [GH #20733 <https://github.com/Perl/perl5/issues/20733>]
1609 .IP \(bu 4
1610 Redefining a \f(CW\*(C`use constant\*(C'\fR list constant with \f(CW\*(C`use constant\*(C'\fR now
1611 properly warns. This changes the behaviour of \f(CW\*(C`use constant\*(C'\fR but is
1612 a core change, not a change to \fIconstant.pm\fR. [GH #20742 <https://github.com/Perl/perl5/issues/20742>]
1613 .IP \(bu 4
1614 Redefining a \f(CW\*(C`use constant\*(C'\fR list constant with an empty prototype
1615 constant sub would result in an assertion failure. [GH #20742 <https://github.com/Perl/perl5/issues/20742>]
1616 .IP \(bu 4
1617 Fixed a regression where the \f(CW\*(C`INC\*(C'\fR method for objects in \f(CW@INC\fR
1618 would not be resolved by \f(CW\*(C`AUTOLOAD\*(C'\fR, while it was in 5.36. The
1619 \&\f(CW\*(C`INCDIR\*(C'\fR method for objects in \f(CW@INC\fR cannot be resolved by
1620 \&\f(CW\*(C`AUTOLOAD\*(C'\fR as \f(CW\*(C`INC\*(C'\fR would have been resolved first. [GH #20665 <https://github.com/Perl/perl5/issues/20665>]
1621 .IP \(bu 4
1622 \&\f(CW$SIG{_\|_DIE_\|_}\fR will now be called from eval when the code dies during
1623 compilation regardless of how it dies. This means that code expecting to
1624 be able to upgrade \f(CW$@\fR into an object will be called consistently. In
1625 earlier versions of perl \f(CW$SIG{_\|_DIE_\|_}\fR would not be called for
1626 certain compilation errors, for instance undeclared variables. For other
1627 errors it might be called if there were more than a certain number of
1628 errors, but not if there were less. Now you can expect that it will be
1629 called in every case.
1630 .IP \(bu 4
1631 Compilation of code with errors used to inconsistently stop depending on
1632 the count and type of errors encountered. The intent was that after 10
1633 errors compilation would halt, but bugs in this logic meant that certain
1634 types of error would be counted, but would not trigger the threshold
1635 check to stop compilation. Other errors would. With this release after
1636 at most 10 errors compilation will terminate, regardless of what type of
1637 error they were.
1638 .Sp
1639 Note that you can change the maximum count by defining
1640 \&\f(CW\*(C`PERL_STOP_PARSING_AFTER_N_ERRORS\*(C'\fR to be something else during the
1641 configuration process. For instance
1642 .Sp
1643 .Vb 1
1644 \& ./Configure ... \-Accflags=\*(Aq\-DPERL_STOP_PARSING_AFTER_N_ERRORS=100\*(Aq
1645 .Ve
1646 .Sp
1647 would allow up to 100 errors.
1648 .IP \(bu 4
1649 The API function "my_snprintf" in perlapi now prints a non\-dot decimal
1650 point if the perl code it ultimately is called from is in the scope of
1651 \&\f(CW\*(C`use locale\*(C'\fR and the locale in effect calls for that.
1652 .IP \(bu 4
1653 A number of bugs related to capture groups in quantified groups in regular
1654 expression have been fixed, especially in alternations. For example in
1655 a pattern like:
1656 .Sp
1657 .Vb 1
1658 \& "foobazfoobar" =~ /((foo)baz|foo(bar))+/
1659 .Ve
1660 .Sp
1661 the regex variable \f(CW$2\fR will not be "foo" as it once was, it will be undef.
1662 .IP \(bu 4
1663 Bugs with regex backreference operators that are inside of a capture
1664 group have been fixed. For instance:
1665 .Sp
1666 .Vb 1
1667 \& "xa=xaaa" =~ /^(xa|=?\e1a){2}\ez/
1668 .Ve
1669 .Sp
1670 will now correctly not match. [GH #10073 <https://github.com/Perl/perl5/issues/10073>]
1671 .IP \(bu 4
1672 \&\f(CWSSGROW()\fR and \f(CWSSCHECK()\fR have been reworked to ensure that the requested
1673 space is actually allocated. \f(CWSSCHECK()\fR is now an alias for \f(CWSSGROW()\fR.
1674 .SH Acknowledgements
1675 .IX Header "Acknowledgements"
1676 Perl 5.38.0 represents approximately 12 months of development since Perl
1677 5.36.0 and contains approximately 290,000 lines of changes across 1,500
1678 files from 100 authors.
1679 .PP
1680 Excluding auto\-generated files, documentation and release tools, there were
1681 approximately 190,000 lines of changes to 970 .pm, .t, .c and .h files.
1682 .PP
1683 Perl continues to flourish into its fourth decade thanks to a vibrant
1684 community of users and developers. The following people are known to have
1685 contributed the improvements that became Perl 5.38.0:
1686 .PP
1687 Alex, Alexander Nikolov, Alex Davies, Andreas König, Andrew Fresh, Andrew
1688 Ruthven, Andy Lester, Aristotle Pagaltzis, Arne Johannessen, A. Sinan Unur,
1689 Bartosz Jarzyna, Bart Van Assche, Benjamin Smith, Bram, Branislav
1690 Zahradník, Brian Greenfield, Bruce Gray, Chad Granum, Chris \*(AqBinGOs\*(Aq
1691 Williams, chromatic, Clemens Wasser, Craig A. Berry, Dagfinn Ilmari
1692 Mannsåker, Dan Book, danielnachun, Dan Jacobson, Dan Kogai, David Cantrell,
1693 David Golden, David Mitchell, E. Choroba, Ed J, Ed Sabol, Elvin Aslanov,
1694 Eric Herman, Felipe Gasper, Ferenc Erki, Firas Khalil Khana, Florian Weimer,
1695 Graham Knop, Håkon Hægland, Harald Jörg, H.Merijn Brand, Hugo van der
1696 Sanden, James E Keenan, James Raspass, jkahrman, Joe McMahon, Johan Vromans,
1697 Jonathan Stowe, Jon Gentle, Karen Etheridge, Karl Williamson, Kenichi
1698 Ishigaki, Kenneth Ölwing, Kurt Fitzner, Leon Timmermans, Li Linjie, Loren
1699 Merritt, Lukas Mai, Marcel Telka, Mark Jason Dominus, Mark Shelor, Matthew
1700 Horsfall, Matthew O. Persico, Mattia Barbon, Max Maischein, Mohammad S
1701 Anwar, Nathan Mills, Neil Bowers, Nicholas Clark, Nicolas Mendoza, Nicolas
1702 R, Paul Evans, Paul Marquess, Peter John Acklam, Peter Levine, Philippe
1703 Bruhat (BooK), Reini Urban, Renee Baecker, Ricardo Signes, Richard Leach,
1704 Russ Allbery, Scott Baker, Sevan Janiyan, Sidney Markowitz, Sisyphus, Steve
1705 Hay, TAKAI Kousuke, Todd Rinaldo, Tomasz Konojacki, Tom Stellard, Tony Cook,
1706 Tsuyoshi Watanabe, Unicode Consortium, vsfos, Yves Orton, Zakariyya Mughal,
1707 Zefram, 小鸡.
1708 .PP
1709 The list above is almost certainly incomplete as it is automatically
1710 generated from version control history. In particular, it does not include
1711 the names of the (very much appreciated) contributors who reported issues to
1712 the Perl bug tracker.
1713 .PP
1714 Many of the changes included in this version originated in the CPAN modules
1715 included in Perl\*(Aqs core. We\*(Aqre grateful to the entire CPAN community for
1716 helping Perl to flourish.
1717 .PP
1718 For a more complete list of all of Perl\*(Aqs historical contributors, please
1719 see the \fIAUTHORS\fR file in the Perl source distribution.
1720 .SH "Reporting Bugs"
1721 .IX Header "Reporting Bugs"
1722 If you find what you think is a bug, you might check the perl bug database
1723 at <https://github.com/Perl/perl5/issues>. There may also be information at
1724 <http://www.perl.org/>, the Perl Home Page.
1725 .PP
1726 If you believe you have an unreported bug, please open an issue at
1727 <https://github.com/Perl/perl5/issues>. Be sure to trim your bug down to a
1728 tiny but sufficient test case.
1729 .PP
1730 If the bug you are reporting has security implications which make it
1731 inappropriate to send to a public issue tracker, then see
1732 "SECURITY VULNERABILITY CONTACT INFORMATION" in perlsec
1733 for details of how to report the issue.
1734 .SH "Give Thanks"
1735 .IX Header "Give Thanks"
1736 If you wish to thank the Perl 5 Porters for the work we had done in Perl 5,
1737 you can do so by running the \f(CW\*(C`perlthanks\*(C'\fR program:
1738 .PP
1739 .Vb 1
1740 \& perlthanks
1741 .Ve
1742 .PP
1743 This will send an email to the Perl 5 Porters list with your show of thanks.
1744 .SH "SEE ALSO"
1745 .IX Header "SEE ALSO"
1746 The \fIChanges\fR file for an explanation of how to view exhaustive details on
1747 what changed.
1748 .PP
1749 The \fIINSTALL\fR file for how to build Perl.
1750 .PP
1751 The \fIREADME\fR file for general stuff.
1752 .PP
1753 The \fIArtistic\fR and \fICopying\fR files for copyright information.