Perl 5.44


3

After a year of development published release of a new stable branch of the Perl programming language - 5.44. When preparing The new release changed approximately 270 lines of code (excluding documentation and automatically generated code - 110), the changes affected 860 files, and 71 developers participated in the development.

The 5.44 branch has been released in accordance with the fixed development schedule established thirteen years ago, which calls for the release of new stable branches once a year and minor releases every three months. The first minor release, Perl 5.44.1, is scheduled for release in about a month, fixing the most significant bugs discovered during the implementation of Perl 5.44.0. With the release of Perl 5.44, support for the 5.40 branch has ended; updates for it may be released in the future only if critical security issues are discovered. Has begun the development process of the experimental 5.45 branch, which will be the basis for the stable release of Perl 5.46 in the first half of 2027, unless a decision is made move to numbering 7.x.

Key changes:

  • Added by experimental possibility of using named parameters in signatures Functions that define the list of variables passed to the function not in the function body, but during its declaration. This new feature allows parameters to be passed not in a strict order, but in any order, using key/value pairs and a syntax similar to assigning elements in hashes:
    • old syntax: sub f { my ($x, $y) = @_; …} f(1, 2);
    • signatures: sub f ($x, $y) { … } f(1, 2);
    • signatures with named parameters: sub f (:$x, :$y) { … } f(y => 2, x => 1);
  • Added experimental support for using aliases (pointers to pointers) in foreach loops with multiple variables. This feature allows you to create an alias in a foreach loop when retrieving multiple values ​​in a single loop iteration. For example, you can create an alias for a hash element with an array when iterating over both the keys and values ​​of the hash: 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"; } # Before version 5.44, dereferencing would be required: foreach my ( $key, $var ) ( %hash ) { say "The $key array contains: @$var"; } # Without experimental refaliasing and declared_refs features: foreach my $key (keys %hash) { say "The $key array contains: @{$hash{$key}}"; }
  • In regular expressions implemented The experimental 'enhanced_xx' mode allows the /xx modifier to be used with character classes in square brackets ([a-zA-Z]) to split them across multiple lines or to insert comments. For example, the condition if ($text =~ m/[a-zA-Z]/){ could be written as: if ($text =~ m/[ a-z # lowercase letters A-Z # uppercase letters ]/xx) {
  • The pseudo-random number generator uses the getentropy() system call to obtain entropy on systems that support it (Linux, BSD, macOS). On other systems, entropy is obtained by reading from the /dev/urandom device or using a hash of the time, process ID, and pointer value.
  • Added specification support Unicode 17.0.
  • Strict adherence to Unicode rules has been ensured for identifier names and regular expression groups, with approximately 160 Unicode characters previously covered by the w class now prohibited. For example, the w class, which covers all letters, digits, and the underscore character, now excludes circled Latin letters, which resemble actual letters but are not. This behavior change only affects programs using the use utf8 mode.
  • Fixed vulnerabilities caused by buffer overflows in the Perl_study_chunk functions (CVE-2026-8376, appears in 32-bit assemblies) and S_measure_struct (CVE-2026-57432), as well as overflow of the 16-bit counter in the Regex engine (CVE-2026-13221), which may cause the regular expression to fail.
  • Jumping to positions within loops and block constructs using the goto operator is prohibited. This feature was deprecated in 2010.
  • Performance optimizations were made to speed up integer addition, subtraction, and multiplication, function signature processing, and populating hashes from key/value lists with string keys known at compile time.

Source: linux.org.ru

Buy reliable hosting for sites with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster