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