NAME

perldelta - what is new for perl v5.41.4

DESCRIPTION

This document describes differences between the 5.41.3 release and the 5.41.4 release.

If you are upgrading from an earlier release such as 5.41.2, first read perl5413delta, which describes differences between 5.41.2 and 5.41.3.

Modules and Pragmata

Updated Modules and Pragmata

  • CPAN has been upgraded from version 2.36 to 2.37.

  • Devel::Peek has been upgraded from version 1.34 to 1.36.

  • ExtUtils::ParseXS has been upgraded from version 3.53 to 3.54.

  • ExtUtils::Typemaps has been upgraded from version 3.53 to 3.54.

  • Module::CoreList has been upgraded from version 5.20240829 to 5.20240920.

  • overload has been upgraded from version 1.38 to 1.39.

  • Scalar::Util has been upgraded from version 1.65 to 1.66.

  • Storable has been upgraded from version 3.34 to 3.35.

  • Test::Simple has been upgraded from version 1.302201 to 1.302204.

  • version has been upgraded from version 0.9930 to 0.9933.

  • XS::APItest has been upgraded from version 1.37 to 1.38.

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 Warnings

  • Possible precedence problem between ! and %s

    (W precedence) You wrote something like

    !$x < $y               # parsed as: (!$x) < $y
    !$x eq $y              # parsed as: (!$x) eq $y
    !$x =~ /regex/         # parsed as: (!$x) =~ /regex/
    !$obj isa Some::Class  # parsed as: (!$obj) isa Some::Class

    but because ! has higher precedence than comparison operators, =~, and isa, this is interpreted as comparing/matching the logical negation of the first operand, instead of negating the result of the comparison/match.

    To disambiguate, either use a negated comparison/binding operator:

    $x >= $y
    $x ne $y
    $x !~ /regex/

    ... or parentheses:

    !($x < $y)
    !($x eq $y)
    !($x =~ /regex/)
    !($obj isa Some::Class)

    ... or the low-precedence not operator:

    not $x < $y
    not $x eq $y
    not $x =~ /regex/
    not $obj isa Some::Class

    (If you did mean to compare the boolean result of negating the first operand, parenthesize as (!$x) < $y, (!$x) eq $y, etc.)

    (This warning subsumes the Possible precedence problem on isa operator warning from the previous perl release.)

Configuration and Compilation

Internal Changes

  • The op_dump() function has been expanded to include additional information about the recent OP_METHSTART and OP_INITFIELD ops, as well as for OP_ARGCHECK and OP_ARGELEM which had not been done previously.

  • op_dump() now also has the facility to print extra debugging information about custom operators, if those operators register a helper function via the new xop_dump element of the XOP structure. For more information, see the relevant additions to perlguts.

Selected Bug Fixes

  • pack("p", ...) and pack("P", ...) now SvPV_force() the supplied SV unless it is read only. This will remove CoW from the SV and prevents code that writes through the generated pointer from modifying the value of other SVs that happen the share the same CoWed string buffer.

    Note: this does not make pack("p",... ) safe, if the SV is magical then any writes to the buffer will likely be discarded on the next read. [GH #22380]

  • Enforce no feature "bareword_filehandles" for bareword file handles that have strictness removed because they are used in open() with a "dup" mode, such as in open my $fh, ">&", THISHANDLE. [GH #22568]

  • Using goto to tail call, or using the call_sv() and related APIs to call, any of trim(), refaddr(), reftype(), ceil(), floor() or stringify() in the builtin:: package would crash or assert due to a TARG handling bug. [GH #22542]

  • Fix sv_gets() to accept a SSize_t append offset instead of I32. This prevents integer overflows when appending to a large SV for readpipe aka qx// and readline. https://www.perlmonks.org/?node_id=11161665

  • Fixed an issue where `utf8n_to_uvchr` failed to correctly identify certain invalid UTF-8 sequences as invalid. Specifically, sequences that start with continuation bytes or unassigned bytes could cause unexpected behavior or a panic. This fix ensures that such invalid sequences are now properly detected and handled. This correction also resolves related issues in modules that handle UTF-8 processing, such as `Encode.pm`.

Acknowledgements

Perl 5.41.4 represents approximately 3 weeks of development since Perl 5.41.3 and contains approximately 5,800 lines of changes across 400 files from 20 authors.

Excluding auto-generated files, documentation and release tools, there were approximately 3,700 lines of changes to 290 .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.4:

Andrei Horodniceanu, Antanas Vaitkus, Aristotle Pagaltzis, Craig A. Berry, David Cantrell, David Mitchell, E. Choroba, Ed J, Eric Herman, Graham Knop, James E Keenan, Karl Williamson, Leon Timmermans, Lukas Mai, Masahiro Honma, Paul Evans, Philippe Bruhat (BooK), Sisyphus, 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.