perldelta - what is new for perl v5.45.3
This document describes differences between the 5.45.2 release and the 5.45.3 release.
If you are upgrading from an earlier release such as 5.45.1, first read perl5452delta, which describes differences between 5.45.1 and 5.45.2.
Four new operators have been added, which are similar to the regular equality operators except for their handling of undef. Whereas the regular operators treat undef as equal to the empty string or the number zero, these operators consider undef to be a distinct value, equal to itself, but unequal to any defined value.
if( $x equ $y ) {
# $x and $y are both undef, or
# $x and $y are both defined and equal
...
}
This is approximately equal to the following, except that it is more efficient and avoids duplicate evaluation of operands or fetching of tied scalar values:
if( (!defined $x and !defined $y) or
(defined $x and defined $y and $x eq $y) ) {
...
}
For more detail, see "Equality Operators" in perlop.
Unicode's blog post about it is https://blog.unicode.org/2026/09/announcing-unicode-standard-version-180.html. A more formal summary of changes is at https://www.unicode.org/versions/Unicode18.0.0. Some changes not readily visible at those places include changes to what is considered a grapheme in some South Asian languages, and adding support for some properties of historical East Asian languages.
The Perl interpreter may now be Configured to emulate thread-safety in locale handling on systems that lack it. Strictly speaking, this is a change to perl's internals, but we're highlighting it here as well because it increases the portability possibilities of your locale-aware code on multi-threaded builds of perl.
Common list slices of caller return values will be more efficient. Specifically, caller will output only the required values indicated by slice subscript(s) with no actual slicing being necessary.
This has been implemented such that the OP type of caller need not change and with minimal modification to the function internals, but consequently not every conceivable slice can be optimized.
The most common slices seen in core and on CPAN are supported. Specifically, any of the following single subscripts (e.g. (caller $depth)[3]) or an ascending run of these subscripts (e.g. (caller $depth)[8,9,10]) will be optimized:
0 - package
1 - filename
2 - line
3 - subroutine
8 - hints
9 - bit mask
10 - hint hash
The regular expression trie optimizer has been reworked to compile trie transitions as octets. Large alternations can now avoid work that previously grew with both the number of alternatives and the amount of text skipped before a match, while preserving the existing matching semantics for native and UTF-8 strings.
B::Deparse has been upgraded from version 1.90 to 1.92.
Compress::Raw::Bzip2 has been upgraded from version 2.218 to 2.224.
Compress::Raw::Zlib has been upgraded from version 2.222 to 2.224.
CPAN::Meta has been upgraded from version 2.150013 to 2.150015.
Devel::PPPort has been upgraded from version 3.73 to 3.74.
IO::Compress has been upgraded from version 2.223 to 2.224.
Module::CoreList has been upgraded from version 5.20260722 to 5.20260924.
Opcode has been upgraded from version 1.72 to 1.73.
overload has been upgraded from version 1.40 to 1.42.
podlators has been upgraded from version v6.1.0 to v6.1.1.
Test::Simple has been upgraded from version 1.302222 to 1.302225.
threads has been upgraded from version 2.46 to 2.47.
warnings has been upgraded from version 1.78 to 1.79.
The default hash algorithm is now SipHash-1-3 on all platforms. It used to be Zaphod32 on 32-bit perls built without support for 64-bit integers. If you want to keep using Zaphod32, configure perl with:
sh Configure -Accflags=-DPERL_HASH_FUNC_ZAPHOD32
Add support for building with Command Line Tools for Xcode 27.0
The regeneration targets have been expanded. regen_all (and regen-all) now builds Perl, runs the standard, parser, keyword, Unicode, and metadata regeneration steps, and performs a final build. Separate targets are available for keyword, inversion-list, and character-class generation, with platform-specific makefile support and clearer diagnostics from t/porting/regen.t. The regeneration scripts also accept REGEN_VERBOSE=1 as an alternative to -v.
The Unicode table generators have been optimized, reducing the time and peak memory needed to regenerate Unicode data. On a full Unicode mktables workload, generation is approximately 23% faster and uses 17% less peak memory. The MPH squeeze path is also substantially faster, at the cost of a small increase in the generated data size.
During regex compilation, S_reg will attempt to flatten nested BRANCH structures, in an attempt to give the TRIE optimizer more alternations to consider. The intent is that patterns that were previously compiled into two or more adjacent TRIE nodes might now get compiled into a single (or at least, fewer) TRIE node(s).
Threads may be Configured to have locale thread-safety
The Perl interpreter may now be Configured to emulate thread-safety in locale handling on systems that lack it. To do this, pass this to Configure:
-Accflags=-DEMULATE_THREAD_SAFE_LOCALES
This option will be ignored on builds that don't have threads, and on platforms where perl believes that the locale handling is thread-safe natively.
The regular expression compiler's TRIE implementation has been changed to use the octets of the UTF-8 representation of the pattern in its internal table structures. Previous versions used a trie based on code points, which had various side effects that required additional complexity, especially because of Unicode's potentially very large alphabet. By switching to an octet-based representation, a large amount of this complexity could be removed, making the new code faster, easier to maintain, and easier to prove correct.
Most users should not notice this change, except perhaps a slight performance improvement.
Since 5.28.0, the numeric value of a string would sometimes not get reset after the string was assigned to as part of a string concatenation. It required the following circumstances to all be present for the bug to manifest:
the string variable must be zero length and have just been used in numeric context, e.g. $s = ""; $n = $s + 1;
then the variable must be the target of a string concatenation and also be used on the RHS, e.g.$s = "9$s";
then if the string is used in numeric context again, the bug caused the old numeric value of 0 to be returned, rather than numifying the new string value and returning 9.
builtin::reftype() and builtin::refaddr() now call set magic for their output when their argument isn't a reference. This would prevent propagation of the result if either function was called like $magical_lexical = reftype($maybe_ref).
Parsing an invalid signature that gives a slurpy parameter a default value no longer crashes when parser debugging is enabled.
Copy magic to the new elements when splice() inserts elements into a non-tied magical array. In particular, assignment to an element of an @ISA array where the element was added by splice() is now correctly recognized when performing method lookup.
Compilation of if/elsif or do blocks now more reliably includes the construction of a new scope when my, our, state or defer keywords are present. Previously, a new scope might not have been correctly applied to very short blocks. This would have been noticeable through object destructors or defer blocks running at the wrong time (when some outer scope was exited).
The same logic now also applies to `else` blocks, which previously always introduced a new runtime scope, even if the contents of the block didn't need it. (That was a workaround to improve the accuracy of line number reporting for the first statement in the block, which should no longer be necessary.)
Empty cond_expr (if/elsif and else) branches will not be optimized away when the context of the stub OP is unknown. (Usually when the conditional expression is immediately before an implicit subroutine return.) In this situation, the stub OP must be retained so that &PL_sv_undef can be pushed onto the stack, which will be needed if the call site has scalar context.
Perl 5.45.3 represents approximately 5 weeks of development since Perl 5.45.2 and contains approximately 230,000 lines of changes across 610 files from 25 authors.
Excluding auto-generated files, documentation and release tools, there were approximately 41,000 lines of changes to 400 .pm, .t, .c and .h files.
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.45.3:
Branislav ZahradnĂk, Chad Granum, David Mitchell, Dina Tagantseva, James E Keenan, Karen Etheridge, Karl Williamson, Leon Timmermans, Lukas Mai, Nick Johnston, Paul Evans, Paul Marquess, Philippe Bruhat (BooK), Richard Leach, Russ Allbery, Scott Baker, Sevan Janiyan, Shlomi Fish, Sisyphus, TAKAI Kousuke, Tomasz Konojacki, Tony Cook, Unicode Consortium, Yudai Takada, Yves Orton.
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.
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.
For a more complete list of all of Perl's historical contributors, please see the AUTHORS file in the Perl source distribution.
If you find what you think is a bug, you might check the perl bug database at https://github.com/Perl/perl5/issues. There may also be information at https://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. Be sure to trim your bug down to a tiny but sufficient test case.
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.
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 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.