=encoding utf8 =head1 NAME perldelta - what is new for perl v5.45.3 =head1 DESCRIPTION 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 L, which describes differences between 5.45.1 and 5.45.2. =head1 Core Enhancements =head2 Undef-aware equality operators Four new operators have been added, which are similar to the regular equality operators except for their handling of C. Whereas the regular operators treat C as equal to the empty string or the number zero, these operators consider C 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 L. =head2 Unicode 18.0 is supported Unicode's blog post about it is L. A more formal summary of changes is at L. 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. =head2 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. Strictly speaking, this is a change to L, 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. =head1 Performance Enhancements =over 4 =item * Common list slices of C return values will be more efficient. Specifically, C 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 C 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. C<(caller $depth)[3]>) or an ascending run of these subscripts (e.g. C<(caller $depth)[8,9,10]>) will be optimized: =over 8 =item * 0 - package =item * 1 - filename =item * 2 - line =item * 3 - subroutine =item * 8 - hints =item * 9 - bit mask =item * 10 - hint hash =back [L] =item * 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. =back =head1 Modules and Pragmata =head2 Updated Modules and Pragmata =over 4 =item * L has been upgraded from version 1.90 to 1.92. =item * L has been upgraded from version 2.218 to 2.224. =item * L has been upgraded from version 2.222 to 2.224. =item * L has been upgraded from version 2.150013 to 2.150015. =item * L has been upgraded from version 3.73 to 3.74. =item * L has been upgraded from version 2.223 to 2.224. =item * L has been upgraded from version 5.20260722 to 5.20260924. =item * L has been upgraded from version 1.72 to 1.73. =item * L has been upgraded from version 1.40 to 1.42. =item * L has been upgraded from version v6.1.0 to v6.1.1. =item * L has been upgraded from version 1.302222 to 1.302225. =item * L has been upgraded from version 2.46 to 2.47. =item * L has been upgraded from version 1.78 to 1.79. =back =head1 Configuration and Compilation =over 4 =item * 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 =back =head1 Platform Support =head2 Platform-Specific Notes =over 4 =item MacOS (Darwin) Add support for building with Command Line Tools for Xcode 27.0 =back =head1 Internal Changes =over 4 =item * The regeneration targets have been expanded. C (and C) 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 F. The regeneration scripts also accept C as an alternative to C<-v>. =item * The Unicode table generators have been optimized, reducing the time and peak memory needed to regenerate Unicode data. On a full Unicode C 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. =item * During regex compilation, C 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). =item * 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 F: -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. See L. =item * 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. =back =head1 Selected Bug Fixes =over 4 =item * 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: =over =item * the string variable must be zero length and have just been used in numeric context, e.g. C<$s = ""; $n = $s + 1;> =item * then the variable must be the target of a string concatenation and also be used on the RHS, e.g.C<$s = "9$s";> =item * 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. =back [L] =item * 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 C<$magical_lexical = reftype($maybe_ref)>. [L] =item * Parsing an invalid signature that gives a slurpy parameter a default value no longer crashes when parser debugging is enabled. [L] =item * Copy magic to the new elements when splice() inserts elements into a non-tied magical array. In particular, assignment to an element of an C<@ISA> array where the element was added by splice() is now correctly recognized when performing method lookup. [L] =item * Compilation of C/C or C blocks now more reliably includes the construction of a new scope when C, C, C or C 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 C 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.) [L] =item * Empty C (C/C and C) branches will not be optimized away when the context of the C OP is unknown. (Usually when the conditional expression is immediately before an implicit subroutine return.) In this situation, the C OP must be retained so that C<&PL_sv_undef> can be pushed onto the stack, which will be needed if the call site has scalar context. [L] =back =head1 Acknowledgements 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 F file in the Perl source distribution. =head1 Reporting Bugs If you find what you think is a bug, you might check the perl bug database at L. There may also be information at L, the Perl Home Page. If you believe you have an unreported bug, please open an issue at L. 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 L for details of how to report the issue. =head1 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 C program: perlthanks This will send an email to the Perl 5 Porters list with your show of thanks. =head1 SEE ALSO The F file for an explanation of how to view exhaustive details on what changed. The F file for how to build Perl. The F file for general stuff. The F and F files for copyright information. =cut