NAME

perl5316delta - what is new for perl v5.31.6

DESCRIPTION

This document describes differences between the 5.31.5 release and the 5.31.6 release.

If you are upgrading from an earlier release such as 5.31.4, first read perl5315delta, which describes differences between 5.31.4 and 5.31.5.

Core Enhancements

Alpha assertions are no longer experimental

See "(*pla:pattern)" in perlre, "(*plb:pattern)" in perlre, "(*nla:pattern)" in perlre>, and "(*nlb:pattern)" in perlre. Use of these no longer generates a warning; existing code that disables the warning category experimental::script_run will continue to work without any changes needed. Enabling the category has no effect.

Script runs are no longer experimental

See "Script Runs" in perlre. Use of these no longer generates a warning; existing code that disables the warning category experimental::alpha_assertions will continue to work without any changes needed. Enabling the category has no effect.

Feature checks are now faster

Previously feature checks in the parser required a hash lookup when features we set outside of a feature bundle, this has been optimized to a bit mask check. [#17229]

Perl is now developed on Github

Perl is now developed on Github, you can find us at https://github.com/Perl/perl5.

Non-security bugs should now be reported via Github.

Modules and Pragmata

Updated Modules and Pragmata

Utility Changes

streamzip

  • This is a new utility, included as part of an IO::Compress::Base upgrade.

    streamzip creates a zip file from stdin. The program will read data from stdin, compress it into a zip container and, by default, write a streamed zip file to stdout.

Configuration and Compilation

  • Configure now correctly handles gcc-10. Previously it was interpreting it as gcc-1 and turned on -fpcc-struct-return.

Platform Support

Platform-Specific Notes

Windows

The configuration for ccflags and optimize are now separate, as with POSIX platforms. [#17156]

Internal Changes

  • The lexer (Perl_yylex() in toke.c) was previously a single 4100-line function, relying heavily on goto and a lot of widely-scoped local variables to do its work. It has now been pulled apart into a few dozen smaller static functions; the largest remaining chunk (yyl_word_or_keyword()) is a little over 900 lines, and consists of a single switch statement, all of whose case groups are independent. This should be much easier to understand and maintain.

  • The OS-level signal handlers and type (Sighandler_t) used by the perl core were declared as having three parameters, but the OS was always told to call them with one argument. This has been fixed by declaring them to have one parameter. See the merge commit v5.31.5-346-g116e19abbf for full details.

  • The code that handles tr/// has been extensively revised, fixing various bugs, especially when the source and/or replacement strings contain characters whose code points are above 255. Some of the bugs were undocumented, one being that under some circumstances (but not all) with /s, the squeezing was done based on the source, rather than the replacement. A documented bug that got fixed was [perl RT #125493].

  • A new macro for XS writers dealing with UTF-8-encoded Unicode strings has been created "UTF8_CHK_SKIP" in perlapi that is safer in the face of malformed UTF-8 input than "UTF8_SKIP" in perlapi (but not as safe as "UTF8_SAFE_SKIP" in perlapi). It won't read past a NUL character. It has been backported in Devel::PPPort 3.55 and later.

Selected Bug Fixes

  • printf() or sprintf() with the %n format could cause a panic on debugging builds, or report an incorrectly cached length value when producing SVfUTF8 flagged strings. [#17221]

  • The tokenizer has been extensively refactored. [#17241][#17189]

  • use strict "subs" is now enforced for bareword constants optimized into a multiconcat operator. [#17254]

  • A memory leak in regular expression patterns has been fixed [#17218].

Acknowledgements

Perl 5.31.6 represents approximately 4 weeks of development since Perl 5.31.5 and contains approximately 43,000 lines of changes across 490 files from 31 authors.

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

Aaron Crane, Chad Granum, Chris 'BinGOs' Williams, Craig A. Berry, Dagfinn Ilmari Mannsåker, Dan Book, Dave Cross, David Mitchell, E. Choroba, Graham Knop, Hauke D, Ichinose Shogo, James E Keenan, Karen Etheridge, Karl Williamson, Matt Turner, Max Maischein, Nicholas Clark, Nicolas R., Pali, Paul Evans, Petr Písař, Richard Leach, Sergey Aleynikov, Steve Hay, Steve Peters, Todd Rinaldo, Tomasz Konojacki, Tom Hukins, Tony Cook, Yves Orton.

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 http://www.perl.org/, the Perl Home Page.

If you believe you have an unreported bug, please run the perlbug program included with your release. Be sure to trim your bug down to a tiny but sufficient test case. Your bug report, along with the output of perl -V, will be sent off to perlbug@perl.org to be analysed by the Perl porting team.

If the bug you are reporting has security implications which make it inappropriate to send to a publicly archived mailing list, 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.