=encoding utf8

=head1 NAME

perl5413delta - what is new for perl v5.41.3

=head1 DESCRIPTION

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

If you are upgrading from an earlier release such as 5.41.1, first read
L<perl5412delta>, which describes differences between 5.41.1 and 5.41.2.

=head1 Incompatible Changes

=head2 Apostrophe is no longer recognized as a global name separator

The apostrophe C<'> has been recognized as a separator between
components of package names and package variables since Perl 3, acting
exactly like C<::>, which was introduced in Perl 5.

Use of C<'> as a package separator was deprecated in Perl 5.38 and has
now been removed.

[L<GH #22303|https://github.com/Perl/perl5/issues/22303>]

=head2 Switch and Smart Match operator removed

The "switch" feature and the smartmatch operator, C<~~>, were introduced in
v5.10.  Their behavior was significantly changed in v5.10.1.  When the
"experiment" system was added in v5.18.0, switch and smartmatch were
retroactively declared experimental.  Over the years, proposals to fix or
supplement the features have come and gone.

They were deprecated in Perl v5.38.0 and scheduled for removal in Perl
5.42.0

These features have now been entirely removed.

If you code currently uses C<given>/C<when> or smart match this can be
replaced with an C<if>/C<else> chain, or there are several alternative
"switch" or smart match implementations on CPAN.

In no particular order:

=over

=item *

L<Syntax::Infix::Smartmatch|https://metacpan.org/pod/Syntax::Infix::Smartmatch>

=item *

L<Switch::Back|https://metacpan.org/pod/Switch::Back>

=item *

L<Syntax::Operator::Matches|https://metacpan.org/pod/Syntax::Operator::Matches>

=item *

L<Syntax::Keyword::Match|https://metacpan.org/pod/Syntax::Keyword::Match>

=back

[L<GH #22370|https://github.com/Perl/perl5/issues/22370>]

=head1 Performance Enhancements

=over 4

=item *

C<tr///> now runs at the same speed regardless of the internal
representation of its operand, as long as the only characters being
translated are ASCII-range, for example C<tr/A-Z/a-z/>.  Previously, if
the internal encoding was UTF-8, a slower, more general implementation
was used.

=back

=head1 Modules and Pragmata

=head2 Updated Modules and Pragmata

=over 4

=item *

L<B::Deparse> has been upgraded from version 1.77 to 1.78.

=item *

L<Compress::Raw::Bzip2> has been upgraded from version 2.212 to 2.213.

=item *

L<Compress::Raw::Zlib> has been upgraded from version 2.212 to 2.213.

=item *

L<DynaLoader> has been upgraded from version 1.56 to 1.57.

=item *

L<ExtUtils::ParseXS> has been upgraded from version 3.52 to 3.53.

=item *

L<ExtUtils::Typemaps> has been upgraded from version 3.51 to 3.53.

=item *

L<feature> has been upgraded from version 1.90 to 1.91.

=item *

L<IO::Compress> has been upgraded from version 2.212 to 2.213.

=item *

L<Module::CoreList> has been upgraded from version 5.20240720 to 5.20240829.

=item *

L<Opcode> has been upgraded from version 1.65 to 1.66.

=item *

L<overload> has been upgraded from version 1.37 to 1.38.

=item *

L<parent> has been upgraded from version 0.241 to 0.242.

=item *

L<perl5db.pl> has been upgraded from version 1.80 to 1.81.

C<b subname>, C<c subname>, C<b postpone subname> will now break on
the first line that is expected to execute in the sub.
[L<GH #799|https://github.com/Perl/perl5/issues/799>]

Distinguish between an empty list or undef for C<w>
expressions. [L<GH #22207|https://github.com/Perl/perl5/issues/22207>]

=item *

L<Safe> has been upgraded from version 2.46 to 2.47.

=item *

L<Scalar::Util> (the Scalar-List-Utils distribution) has been upgraded from
version 1.63 to 1.65.

=item *

L<Storable> has been upgraded from version 3.33 to 3.34.

=item *

L<Term::Table> has been upgraded from version 0.018 to 0.022.

=item *

L<Test::Harness> has been upgraded from version 3.48 to 3.50.

=item *

L<Test::Simple> has been upgraded from version 1.302199 to 1.302201 and
subsequently to 1.302201.  Upstream on CPAN, the Test2-Suite distribution has
been merged into the Test-Simple distribution.  Test2-Suite was formerly
shipped with the Perl core distribution.  Test2-Suite's files are now found
under F<cpan/Test-Simple> in the Perl 5 source tree (whether you access that
source tree in a git checkout or in a released tarball).  However, this should
have no impact whatsoever on any end-user of any modules formerly found under
Test2-Suite.

=item *

L<threads> has been upgraded from version 2.41 to 2.42.

=item *

L<Tie::RefHash> has been upgraded from version 1.40 to 1.41.

=back

=head1 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 L<perldiag>.

=head3 New Warnings

=over 4

=item *

L<%s() attempted on handle %s opened with open()|perldiag/"%s() attempted on handle %s opened with open()">

(W io) You called readdir(), telldir(), seekdir(), rewinddir() or
closedir() on a handle that was opened with open().  If you want to
use these functions to traverse the contents of a directory, you need
to open the handle with opendir().

[L<GH #22394|https://github.com/Perl/perl5/issues/22394>]

=item *

L<Possible precedence problem on isa operator|perldiag/"Possible precedence problem on isa operator">

(W precedence) You wrote something like

    !$obj isa Some::Class

but because C<!> has higher precedence than C<isa>, this is interpreted as
C<(!$obj) isa Some::Class>, which checks whether a boolean is an instance of
C<Some::Class>. If you want to negate the result of C<isa> instead, use one of:

    !($obj isa Some::Class)   # explicit parentheses
    not $obj isa Some::Class  # low-precedence 'not' operator

=back

=head2 Changes to Existing Diagnostics

=over 4

=item *

L<%s() attempted on invalid dirhandle %s|perldiag/"%s() attempted on invalid dirhandle %s">

This was consolidated from separate messages for readdir(), telldir(),
seekdir(), rewinddir() and closedir() as part of refactoring for
[L<GH #22394|https://github.com/Perl/perl5/issues/22394>].

=back

=head1 Testing

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

=over 4

=item *

Added testing of the perl headers against the C++ compiler
corresponding to the C compiler perl is being built with.
[L<GH #22232|https://github.com/Perl/perl5/issues/22232>]

=back

=head1 Internal Changes

=over 4

=item *

When built with the C<-DDEBUGGING> compile option, perl API functions that
take pointers to distinct types of SVs (AVs, HVs or CVs) will check the
C<SvTYPE()> of the passed values to ensure they are valid.  Additionally,
internal code within core functions that attempts to extract AVs, HVs or CVs
from reference values passed in will also perform such checks.

While this has been entirely tested by normal Perl CI testing, there may
still be some corner-cases where these constraints are violated in
otherwise-valid calls.  These may require further investigation if they are
found, and specific code to be adjusted to account for it.

=back

=head1 Selected Bug Fixes

=over 4

=item *

L<C<open>|perlfunc/open> automatically creates an anonymous temporary file when
passed C<undef> as a filename:

    open(my $fh, "+>", undef) or die ...

Due to the way this feature was implemented, it would also trigger for
non-existent elements of arrays or hashes:

    open(my $fh, "+>", $hash{no_such_key}) or die ...
    # unexpectedly succeeds and creates a temp file

Now a temporary file is only created if a literal C<undef> is passed.
[L<GH #22385|https://github.com/Perl/perl5/issues/22385>]

=item *

Compound assignment operators return lvalues that can be further modified:

    ($x &= $y) += $z;
    # Equivalent to:
    #  $x &= $y;
    #  $x += $z;

However, the separate numeric/string bitwise operators provided by L<the
C<bitwise> feature|feature/The 'bitwise' feature>, C<< &= ^= |= &.= ^.= |.= >>,
did not do so:

    use feature qw(bitwise);
    ($x &= $y) += $z;
    # Used to die:
    #  Can't modify numeric bitwise and (&) in addition (+) at ...

This has been corrected. [L<GH #22412|https://github.com/Perl/perl5/issues/22412>]

=item *

Starting in v5.39.8, L<POSIX/C<strftime>> would crash or produce odd errors
(such as C<Out of memory in perl:util:safesysmalloc>) when given a format
string that wasn't actually a string, but a number, C<undef>, or an object
(even one with overloaded string conversion).

Now C<strftime> stringifies its first argument, as before.
[L<GH #22498|https://github.com/Perl/perl5/issues/22498>]

=back

=head1 Obituary

Abe Timmerman (ABELTJE) passed away on August 15, 2024. Since 2002, Abe
built and maintained the L<Test::Smoke> project: "a set of scripts and
modules that try to run the Perl core tests on as many configurations as
possible and combine the results into an easy to read report". Smoking
Perl on as many platforms and configurations as possible has been
instrumental in finding bugs and developing patches for those bugs.

Abe was a regular attendee of the Perl Toolchain Summit (née Perl QA
Hackathon), the Dutch Perl Workshop and the Amsterdam.pm user group
meetings. With his kindness, his smile and his laugh, he helped make
Perl and its community better.

Abeltje's memorial card said "Grab every opportunity to have a drink of
bubbly. This is an opportunity". We'll miss you Abe, and we'll have a
drink of bubbly in your honor.

=head1 Acknowledgements

Perl 5.41.3 represents approximately 6 weeks of development since Perl
5.41.2 and contains approximately 34,000 lines of changes across 740 files
from 23 authors.

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

Branislav Zahradník, Chad Granum, Craig A. Berry, Dan Jacobson, David
Mitchell, E. Choroba, Eric Herman, Graham Knop, iabyn, James E Keenan, Karen
Etheridge, Karl Williamson, Leon Timmermans, Lukas Mai, Max Maischein, Paul
Evans, Paul Marquess, Philippe Bruhat (BooK), Sisyphus, Štěpán Němec,
Steve Hay, 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 F<AUTHORS> file in the Perl source distribution.

=head1 Reporting Bugs

If you find what you think is a bug, you might check the perl bug database
at L<https://github.com/Perl/perl5/issues>. There may also be information at
L<https://www.perl.org/>, the Perl Home Page.

If you believe you have an unreported bug, please open an issue at
L<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
L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION>
for details of how to report the issue.

=head1 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 C<perlthanks> program:

    perlthanks

This will send an email to the Perl 5 Porters list with your show of thanks.

=head1 SEE ALSO

The F<Changes> file for an explanation of how to view exhaustive details on
what changed.

The F<INSTALL> file for how to build Perl.

The F<README> file for general stuff.

The F<Artistic> and F<Copying> files for copyright information.

=cut