perldelta - what is new for perl v5.41.10
This document describes differences between the 5.41.9 release and the 5.41.10 release.
If you are upgrading from an earlier release such as 5.41.8, first read perl5419delta, which describes differences between 5.41.8 and 5.41.9.
any
and all
features to keyword_any
and keyword_all
Perl release 5.41.7 introduced two new experimental features, called any
and all
, which enable keywords of the same names. Those keywords provide list-processing operators inspired by the ones from List::Util of the same name. It was subsequently considered that the names of these two features are confusingly close to the ability of the feature
module to refer to all of its features by using the :all
export tag. [GH #23104]
As a consequence, these feature flags have now been renamed to keyword_any
and keyword_all
to avoid this confusion. Likewise, the related experimental warning flags are also renamed to experimental::keyword_any
and experimental::keyword_all
. Apart from these new flag names, the actual syntax and semantics of these two operators remain unchanged since their appearance in Perl release 5.41.7.
use v5.40;
use feature 'keyword_all';
no warnings 'experimental::keyword_all';
my @numbers = ...
if(all { $_ % 2 == 0 } @numbers) {
say "All the numbers are even";
}
SvVSTRING
API macroA new API macro has been added, which is used to obtain the second string buffer out of a "vstring" SV, in a manner similar to the SvPV
macro which obtains the regular string buffer out of a regular SV.
STRLEN len;
const char *vstr_pv = SvVSTRING(sv, vstr_len);
String reversal from a single argument, when the string buffer is not "swiped", is now done in a single pass and is noticeably faster. The extent of the improvement is compiler & hardware dependent. [GH #23012]
Archive::Tar has been upgraded from version 3.02_001 to 3.04.
Benchmark has been upgraded from version 1.26 to 1.27.
builtin has been upgraded from version 0.017 to 0.018.
On platforms that don't support Inf/NaN values in floating-point numbers (such as VAX), builtin::inf
and builtin::nan
now throw a runtime error (rather than breaking the perl build). [GH #22882]
ExtUtils::MakeMaker has been upgraded from version 7.70 to 7.72.
ExtUtils::ParseXS has been extensively refactored internally and extensive tests have been added. Most of these changes shouldn't be visible externally with a few exceptions, the main ones being:
The generated C code, especially for returning values, may have changed slightly, and in some cases be slightly more efficient (in particular, using TARG
more often to return a value rather than creating a new temporary).
The parser is more likely to give warnings now on XS errors which previously would have just silently generated invalid C code.
One XS bug has been fixed in a way that may be highly visible. Previously when parsing the parameters of an XS sub declaration, if a parameter couldn't be parsed, it was quietly ignored. This meant that it would still consume an argument, but wouldn't declare a C variable: a bit like the Perl-level my ($a, undef, $c) = @_
. Now, it gives a compile error. This will break XS code that does (for example):
void
foo(int a, /* skip arg */, int c)
because C-comments aren't part of XS syntax, and so the parameter was a syntax error and was quietly skipped. This is better written as
void
foo(int a, b, int c)
since parameters which are not assigned a type act as placeholders.
feature has been upgraded from version 1.94 to 1.95.
fields has been upgraded from version 2.26 to 2.27.
Math::BigInt has been upgraded from version 2.003004 to 2.004001.
Math::BigInt::FastCalc has been upgraded from version 0.5018 to 0.5019.
Module::CoreList has been upgraded from version 5.20250220 to 5.20250321.
Safe has been upgraded from version 2.46 to 2.47.
Search::Dict has been upgraded from version 1.07 to 1.08.
A missing parameter has been added to the sample code in the SYNOPSIS.
Storable has been upgraded from version 3.35 to 3.36.
threads has been upgraded from version 2.42 to 2.43.
VMS::Filespec has been upgraded from version 1.14 to 1.15.
warnings has been upgraded from version 1.73 to 1.74.
XS::APItest has been upgraded from version 1.40 to 1.41.
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 https://github.com/Perl/perl5/issues.
Additionally, the following selected changes have been made:
Binary and octal floating-point constants (such as 012.345p-2
and 0b101.11p-1
) are now documented. This feature was first introduced in perl 5.22.0 together with hexadecimal floating-point constants and had a few bug fixes in perl 5.28.0, but it was never formally documented. [GH #18664]
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.
Prevent this warning when accessing a function parameter in @_
that is an lvalue reference to an untied hash element where the key was undefined. This warning is still produced at the point of call. [GH #22423]
Tests were added and changed to reflect the other additions and changes in this release.
Three new API functions have been added to interact with the regexp global match position stored in an SV. These are sv_regex_global_pos_get()
, sv_regex_global_pos_set()
and sv_regex_global_pos_clear()
. Using these API functions avoids XS modules needing to know about or interact directly with the way this position is currently stored, which involves the PERL_MAGIC_regex_global
magic type.
In regexes, the contents of \g{...}
backreferences are now properly validated. Previously, \g{1 FOO}
was silently parsed as \g{1}
, ignoring everything after the first number. [GH #23050]
A run-time pattern which contained a code block which recursed back to the same bit of code which ran that match, could cause a crash. [GH #22869]
For example:
my $r = qr/... (?{ foo() if ... }) .../;
sub foo { $string =~ $r }
foo()
Andrew Main (ZEFRAM) passed away on March 10, 2025.
Zefram was a brilliant person, seemingly knowledgeable in everything and happy to impart his knowledge and share his striking insights with a gentle, technical demeanor that often failed to convey the genuine care with which he communicated.
It would be impossible to overstate the impact that Zefram has had on both the language and culture of Perl over the years. From his countless contributions to the code-base, to his often quirky but always distinctive appearances at conferences and gatherings, his influence and memory are sure to endure long into the future.
Zefram wished to have no designated memorial location in meatspace. His designated memorial location in cyberspace is http://www.fysh.org/~zefram/personal/.
Perl 5.41.10 represents approximately 4 weeks of development since Perl 5.41.9 and contains approximately 19,000 lines of changes across 340 files from 14 authors.
Excluding auto-generated files, documentation and release tools, there were approximately 16,000 lines of changes to 270 .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.10:
brian d foy, Chris 'BinGOs' Williams, Dagfinn Ilmari Mannsåker, Daniel Dragan, David Mitchell, Graham Knop, Karl Williamson, Leon Timmermans, Lukas Mai, Paul Evans, Philippe Bruhat (BooK), Richard Leach, Tony Cook, 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.