You are viewing the version of this documentation from Perl 5.43.8. This is a development version of Perl.

CONTENTS

NAME

perldelta - what is new for perl v5.43.8

DESCRIPTION

This document describes differences between the 5.43.7 release and the 5.43.8 release.

If you are upgrading from an earlier release such as 5.43.6, first read perl5437delta, which describes differences between 5.43.6 and 5.43.7.

Core Enhancements

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.42;
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.

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. 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 as 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

m/...[...].../xx has new restrictions

Using an unescaped # or literal vertical space is now deprecated in a regular expression bracketed character class that is compiled with the /xx modifier. These still work, but deprecation warnings will be generated unless turned off or the constructs are cured as follows.

Modules and Pragmata

Updated Modules and Pragmata

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.

New Diagnostics

New Errors

Changes to Existing Diagnostics

Configuration and Compilation

Testing

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

Platform Support

Platform-Specific Notes

OpenBSD

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

Internal Changes

Selected Bug Fixes

Acknowledgements

Perl 5.43.8 represents approximately 5 weeks of development since Perl 5.43.7 and contains approximately 56,000 lines of changes across 320 files from 20 authors.

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

Craig A. Berry, David Mitchell, Graham Knop, H.Merijn Brand, James E Keenan, James Raspass, Karl Williamson, Leon Timmermans, Lukas Mai, Max Maischein, Paul Evans, Paul Marquess, Philippe Bruhat (BooK), Ricardo Signes, Richard Leach, Scott Baker, Steve Hay, TAKAI Kousuke, Tomasz Konojacki, 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 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.