[ this is a template for a new perldelta file. Any text flagged as XXX needs to be processed before release. ]
perldelta - what is new for perl v5.41.9
This document describes differences between the 5.41.8 release and the 5.41.9 release.
If you are upgrading from an earlier release such as 5.41.7, first read perl5418delta, which describes differences between 5.41.7 and 5.41.8.
XXX Any important notices here
XXX New core language features go here. Summarize user-visible core language enhancements. Particularly prominent performance optimisations could go here, but most should go in the "Performance Enhancements" section.
[ List each enhancement as a =head2 entry ]
my method
Like sub
since Perl version 5.18, method
can now be prefixed with the my
keyword. This declares a subroutine that has lexical, rather than package visibility. See perlclass for more detail.
->&
Along with the ability to declare methods lexically, this release also permits invoking a lexical subroutine as if it were a method, bypassing the usual name-based method resolution by name.
Combined with lexical method declaration, these two new abilities create the effect of having private methods.
XXX Any security-related notices go here. In particular, any security vulnerabilities closed should be noted here rather than in the "Selected Bug Fixes" section.
[ List each security issue as a =head2 entry ]
XXX For a release on a stable branch, this section aspires to be:
There are no changes intentionally incompatible with 5.XXX.XXX
If any exist, they are bugs, and we request that you submit a
report. See L</Reporting Bugs> below.
[ List each incompatible change as a =head2 entry ]
The "switch" feature and the smartmatch operator, ~~
, 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, and entirely removed in Perl 5.41.3.
After some discussion these have been re-instated.
Using them no longer produces a deprecation warning.
Switch itself still requires the switch
feature, which is enabled by default for feature bundles from v5.9.5 through to v5.34. Switch remains disabled in feature bundles 5.35 and later, but can be separately enabled:
# no switch here
use v5.10;
# switch here
use v5.36;
# no switch here
use feature "switch";
# switch here
Smart match now requires the smartmatch
feature, which is enabled by default and included in all feature bundles up to 5.40. It is disabled for the 5.41 feature bundle and later, but can be separately enabled:
# smartmatch here
use v5.41;
# no smartmatch here
use feature "smartmatch";
# smartmatch here
XXX Any deprecated features, syntax, modules etc. should be listed here.
XXX Remove this section if not applicable.
The following modules will be removed from the core distribution in a future release, and will at that time need to be installed from CPAN. Distributions on CPAN which require these modules will need to list them as prerequisites.
The core versions of these modules will now issue deprecated
-category warnings to alert you to this fact. To silence these deprecation warnings, install the modules in question from CPAN.
Note that these are (with rare exceptions) fine modules that you are encouraged to continue to use. Their disinclusion from core primarily hinges on their necessity to bootstrapping a fully functional, CPAN-capable Perl installation, not usually on concerns over their design.
XXX Note that deprecated modules should be listed here even if they are listed as an updated module in the "Modules and Pragmata" section.
[ List each other deprecation as a =head2 entry ]
XXX Changes which enhance performance without changing behaviour go here. There may well be none in a stable release.
[ List each enhancement as an =item entry ]
The stringification of integers by "print" in perlfunc and "say" in perlfunc, when coming from an SVt_IV, is now more efficient. [GH #22927]
Subroutines in packages no longer need to be stored in typeglobs: declaring a subroutine will now put a simple sub reference directly in the stash if possible, saving memory. The typeglob still notionally exists, so accessing it will cause the stash entry to be upgraded to a typeglob (i.e. this is just an internal implementation detail). This optimization does not currently apply to XSUBs or exported subroutines, and method calls will undo it, since they cache things in typeglobs.
(This optimization was originally announced in perl5220delta, but due to a bug it only worked for subroutines in package main
, not in modules.)
XXX
XXX All changes to installed files in cpan/, dist/, ext/ and lib/ go here. If Module::CoreList is updated, generate an initial draft of the following sections using Porting/corelist-perldelta.pl. A paragraph summary for important changes should then be added by hand. In an ideal world, dual-life modules would have a Changes file that could be cribbed.
The list of new and updated modules is modified automatically as part of preparing a Perl release, so the only reason to manually add entries here is if you're summarising the important changes in the module update. (Also, if the manually-added details don't match the automatically-generated ones, the release manager will have to investigate the situation carefully.)
[ Within each section, list entries as an =item entry ]
XXX Remove this section if Porting/corelist-perldelta.pl did not add any content here.
XXX has been upgraded from version A.xx to B.yy.
XXX If there was something important to note about this change, include that here.
XXX Remove this section if Porting/corelist-perldelta.pl did not add any content here.
XXX Changes to files in pod/ go here. Consider grouping entries by file and be sure to link to the appropriate page, e.g. perlfunc.
XXX Changes which create new files in pod/ go here.
XXX Description of the purpose of the new file here
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.
XXX Changes which significantly change existing files in pod/ go here. However, any changes to pod/perldiag.pod should go in the "Diagnostics" section.
Additionally, the following selected changes have been made:
XXX Description of the change here
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.
XXX New or changed warnings emitted by the core's C
code go here. Also include any changes in perldiag that reconcile it to the C
code.
XXX Newly added diagnostic messages go under here, separated into "New Errors" and "New Warnings"
Undefined subroutine &%s called, close to label '%s'
(F) The subroutine indicated hasn't been defined, or if it was, it has since been undefined.
This error could also indicate a mistyped package separator, when a single colon was typed instead of two colons. For example, Foo:bar()
would be parsed as the label Foo
followed by an unqualified function name: foo: bar()
.
XXX message
XXX message
XXX Changes (i.e. rewording) of diagnostic messages go here
Possible precedence problem between ! and %s
This warning no longer triggers for code like !!$x == $y
, i.e. where double negation (!!
) is used as a convert-to-boolean operator. [GH #22954]
Useless use of %s in void context
This warning now triggers for use of a chained comparison like 0 < $x < 1
.
XXX Describe change here
XXX Changes to installed programs such as perldoc and xsubpp go here. Most of these are built within the directory utils.
[ List utility changes as a =head2 entry for each utility and =item entries for each change Use XXX with program names to get proper documentation linking. ]
XXX
XXX Changes to Configure, installperl, installman, and analogous tools go here. Any other changes to the Perl build process should be listed here. However, any platform-specific changes should be listed in the "Platform Support" section, instead.
[ List changes as an =item entry ].
XXX
XXX Any significant changes to the testing of a freshly built perl should be listed here. Changes which create new files in t/ go here as do any large changes to the testing harness (e.g. when parallel testing was added). Changes to existing files in t/ aren't worth summarizing, although the bugs that they represent may be covered elsewhere.
XXX If there were no significant test changes, say this:
Tests were added and changed to reflect the other additions and changes in this release.
XXX If instead there were significant changes, say this:
Tests were added and changed to reflect the other additions and changes in this release. Furthermore, these significant changes were made:
[ List each test improvement as an =item entry ]
XXX
XXX Any changes to platform support should be listed in the sections below.
[ Within the sections, list each platform as an =item entry with specific changes as paragraphs below it. ]
XXX List any platforms that this version of perl compiles on, that previous versions did not. These will either be enabled by new files in the hints/ directories, or new subdirectories and README files at the top level of the source tree.
XXX
XXX List any platforms that this version of perl no longer compiles on.
XXX
XXX List any changes for specific platforms. This could include configuration and compilation changes or changes in portability/compatibility. However, changes within modules for platforms should generally be listed in the "Modules and Pragmata" section.
XXX
XXX Changes which affect the interface available to XS
code go here. Other significant internal changes for future core maintainers should be noted as well.
[ List each change as an =item entry ]
Two new API functions are introduced to convert strings encoded in native bytes format to UTF-8. These return the string unchanged if its UTF-8 representation is the same as the original. Otherwise, new memory is allocated to contain the converted string. This is in contrast to the existing "bytes_to_utf8
" in perlapi which always allocates new memory. The new functions are "bytes_to_utf8_free_me
" in perlapi and "bytes_to_utf8_temp_pv
" in perlapi. "bytes_to_utf8_temp_pv
" in perlapi arranges for the new memory to automatically be freed. With bytes_to_utf8_free_me
, you are responsible for freeing any newly allocated memory.
The way that subroutine signatures are parsed by the parser grammar has been changed.
Previously, when parsing individual signature parameters, the parser would accumulate an OP_ARGELEM
optree fragment for each parameter on the parser stack, collecting them in an OP_LIST
sequence, before finally building the complete argument handling optree itself, in a large action block defined directly in perly.y.
In the new approach, all the optree generation is handled by newly-defined functions in op.c which are called by the action blocks in the parser. These do not keep state on the parser stack, but instead in a dedicated memory structure referenced by the main PL_parser
structure. This is intended to be largely opaque to other code, and accessed only via the new functions.
This new arrangement is intended to allow more flexible code generation and additional features to be developed in future.
XXX Important bug fixes in the core language are summarized here. Bug fixes in files in ext/ and lib/ are best summarized in "Modules and Pragmata".
XXX Include references to GitHub issues and PRs as: [GH #12345] and the release manager will later use a regex to expand these into links.
[ List each fix as an =item entry ]
The $SIG{__DIE__}
and $SIG{__WARN__}
handlers can no longer be invoked recursively, either deliberately or by accident, as described in "%SIG" in perlvar. That is, when an exception (or warning) triggers a call to a $SIG{__DIE__}
(or $SIG{__WARN__}
) handler, further exceptions (or warnings) are processed directly, ignoring %SIG
until the original $SIG{__DIE__}
(or $SIG{__WARN__}
) handler call returns. [GH #14527], [GH #22984], [GH #22987]
The ObjectFIELDS()
for an object and xhv_class_fields
for the object's stash weren't always NULL or not-NULL, confusing sv_dump() (and hence Devel::Peek's Dump()) into crashing on an object with no defined fields in some cases. [github #22959]
When comparing strings when using a UTF-8 locale, the behavior was previously undefined if either or both contained an above-Unicode code point, such as 0x110000. Now all such code points will collate the same as the highest Unicode code point, U+10FFFF.
XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any tests that had to be TODO
ed for the release would be noted here. Unfixed platform specific bugs also go here.
[ List each fix as an =item entry ]
XXX
XXX Add anything here that we forgot to add, or were mistaken about, in the perldelta of a previous release.
XXX If any significant core contributor or member of the CPAN community has died, add a short obituary here.
XXX Generate this with:
perl Porting/acknowledgements.pl v5.41.8..HEAD
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.
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.
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.