.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "PERL5320DELTA 1perl" .TH PERL5320DELTA 1perl 2024-02-11 "perl v5.38.2" "Perl Programmers Reference Guide" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME perl5320delta \- what is new for perl v5.32.0 .SH DESCRIPTION .IX Header "DESCRIPTION" This document describes differences between the 5.30.0 release and the 5.32.0 release. .PP If you are upgrading from an earlier release such as 5.28.0, first read perl5300delta, which describes differences between 5.28.0 and 5.30.0. .SH "Core Enhancements" .IX Header "Core Enhancements" .SS "The isa Operator" .IX Subsection "The isa Operator" A new experimental infix operator called \f(CW\*(C`isa\*(C'\fR tests whether a given object is an instance of a given class or a class derived from it: .PP .Vb 1 \& if( $obj isa Package::Name ) { ... } .Ve .PP For more detail see "Class Instance Operator" in perlop. .SS "Unicode 13.0 is supported" .IX Subsection "Unicode 13.0 is supported" See for details. .SS "Chained comparisons capability" .IX Subsection "Chained comparisons capability" Some comparison operators, as their associativity, \fIchain\fR with some operators of the same precedence (but never with operators of different precedence). .PP .Vb 1 \& if ( $x < $y <= $z ) {...} .Ve .PP behaves exactly like: .PP .Vb 1 \& if ( $x < $y && $y <= $z ) {...} .Ve .PP (assuming that \f(CW"$y"\fR is as simple a scalar as it looks.) .PP You can read more about this in perlop under "Operator Precedence and Associativity" in perlop. .ie n .SS "New Unicode properties ""Identifier_Status"" and ""Identifier_Type"" supported" .el .SS "New Unicode properties \f(CWIdentifier_Status\fP and \f(CWIdentifier_Type\fP supported" .IX Subsection "New Unicode properties Identifier_Status and Identifier_Type supported" Unicode has revised its regular expression requirements: . As part of that they are wanting more properties to be exposed, ones that aren't part of the strict UCD (Unicode character database). These two are used for examining inputs for security purposes. Details on their usage is at . .ie n .SS "It is now possible to write ""qr/\ep{Name=...}/"", or ""qr!\ep{na=/(SMILING|GRINNING) FACE/}!""" .el .SS "It is now possible to write \f(CWqr/\ep{Name=...}/\fP, or \f(CWqr!\ep{na=/(SMILING|GRINNING) FACE/}!\fP" .IX Subsection "It is now possible to write qr/p{Name=...}/, or qr!p{na=/(SMILING|GRINNING) FACE/}!" The Unicode Name property is now accessible in regular expression patterns, as an alternative to \f(CW\*(C`\eN{...}\*(C'\fR. A comparison of the two methods is given in "Comparison of \eN{...} and \ep{name=...}" in perlunicode. .PP The second example above shows that wildcard subpatterns are also usable in this property. See "Wildcards in Property Values" in perlunicode. .ie n .SS "Improvement of POSIX::mblen(), ""mbtowc"", and ""wctomb""" .el .SS "Improvement of \f(CWPOSIX::mblen()\fP, \f(CWmbtowc\fP, and \f(CWwctomb\fP" .IX Subsection "Improvement of POSIX::mblen(), mbtowc, and wctomb" The \f(CWPOSIX::mblen()\fR, \f(CW\*(C`mbtowc\*(C'\fR, and \f(CW\*(C`wctomb\*(C'\fR functions now work on shift state locales and are thread-safe on C99 and above compilers when executed on a platform that has locale thread-safety; the length parameters are now optional. .PP These functions are always executed under the current C language locale. (See perllocale.) Most locales are stateless, but a few, notably the very rarely encountered ISO 2022, maintain a state between calls to these functions. Previously the state was cleared on every call, but now the state is not reset unless the appropriate parameter is \f(CW\*(C`undef\*(C'\fR. .PP On threaded perls, the C99 functions \fBmbrlen\fR\|(3), \fBmbrtowc\fR\|(3), and \&\fBwcrtomb\fR\|(3), when available, are substituted for the plain functions. This makes these functions thread-safe when executing on a locale thread-safe platform. .PP The string length parameters in \f(CW\*(C`mblen\*(C'\fR and \f(CW\*(C`mbtowc\*(C'\fR are now optional; useful only if you wish to restrict the length parsed in the source string to less than the actual length. .SS "Alpha assertions are no longer experimental" .IX Subsection "Alpha assertions are no longer experimental" See "(*pla:pattern)" in perlre, "(*plb:pattern)" in perlre, "(*nla:pattern)" in perlre>, and "(*nlb:pattern)" in perlre. Use of these no longer generates a warning; existing code that disables the warning category \f(CW\*(C`experimental::alpha_assertions\*(C'\fR will continue to work without any changes needed. Enabling the category has no effect. .SS "Script runs are no longer experimental" .IX Subsection "Script runs are no longer experimental" See "Script Runs" in perlre. Use of these no longer generates a warning; existing code that disables the warning category \&\f(CW\*(C`experimental::script_run\*(C'\fR will continue to work without any changes needed. Enabling the category has no effect. .SS "Feature checks are now faster" .IX Subsection "Feature checks are now faster" Previously feature checks in the parser required a hash lookup when features were set outside of a feature bundle, this has been optimized to a bit mask check. [GH #17229 ] .SS "Perl is now developed on GitHub" .IX Subsection "Perl is now developed on GitHub" Perl is now developed on GitHub. You can find us at . .PP Non-security bugs should now be reported via GitHub. Security issues should continue to be reported as documented in perlsec. .SS "Compiled patterns can now be dumped before optimization" .IX Subsection "Compiled patterns can now be dumped before optimization" This is primarily useful for tracking down bugs in the regular expression compiler. This dump happens on \f(CW\*(C`\-DDEBUGGING\*(C'\fR perls, if you specify \f(CW\*(C`\-Drv\*(C'\fR on the command line; or on any perl if the pattern is compiled within the scope of \f(CW\*(C`use\ re\ qw(Debug\ DUMP_PRE_OPTIMIZE)\*(C'\fR or \&\f(CW\*(C`use\ re\ qw(Debug\ COMPILE\ EXTRA)\*(C'\fR. (All but the second case display other information as well.) .SH Security .IX Header "Security" .SS "[CVE\-2020\-10543] Buffer overflow caused by a crafted regular expression" .IX Subsection "[CVE-2020-10543] Buffer overflow caused by a crafted regular expression" A signed \f(CW\*(C`size_t\*(C'\fR integer overflow in the storage space calculations for nested regular expression quantifiers could cause a heap buffer overflow in Perl's regular expression compiler that overwrites memory allocated after the regular expression storage space with attacker supplied data. .PP The target system needs a sufficient amount of memory to allocate partial expansions of the nested quantifiers prior to the overflow occurring. This requirement is unlikely to be met on 64\-bit systems. .PP Discovered by: ManhND of The Tarantula Team, VinCSS (a member of Vingroup). .SS "[CVE\-2020\-10878] Integer overflow via malformed bytecode produced by a crafted regular expression" .IX Subsection "[CVE-2020-10878] Integer overflow via malformed bytecode produced by a crafted regular expression" Integer overflows in the calculation of offsets between instructions for the regular expression engine could cause corruption of the intermediate language state of a compiled regular expression. An attacker could abuse this behaviour to insert instructions into the compiled form of a Perl regular expression. .PP Discovered by: Hugo van der Sanden and Slaven Rezic. .SS "[CVE\-2020\-12723] Buffer overflow caused by a crafted regular expression" .IX Subsection "[CVE-2020-12723] Buffer overflow caused by a crafted regular expression" Recursive calls to \f(CWS_study_chunk()\fR by Perl's regular expression compiler to optimize the intermediate language representation of a regular expression could cause corruption of the intermediate language state of a compiled regular expression. .PP Discovered by: Sergey Aleynikov. .SS "Additional Note" .IX Subsection "Additional Note" An application written in Perl would only be vulnerable to any of the above flaws if it evaluates regular expressions supplied by the attacker. Evaluating regular expressions in this fashion is known to be dangerous since the regular expression engine does not protect against denial of service attacks in this usage scenario. .SH "Incompatible Changes" .IX Header "Incompatible Changes" .SS "Certain pattern matching features are now prohibited in compiling Unicode property value wildcard subpatterns" .IX Subsection "Certain pattern matching features are now prohibited in compiling Unicode property value wildcard subpatterns" These few features are either inappropriate or interfere with the algorithm used to accomplish this task. The complete list is in "Wildcards in Property Values" in perlunicode. .ie n .SS "Unused functions ""POSIX::mbstowcs"" and ""POSIX::wcstombs"" are removed" .el .SS "Unused functions \f(CWPOSIX::mbstowcs\fP and \f(CWPOSIX::wcstombs\fP are removed" .IX Subsection "Unused functions POSIX::mbstowcs and POSIX::wcstombs are removed" These functions could never have worked due to a defective interface specification. There is clearly no demand for them, given that no one has ever complained in the many years the functions were claimed to be available, hence so-called "support" for them is now dropped. .ie n .SS "A bug fix for ""(?[...])"" may have caused some patterns to no longer compile" .el .SS "A bug fix for \f(CW(?[...])\fP may have caused some patterns to no longer compile" .IX Subsection "A bug fix for (?[...]) may have caused some patterns to no longer compile" See "Selected Bug Fixes". The heuristics previously used may have let some constructs compile (perhaps not with the programmer's intended effect) that should have been errors. None are known, but it is possible that some erroneous constructs no longer compile. .ie n .SS """\ep{\fIuser\-defined\fP}"" properties now always override official Unicode ones" .el .SS "\f(CW\ep{\fP\f(CIuser\-defined\fP\f(CW}\fP properties now always override official Unicode ones" .IX Subsection "p{user-defined} properties now always override official Unicode ones" Previously, if and only if a user-defined property was declared prior to the compilation of the regular expression pattern that contains it, its definition was used instead of any official Unicode property with the same name. Now, it always overrides the official property. This change could break existing code that relied (likely unwittingly) on the previous behavior. Without this fix, if Unicode released a new version with a new property that happens to have the same name as the one you had long been using, your program would break when you upgraded to a perl that used that new Unicode version. See "User-Defined Character Properties" in perlunicode. [GH #17205 ] .SS "Modifiable variables are no longer permitted in constants" .IX Subsection "Modifiable variables are no longer permitted in constants" Code like: .PP .Vb 2 \& my $var; \& $sub = sub () { $var }; .Ve .PP where \f(CW$var\fR is referenced elsewhere in some sort of modifiable context now produces an exception when the sub is defined. .PP This error can be avoided by adding a return to the sub definition: .PP .Vb 1 \& $sub = sub () { return $var }; .Ve .PP This has been deprecated since Perl 5.22. [GH #17020] .ie n .SS "Use of ""vec"" on strings with code points above 0xFF is forbidden" .el .SS "Use of \f(CWvec\fP on strings with code points above 0xFF is forbidden" .IX Subsection "Use of vec on strings with code points above 0xFF is forbidden" Such strings are represented internally in UTF\-8, and \f(CW\*(C`vec\*(C'\fR is a bit-oriented operation that will likely give unexpected results on those strings. This was deprecated in perl 5.28.0. .SS "Use of code points over 0xFF in string bitwise operators" .IX Subsection "Use of code points over 0xFF in string bitwise operators" Some uses of these were already illegal after a previous deprecation cycle. The remaining uses are now prohibited, having been deprecated in perl 5.28.0. See perldeprecation. .ie n .SS "Sys::Hostname::hostname() does not accept arguments" .el .SS "\f(CWSys::Hostname::hostname()\fP does not accept arguments" .IX Subsection "Sys::Hostname::hostname() does not accept arguments" This usage was deprecated in perl 5.28.0 and is now fatal. .SS "Plain ""0"" string now treated as a number for range operator" .IX Subsection "Plain ""0"" string now treated as a number for range operator" Previously a range \f(CW"0" .. "\-1"\fR would produce a range of numeric strings from "0" through "99"; this now produces an empty list, just as \f(CW\*(C`0 .. \-1\*(C'\fR does. This also means that \f(CW"0" .. "9"\fR now produces a list of integers, where previously it would produce a list of strings. .PP This was due to a special case that treated strings starting with "0" as strings so ranges like \f(CW"00" .. "03"\fR produced \f(CW"00", "01", "02", "03"\fR, but didn't specially handle the string \f(CW"0"\fR. [GH #16770] .ie n .SS """\eK"" now disallowed in look-ahead and look-behind assertions" .el .SS "\f(CW\eK\fP now disallowed in look-ahead and look-behind assertions" .IX Subsection "K now disallowed in look-ahead and look-behind assertions" This was disallowed because it causes unexpected behaviour, and no-one could define what the desired behaviour should be. [GH #14638] .SH "Performance Enhancements" .IX Header "Performance Enhancements" .IP \(bu 4 \&\f(CW\*(C`my_strnlen\*(C'\fR has been sped up for systems that don't have their own \&\f(CW\*(C`strnlen\*(C'\fR implementation. .IP \(bu 4 \&\f(CW\*(C`grok_bin_oct_hex\*(C'\fR (and so, \f(CW\*(C`grok_bin\*(C'\fR, \f(CW\*(C`grok_oct\*(C'\fR, and \f(CW\*(C`grok_hex\*(C'\fR) have been sped up. .IP \(bu 4 \&\f(CW\*(C`grok_number_flags\*(C'\fR has been sped up. .IP \(bu 4 \&\f(CW\*(C`sort\*(C'\fR is now noticeably faster in cases such as \f(CW\*(C`sort {$a <=> $b}\*(C'\fR or \&\f(CW\*(C`sort {$b <=> $a}\*(C'\fR. [GH #17608 ] .SH "Modules and Pragmata" .IX Header "Modules and Pragmata" .SS "Updated Modules and Pragmata" .IX Subsection "Updated Modules and Pragmata" .IP \(bu 4 Archive::Tar has been upgraded from version 2.32 to 2.36. .IP \(bu 4 autodie has been upgraded from version 2.29 to 2.32. .IP \(bu 4 B has been upgraded from version 1.76 to 1.80. .IP \(bu 4 B::Deparse has been upgraded from version 1.49 to 1.54. .IP \(bu 4 Benchmark has been upgraded from version 1.22 to 1.23. .IP \(bu 4 charnames has been upgraded from version 1.45 to 1.48. .IP \(bu 4 Class::Struct has been upgraded from version 0.65 to 0.66. .IP \(bu 4 Compress::Raw::Bzip2 has been upgraded from version 2.084 to 2.093. .IP \(bu 4 Compress::Raw::Zlib has been upgraded from version 2.084 to 2.093. .IP \(bu 4 CPAN has been upgraded from version 2.22 to 2.27. .IP \(bu 4 DB_File has been upgraded from version 1.843 to 1.853. .IP \(bu 4 Devel::PPPort has been upgraded from version 3.52 to 3.57. .Sp The test files generated on Win32 are now identical to when they are generated on POSIX-like systems. .IP \(bu 4 diagnostics has been upgraded from version 1.36 to 1.37. .IP \(bu 4 Digest::MD5 has been upgraded from version 2.55 to 2.55_01. .IP \(bu 4 Dumpvalue has been upgraded from version 1.18 to 1.21. .Sp Previously, when dumping elements of an array and encountering an undefined value, the string printed would have been \f(CW\*(C`empty array\*(C'\fR. This has been changed to what was apparently originally intended: \f(CW\*(C`empty slot\*(C'\fR. .IP \(bu 4 DynaLoader has been upgraded from version 1.45 to 1.47. .IP \(bu 4 Encode has been upgraded from version 3.01 to 3.06. .IP \(bu 4 encoding has been upgraded from version 2.22 to 3.00. .IP \(bu 4 English has been upgraded from version 1.10 to 1.11. .IP \(bu 4 Exporter has been upgraded from version 5.73 to 5.74. .IP \(bu 4 ExtUtils::CBuilder has been upgraded from version 0.280231 to 0.280234. .IP \(bu 4 ExtUtils::MakeMaker has been upgraded from version 7.34 to 7.44. .IP \(bu 4 feature has been upgraded from version 1.54 to 1.58. .Sp A new \f(CW\*(C`indirect\*(C'\fR feature has been added, which is enabled by default but allows turning off indirect object syntax. .IP \(bu 4 File::Find has been upgraded from version 1.36 to 1.37. .Sp On Win32, the tests no longer require either a file in the drive root directory, or a writable root directory. .IP \(bu 4 File::Glob has been upgraded from version 1.32 to 1.33. .IP \(bu 4 File::stat has been upgraded from version 1.08 to 1.09. .IP \(bu 4 Filter::Simple has been upgraded from version 0.95 to 0.96. .IP \(bu 4 Getopt::Long has been upgraded from version 2.5 to 2.51. .IP \(bu 4 Hash::Util has been upgraded from version 0.22 to 0.23. .Sp The Synopsis has been updated as the example code stopped working with newer perls. [GH #17399 ] .IP \(bu 4 I18N::Langinfo has been upgraded from version 0.18 to 0.19. .IP \(bu 4 I18N::LangTags has been upgraded from version 0.43 to 0.44. .Sp Document the \f(CW\*(C`IGNORE_WIN32_LOCALE\*(C'\fR environment variable. .IP \(bu 4 IO has been upgraded from version 1.40 to 1.43. .Sp IO::Socket no longer caches a zero protocol value, since this indicates that the implementation will select a protocol. This means that on platforms that don't implement \f(CW\*(C`SO_PROTOCOL\*(C'\fR for a given socket type the protocol method may return \f(CW\*(C`undef\*(C'\fR. .Sp The supplied \fITO\fR is now always honoured on calls to the \f(CWsend()\fR method. [GH #16891] .IP \(bu 4 IO-Compress has been upgraded from version 2.084 to 2.093. .IP \(bu 4 IPC::Cmd has been upgraded from version 1.02 to 1.04. .IP \(bu 4 IPC::Open3 has been upgraded from version 1.20 to 1.21. .IP \(bu 4 JSON::PP has been upgraded from version 4.02 to 4.04. .IP \(bu 4 Math::BigInt has been upgraded from version 1.999816 to 1.999818. .IP \(bu 4 Math::BigInt::FastCalc has been upgraded from version 0.5008 to 0.5009. .IP \(bu 4 Module::CoreList has been upgraded from version 5.20190522 to 5.20200620. .IP \(bu 4 Module::Load::Conditional has been upgraded from version 0.68 to 0.70. .IP \(bu 4 Module::Metadata has been upgraded from version 1.000036 to 1.000037. .IP \(bu 4 mro has been upgraded from version 1.22 to 1.23. .IP \(bu 4 Net::Ping has been upgraded from version 2.71 to 2.72. .IP \(bu 4 Opcode has been upgraded from version 1.43 to 1.47. .IP \(bu 4 open has been upgraded from version 1.11 to 1.12. .IP \(bu 4 overload has been upgraded from version 1.30 to 1.31. .IP \(bu 4 parent has been upgraded from version 0.237 to 0.238. .IP \(bu 4 perlfaq has been upgraded from version 5.20190126 to 5.20200523. .IP \(bu 4 PerlIO has been upgraded from version 1.10 to 1.11. .IP \(bu 4 PerlIO::encoding has been upgraded from version 0.27 to 0.28. .IP \(bu 4 PerlIO::via has been upgraded from version 0.17 to 0.18. .IP \(bu 4 Pod::Html has been upgraded from version 1.24 to 1.25. .IP \(bu 4 Pod::Simple has been upgraded from version 3.35 to 3.40. .IP \(bu 4 podlators has been upgraded from version 4.11 to 4.14. .IP \(bu 4 POSIX has been upgraded from version 1.88 to 1.94. .IP \(bu 4 re has been upgraded from version 0.37 to 0.40. .IP \(bu 4 Safe has been upgraded from version 2.40 to 2.41. .IP \(bu 4 Scalar::Util has been upgraded from version 1.50 to 1.55. .IP \(bu 4 SelfLoader has been upgraded from version 1.25 to 1.26. .IP \(bu 4 Socket has been upgraded from version 2.027 to 2.029. .IP \(bu 4 Storable has been upgraded from version 3.15 to 3.21. .Sp Use of \f(CWnote()\fR from Test::More is now optional in tests. This works around a circular dependency with Test::More when installing on very old perls from CPAN. .Sp Vstring magic strings over 2GB are now disallowed. .Sp Regular expressions objects weren't properly counted for object id purposes on retrieve. This would corrupt the resulting structure, or cause a runtime error in some cases. [GH #17037] .IP \(bu 4 Sys::Hostname has been upgraded from version 1.22 to 1.23. .IP \(bu 4 Sys::Syslog has been upgraded from version 0.35 to 0.36. .IP \(bu 4 Term::ANSIColor has been upgraded from version 4.06 to 5.01. .IP \(bu 4 Test::Simple has been upgraded from version 1.302162 to 1.302175. .IP \(bu 4 Thread has been upgraded from version 3.04 to 3.05. .IP \(bu 4 Thread::Queue has been upgraded from version 3.13 to 3.14. .IP \(bu 4 threads has been upgraded from version 2.22 to 2.25. .IP \(bu 4 threads::shared has been upgraded from version 1.60 to 1.61. .IP \(bu 4 Tie::File has been upgraded from version 1.02 to 1.06. .IP \(bu 4 Tie::Hash::NamedCapture has been upgraded from version 0.10 to 0.13. .IP \(bu 4 Tie::Scalar has been upgraded from version 1.04 to 1.05. .IP \(bu 4 Tie::StdHandle has been upgraded from version 4.5 to 4.6. .IP \(bu 4 Time::HiRes has been upgraded from version 1.9760 to 1.9764. .Sp Removed obsolete code such as support for pre\-5.6 perl and classic MacOS. [GH #17096] .IP \(bu 4 Time::Piece has been upgraded from version 1.33 to 1.3401. .IP \(bu 4 Unicode::Normalize has been upgraded from version 1.26 to 1.27. .IP \(bu 4 Unicode::UCD has been upgraded from version 0.72 to 0.75. .IP \(bu 4 VMS::Stdio has been upgraded from version 2.44 to 2.45. .IP \(bu 4 warnings has been upgraded from version 1.44 to 1.47. .IP \(bu 4 Win32 has been upgraded from version 0.52 to 0.53. .IP \(bu 4 Win32API::File has been upgraded from version 0.1203 to 0.1203_01. .IP \(bu 4 XS::APItest has been upgraded from version 1.00 to 1.09. .SS "Removed Modules and Pragmata" .IX Subsection "Removed Modules and Pragmata" .IP \(bu 4 Pod::Parser has been removed from the core distribution. It still is available for download from CPAN. This resolves [#13194 ]. .SH Documentation .IX Header "Documentation" .SS "Changes to Existing Documentation" .IX Subsection "Changes to Existing Documentation" We have attempted to update the documentation to reflect the changes listed in this document. If you find any we have missed, open an issue at . .PP Additionally, the following selected changes have been made: .PP \fIperldebguts\fR .IX Subsection "perldebguts" .IP \(bu 4 Simplify a few regnode definitions .Sp Update \f(CW\*(C`BOUND\*(C'\fR and \f(CW\*(C`NBOUND\*(C'\fR definitions. .IP \(bu 4 Add ANYOFHs regnode .Sp This node is like \f(CW\*(C`ANYOFHb\*(C'\fR, but is used when more than one leading byte is the same in all the matched code points. .Sp \&\f(CW\*(C`ANYOFHb\*(C'\fR is used to avoid having to convert from UTF\-8 to code point for something that won't match. It checks that the first byte in the UTF\-8 encoded target is the desired one, thus ruling out most of the possible code points. .PP \fIperlapi\fR .IX Subsection "perlapi" .IP \(bu 4 \&\f(CW\*(C`sv_2pvbyte\*(C'\fR updated to mention it will croak if the SV cannot be downgraded. .IP \(bu 4 \&\f(CW\*(C`sv_setpvn\*(C'\fR updated to mention that the UTF\-8 flag will not be changed by this function, and a terminating NUL byte is guaranteed. .IP \(bu 4 Documentation for \f(CW\*(C`PL_phase\*(C'\fR has been added. .IP \(bu 4 The documentation for \f(CW\*(C`grok_bin\*(C'\fR, \f(CW\*(C`grok_oct\*(C'\fR, and \f(CW\*(C`grok_hex\*(C'\fR has been updated and clarified. .PP \fIperldiag\fR .IX Subsection "perldiag" .IP \(bu 4 Add documentation for experimental 'isa' operator .Sp (S experimental::isa) This warning is emitted if you use the (\f(CW\*(C`isa\*(C'\fR) operator. This operator is currently experimental and its behaviour may change in future releases of Perl. .PP \fIperlfunc\fR .IX Subsection "perlfunc" .ie n .IP """caller""" 4 .el .IP \f(CWcaller\fR 4 .IX Item "caller" Like \f(CW\*(C`_\|_FILE_\|_\*(C'\fR and \f(CW\*(C`_\|_LINE_\|_\*(C'\fR, the filename and line number returned here may be altered by the mechanism described at "Plain Old Comments (Not!)" in perlsyn. .ie n .IP """_\|_FILE_\|_""" 4 .el .IP \f(CW_\|_FILE_\|_\fR 4 .IX Item "__FILE__" It can be altered by the mechanism described at "Plain Old Comments (Not!)" in perlsyn. .ie n .IP """_\|_LINE_\|_""" 4 .el .IP \f(CW_\|_LINE_\|_\fR 4 .IX Item "__LINE__" It can be altered by the mechanism described at "Plain Old Comments (Not!)" in perlsyn. .ie n .IP """return""" 4 .el .IP \f(CWreturn\fR 4 .IX Item "return" Now mentions that you cannot return from \f(CW\*(C`do BLOCK\*(C'\fR. .ie n .IP """open""" 4 .el .IP \f(CWopen\fR 4 .IX Item "open" The \f(CWopen()\fR section had been renovated significantly. .PP \fIperlguts\fR .IX Subsection "perlguts" .IP \(bu 4 No longer suggesting using perl's \f(CW\*(C`malloc\*(C'\fR. Modern system \f(CW\*(C`malloc\*(C'\fR is assumed to be much better than perl's implementation now. .IP \(bu 4 Documentation about \fIembed.fnc\fR flags has been removed. \fIembed.fnc\fR now has sufficient comments within it. Anyone changing that file will see those comments first, so entries here are now redundant. .IP \(bu 4 Updated documentation for \f(CW\*(C`UTF8f\*(C'\fR .IP \(bu 4 Added missing \f(CW\*(C`=for apidoc\*(C'\fR lines .PP \fIperlhacktips\fR .IX Subsection "perlhacktips" .IP \(bu 4 The differences between Perl strings and C strings are now detailed. .PP \fIperlintro\fR .IX Subsection "perlintro" .IP \(bu 4 The documentation for the repetition operator \f(CW\*(C`x\*(C'\fR have been clarified. [GH #17335 ] .PP \fIperlipc\fR .IX Subsection "perlipc" .IP \(bu 4 The documentation surrounding \f(CW\*(C`open\*(C'\fR and handle usage has been modernized to prefer 3\-arg open and lexical variables instead of barewords. .IP \(bu 4 Various updates and fixes including making all examples strict-safe and replacing \f(CW\*(C`\-w\*(C'\fR with \f(CW\*(C`use warnings\*(C'\fR. .PP \fIperlop\fR .IX Subsection "perlop" .IP \(bu 4 \&'isa' operator is experimental .Sp This is an experimental feature and is available when enabled by \f(CW\*(C`use feature \*(Aqisa\*(Aq\*(C'\fR. It emits a warning in the \f(CW\*(C`experimental::isa\*(C'\fR category. .PP \fIperlpod\fR .IX Subsection "perlpod" .IP \(bu 4 Details of the various stacks within the perl interpreter are now explained here. .IP \(bu 4 Advice has been added regarding the usage of \f(CW\*(C`Z<>\*(C'\fR. .PP \fIperlport\fR .IX Subsection "perlport" .IP \(bu 4 Update \f(CW\*(C`timegm\*(C'\fR example to use the correct year format \fI1970\fR instead of \fI70\fR. [GH #16431 ] .PP \fIperlreref\fR .IX Subsection "perlreref" .IP \(bu 4 Fix some typos. .PP \fIperlvar\fR .IX Subsection "perlvar" .IP \(bu 4 Now recommends stringifying \f(CW$]\fR and comparing it numerically. .PP \fIperlapi, perlintern\fR .IX Subsection "perlapi, perlintern" .IP \(bu 4 Documentation has been added for several functions that were lacking it before. .PP \fIperlxs\fR .IX Subsection "perlxs" .IP \(bu 4 Suggest using \f(CW\*(C`libffi\*(C'\fR for simple library bindings via CPAN modules like FFI::Platypus or FFI::Raw. .PP \fIPOSIX\fR .IX Subsection "POSIX" .IP \(bu 4 \&\f(CW\*(C`setlocale\*(C'\fR warning about threaded builds updated to note it does not apply on Perl 5.28.X and later. .IP \(bu 4 \&\f(CW\*(C`Posix::SigSet\->new(...)\*(C'\fR updated to state it throws an error if any of the supplied signals cannot be added to the set. .PP Additionally, the following selected changes have been made: .PP \fIUpdating of links\fR .IX Subsection "Updating of links" .IP \(bu 4 Links to the now defunct site now point at the equivalent URL. [GH #17393 ] .IP \(bu 4 The man page for ExtUtils::XSSymSet is now only installed on VMS, which is the only platform the module is installed on. [GH #17424 ] .IP \(bu 4 URLs have been changed to \f(CW\*(C`https://\*(C'\fR and stale links have been updated. .Sp Where applicable, the URLs in the documentation have been moved from using the \&\f(CW\*(C`http://\*(C'\fR protocol to \f(CW\*(C`https://\*(C'\fR. This also affects the location of the bug tracker at . .IP \(bu 4 Some links to OS/2 libraries, Address Sanitizer and other system tools had gone stale. These have been updated with working links. .IP \(bu 4 Some links to old email addresses on perl5\-porters had gone stale. These have been updated with working links. .SH Diagnostics .IX Header "Diagnostics" The following additions or changes have been made to diagnostic output, including warnings and fatal error messages. For the complete list of diagnostic messages, see perldiag. .SS "New Diagnostics" .IX Subsection "New Diagnostics" \fINew Errors\fR .IX Subsection "New Errors" .IP \(bu 4 Expecting interpolated extended charclass in regex; marked by <\-\- HERE in m/%s/ .Sp This is a replacement for several error messages listed under "Changes to Existing Diagnostics". .IP \(bu 4 \&\f(CW\*(C`No digits found for %s literal\*(C'\fR .Sp (F) No hexadecimal digits were found following \f(CW\*(C`0x\*(C'\fR or no binary digits were found following \f(CW\*(C`0b\*(C'\fR. .PP \fINew Warnings\fR .IX Subsection "New Warnings" .IP \(bu 4 Code point 0x%X is not Unicode, and not portable .Sp This is actually not a new message, but it is now output when the warnings category \f(CW\*(C`portable\*(C'\fR is enabled. .Sp When raised during regular expression pattern compilation, the warning has extra text added at the end marking where precisely in the pattern it occurred. .IP \(bu 4 Non-hex character '%c' terminates \ex early. Resolved as "%s" .Sp This replaces a warning that was much less specific, and which gave false information. This new warning parallels the similar already-existing one raised for \f(CW\*(C`\eo{}\*(C'\fR. .SS "Changes to Existing Diagnostics" .IX Subsection "Changes to Existing Diagnostics" .IP \(bu 4 Character following "\ec" must be printable ASCII .Sp \&...now has extra text added at the end, when raised during regular expression pattern compilation, marking where precisely in the pattern it occurred. .IP \(bu 4 Use "%s" instead of "%s" .Sp \&...now has extra text added at the end, when raised during regular expression pattern compilation, marking where precisely in the pattern it occurred. .IP \(bu 4 Sequence "\ec{" invalid .Sp \&...now has extra text added at the end, when raised during regular expression pattern compilation, marking where precisely in the pattern it occurred. .IP \(bu 4 "\ec%c" is more clearly written simply as "%s" .Sp \&...now has extra text added at the end, when raised during regular expression pattern compilation, marking where precisely in the pattern it occurred. .IP \(bu 4 Non-octal character '%c' terminates \eo early. Resolved as "%s" .Sp \&...now includes the phrase "terminates \eo early", and has extra text added at the end, when raised during regular expression pattern compilation, marking where precisely in the pattern it occurred. In some instances the text of the resolution has been clarified. .IP \(bu 4 \&'%s' resolved to '\eo{%s}%d' .Sp As of Perl 5.32, this message is no longer generated. Instead, "Non-octal character '%c' terminates \eo early. Resolved as "%s"" in perldiag is used instead. .IP \(bu 4 Use of code point 0x%s is not allowed; the permissible max is 0x%X .Sp Some instances of this message previously output the hex digits \f(CW\*(C`A\*(C'\fR, \&\f(CW\*(C`B\*(C'\fR, \f(CW\*(C`C\*(C'\fR, \f(CW\*(C`D\*(C'\fR, \f(CW\*(C`E\*(C'\fR, and \f(CW\*(C`F\*(C'\fR in lower case. Now they are all consistently upper case. .IP \(bu 4 The following three diagnostics have been removed, and replaced by \&\f(CW\*(C`Expecting interpolated extended charclass in regex; marked by <\-\- HERE in m/%s/\*(C'\fR : \&\f(CW\*(C`Expecting close paren for nested extended charclass in regex; marked by <\-\- HERE in m/%s/\*(C'\fR, \&\f(CW\*(C`Expecting close paren for wrapper for nested extended charclass in regex; marked by <\-\- HERE in m/%s/\*(C'\fR, and \&\f(CW\*(C`Expecting \*(Aq(?flags:(?[...\*(Aq in regex; marked by <\-\-\ HERE in m/%s/\*(C'\fR. .IP \(bu 4 The \f(CW\*(C`Code point 0x%X is not Unicode, and not portable\*(C'\fR warning removed the line \f(CW\*(C`Code points above 0xFFFF_FFFF require larger than a 32 bit word.\*(C'\fR as code points that large are no longer legal on 32\-bit platforms. .IP \(bu 4 Can't use global \f(CW%s\fR in \f(CW%s\fR .Sp This error message has been slightly reformatted from the original \f(CW\*(C`Can\*(Aqt use global %s in "%s"\*(C'\fR, and in particular misleading error messages like \f(CW\*(C`Can\*(Aqt use global $_ in "my"\*(C'\fR are now rendered as \f(CW\*(C`Can\*(Aqt use global $_ in subroutine signature\*(C'\fR. .IP \(bu 4 Constants from lexical variables potentially modified elsewhere are no longer permitted .Sp This error message replaces the former \f(CWConstants from lexical variables potentially modified elsewhere are deprecated. This will not be allowed in Perl 5.32\fR to reflect the fact that this previously deprecated usage has now been transformed into an exception. The message's classification has also been updated from D (deprecated) to F (fatal). .Sp See also "Incompatible Changes". .IP \(bu 4 \&\f(CW\*(C`\eN{} here is restricted to one character\*(C'\fR is now emitted in the same circumstances where previously \f(CW\*(C`\eN{} in inverted character class or as a range end\-point is restricted to one character\*(C'\fR was. .Sp This is due to new circumstances having been added in Perl 5.30 that weren't covered by the earlier wording. .SH "Utility Changes" .IX Header "Utility Changes" .SS perlbug .IX Subsection "perlbug" .IP \(bu 4 The bug tracker homepage URL now points to GitHub. .SS streamzip .IX Subsection "streamzip" .IP \(bu 4 This is a new utility, included as part of an IO::Compress::Base upgrade. .Sp streamzip creates a zip file from stdin. The program will read data from stdin, compress it into a zip container and, by default, write a streamed zip file to stdout. .SH "Configuration and Compilation" .IX Header "Configuration and Compilation" .SS \fIConfigure\fP .IX Subsection "Configure" .IP \(bu 4 For clang++, add \f(CW\*(C`#include \*(C'\fR to Configure's probes for \&\f(CW\*(C`futimes\*(C'\fR, \f(CW\*(C`strtoll\*(C'\fR, \f(CW\*(C`strtoul\*(C'\fR, \f(CW\*(C`strtoull\*(C'\fR, \f(CW\*(C`strtouq\*(C'\fR, otherwise the probes would fail to compile. .IP \(bu 4 Use a compile and run test for \f(CW\*(C`lchown\*(C'\fR to satisfy clang++ which should more reliably detect it. .IP \(bu 4 For C++ compilers, add \f(CW\*(C`#include \*(C'\fR to Configure's probes for \&\f(CW\*(C`getpgrp\*(C'\fR and \f(CW\*(C`setpgrp\*(C'\fR as they use printf and C++ compilers may fail compilation instead of just warning. .IP \(bu 4 Check if the compiler can handle inline attribute. .IP \(bu 4 Check for character data alignment. .IP \(bu 4 \&\fIConfigure\fR now correctly handles gcc\-10. Previously it was interpreting it as gcc\-1 and turned on \f(CW\*(C`\-fpcc\-struct\-return\*(C'\fR. .IP \(bu 4 Perl now no longer probes for \f(CW\*(C`d_u32align\*(C'\fR, defaulting to \f(CW\*(C`define\*(C'\fR on all platforms. This check was error-prone when it was done, which was on 32\-bit platforms only. [GH #16680] .IP \(bu 4 Documentation and hints for building perl on Z/OS (native EBCDIC) have been updated. This is still a work in progress. .IP \(bu 4 A new probe for \f(CW\*(C`malloc_usable_size\*(C'\fR has been added. .IP \(bu 4 Improvements in \fIConfigure\fR to detection in C++ and clang++. Work ongoing by Andy Dougherty. [GH #17033] .IP \(bu 4 \&\fIautodoc.pl\fR .Sp This tool that regenerates perlintern and perlapi has been overhauled significantly, restoring consistency in flags used in \fIembed.fnc\fR and Devel::PPPort and allowing removal of many redundant \f(CW\*(C`=for apidoc\*(C'\fR entries in code. .IP \(bu 4 The \f(CW\*(C`ECHO\*(C'\fR macro is now defined. This is used in a \f(CW\*(C`dtrace\*(C'\fR rule that was originally changed for FreeBSD, and the FreeBSD make apparently predefines it. The Solaris make does not predefine \f(CW\*(C`ECHO\*(C'\fR which broke this rule on Solaris. [GH #17057] .IP \(bu 4 Bison versions 3.1 through 3.4 are now supported. .SH Testing .IX Header "Testing" Tests were added and changed to reflect the other additions and changes in this release. Furthermore, these significant changes were made: .IP \(bu 4 \&\fIt/run/switches.t\fR no longer uses (and re-uses) the \fItmpinplace/\fR directory under \fIt/\fR. This may prevent spurious failures. [GH #17424 ] .IP \(bu 4 Various bugs in \f(CW\*(C`POSIX::mbtowc\*(C'\fR were fixed. Potential races with other threads are now avoided, and previously the returned wide character could well be garbage. .IP \(bu 4 Various bugs in \f(CW\*(C`POSIX::wctomb\*(C'\fR were fixed. Potential races with other threads are now avoided, and previously it would segfault if the string parameter was shared or hadn't been pre-allocated with a string of sufficient length to hold the result. .IP \(bu 4 Certain test output of scalars containing control characters and Unicode has been fixed on EBCDIC. .IP \(bu 4 \&\fIt/charset_tools.pl\fR: Avoid some work on ASCII platforms. .IP \(bu 4 \&\fIt/re/regexp.t\fR: Speed up many regex tests on ASCII platform .IP \(bu 4 \&\fIt/re/pat.t\fR: Skip tests that don't work on EBCDIC. .SH "Platform Support" .IX Header "Platform Support" .SS "Discontinued Platforms" .IX Subsection "Discontinued Platforms" .IP "Windows CE" 4 .IX Item "Windows CE" Support for building perl on Windows CE has now been removed. .SS "Platform-Specific Notes" .IX Subsection "Platform-Specific Notes" .IP Linux 4 .IX Item "Linux" \&\f(CW\*(C`cc\*(C'\fR will be used to populate \f(CW\*(C`plibpth\*(C'\fR if \f(CW\*(C`cc\*(C'\fR is \f(CW\*(C`clang\*(C'\fR. [GH #17043] .IP "NetBSD 8.0" 4 .IX Item "NetBSD 8.0" Fix compilation of Perl on NetBSD 8.0 with g++. [GH #17381 ] .IP Windows 4 .IX Item "Windows" .RS 4 .PD 0 .IP \(bu 4 .PD The configuration for \f(CW\*(C`ccflags\*(C'\fR and \f(CW\*(C`optimize\*(C'\fR are now separate, as with POSIX platforms. [GH #17156 ] .IP \(bu 4 Support for building perl with Visual C++ 6.0 has now been removed. .IP \(bu 4 The locale tests could crash on Win32 due to a Windows bug, and separately due to the CRT throwing an exception if the locale name wasn't validly encoded in the current code page. .Sp For the second we now decode the locale name ourselves, and always decode it as UTF\-8. [GH #16922] .IP \(bu 4 \&\fIt/op/magic.t\fR could fail if environment variables starting with \&\f(CW\*(C`FOO\*(C'\fR already existed. .IP \(bu 4 MYMALLOC (PERL_MALLOC) build has been fixed. .RE .RS 4 .RE .IP Solaris 4 .IX Item "Solaris" .RS 4 .PD 0 .IP \(bu 4 .PD \&\f(CW\*(C`Configure\*(C'\fR will now find recent versions of the Oracle Developer Studio compiler, which are found under \f(CW\*(C`/opt/developerstudio*\*(C'\fR. .IP \(bu 4 \&\f(CW\*(C`Configure\*(C'\fR now uses the detected types for \f(CW\*(C`gethostby*\*(C'\fR functions, allowing Perl to once again compile on certain configurations of Solaris. .RE .RS 4 .RE .IP VMS 4 .IX Item "VMS" .RS 4 .PD 0 .IP \(bu 4 .PD With the release of the patch kit C99 V2.0, VSI has provided support for a number of previously-missing C99 features. On systems with that patch kit installed, Perl's configuration process will now detect the presence of the header \f(CW\*(C`stdint.h\*(C'\fR and the following functions: \f(CW\*(C`fpclassify\*(C'\fR, \f(CW\*(C`isblank\*(C'\fR, \f(CW\*(C`isless\*(C'\fR, \&\f(CW\*(C`llrint\*(C'\fR, \f(CW\*(C`llrintl\*(C'\fR, \f(CW\*(C`llround\*(C'\fR, \f(CW\*(C`llroundl\*(C'\fR, \f(CW\*(C`nearbyint\*(C'\fR, \f(CW\*(C`round\*(C'\fR, \f(CW\*(C`scalbn\*(C'\fR, and \f(CW\*(C`scalbnl\*(C'\fR. .IP \(bu 4 \&\f(CW\*(C`\-Duse64bitint\*(C'\fR is now the default on VMS. .RE .RS 4 .RE .IP z/OS 4 .IX Item "z/OS" Perl 5.32 has been tested on z/OS 2.4, with the following caveats: .RS 4 .IP \(bu 4 Only static builds (the default) build reliably .IP \(bu 4 When using locales, z/OS does not handle the \f(CW\*(C`LC_MESSAGES\*(C'\fR category properly, so when compiling perl, you should add the following to your \&\fIConfigure\fR options .Sp .Vb 1 \& ./Configure \-Accflags=\-DNO_LOCALE_MESSAGES .Ve .IP \(bu 4 z/OS does not support locales with threads, so when compiling a threaded perl, you should add the following to your \fIConfigure\fR options .Sp .Vb 1 \& ./Configure \-Accflags=\-DNO_LOCALE .Ve .IP \(bu 4 Some CPAN modules that are shipped with perl fail at least one of their self-tests. These are: Archive::Tar, Config::Perl::V, CPAN::Meta, CPAN::Meta::YAML, Digest::MD5, Digest::SHA, Encode, ExtUtils::MakeMaker, ExtUtils::Manifest, HTTP::Tiny, IO::Compress, IPC::Cmd, JSON::PP, libnet, MIME::Base64, Module::Metadata, PerlIO::via\-QuotedPrint, Pod::Checker, podlators, Pod::Simple, Socket, and Test::Harness. .Sp The causes of the failures range from the self-test itself is flawed, and the module actually works fine, up to the module doesn't work at all on EBCDIC platforms. .RE .RS 4 .RE .SH "Internal Changes" .IX Header "Internal Changes" .IP \(bu 4 \&\f(CW\*(C`savepvn\*(C'\fR's len parameter is now a \f(CW\*(C`Size_t\*(C'\fR instead of an \f(CW\*(C`I32\*(C'\fR since we can handle longer strings than 31 bits. .IP \(bu 4 The lexer (\f(CWPerl_yylex()\fR in \fItoke.c\fR) was previously a single 4100\-line function, relying heavily on \f(CW\*(C`goto\*(C'\fR and a lot of widely-scoped local variables to do its work. It has now been pulled apart into a few dozen smaller static functions; the largest remaining chunk (\f(CWyyl_word_or_keyword()\fR) is a little over 900 lines, and consists of a single \f(CW\*(C`switch\*(C'\fR statement, all of whose \&\f(CW\*(C`case\*(C'\fR groups are independent. This should be much easier to understand and maintain. .IP \(bu 4 The OS-level signal handlers and type (Sighandler_t) used by the perl core were declared as having three parameters, but the OS was always told to call them with one argument. This has been fixed by declaring them to have one parameter. See the merge commit \f(CW\*(C`v5.31.5\-346\-g116e19abbf\*(C'\fR for full details. .IP \(bu 4 The code that handles \f(CW\*(C`tr///\*(C'\fR has been extensively revised, fixing various bugs, especially when the source and/or replacement strings contain characters whose code points are above 255. Some of the bugs were undocumented, one being that under some circumstances (but not all) with \f(CW\*(C`/s\*(C'\fR, the squeezing was done based on the source, rather than the replacement. A documented bug that got fixed was [GH #14777] . .IP \(bu 4 A new macro for XS writers dealing with UTF\-8\-encoded Unicode strings has been created "\f(CW\*(C`UTF8_CHK_SKIP\*(C'\fR" in perlapi that is safer in the face of malformed UTF\-8 input than "\f(CW\*(C`UTF8_SKIP\*(C'\fR" in perlapi (but not as safe as "\f(CW\*(C`UTF8_SAFE_SKIP\*(C'\fR" in perlapi). It won't read past a NUL character. It has been backported in Devel::PPPort 3.55 and later. .IP \(bu 4 Added the \f(CW\*(C`PL_curstackinfo\->si_cxsubix\*(C'\fR field. This records the stack index of the most recently pushed sub/format/eval context. It is set and restored automatically by \f(CWcx_pushsub()\fR, \f(CWcx_popsub()\fR etc., but would need to be manually managed if you do any unusual manipulation of the context stack. .IP \(bu 4 Various macros dealing with character type classification and changing case where the input is encoded in UTF\-8 now require an extra parameter to prevent potential reads beyond the end of the buffer. Use of these has generated a deprecation warning since Perl 5.26. Details are in "In XS code, use of various macros dealing with UTF\-8." in perldeprecation .IP \(bu 4 A new parser function \fBparse_subsignature()\fR allows a keyword plugin to parse a subroutine signature while \f(CWuse feature \&\*(Aqsignatures\*(Aq\fR is in effect. This allows custom keywords to implement semantics similar to regular \f(CW\*(C`sub\*(C'\fR declarations that include signatures. [GH #16261] .IP \(bu 4 Since on some platforms we need to hold a mutex when temporarily switching locales, new macros (\f(CW\*(C`STORE_LC_NUMERIC_SET_TO_NEEDED_IN\*(C'\fR, \&\f(CW\*(C`WITH_LC_NUMERIC_SET_TO_NEEDED\*(C'\fR and \f(CW\*(C`WITH_LC_NUMERIC_SET_TO_NEEDED_IN\*(C'\fR) have been added to make it easier to do this safely and efficiently as part of [GH #17034] . .IP \(bu 4 The memory bookkeeping overhead for allocating an OP structure has been reduced by 8 bytes per OP on 64\-bit systems. .IP \(bu 4 \&\fBeval_pv()\fR no longer stringifies the exception when \&\f(CW\*(C`[GH #17035]|https://github.com/Perl/perl5/issues/17035\*(C'\fR] .IP \(bu 4 The PERL_DESTRUCT_LEVEL environment variable was formerly only honoured on perl binaries built with DEBUGGING support. It is now checked on all perl builds. Its normal use is to force perl to individually free every block of memory which it has allocated before exiting, which is useful when using automated leak detection tools such as valgrind. .IP \(bu 4 The API \fBeval_sv()\fR now accepts a \f(CW\*(C`G_RETHROW\*(C'\fR flag. If this flag is set and an exception is thrown while compiling or executing the supplied code, it will be rethrown, and \fBeval_sv()\fR will not return. [GH #17036] .IP \(bu 4 As part of the fix for [GH #1537] \fBperl_parse()\fR now returns non-zero if \fBexit\fR\|(0) is called in a \f(CW\*(C`BEGIN\*(C'\fR, \f(CW\*(C`UNITCHECK\*(C'\fR or \&\f(CW\*(C`CHECK\*(C'\fR block. .IP \(bu 4 Most functions which recursively walked an op tree during compilation have been made non-recursive. This avoids SEGVs from stack overflow when the op tree is deeply nested, such as \f(CW\*(C`$n == 1 ? "one" : $n == 2 ? "two" : ....\*(C'\fR (especially in code which is auto-generated). .Sp This is particularly noticeable where the code is compiled within a separate thread, as threads tend to have small stacks by default. .SH "Selected Bug Fixes" .IX Header "Selected Bug Fixes" .IP \(bu 4 Previously "require" in perlfunc would only treat the special built-in SV \f(CW&PL_sv_undef\fR as a value in \f(CW%INC\fR as if a previous \f(CW\*(C`require\*(C'\fR has failed, treating other undefined SVs as if the previous \f(CW\*(C`require\*(C'\fR has succeeded. This could cause unexpected success from \f(CW\*(C`require\*(C'\fR e.g., on \f(CW\*(C`local %INC = %INC;\*(C'\fR. This has been fixed. [GH #17428 ] .IP \(bu 4 \&\f(CW\*(C`(?{...})\*(C'\fR eval groups in regular expressions no longer unintentionally trigger "EVAL without pos change exceeded limit in regex" [GH #17490 ]. .IP \(bu 4 \&\f(CW\*(C`(?[...])\*(C'\fR extended bracketed character classes do not wrongly raise an error on some cases where a previously-compiled such class is interpolated into another. The heuristics previously used have been replaced by a reliable method, and hence the diagnostics generated have changed. See "Diagnostics". .IP \(bu 4 The debug display (say by specifying \f(CW\*(C`\-Dr\*(C'\fR or \f(CW\*(C`use\ re\*(C'\fR (with appropriate options) of compiled Unicode property wildcard subpatterns no longer has extraneous output. .IP \(bu 4 Fix an assertion failure in the regular expression engine. [GH #17372 ] .IP \(bu 4 Fix coredump in pp_hot.c after \f(CWB::UNOP_AUX::aux_list()\fR. [GH #17301 ] .IP \(bu 4 Loading IO is now threadsafe. [GH #14816 ] .IP \(bu 4 \&\f(CW\*(C`\ep{user\-defined}\*(C'\fR overrides official Unicode [GH #17025 ] .Sp Prior to this patch, the override was only sometimes in effect. .IP \(bu 4 Properly handle filled \f(CW\*(C`/il\*(C'\fR regnodes and multi-char folds .IP \(bu 4 Compilation error during make minitest [GH #17293 ] .IP \(bu 4 Move the implementation of \f(CW\*(C`%\-\*(C'\fR, \f(CW\*(C`%+\*(C'\fR into core. .IP \(bu 4 Read beyond buffer in \f(CW\*(C`grok_inf_nan\*(C'\fR [GH #17370 ] .IP \(bu 4 Workaround glibc bug with \f(CW\*(C`LC_MESSAGES\*(C'\fR [GH #17081 ] .IP \(bu 4 \&\f(CWprintf()\fR or \f(CWsprintf()\fR with the \f(CW%n\fR format could cause a panic on debugging builds, or report an incorrectly cached length value when producing \f(CW\*(C`SVfUTF8\*(C'\fR flagged strings. [GH #17221 ] .IP \(bu 4 The tokenizer has been extensively refactored. [GH #17241 ] [GH #17189 ] .IP \(bu 4 \&\f(CW\*(C`use strict "subs"\*(C'\fR is now enforced for bareword constants optimized into a \f(CW\*(C`multiconcat\*(C'\fR operator. [GH #17254 ] .IP \(bu 4 A memory leak in regular expression patterns has been fixed. [GH #17218 ] .IP \(bu 4 Perl no longer treats strings starting with "0x" or "0b" as hex or binary numbers respectively when converting a string to a number. This reverts a change in behaviour inadvertently introduced in perl 5.30.0 intended to improve precision when converting a string to a floating point number. [GH #17062] .IP \(bu 4 Matching a non\-\f(CW\*(C`SVf_UTF8\*(C'\fR string against a regular expression containing unicode literals could leak a SV on each match attempt. [GH #17140] .IP \(bu 4 Overloads for octal and binary floating point literals were always passed a string with a \f(CW\*(C`0x\*(C'\fR prefix instead of the appropriate \f(CW0\fR or \&\f(CW\*(C`[GH #14791]|https://github.com/Perl/perl5/issues/14791\*(C'\fR] .IP \(bu 4 \&\f(CW\*(C`$@ = 100; die;\*(C'\fR now correctly propagates the 100 as an exception instead of ignoring it. [GH #17098] .IP \(bu 4 \&\f(CW\*(C`[GH #17108]|https://github.com/Perl/perl5/issues/17108\*(C'\fR] .IP \(bu 4 Exceptions thrown while \f(CW$@\fR is read-only could result in infinite recursion as perl tried to update \f(CW$@\fR, which throws another exception, resulting in a stack overflow. Perl now replaces \f(CW$@\fR with a copy if it's not a simple writable SV. [GH #17083] .IP \(bu 4 Setting \f(CW$)\fR now properly sets supplementary group ids if you have the necessary privileges. [GH #17031] .IP \(bu 4 \&\fBclose()\fR on a pipe now preemptively clears the PerlIO object from the IO SV. This prevents a second attempt to close the already closed PerlIO object if a signal handler calls \fBdie()\fR or \fBexit()\fR while \fBclose()\fR is waiting for the child process to complete. [GH #13929] .IP \(bu 4 \&\f(CW\*(C`sprintf("%.*a", \-10000, $x)\*(C'\fR would cause a buffer overflow due to mishandling of the negative precision value. [GH #16942] .IP \(bu 4 \&\fBscalar()\fR on a reference could cause an erroneous assertion failure during compilation. [GH #16969] .IP \(bu 4 \&\f(CW\*(C`%{^CAPTURE_ALL}\*(C'\fR is now an alias to \f(CW\*(C`%\-\*(C'\fR as documented, rather than incorrectly an alias for \f(CW\*(C`[GH #16105]|https://github.com/Perl/perl5/issues/16105\*(C'\fR] .IP \(bu 4 \&\f(CW\*(C`%{^CAPTURE}\*(C'\fR didn't work if \f(CW\*(C`@{^CAPTURE}\*(C'\fR was mentioned first. Similarly for \f(CW\*(C`%{^CAPTURE_ALL}\*(C'\fR and \f(CW\*(C`@{^CAPTURE_ALL}\*(C'\fR, though \&\f(CW\*(C`[GH #17045]|https://github.com/Perl/perl5/issues/17045\*(C'\fR] .IP \(bu 4 Extraordinarily large (over 2GB) floating point format widths could cause an integer overflow in the underlying call to \fBsnprintf()\fR, resulting in an assertion. Formatted floating point widths are now limited to the range of int, the return value of \fBsnprintf()\fR. [#16881 ] .IP \(bu 4 Parsing the following constructs within a sub-parse (such as with \&\f(CW"${code here}"\fR or \f(CW\*(C`s/.../code here/e\*(C'\fR) has changed to match how they're parsed normally: .RS 4 .IP \(bu 4 \&\f(CW\*(C`print $fh ...\*(C'\fR no longer produces a syntax error. .IP \(bu 4 Code like \f(CW\*(C`s/.../ ${time} /e\*(C'\fR now properly produces an "Ambiguous use of ${time} resolved to \f(CW$time\fR at ..." warning when warnings are enabled. .IP \(bu 4 \&\f(CW\*(C`@x {"a"}\*(C'\fR (with the space) in a sub-parse now properly produces a "better written as" warning when warnings are enabled. .IP \(bu 4 Attributes can now be used in a sub-parse. [GH #16847] .RE .RS 4 .RE .IP \(bu 4 Incomplete hex and binary literals like \f(CW\*(C`0x\*(C'\fR and \f(CW\*(C`0b\*(C'\fR are now treated as if the \f(CW\*(C`x\*(C'\fR or \f(CW\*(C`b\*(C'\fR is part of the next token. [#17010 ] .IP \(bu 4 A spurious \f(CW\*(C`)\*(C'\fR in a subparse, such as in \f(CW\*(C`s/.../code here/e\*(C'\fR or \&\f(CW"...${code here}"\fR, no longer confuses the parser. .Sp Previously a subparse was bracketed with generated \f(CW\*(C`(\*(C'\fR and \f(CW\*(C`)\*(C'\fR tokens, so a spurious \f(CW\*(C`)\*(C'\fR would close the construct without doing the normal subparse clean up, confusing the parser and possible causing an assertion failure. .Sp Such constructs are now surrounded by artificial tokens that can't be included in the source. [GH #15814] .IP \(bu 4 Reference assignment of a sub, such as \f(CW\*(C`\e&foo = \e&bar;\*(C'\fR, silently did nothing in the \f(CW\*(C`[GH #16987]|https://github.com/Perl/perl5/issues/16987\*(C'\fR] .IP \(bu 4 \&\fBsv_gets()\fR now recovers better if the target SV is modified by a signal handler. [GH #16960] .IP \(bu 4 \&\f(CW\*(C`readline @foo\*(C'\fR now evaluates \f(CW@foo\fR in scalar context. Previously it would be evaluated in list context, and since \fBreadline()\fR pops only one argument from the stack, the stack could underflow, or be left with unexpected values on the stack. [GH #16929] .IP \(bu 4 Parsing incomplete hex or binary literals was changed in 5.31.1 to treat such a literal as just the 0, leaving the following \f(CW\*(C`x\*(C'\fR or \f(CW\*(C`b\*(C'\fR to be parsed as part of the next token. This could lead to some silent changes in behaviour, so now incomplete hex or binary literals produce a fatal error. [GH #17010] .IP \(bu 4 \&\fBeval_pv()\fR's \fIcroak_on_error\fR flag will now throw even if the exception is a false overloaded value. [GH #17036] .IP \(bu 4 \&\f(CW\*(C`INIT\*(C'\fR blocks and the program itself are no longer run if \fBexit\fR\|(0) is called within a \f(CW\*(C`BEGIN\*(C'\fR, \f(CW\*(C`UNITCHECK\*(C'\fR or \f(CW\*(C`CHECK\*(C'\fR block. [GH #1537] .IP \(bu 4 \&\f(CW\*(C`open my $fh, ">>+", undef\*(C'\fR now opens the temporary file in append mode: writes will seek to the end of file before writing. [GH #17058] .IP \(bu 4 Fixed a SEGV when searching for the source of an uninitialized value warning on an op whose subtree includes an OP_MULTIDEREF. [GH #17088] .SH Obituary .IX Header "Obituary" Jeff Goff (JGOFF or DrForr), an integral part of the Perl and Raku communities and a dear friend to all of us, has passed away on March 13th, 2020. DrForr was a prominent member of the communities, attending and speaking at countless events, contributing to numerous projects, and assisting and helping in any way he could. .PP His passing leaves a hole in our hearts and in our communities and he will be sorely missed. .SH Acknowledgements .IX Header "Acknowledgements" Perl 5.32.0 represents approximately 13 months of development since Perl 5.30.0 and contains approximately 220,000 lines of changes across 1,800 files from 89 authors. .PP Excluding auto-generated files, documentation and release tools, there were approximately 140,000 lines of changes to 880 .pm, .t, .c and .h files. .PP Perl continues to flourish into its fourth decade thanks to a vibrant community of users and developers. The following people are known to have contributed the improvements that became Perl 5.32.0: .PP Aaron Crane, Alberto Simões, Alexandr Savca, Andreas König, Andrew Fresh, Andy Dougherty, Ask Bjørn Hansen, Atsushi Sugawara, Bernhard M. Wiedemann, brian d foy, Bryan Stenson, Chad Granum, Chase Whitener, Chris 'BinGOs' Williams, Craig A. Berry, Dagfinn Ilmari Mannsåker, Dan Book, Daniel Dragan, Dan Kogai, Dave Cross, Dave Rolsky, David Cantrell, David Mitchell, Dominic Hargreaves, E. Choroba, Felipe Gasper, Florian Weimer, Graham Knop, Håkon Hægland, Hauke D, H.Merijn Brand, Hugo van der Sanden, Ichinose Shogo, James E Keenan, Jason McIntosh, Jerome Duval, Johan Vromans, John Lightsey, John Paul Adrian Glaubitz, Kang-min Liu, Karen Etheridge, Karl Williamson, Leon Timmermans, Manuel Mausz, Marc Green, Matthew Horsfall, Matt Turner, Max Maischein, Michael Haardt, Nicholas Clark, Nicolas R., Niko Tyni, Pali, Paul Evans, Paul Johnson, Paul Marquess, Peter Eisentraut, Peter John Acklam, Peter Oliver, Petr Písař, Renee Baecker, Ricardo Signes, Richard Leach, Russ Allbery, Samuel Smith, Santtu Ojanperä, Sawyer X, Sergey Aleynikov, Sergiy Borodych, Shirakata Kentaro, Shlomi Fish, Sisyphus, Slaven Rezic, Smylers, Stefan Seifert, Steve Hay, Steve Peters, Svyatoslav, Thibault Duponchelle, Todd Rinaldo, Tomasz Konojacki, Tom Hukins, Tony Cook, Unicode Consortium, VanL, Vickenty Fesunov, Vitali Peil, Yves Orton, Zefram. .PP The list above is almost certainly incomplete as it is automatically generated from version control history. In particular, it does not include the names of the (very much appreciated) contributors who reported issues to the Perl bug tracker. .PP Many of the changes included in this version originated in the CPAN modules included in Perl's core. We're grateful to the entire CPAN community for helping Perl to flourish. .PP For a more complete list of all of Perl's historical contributors, please see the \fIAUTHORS\fR file in the Perl source distribution. .SH "Reporting Bugs" .IX Header "Reporting Bugs" If you find what you think is a bug, you might check the perl bug database at . There may also be information at , the Perl Home Page. .PP If you believe you have an unreported bug, please open an issue at . Be sure to trim your bug down to a tiny but sufficient test case. .PP If the bug you are reporting has security implications which make it inappropriate to send to a public issue tracker, then see "SECURITY VULNERABILITY CONTACT INFORMATION" in perlsec for details of how to report the issue. .SH "Give Thanks" .IX Header "Give Thanks" If you wish to thank the Perl 5 Porters for the work we had done in Perl 5, you can do so by running the \f(CW\*(C`perlthanks\*(C'\fR program: .PP .Vb 1 \& perlthanks .Ve .PP This will send an email to the Perl 5 Porters list with your show of thanks. .SH "SEE ALSO" .IX Header "SEE ALSO" The \fIChanges\fR file for an explanation of how to view exhaustive details on what changed. .PP The \fIINSTALL\fR file for how to build Perl. .PP The \fIREADME\fR file for general stuff. .PP The \fIArtistic\fR and \fICopying\fR files for copyright information.