The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

perl5311delta - what is new for perl v5.31.1

DESCRIPTION

This document describes differences between the 5.31.0 release and the 5.31.1 release.

If you are upgrading from an earlier release such as 5.30.0, first read perl5310delta, which describes differences between 5.30.0 and 5.31.0.

Incompatible Changes

Use of vec on strings with code points above 0xFF is forbidden

Such strings are represented internally in UTF-8, and vec is a bit-oriented operation that will likely give unexpected results on those strings. This was deprecated in perl 5.28.0.

Use of code points over 0xFF in string bitwise operators

Some uses of these were already illegal after a previous deprecation cycle. The remaining uses are now prohibited, having been deprecated in perl 5.28.0. See perldeprecation.

Sys::Hostname::hostname() does not accept arguments

This usage was deprecated in perl 5.28.0 and is now fatal.

Modules and Pragmata

Updated Modules and Pragmata

  • Class::Struct has been upgraded from version 0.65 to 0.66.

  • Compress::Raw::Bzip2 has been upgraded from version 2.084 to 2.086.

  • Compress::Raw::Zlib has been upgraded from version 2.084 to 2.086.

  • CPAN has been upgraded from version 2.22 to 2.27.

  • DB_File has been upgraded from version 1.843 to 1.852.

  • Devel::PPPort has been upgraded from version 3.52 to 3.53.

  • ExtUtils::CBuilder has been upgraded from version 0.280231 to 0.280232.

  • ExtUtils::MakeMaker has been upgraded from version 7.34 to 7.36.

  • I18N::LangTags has been upgraded from version 0.43 to 0.44.

  • IO has been upgraded from version 1.40 to 1.41.

    The supplied TO is now always honoured on calls to the send() method. [perl #133936]

  • IO::Compress has been upgraded from version 2.084 to 2.086.

  • Module::CoreList has been upgraded from version 5.20190524 to 5.20190620.

  • overload has been upgraded from version 1.30 to 1.31.

  • Pod::Simple has been upgraded from version 3.36 to 3.38.

  • podlators has been upgraded from version 4.11 to 4.12.

  • POSIX has been upgraded from version 1.88 to 1.89.

  • SelfLoader has been upgraded from version 1.25 to 1.26.

  • Storable has been upgraded from version 3.15 to 3.16.

    Regular expressions objects weren't properly counted for object id purposes on retrieve. This would corrupt the resulting structure, or cause a runtime error in some cases. [perl #134179]

  • Sys::Hostname has been upgraded from version 1.22 to 1.23.

  • Test::Simple has been upgraded from version 1.302162 to 1.302164.

  • Tie::File has been upgraded from version 1.02 to 1.03.

  • Tie::Hash::NamedCapture has been upgraded from version 0.10 to 0.11.

  • Time::HiRes has been upgraded from version 1.9760 to 1.9761.

  • Unicode::Normalize has been upgraded from version 1.26 to 1.27.

  • Unicode::UCD has been upgraded from version 0.72 to 0.73.

  • warnings has been upgraded from version 1.44 to 1.45.

  • XS::APItest has been upgraded from version 1.00 to 1.01.

Removed Modules and Pragmata

  • Pod::Parser has been removed from the core distribution. It still is available for download from CPAN. This resolves [perl #119439].

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, send email to perlbug@perl.org.

Additionally, the following selected changes have been made:

perlguts

  • Documentation about embed.fnc flags has been removed. embed.fnc now has sufficient comments within it. Anyone changing that file will see those comments first, so entries here are now redundant.

perlpod

  • Advice has been added regarding the usage of Z<>.

Configuration and Compilation

  • autodoc.pl

    This tool that regenerates perlintern and perlapi has been overhauled significantly, restoring consistency in flags used in embed.fnc and Devel::PPPort and allowing removal of many redundant =for apidoc entries in code.

Platform Support

Discontinued Platforms

Windows CE

Support for building perl on Windows CE has now been removed.

Internal Changes

Selected Bug Fixes

  • Setting $) now properly sets supplementary group ids if you have the necessary privileges. [perl #134169]

  • close() on a pipe now preemptively clears the PerlIO object from the IO SV. This prevents a second attempt to close the already closed PerlIO object if a signal handler calls die() or exit() while close() is waiting for the child process to complete. [perl #122112]

  • sprintf("%.*a", -10000, $x) would cause a buffer overflow due to mishandling of the negative precision value. [perl #134008]

  • scalar() on a reference could cause an erroneous assertion failure during compilation. [perl #134045]

  • %{^CAPTURE_ALL} is now an alias to %- as documented, rather than incorrectly an alias for %+. [perl #131867]

  • %{^CAPTURE} didn't work if @{^CAPTURE} was mentioned first. Similarly for %{^CAPTURE_ALL} and @{^CAPTURE_ALL}, though @{^CAPTURE_ALL} currently isn't used. [perl #131193]

  • Extraordinarily large (over 2GB) floating point format widths could cause an integer overflow in the underlying call to snprintf(), resulting in an assertion. Formatted floating point widths are now limited to the range of int, the return value of snprintf(). [perl #133913]

  • Parsing the following constructs within a sub-parse (such as with "${code here}" or s/.../code here/e) has changed to match how they're parsed normally:

    • print $fh ... no longer produces a syntax error.

    • Code like s/.../ ${time} /e now properly produces an "Ambiguous use of ${time} resolved to $time at ..." warning when warnings are enabled.

    • @x {"a"} (with the space) in a sub-parse now properly produces a "better written as" warning when warnings are enabled.

    • attributes can now be used in a sub-parse.

    [perl #133850]

  • Incomplete hex and binary literals like 0x and 0b are now treated as if the x or b is part of the next token. [perl #134125]

  • A spurious ) in a subparse, such as in s/.../code here/e or "...${code here}", no longer confuses the parser.

    Previously a subparse was bracketed with generated ( and ) tokens, so a spurious ) would close the construct without doing the normal subparse clean up, confusing the parser and possible causing an assertion failure.

    Such constructs are now surrounded by artificial tokens that can't be included in the source. [perl #130585]

  • Reference assignment of a sub, such as \&foo = \&bar;, silently did nothing in the main:: package. [perl #134072]

  • sv_gets() now recovers better if the target SV is modified by a signal handler. [perl #134035]

  • readline @foo now evaluates @foo in scalar context. Previously it would be evalauted in list context, and since readline() pops only one argument from the stack, the stack could underflow, or be left with unexpected values on the stack. [perl #133989]

Acknowledgements

Perl 5.31.1 represents approximately 4 weeks of development since Perl 5.31.0 and contains approximately 37,000 lines of changes across 500 files from 20 authors.

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

Alexandr Savca, Andreas König, Chris 'BinGOs' Williams, Dagfinn Ilmari Mannsåker, Dominic Hargreaves, Graham Knop, Hugo van der Sanden, James E Keenan, Jerome Duval, Karen Etheridge, Karl Williamson, Manuel Mausz, Michael Haardt, Nicolas R., Pali, Richard Leach, Sawyer X, Steve Hay, Tony Cook, Vickenty Fesunov.

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://rt.perl.org/. 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.