You are viewing the version of this documentation from Perl 5.44.0-RC1. This is a development version of Perl.

CONTENTS

NAME

perldelta - what is new for perl v5.44.0

DESCRIPTION

This document describes differences between the 5.42.0 release and the 5.44.0 release.

Core Enhancements

Reported argument counts in method signatures now account for $self

In previous versions of Perl, the exception message thrown by a method subroutine with a signature when it does not receive an appropriate number of arguments to match its declared parameters failed to account for the implied $self parameter, causing the numbers in the message to be 1 fewer than intended.

This has now been fixed, so messages report the correct number of arguments including the object invocant.

Unicode 17.0 is supported

See https://www.unicode.org/versions/Unicode17.0.0/.

Named Parameters in Signatures

This adds a major new ability to subroutine signatures, allowing callers to pass parameters by name/value pairs rather than by position.

sub f ($x, $y, :$alpha, :$beta = undef) { ... }

f( 123, 456, alpha => 789 );

Originally specified in PPC0024.

This feature is currently considered experimental, and is described in further detail in "Signatures" in perlsub.

Multi-variable foreach can now use aliased references

Perl version 5.22 introduced reference aliases, allowing a foreach loop iteration variable to create new aliases to references. Perl version 5.36 introduced foreach loops with multiple variables, consuming more than one input list item on each iteration. New in this version, the two features may now be used together, allowing multiple iteration variables where any of them are permitted to be reference aliases.

use v5.44;
use feature qw( refaliasing declared_refs );

my %hash = (
    one => [1],
    two => [2, 2],
);

foreach my ( $key, \@items ) ( %hash ) {
    say "The $key array contains: @items";
}

Currently both the refaliasing and declared_refs features remain experimental.

New source of entropy for PRNG seeding

Perl now uses the getentropy() system call to fetch random bytes suitable for seeding the internal PRNG. Previously Perl would read raw bytes from the /dev/urandom device. Perl now seeds itself in this order (and falls through upon failure):

  1. getentropy() on systems that support this call (Linux, BSD, MacOS)

  2. /dev/urandom on systems that have it

  3. Hash of internal state variables: Unix time, process ID, and pointer value

Enhanced operation of regular expression patterns under /xx

Experimentally, the /xx pattern modifier can allow bracketed character classes (e.g., [a-zA-Z] to extend across multiple lines and to contain comments, and to warn you of potential cases where a portion of a pattern inadvertently has been treated as a comment instead of what you intended. This behavior is enabled by use feature "enhanced_xx". See "/x and /xx" in perlre.

Security

CVE-2026-8376 - Buffer overflow in Perl_study_chunk

Perl_study_chunk in regcomp_study.c checked the size of the joined substring buffer in characters rather than bytes. On 32-bit builds, this can lead to an integer overflow of the size of the buffer leading to out-of-bounds writes.

Incompatible Changes

Unicode rules are now fully enforced on identifier and regular expression group names.

Before Unicode, Perl accepted any \w character in an identifier or other name, except the first character couldn't be a digit. Later, Unicode created two properties that described this. Even later, they found those properties to be insufficient, and created two new similar properties. These are the ones that perl has intended to use since: \p{XID_Start} and \p{XID_Continue}. (The X stands for "eXtended" and indicates these are the more modern versions.)

(And even later, long after Perl identifier rules were formed using the above properties, Unicode added recommendations to further restrict legal identifier names. These were added to counter cases where, for example, programmers snuck code past reviewers using characters that look like other ones. The two properties are Identifier_Status and Identifier_Type. See https://www.unicode.org/reports/tr39/. Perl currently doesn't do anything with these, except to furnish you the ability to use them in regular expressions.)

We soon discovered that there were 14 characters that match XID_Start and XID_Continue that don't also match \w. To avoid breaking code that had long relied on \w, we chose to not add those to the list of acceptable identifier characters.

It turns out that there are about 160 characters that match \w but not the Unicode XID properties. Thus they are illegal according to Unicode. Those are now explicitly forbidden in both Perl identifiers and regular expression group names. Previously, it was likely that their use in identifiers wouldn't work anyway; they could be accepted initially as legal, but other code would later reject them, but with a message that had nothing to do with the underlying problem. However group names in regular expression patterns could contain illegal continuation characters and have a higher probablility of not being caught. That is now changed.

Only programs that do use utf8 can be affected, and then only characters that appear in the 2nd or later positions of the name. The characters that an identifier name can begin with are unchanged.

130 of the now unacceptable characters are 5 sets of 26 Latin letters that are enclosed by some shape, such as CIRCLED LATIN CAPITAL LETTER N. Another 8 are generic modifiers that add shapes around other characters; 5 are modifiers to Cyrillic numbers; and 16 are Arabic ligatures and isolated forms. The other two are GREEK YPOGEGRAMMENI and VERTICAL TILDE.

Deprecations

Performance Enhancements

Modules and Pragmata

Updated Modules and Pragmata

Documentation

Changes to Existing Documentation

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:

perlapi

perlexperiment

perlxs

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.

Changes to Existing Diagnostics

New Diagnostics

New Errors

New Warnings

Configuration and Compilation

Testing

Tests were added and changed to reflect the other additions and changes in this release. Furthermore, these changes were made:

Platform Support

Platform-Specific Notes

Windows
  • Fix builds with USE_IMP_SYS defined but USE_ITHREADS not defined.

  • A compilation error in unthreaded builds using MSVC introduced in Perl 5.43.5 has been fixed. [GH #23952]

OpenBSD
  • When testing embedding, ensure we link against the correct static libperl. [GH #22125]

AIX
  • Thread-safe locale handling has been turned off on all releases due to apparent bugs in the underlying operating system support.

  • The ibm-clang/ibm-clang_r IBM Open XL C/C++ compiler is now supported for AIX 7.2 and 7.3. This is the recommended compiler to use when compiling Perl on these versions of AIX.

Internal Changes

Selected Bug Fixes

Known Problems

None

Obituary

"WELL VOLUNTEERED!" echoed across conference rooms and IRC channels. Matt S. Trout's battle cry that transformed reluctant volunteers into community leaders.

With profound sadness, we announce Matt's passing. Since the early 2000s, Matt shaped Perl through sheer force of will: IRC operator, PAUSE administrator, Shadowcat Systems co-founder, architect of DBIx::Class. His opinions came wrapped in profanity and delivered at maximum volume. He suffered no fools and grew to sometimes realize he should apologize. Yet this same abrasive exterior protected fierce dedication to mentoring, developers he harangued into volunteering now lead the community themselves. Matt's deliberately mind-bending code pushed Perl forward. Every modern Perl developer touches his legacy daily.

Well volunteered, Matt. Rest in peace.

Acknowledgements

Perl 5.44.0 represents approximately 12 months of development since Perl 5.42.0 and contains approximately 270,000 lines of changes across 1,300 files from 71 authors.

Excluding auto-generated files, documentation and release tools, there were approximately 110,000 lines of changes to 860 .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.42.1:

Alexander Karelas, Aristotle Pagaltzis, Arne Johannessen, Bartosz Jarzyna, Branislav Zahradník, brian d foy, Chad Granum, Chris 'BinGOs' Williams, Chris Prather, Christian Hansen, Craig A. Berry, Dagfinn Ilmari Mannsåker, Dan Book, Dan Church, Daniel Dragan, Daniel Laügt, Daniel Tang, Dan Kogai, Dave Cross, David Mitchell, Dmitrii Kuvaiskii, E. Choroba, Ed J, Elvin Aslanov, Eric Herman, Eugen Konkov, Graham Knop, Harald Jörg, H.Merijn Brand, Igor Todorovski, James Cook, James E Keenan, James Raspass, Jörg Thomas, Karen Etheridge, Karl Williamson, Leon Timmermans, Lukas Mai, Marc Reisner, Masahiro Iuchi, Matthew Horsfall, Maxim Vuets, Max Maischein, Nicolas R, Olaf Alders, Paul Evans, Paul Marquess, Peter John Acklam, Philippe Bruhat (BooK), Ricardo Signes, Richard Leach, Robert Rothenberg, Ryan Carsten Schmidt, Samuel Smith, Samuel Young, Scott Baker, Sevan Janiyan, Shirakata Kentaro, Sisyphus, Stan Ulbrych, Stefan Adams, Štěpán Němec, Steve Hay, TAKAI Kousuke, Thibault Duponchelle, Toby Inkster, Tomasz Konojacki, Tom Wyant, Tony Cook, Unicode Consortium, Yitzchak Scott-Thoennes.

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.

Reporting Bugs

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.

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.

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.