=encoding utf8 =head1 NAME perldelta - what is new for perl v5.41.3 =head1 DESCRIPTION This document describes differences between the 5.41.2 release and the 5.41.3 release. If you are upgrading from an earlier release such as 5.41.1, first read L, which describes differences between 5.41.1 and 5.41.2. =head1 Incompatible Changes =head2 Apostrophe is no longer recognized as a global name separator The apostrophe C<'> has been recognized as a separator between components of package names and package variables since Perl 3, acting exactly like C<::>, which was introduced in Perl 5. Use of C<'> as a package separator was deprecated in Perl 5.38 and has now been removed. [L] =head2 Switch and Smart Match operator removed The "switch" feature and the smartmatch operator, C<~~>, were introduced in v5.10. Their behavior was significantly changed in v5.10.1. When the "experiment" system was added in v5.18.0, switch and smartmatch were retroactively declared experimental. Over the years, proposals to fix or supplement the features have come and gone. They were deprecated in Perl v5.38.0 and scheduled for removal in Perl 5.42.0 These features have now been entirely removed. If you code currently uses C/C or smart match this can be replaced with an C/C chain, or there are several alternative "switch" or smart match implementations on CPAN. In no particular order: =over =item * L =item * L =item * L =item * L =back [L] =head1 Performance Enhancements =over 4 =item * C now runs at the same speed regardless of the internal representation of its operand, as long as the only characters being translated are ASCII-range, for example C. Previously, if the internal encoding was UTF-8, a slower, more general implementation was used. =back =head1 Modules and Pragmata =head2 Updated Modules and Pragmata =over 4 =item * L has been upgraded from version 1.77 to 1.78. =item * L has been upgraded from version 2.212 to 2.213. =item * L has been upgraded from version 2.212 to 2.213. =item * L has been upgraded from version 1.56 to 1.57. =item * L has been upgraded from version 3.52 to 3.53. =item * L has been upgraded from version 3.51 to 3.53. =item * L has been upgraded from version 1.90 to 1.91. =item * L has been upgraded from version 2.212 to 2.213. =item * L has been upgraded from version 5.20240720 to 5.20240829. =item * L has been upgraded from version 1.65 to 1.66. =item * L has been upgraded from version 1.37 to 1.38. =item * L has been upgraded from version 0.241 to 0.242. =item * L has been upgraded from version 1.80 to 1.81. C, C, C will now break on the first line that is expected to execute in the sub. [L] Distinguish between an empty list or undef for C expressions. [L] =item * L has been upgraded from version 2.46 to 2.47. =item * L (the Scalar-List-Utils distribution) has been upgraded from version 1.63 to 1.65. =item * L has been upgraded from version 3.33 to 3.34. =item * L has been upgraded from version 0.018 to 0.022. =item * L has been upgraded from version 3.48 to 3.50. =item * L has been upgraded from version 1.302199 to 1.302201 and subsequently to 1.302201. Upstream on CPAN, the Test2-Suite distribution has been merged into the Test-Simple distribution. Test2-Suite was formerly shipped with the Perl core distribution. Test2-Suite's files are now found under F in the Perl 5 source tree (whether you access that source tree in a git checkout or in a released tarball). However, this should have no impact whatsoever on any end-user of any modules formerly found under Test2-Suite. =item * L has been upgraded from version 2.41 to 2.42. =item * L has been upgraded from version 1.40 to 1.41. =back =head1 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 L. =head3 New Warnings =over 4 =item * L<%s() attempted on handle %s opened with open()|perldiag/"%s() attempted on handle %s opened with open()"> (W io) You called readdir(), telldir(), seekdir(), rewinddir() or closedir() on a handle that was opened with open(). If you want to use these functions to traverse the contents of a directory, you need to open the handle with opendir(). [L] =item * L (W precedence) You wrote something like !$obj isa Some::Class but because C has higher precedence than C, this is interpreted as C<(!$obj) isa Some::Class>, which checks whether a boolean is an instance of C. If you want to negate the result of C instead, use one of: !($obj isa Some::Class) # explicit parentheses not $obj isa Some::Class # low-precedence 'not' operator =back =head2 Changes to Existing Diagnostics =over 4 =item * L<%s() attempted on invalid dirhandle %s|perldiag/"%s() attempted on invalid dirhandle %s"> This was consolidated from separate messages for readdir(), telldir(), seekdir(), rewinddir() and closedir() as part of refactoring for [L]. =back =head1 Testing Tests were added and changed to reflect the other additions and changes in this release. Furthermore, these significant changes were made: =over 4 =item * Added testing of the perl headers against the C++ compiler corresponding to the C compiler perl is being built with. [L] =back =head1 Internal Changes =over 4 =item * When built with the C<-DDEBUGGING> compile option, perl API functions that take pointers to distinct types of SVs (AVs, HVs or CVs) will check the C of the passed values to ensure they are valid. Additionally, internal code within core functions that attempts to extract AVs, HVs or CVs from reference values passed in will also perform such checks. While this has been entirely tested by normal Perl CI testing, there may still be some corner-cases where these constraints are violated in otherwise-valid calls. These may require further investigation if they are found, and specific code to be adjusted to account for it. =back =head1 Selected Bug Fixes =over 4 =item * L|perlfunc/open> automatically creates an anonymous temporary file when passed C as a filename: open(my $fh, "+>", undef) or die ... Due the way this feature was implemented, it would also trigger for non-existent elements of arrays or hashes: open(my $fh, "+>", $hash{no_such_key}) or die ... # unexpectedly succeeds and creates a temp file Now a temporary file is only created if a literal C is passed. [L] =item * Compound assignment operators return lvalues that can be further modified: ($x &= $y) += $z; # Equivalent to: # $x &= $y; # $x += $z; However, the separate numeric/string bitwise operators provided by L feature|feature/The 'bitwise' feature>, C<< &= ^= |= &.= ^.= |.= >>, did not do so: use feature qw(bitwise); ($x &= $y) += $z; # Used to die: # Can't modify numeric bitwise and (&) in addition (+) at ... This has been corrected. [L] =item * Starting in v5.39.8, L> would crash or produce odd errors (such as C) when given a format string that wasn't actually a string, but a number, C, or an object (even one with overloaded string conversion). Now C stringifies its first argument, as before. [L] =back =head1 Obituary Abe Timmerman (ABELTJE) passed away on August 15, 2024. Since 2002, Abe built and maintained the L project: "a set of scripts and modules that try to run the Perl core tests on as many configurations as possible and combine the results into an easy to read report". Smoking Perl on as many platforms and configurations as possible has been instrumental in finding bugs and developing patches for those bugs. Abe was a regular attendee of the Perl Toolchain Summit (née Perl QA Hackathon), the Dutch Perl Workshop and the Amsterdam.pm user group meetings. With his kindness, his smile and his laugh, he helped make Perl and its community better. Abeltje's memorial card said "Grab every opportunity to have a drink of bubbly. This is an opportunity". We'll miss you Abe, and we'll have a drink of bubbly in your honor. =head1 Acknowledgements Perl 5.41.3 represents approximately 6 weeks of development since Perl 5.41.2 and contains approximately 34,000 lines of changes across 740 files from 23 authors. Excluding auto-generated files, documentation and release tools, there were approximately 22,000 lines of changes to 370 .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.41.3: Branislav Zahradník, Chad Granum, Craig A. Berry, Dan Jacobson, David Mitchell, E. Choroba, Eric Herman, Graham Knop, iabyn, James E Keenan, Karen Etheridge, Karl Williamson, Leon Timmermans, Lukas Mai, Max Maischein, Paul Evans, Paul Marquess, Philippe Bruhat (BooK), Sisyphus, Štěpán Němec, Steve Hay, TAKAI Kousuke, Thibault Duponchelle, Tony Cook. 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