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

CONTENTS

NAME

perldelta - what is new for perl v5.41.7

DESCRIPTION

This document describes differences between the 5.41.6 release and the 5.41.7 release.

If you are upgrading from an earlier release such as 5.41.5, first read perl5416delta, which describes differences between 5.41.5 and 5.41.6.

Core Enhancements

New :writer attribute on field variables

Classes defined using use feature 'class' are now able to automatically create writer accessors for scalar fields, by using the :writer attribute, similar to the way that :reader already creates reader accessors.

class Point {
    field $x :reader :writer :param;
    field $y :reader :writer :param;
}

my $p = Point->new( x => 20, y => 40 );
$p->set_x(60);

New any and all operators

A new experimental feature has been added, which adds two new list-processing operators, any and all.

use v5.40;
use feature 'all';

my @numbers = ...

if(all { $_ % 2 == 0 } @numbers) {
    say "All the numbers are even";
}

These operate similarly to grep except that they only ever return true or false, testing if any (or all) of the elements in the list make the testing block yield true. Because of this they can short-circuit, avoiding the need to test any further elements if a given element determines the eventual result.

These are inspired by the same-named functions in the List::Util module, except that they are implemented as direct core operators, and thus perform faster, and do not produce an additional subroutine call stack frame for invoking the code block.

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:

perl5416delta

pod/perlguts.pod and pod/perlclib.pod

Memory Allocation in C/XS

Documentation was updated to reflect that mixing Newx, Renew, and Safefree vs malloc, realloc, and free are not allowed, and mixing pointers between the 2 classes of APIs is not allowed. Updates made in pod/perlguts.pod and pod/perlclib.pod.

Added the change note for apostrophes in names being reinstated, which was delayed by the review cycle.

Configuration and Compilation

Testing

Tests were added and changed to reflect the other additions and changes in this release.

Internal Changes

Selected Bug Fixes

Acknowledgements

Perl 5.41.7 represents approximately 4 weeks of development since Perl 5.41.6 and contains approximately 11,000 lines of changes across 160 files from 16 authors.

Excluding auto-generated files, documentation and release tools, there were approximately 6,400 lines of changes to 96 .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.7:

Dagfinn Ilmari Mannsåker, Daniel Dragan, Ed Sabol, James E Keenan, Karen Etheridge, Karl Williamson, Lukas Mai, Mark Fowler, Max Maischein, Paul Evans, Richard Leach, Scott Baker, Sisyphus, 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 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.