PERL5320DELTA(1perl)

πŸ“¦
version 5.44.0 Β· 2 versions
, in arch rolling

πŸ’– perl5320delta β€” what's new for perl v5.32.0 πŸ’–

okay bestie, sit DOWN, because this is perl5320delta from the Perl Programmers Reference Guide, and it's literally the tea on everything that changed in perl. grab a matcha, this is a long one (it's part 1 of 7, so no, we're not done yet ✨).


🌸 DESCRIPTION 🌸

This doc spills the differences between the 5.30.0 release and the 5.32.0 release. periodt.

If you're upgrading from something even older, like 5.28.0, first go read perl5300delta, which covers the glow-up from 5.28.0 to 5.30.0. no skipping ahead bestie, the lore builds 🫢


✨ Core Enhancements ✨

πŸ‘‘ The isa Operator

There's a brand-new experimental infix operator called isa πŸ’… and it tests whether a given object is an instance of a given class, or a class derived from it:

if( $obj isa Package::Name ) { ... }

Want the whole deep dive? See "Class Instance Operator" in perlop. iykyk.


🌈 Unicode 13.0 is supported

Details live at <https://www.unicode.org/versions/Unicode13.0.0/> β€” go look, it's giving very thorough.


πŸ”₯ Chained comparisons capability

Some comparison operators, as their associativity, chain with some operators of the same precedence β€” but never with operators of a different precedence. okay?

if ( $x < $y <= $z ) {...}

behaves exactly like:

if ( $x < $y && $y <= $z ) {...}

(assuming $y is as simple a scalar as it looks β€” no sneaky side effects, bestie πŸ‘€)

More on this in perlop under "Operator Precedence and Associativity".


πŸ¦‹ New Unicode properties Identifier_Status and Identifier_Type supported

Unicode revised its regular expression requirements: <https://www.unicode.org/reports/tr18/tr18-21.html>. As part of that glow-up they want more properties exposed β€” ones that are not part of the strict UCD (Unicode character database). These two are used for examining inputs for security purposes. Details on their usage live at <https://www.unicode.org/reports/tr39/>.


πŸŽ€ 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 \N{...} 🌟. A comparison of the two methods is given in "Comparison of \N{...} and \p{name=...}" in perlunicode.

The second example up there shows that wildcard subpatterns are also usable in this property. See "Wildcards in Property Values" in perlunicode.


🧚 Improvement of POSIX::mblen(), mbtowc, and wctomb

The POSIX::mblen(), mbtowc, and wctomb functions now work on shift state locales, and they're thread-safe on C99 and above compilers when executed on a platform that has locale thread-safety πŸ”₯. oh and the length parameters are now optional.

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 undef. 🫠 that's the change, bestie.

On threaded perls, the C99 functions mbrlen(3), mbrtowc(3), and wcrtomb(3), when available, are substituted for the plain functions. This makes these functions thread-safe when executing on a locale thread-safe platform. πŸ’…

The string length parameters in mblen and mbtowc are now optional; useful only if you wish to restrict the length parsed in the source string to less than the actual length.


🌸 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 experimental::alpha_assertions will continue to work without any changes needed. Enabling the category has no effect. iconic.


⭐ 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 experimental::script_run will continue to work without any changes needed. Enabling the category has no effect.


πŸ’œ 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 <https://github.com/Perl/perl5/issues/17229>]


🌈 Perl is now developed on GitHub

Perl is now developed on GitHub. You can find us at <https://github.com/Perl/perl5>. main character energy fr fr.

Non-security bugs should now be reported via GitHub. Security issues should continue to be reported as documented in perlsec. πŸ”


πŸ“ 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 -DDEBUGGING perls, if you specify -Drv on the command line; or
  • on any perl if the pattern is compiled within the scope of use re qw(Debug DUMP_PRE_OPTIMIZE) or use re qw(Debug COMPILE EXTRA).

(All but the second case display other information as well.)


πŸ” Security πŸ”

πŸ’€ [CVE-2020-10543] Buffer overflow caused by a crafted regular expression

A signed size_t 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. yikes.

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.

Discovered by: ManhND of The Tarantula Team, VinCSS (a member of Vingroup).


πŸ’€ [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. 😭

Discovered by: Hugo van der Sanden and Slaven Rezic.


πŸ’€ [CVE-2020-12723] Buffer overflow caused by a crafted regular expression

Recursive calls to S_study_chunk() 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.

Discovered by: Sergey Aleynikov.


⚠️ 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.

bestie. do NOT eval regexes from strangers. that's the whole post. 🚨

🚫 Incompatible Changes 🚫

πŸ™ˆ 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.


πŸ’€ 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. bye πŸ‘‹


😭 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.


πŸ”„ \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 <https://github.com/Perl/perl5/issues/17205>]


🧊 Modifiable variables are no longer permitted in constants

Code like:

my $var;
$sub = sub () { $var };

where $var is referenced elsewhere in some sort of modifiable context now produces an exception when the sub is defined.

This error can be avoided by adding a return to the sub definition:

$sub = sub () { return $var };

This has been deprecated since Perl 5.22. [GH #17020 <https://github.com/Perl/perl5/issues/17020>]


🌸 Use of vec on strings with code points above 0xFF is forbidden

Such strings are represented internally in UTF-8, and vec is a bit-oriented operation that will likely give unexpected results on those strings. This was deprecated in perl 5.28.0.


πŸ’… 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.


🫢 Sys::Hostname::hostname() does not accept arguments

This usage was deprecated in perl 5.28.0 and is now fatal. πŸ’€


πŸ”’ Plain "0" string now treated as a number for range operator

Previously a range "0" .. "-1" would produce a range of numeric strings from "0" through "99"; this now produces an empty list, just as 0 .. -1 does. This also means that "0" .. "9" now produces a list of integers, where previously it would produce a list of strings.

This was due to a special case that treated strings starting with "0" as strings so ranges like "00" .. "03" produced "00", "01", "02", "03", but didn't specially handle the string "0". [GH #16770 <https://github.com/Perl/perl5/issues/16770>]


🚫 \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 <https://github.com/Perl/perl5/issues/14638>]


⚑ Performance Enhancements ⚑

  • my_strnlen has been sped up for systems that don't have their own strnlen implementation. πŸ”₯
  • grok_bin_oct_hex (and so, grok_bin, grok_oct, and grok_hex) have been sped up.
  • grok_number_flags has been sped up.
  • sort is now noticeably faster in cases such as sort {$a <=> $b} or sort {$b <=> $a}. πŸ’¨ [GH #17608 <https://github.com/Perl/perl5/pull/17608>]

okay that's part 1 bestie, and there's SO much more coming πŸ’– don't go anywhere β€”

πŸ’– Modules and Pragmata πŸ’–

Okay bestie, gather round, because this is the glow-up section. A ton of core modules and pragmata got new versions in this release, and a couple of notes are genuinely important (hi, feature), so let's get into it. No skipping, we're reading the whole list, periodt. ✨


🌸 Updated Modules and Pragmata 🌸

Every single one of these got bumped. Versions are exactly as shipped β€” don't come for me, I'm just the messenger πŸ’…

  • Archive::Tar β€” upgraded from version 2.32 to 2.36. πŸŽ€
  • autodie β€” upgraded from version 2.29 to 2.32.
  • B β€” upgraded from version 1.76 to 1.80.
  • B::Deparse β€” upgraded from version 1.49 to 1.54.
  • Benchmark β€” upgraded from version 1.22 to 1.23.
  • charnames β€” upgraded from version 1.45 to 1.48. 🌈
  • Class::Struct β€” upgraded from version 0.65 to 0.66.
  • Compress::Raw::Bzip2 β€” upgraded from version 2.084 to 2.093.
  • Compress::Raw::Zlib β€” upgraded from version 2.084 to 2.093.
  • CPAN β€” upgraded from version 2.22 to 2.27.
  • DB_File β€” upgraded from version 1.843 to 1.853.
  • Devel::PPPort β€” upgraded from version 3.52 to 3.57.
    • The test files generated on Win32 are now identical to when they are generated on POSIX-like systems. πŸ¦‹
  • diagnostics β€” upgraded from version 1.36 to 1.37.
  • Digest::MD5 β€” upgraded from version 2.55 to 2.55_01.
  • Dumpvalue β€” upgraded from version 1.18 to 1.21.
    • Previously, when dumping elements of an array and encountering an undefined value, the string printed would have been "empty array". This has been changed to what was apparently originally intended: "empty slot". Not me noticing the typo years later 😭 iconic behaviour honestly.
  • DynaLoader β€” upgraded from version 1.45 to 1.47.
  • Encode β€” upgraded from version 3.01 to 3.06.
  • encoding β€” upgraded from version 2.22 to 3.00. Big jump, very main character.
  • English β€” upgraded from version 1.10 to 1.11.
  • Exporter β€” upgraded from version 5.73 to 5.74.
  • ExtUtils::CBuilder β€” upgraded from version 0.280231 to 0.280234.
  • ExtUtils::MakeMaker β€” upgraded from version 7.34 to 7.44.
  • feature β€” upgraded from version 1.54 to 1.58.
    • A new "indirect" feature has been added, which is enabled by default but allows turning off indirect object syntax. πŸ‘€ This one actually matters, so write it down.
  • File::Find β€” upgraded from version 1.36 to 1.37.
    • On Win32, the tests no longer require either a file in the drive root directory, or a writable root directory.
  • File::Glob β€” upgraded from version 1.32 to 1.33.
  • File::stat β€” upgraded from version 1.08 to 1.09.
  • Filter::Simple β€” upgraded from version 0.95 to 0.96.
  • Getopt::Long β€” upgraded from version 2.5 to 2.51.
  • Hash::Util β€” upgraded from version 0.22 to 0.23.
  • I18N::Langinfo β€” upgraded from version 0.18 to 0.19.
  • I18N::LangTags β€” upgraded from version 0.43 to 0.44.
    • Document the "IGNORE_WIN32_LOCALE" environment variable.
  • IO β€” upgraded from version 1.40 to 1.43.
    • 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 "SO_PROTOCOL" for a given socket type the protocol method may return "undef". 🌸
    • The supplied TO is now always honoured on calls to the send() method. [GH #16891 https://github.com/Perl/perl5/issues/16891]
  • IO-Compress β€” upgraded from version 2.084 to 2.093.
  • IPC::Cmd β€” upgraded from version 1.02 to 1.04.
  • IPC::Open3 β€” upgraded from version 1.20 to 1.21.
  • JSON::PP β€” upgraded from version 4.02 to 4.04.
  • Math::BigInt β€” upgraded from version 1.999816 to 1.999818.
  • Math::BigInt::FastCalc β€” upgraded from version 0.5008 to 0.5009.
  • Module::CoreList β€” upgraded from version 5.20190522 to 5.20200620.
  • Module::Load::Conditional β€” upgraded from version 0.68 to 0.70.
  • Module::Metadata β€” upgraded from version 1.000036 to 1.000037.
  • mro β€” upgraded from version 1.22 to 1.23.
  • Net::Ping β€” upgraded from version 2.71 to 2.72.
  • Opcode β€” upgraded from version 1.43 to 1.47.
  • open β€” upgraded from version 1.11 to 1.12.
  • overload β€” upgraded from version 1.30 to 1.31.
  • parent β€” upgraded from version 0.237 to 0.238.
  • perlfaq β€” upgraded from version 5.20190126 to 5.20200523.
  • PerlIO β€” upgraded from version 1.10 to 1.11.
  • PerlIO::encoding β€” upgraded from version 0.27 to 0.28.
  • PerlIO::via β€” upgraded from version 0.17 to 0.18.
  • Pod::Html β€” upgraded from version 1.24 to 1.25.
  • Pod::Simple β€” upgraded from version 3.35 to 3.40.
  • podlators β€” upgraded from version 4.11 to 4.14.
  • POSIX β€” upgraded from version 1.88 to 1.94.
  • re β€” upgraded from version 0.37 to 0.40.
  • Safe β€” upgraded from version 2.40 to 2.41.
  • Scalar::Util β€” upgraded from version 1.50 to 1.55.
  • SelfLoader β€” upgraded from version 1.25 to 1.26.
  • Socket β€” upgraded from version 2.027 to 2.029.
  • Storable β€” upgraded from version 3.15 to 3.21.
    • Use of note() 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. πŸ’€ dependency loops, we do not miss you.
    • Vstring magic strings over 2GB are now disallowed.
    • 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 https://github.com/Perl/perl5/issues/17037]
  • Sys::Hostname β€” upgraded from version 1.22 to 1.23.
  • Sys::Syslog β€” upgraded from version 0.35 to 0.36.
  • Term::ANSIColor β€” upgraded from version 4.06 to 5.01.
  • Test::Simple β€” upgraded from version 1.302162 to 1.302175.
  • Thread β€” upgraded from version 3.04 to 3.05.
  • Thread::Queue β€” upgraded from version 3.13 to 3.14.
  • threads β€” upgraded from version 2.22 to 2.25.
  • threads::shared β€” upgraded from version 1.60 to 1.61.
  • Tie::File β€” upgraded from version 1.02 to 1.06.
  • Tie::Hash::NamedCapture β€” upgraded from version 0.10 to 0.13.
  • Tie::Scalar β€” upgraded from version 1.04 to 1.05.
  • Tie::StdHandle β€” upgraded from version 4.5 to 4.6.
  • Time::HiRes β€” upgraded from version 1.9760 to 1.9764.
  • Time::Piece β€” upgraded from version 1.33 to 1.3401.
  • Unicode::Normalize β€” upgraded from version 1.26 to 1.27.
  • Unicode::UCD β€” upgraded from version 0.72 to 0.75.
  • VMS::Stdio β€” upgraded from version 2.44 to 2.45.
  • warnings β€” upgraded from version 1.44 to 1.47.
  • Win32 β€” upgraded from version 0.52 to 0.53.
  • Win32API::File β€” upgraded from version 0.1203 to 0.1203_01.
  • XS::APItest β€” upgraded from version 1.00 to 1.09.

πŸ₯€ Removed Modules and Pragmata πŸ₯€

Not everything gets to stay in the group chat forever, and this one got the boot:

  • Pod::Parser has been removed from the core distribution. It still is available for download from CPAN. This resolves [#13194 https://github.com/Perl/perl5/issues/13194]. So if you still need it, CPAN's got you 🫢

πŸ“– Documentation πŸ“–

✨ Changes to Existing Documentation ✨

okay so bestie, we tried to go through the docs and make them match everything listed in this file. If you spot something we missed, pls be a doll and open an issue at <https://github.com/Perl/perl5/issues>. πŸ’–

And on top of that, here's the selected glow-up list:

πŸ› perldebguts

  • Simplify a few regnode definitions β€” we cleaned up the BOUND and NBOUND definitions.
  • Add ANYOFHs regnode β€” this node is giving ANYOFHb, but it's the one we use when more than one leading byte is the same across all the matched code points.

And just so you know what ANYOFHb is doing there: it exists so we don't have to convert from UTF-8 to code point for something that's literally never gonna match. It checks that the first byte in the UTF-8 encoded target is the one we want, which rules out basically most of the possible code points. efficiency queen πŸ’…

🐘 perlapi

  • sv_2pvbyte β€” updated to mention it will croak if the SV cannot be downgraded. 😀
  • sv_setpvn β€” updated to say that the UTF-8 flag will not be changed by this function, and a terminating NUL byte is guaranteed.
  • Documentation for PL_phase has been added. (finally!!)
  • The documentation for grok_bin, grok_oct, and grok_hex has been updated and clarified. no more vibes-based guessing 🌸

🚨 perldiag

  • Add documentation for experimental 'isa' operator

(S experimental::isa) This warning is emitted if you use the (isa) operator. This operator is currently experimental and its behaviour may change in future releases of Perl. so like, use it but don't get attached ok?

🧰 perlfunc

  • caller β€” like __FILE__ and __LINE__, the filename and line number returned here may be altered by the mechanism described at "Plain Old Comments (Not!)" in perlsyn.
  • __FILE__ β€” it can be altered by the mechanism described at "Plain Old Comments (Not!)" in perlsyn.
  • __LINE__ β€” it can be altered by the mechanism described at "Plain Old Comments (Not!)" in perlsyn.
  • return β€” now mentions that you cannot return from do BLOCK.
  • open β€” the open() section had been renovated significantly. she got a whole makeover πŸ’–

🧠 perlguts

  • No longer suggesting using perl's malloc. Modern system malloc is assumed to be much better than perl's implementation now. grow up era.
  • Documentation about embed.fnc flags has been removed. embed.fnc now has sufficient comments within it. Anyone changing that file will see those comments first, so entries here are now redundant.
  • Updated documentation for UTF8f.
  • Added missing =for apidoc lines.

πŸ•΅οΈ perlhacktips

  • The differences between Perl strings and C strings are now detailed. iconique honestly

🌱 perlintro

πŸ“ž perlipc

  • The documentation surrounding open and handle usage has been modernized to prefer 3-arg open and lexical variables instead of barewords. no cap, this is the way.
  • Various updates and fixes including making all examples strict-safe and replacing -w with use warnings.

πŸŽ€ perlop

  • 'isa' operator is experimental

This is an experimental feature and is available when enabled by use feature 'isa'. It emits a warning in the experimental::isa category.

πŸ“ perlpod

  • Details of the various stacks within the perl interpreter are now explained here.
  • Advice has been added regarding the usage of Z<>.

🌍 perlport

πŸ” perlreref

  • Fix some typos. we hate typos fr fr

πŸ’° perlvar

  • Now recommends stringifying $] and comparing it numerically.

🧬 perlapi, perlintern

  • Documentation has been added for several functions that were lacking it before.

πŸ”— perlxs

  • Suggest using libffi for simple library bindings via CPAN modules like FFI::Platypus or FFI::Raw.

🌈 POSIX

  • setlocale warning about threaded builds updated to note it does not apply on Perl 5.28.X and later.
  • Posix::SigSet->new(...) updated to state it throws an error if any of the supplied signals cannot be added to the set. throwing hands, literally 😭

Additionally, the following selected changes have been made:

Where applicable, the URLs in the documentation have been moved from using the http:// protocol to https://. This also affects the location of the bug tracker at <https://rt.perl.org>.

  • Some links to OS/2 libraries, Address Sanitizer and other system tools had gone stale. These have been updated with working links.
  • Some links to old email addresses on perl5-porters had gone stale. These have been updated with working links.

🩺 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. ✨

πŸ†• New Diagnostics

πŸ’€ New Errors

  • Expecting interpolated extended charclass in regex; marked by <-- HERE in m/%s/

This is a replacement for several error messages listed under "Changes to Existing Diagnostics". it's giving consolidation, she ate πŸ’…

  • No digits found for %s literal

(F) No hexadecimal digits were found following 0x or no binary digits were found following 0b.

😬 New Warnings

  • Code point 0x%X is not Unicode, and not portable

This is actually not a new message, but it is now output when the warnings category portable is enabled.

When raised during regular expression pattern compilation, the warning has extra text added at the end marking where precisely in the pattern it occurred.

  • Non-hex character '%c' terminates \x early. Resolved as "%s"

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 "\o{}". glow up complete πŸ¦‹

♻️ Changes to Existing Diagnostics

  • Character following "\c" must be printable ASCII

…now has extra text added at the end, when raised during regular expression pattern compilation, marking where precisely in the pattern it occurred.

  • Use "%s" instead of "%s"

…now has extra text added at the end, when raised during regular expression pattern compilation, marking where precisely in the pattern it occurred.

  • Sequence "\c{" invalid

…now has extra text added at the end, when raised during regular expression pattern compilation, marking where precisely in the pattern it occurred.

  • "\c%c" is more clearly written simply as "%s"

…now has extra text added at the end, when raised during regular expression pattern compilation, marking where precisely in the pattern it occurred.

  • Non-octal character '%c' terminates \o early. Resolved as "%s"

…now includes the phrase "terminates \o 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.

  • '%s' resolved to '\o{%s}%d'

As of Perl 5.32, this message is no longer generated. Instead, Non-octal character '%c' terminates \o early. Resolved as "%s" in perldiag is used instead. rip to a real one πŸ•ŠοΈ

  • Use of code point 0x%s is not allowed; the permissible max is 0x%X

Some instances of this message previously output the hex digits A, B, C, D, E, and F in lower case. Now they are all consistently upper case. consistency is the moment.

  • The following three diagnostics have been removed, and replaced by Expecting interpolated extended charclass in regex; marked by <-- HERE in m/%s/: Expecting close paren for nested extended charclass in regex; marked by <-- HERE in m/%s/, Expecting close paren for wrapper for nested extended charclass in regex; marked by <-- HERE in m/%s/, and Expecting '(?flags:(?[...' in regex; marked by <-- HERE in m/%s/.
  • The Code point 0x%X is not Unicode, and not portable warning removed the line Code points above 0xFFFF_FFFF require larger than a 32 bit word. as code points that large are no longer legal on 32-bit platforms.
  • Can't use global %s in %s

This error message has been slightly reformatted from the original Can't use global %s in "%s", and in particular misleading error messages like Can't use global $_ in "my" are now rendered as Can't use global $_ in subroutine signature.

  • Constants from lexical variables potentially modified elsewhere are no longer permitted

This error message replaces the former Constants from lexical variables potentially modified elsewhere are deprecated. This will not be allowed in Perl 5.32 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).

See also "Incompatible Changes". ⚠️ like, for real, read that one.

  • "\N{} here is restricted to one character" is now emitted in the same circumstances where previously "\N{} in inverted character class or as a range end-point is restricted to one character" was.

This is due to new circumstances having been added in Perl 5.30 that weren't covered by the earlier wording.


πŸ› οΈ Utility Changes πŸ› οΈ

🐞 perlbug

  • The bug tracker homepage URL now points to GitHub. no more confusion bestie πŸ’–

πŸ—œοΈ streamzip

  • This is a new utility, included as part of an IO::Compress::Base upgrade.

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. she's new here and already slaying πŸ‘‘

πŸ› οΈ Configuration and Compilation πŸ’…

✨ Configure ✨

  • For clang++, add #include <stdlib.h> to Configure's probes for futimes, strtoll, strtoul, strtoull, and strtouq β€” otherwise those probes just... don't compile. embarrassing for everyone involved honestly. 😭
  • Use a compile and run test for lchown so clang++ is satisfied, which should detect it way more reliably. no cap.
  • For C++ compilers, add #include <stdio.h> to Configure's probes for getpgrp and setpgrp, because they use printf and C++ compilers may straight up fail compilation instead of just warning. rude but okay. πŸ™ˆ
  • Check if the compiler can handle the inline attribute.
  • Check for character data alignment.
  • Configure now correctly handles gcc-10. before this it was reading it as gcc-1 and turning on -fpcc-struct-return, which is... not it. πŸ’€
  • Perl now no longer probes for d_u32align, and just defaults to define on all platforms. that check was error-prone when it ran, which was on 32-bit platforms only. [GH #16680]
  • Documentation and hints for building perl on Z/OS (native EBCDIC) have been updated. still a work in progress bestie, we're getting there. 🫢
  • A new probe for malloc_usable_size has been added. new probe just dropped. ✨
  • Improvements in Configure for detection in C++ and clang++. Work is ongoing by Andy Dougherty. [GH #17033]
  • autodoc.pl

This tool, which regenerates perlintern and perlapi, has been overhauled significantly β€” it restores consistency in the flags used in embed.fnc and Devel::PPPort, and lets a whole bunch of redundant =for apidoc entries get removed from the code. glow up fr. πŸ’…

  • The ECHO macro is now defined. it's used in a dtrace rule that was originally changed for FreeBSD, and the FreeBSD make apparently predefines it. the Solaris make does not predefine ECHO, which broke this rule on Solaris. [GH #17057]
  • Bison versions 3.1 through 3.4 are now supported. πŸ‘‘

🌸 Testing 🌸

Tests were added and changed to reflect all the other additions and changes in this release. And on top of that, these significant changes were made:

  • t/run/switches.t no longer uses (and re-uses) the tmpinplace/ directory under t/. this may prevent spurious failures. [GH #17424]
  • Various bugs in POSIX::mbtowc were fixed. potential races with other threads are now avoided, and previously the returned wide character could very well be garbage. like, actual garbage. 😭
  • Various bugs in POSIX::wctomb 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 long enough to hold the result. segfault is not the vibe.
  • Certain test output of scalars containing control characters and Unicode has been fixed on EBCDIC.
  • t/charset_tools.pl: avoid some work on ASCII platforms. efficiency queen. ⭐
  • t/re/regexp.t: speed up many regex tests on ASCII platform.
  • t/re/pat.t: skip tests that don't work on EBCDIC.

πŸ’» Platform Support πŸ’»

🌈 Discontinued Platforms 🌈

Windows CE

Support for building perl on Windows CE has now been removed. it's gone, bestie. rip. πŸͺ¦

🌸 Platform-Specific Notes 🌸

Linux

cc will be used to populate plibpth if cc is clang. [GH #17043]

NetBSD 8.0

Fix compilation of Perl on NetBSD 8.0 with g++. [GH #17381]

Windows

  • The configuration for ccflags and optimize are now separate, just like on POSIX platforms. [GH #17156]
  • Support for building perl with Visual C++ 6.0 has now been removed. another one bites the dust. πŸ’€
  • The locale tests could crash on Win32 because of a Windows bug, and separately because of the CRT throwing an exception if the locale name wasn't validly encoded in the current code page.

For the second one, we now decode the locale name ourselves, and always decode it as UTF-8. [GH #16922]

  • t/op/magic.t could fail if environment variables starting with FOO already existed.
  • MYMALLOC (PERL_MALLOC) build has been fixed. we love a fix. 🫢

Solaris

  • Configure will now find recent versions of the Oracle Developer Studio compiler, which live under /opt/developerstudio*.
  • Configure now uses the detected types for gethostby* functions, which lets Perl once again compile on certain configurations of Solaris.

VMS

  • With the release of the patch kit C99 V2.0, VSI has provided support for a bunch of previously-missing C99 features. On systems with that patch kit installed, Perl's configuration process will now detect the presence of the header stdint.h and the following functions: fpclassify, isblank, isless, llrint, llrintl, llround, llroundl, nearbyint, round, scalbn, and scalbnl.
  • -Duse64bitint is now the default on VMS. periodt.

z/OS

Perl 5.32 has been tested on z/OS 2.4, with the following caveats:

  • Only static builds (the default) build reliably.
  • When using locales, z/OS does not handle the LC_MESSAGES category properly, so when compiling perl, you should add the following to your Configure options:
./Configure <other options> -Accflags=-DNO_LOCALE_MESSAGES
  • z/OS does not support locales with threads, so when compiling a threaded perl, you should add the following to your Configure options:
./Configure <other Configure options> -Accflags=-DNO_LOCALE
  • 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.

The causes of these failures range from the self-test itself being flawed (and the module actually working fine) all the way up to the module not working at all on EBCDIC platforms. 🫠

✨ Internal Changes ✨

okay bestie, this is the deep-lore section β€” the plumbing under the floorboards, the stuff only XS gremlins and core devs really touch. but it's still iconic, so let's go πŸ’…

  • savepvn's len parameter is a Size_t now instead of an I32, because bestie we can handle strings way longer than 31 bits now, it's giving glow-up ✨
  • The lexer (Perl_yylex() in toke.c) used to be one single 4100-line function, and honestly the way it worked was all goto and one million widely-scoped local variables just vibing in the same room 😭 sparkly new era: it's been broken up into a few dozen smaller static functions. The biggest chunk left standing (yyl_word_or_keyword()) is a little over 900 lines and it's just a single switch statement where all the case groups are fully independent of each other. Way easier to understand, way easier to keep alive. slay πŸ”₯
  • The OS-level signal handlers and the type they use (Sighandler_t) in the perl core were declared with three parameters, except the OS was always being told to call them with one argument πŸ™ˆ that's a vibe mismatch. Fixed now β€” they're declared with one parameter. Full receipts in the merge commit v5.31.5-346-g116e19abbf, iykyk.
  • The code that handles tr/// got a full glow-up, fixing a whole pile of bugs β€” especially when the source and/or replacement strings have characters whose code points go above 255 πŸ¦‹ Some of those bugs were never even documented, one of them being that under some circumstances (but not all) with /s, the squeezing was done based on the source instead of the replacement. Rude. A documented bug that got fixed along the way was [GH #14777] (https://github.com/Perl/perl5/issues/14777).
  • New macro dropped for XS writers handling UTF-8-encoded Unicode strings: UTF8_CHK_SKIP in perlapi. It's safer against malformed UTF-8 input than UTF8_SKIP in perlapi (but ngl, not as safe as UTF8_SAFE_SKIP in perlapi). Also it will not read past a NUL character, periodt. It's been backported in Devel::PPPort 3.55 and later 🫢
  • Added the PL_curstackinfo->si_cxsubix field. It keeps track of the stack index of the most recently pushed sub/format/eval context. cx_pushsub(), cx_popsub() and friends set and restore it automatically for you β€” but if you're doing any unusual manipulation of the context stack, you're gonna have to manage it by hand, bestie πŸ’€
  • So, various macros that deal with character type classification and changing case when the input is encoded in UTF-8 now require an extra parameter to stop potential reads past the end of the buffer. Using them has thrown a deprecation warning since Perl 5.26. All the details live in "In XS code, use of various macros dealing with UTF-8." in perldeprecation. don't ignore her πŸ‘‘
  • New parser function parse_subsignature() lets a keyword plugin parse a subroutine signature while use feature 'signatures' is in effect πŸŽ€ which means custom keywords can implement semantics similar to regular sub declarations that include signatures. [GH #16261] (https://github.com/Perl/perl5/issues/16261)
  • Because on some platforms we gotta hold a mutex while temporarily switching locales, new macros have been added β€” STORE_LC_NUMERIC_SET_TO_NEEDED_IN, WITH_LC_NUMERIC_SET_TO_NEEDED and WITH_LC_NUMERIC_SET_TO_NEEDED_IN β€” to make doing that safely and efficiently way easier, as part of [GH #17034] (https://github.com/Perl/perl5/issues/17034) 🌈
  • The memory bookkeeping overhead for allocating an OP structure got cut by 8 bytes per OP on 64-bit systems πŸ’– tiny win, but they add up, that's the whole vibe.
  • eval_pv() no longer stringifies the exception when [GH #17035] (https://github.com/Perl/perl5/issues/17035)
  • The PERL_DESTRUCT_LEVEL environment variable used to only be honoured on perl binaries built with DEBUGGING support. Now? It's checked on all perl builds πŸ”₯ Its normal use is forcing perl to individually free every single block of memory it allocated before exiting β€” which is super useful when you're running automated leak detection tools like valgrind πŸ•΅οΈβ€β™€οΈ
  • The API eval_sv() now accepts a G_RETHROW flag. If that flag is set and an exception gets thrown while compiling or executing the supplied code, it'll be rethrown, and eval_sv() will not return. [GH #17036] (https://github.com/Perl/perl5/issues/17036) 😭
  • As part of the fix for [GH #1537] (https://github.com/Perl/perl5/issues/1537), perl_parse() now returns non-zero if exit(0) is called inside a BEGIN, UNITCHECK or CHECK block.
  • Most functions that recursively walked an op tree during compilation have been made non-recursive. Why do we care? Because it avoids SEGVs from stack overflow when the op tree is deeply nested β€” like, say, $n == 1 ? "one" : $n == 2 ? "two" : .... (especially in code that's auto-generated, ma'am πŸ˜΅β€πŸ’«).

This is particularly noticeable when the code is compiled inside a separate thread, since threads tend to have small stacks by default. main character energy for your stack, honestly.


okay bestie, welcome to the ✨healing era✨ β€” this is the section where perl lists all the stuff that was lowkey broken and is now fixed. every one of these is real, and there are a lot of them, so grab a snack πŸ“


🌸 SELECTED BUG FIXES πŸ’…

  • okay so, previously, require (the one in perlfunc) would only treat the special built-in SV &PL_sv_undef as a value in %INC as if a previous require had failed β€” and it treated other undefined SVs as if the previous require had succeeded πŸ™ˆ which meant require could unexpectedly succeed, like for example on local %INC = %INC;. that's fixed now. [GH #17428] https://github.com/Perl/perl5/issues/17428
  • (?{...}) eval groups in regular expressions no longer unintentionally trigger EVAL without pos change exceeded limit in regex [GH #17490] https://github.com/Perl/perl5/issues/17490
  • (?[...]) extended bracketed character classes don't wrongly raise an error in some cases where a previously-compiled such class is interpolated into another one. the heuristics that used to handle this got replaced with a reliable method, and because of that the diagnostics generated have changed. go look at the "Diagnostics" section 🫢
  • the debug display (like when you specify -Dr, or use re with the appropriate options) of compiled Unicode property wildcard subpatterns doesn't have that extraneous output anymore ✨
  • fixed an assertion failure in the regular expression engine. [GH #17372] https://github.com/Perl/perl5/issues/17372
  • fixed a coredump in pp_hot.c after B::UNOP_AUX::aux_list(). [GH #17301] https://github.com/Perl/perl5/issues/17301
  • loading IO is threadsafe now πŸ§΅πŸ’– [GH #14816] https://github.com/Perl/perl5/issues/14816
  • \p{user-defined} now overrides official Unicode [GH #17025] https://github.com/Perl/perl5/issues/17025

before this patch, the override was only sometimes in effect (the audacity 😭).

previously a subparse was bracketed with generated ( and ) tokens, so a spurious ) would close the construct without doing the normal subparse clean up, which confused the parser and possibly caused an assertion failure.

such constructs are now surrounded by artificial tokens that can't be included in the source. [GH #15814] https://github.com/Perl/perl5/issues/15814


πŸ•ŠοΈπŸ’œ 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.

His passing leaves a hole in our hearts and in our communities and he will be sorely missed.

πŸ’– ACKNOWLEDGEMENTS πŸ’–

okay bestie, gather round, because this is the part where we scream about everyone who made Perl 5.32.0 happen. Perl 5.32.0 represents approximately 13 months of development since Perl 5.30.0, and it contains approximately 220,000 lines of changes across 1,800 files from 89 authors. that's not a typo. eighty-nine. authors. absolute legends, every one. πŸ‘‘

and if you take away the auto-generated files, the docs, and the release tools? there were still approximately 140,000 lines of changes to 880 .pm, .t, .c and .h files. the dedication is literally unmatched. 🫢

Perl continues to flourish into its fourth decade thanks to a vibrant community of users and developers. and the following people are known to have contributed the improvements that became Perl 5.32.0:

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.

real talk though β€” the list above is almost certainly incomplete, because it's 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.

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. CPAN girlies, this one's for you πŸ’…

and for a more complete list of all of Perl's historical contributors, please see the AUTHORS file in the Perl source distribution.


πŸ› REPORTING BUGS πŸ›

found something you think is a bug? first move: check the perl bug database at <https://github.com/Perl/perl5/issues>. there may also be information at <http://www.perl.org/>, the Perl Home Page. πŸ‘€

if you believe you have an unreported bug, please open an issue at <https://github.com/Perl/perl5/issues>. and bestie, be sure to trim your bug down to a tiny but sufficient test case. tiny. sufficient. iconic. ✨

if the bug you're 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. do not just post it publicly, i am begging you πŸ™ˆ


πŸŽ€ 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 perlthanks program:

perlthanks

this will send an email to the Perl 5 Porters list with your show of thanks. the way that a single command is literally just a little love letter πŸ˜­πŸ’–


🌈 SEE ALSO 🌈

  • the Changes file, for an explanation of how to view exhaustive details on what changed. πŸ“œ
  • the INSTALL file, for how to build Perl. πŸ”¨
  • the README file, for general stuff. πŸ“„
  • the Artistic and Copying files, for copyright information. βš–οΈ

and that's the whole page, bestie!! we made it πŸ¦‹ this was PERL5320DELTA(1perl), coming to you from perl v5.44.0, dated 2026-10-17. go forth, upgrade responsibly, and remember β€” it's giving fourth decade of Perl and she's still the main character πŸ‘‘ periodt. πŸ’œ

πŸ“¦ where this page comes from
  • arch rolling: perl 5.44.0-1 Β· Artistic-1.0-Perl AND GPL-1.0-or-later
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms