NAME

perl5392delta - what is new for perl v5.39.2

DESCRIPTION

This document describes differences between the 5.39.1 release and the 5.39.2 release.

If you are upgrading from an earlier release such as 5.39.0, first read perl5391delta, which describes differences between 5.39.0 and 5.39.1.

Core Enhancements

New __CLASS__ Keyword

When using the new class feature, code inside a method, ADJUST block or field initializer expression is now permitted to use the new __CLASS__ keyword. This yields a class name, similar to __PACKAGE__, but whereas that gives the compile-time package that the code appears in, the __CLASS__ keyword is aware of the actual run-time class that the object instance is a member of. This makes it useful for method dispatch on that class, especially during constructors, where access to $self is not permitted.

For more information, see "__CLASS__" in perlfunc.

Modules and Pragmata

Updated Modules and Pragmata

  • Compress::Raw::Bzip2 has been upgraded from version 2.205 to 2.206.

  • Compress::Raw::Zlib has been upgraded from version 2.205 to 2.206.

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

  • ExtUtils::Miniperl has been upgraded from version 1.13 to 1.14.

  • feature has been upgraded from version 1.83 to 1.84.

  • File::Spec has been upgraded from version 3.89 to 3.90.

  • HTTP::Tiny has been upgraded from version 0.086 to 0.088.

  • IO::Compress has been upgraded from version 2.205 to 2.206.

  • IO::Socket::IP has been upgraded from version 0.41_01 to 0.42.

  • Module::CoreList has been upgraded from version 5.20230720 to 5.20230820.

  • NDBM_File has been upgraded from version 1.16 to 1.17.

  • Opcode has been upgraded from version 1.64 to 1.65.

  • perlfaq has been upgraded from version 5.20230701 to 5.20230812.

  • PerlIO::scalar has been upgraded from version 0.31 to 0.32.

  • PerlIO::via has been upgraded from version 0.18 to 0.19.

  • Pod::Html has been upgraded from version 1.34 to 1.35.

  • Pod::Simple has been upgraded from version 3.43 to 3.45.

  • POSIX has been upgraded from version 2.14 to 2.15.

  • Safe has been upgraded from version 2.44 to 2.45.

  • strict has been upgraded from version 1.12 to 1.13.

  • Test::Harness has been upgraded from version 3.44 to 3.47.

  • threads has been upgraded from version 2.37 to 2.38.

  • warnings has been upgraded from version 1.66 to 1.67.

  • XS::APItest has been upgraded from version 1.32 to 1.33.

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 Diagnostics

New Errors

New Warnings

Configuration and Compilation

  • microperl, long broken and of unclear present purpose, has been removed as promised in Perl 5.18.

Testing

Tests were added and changed to reflect the other additions and changes in this release.

Platform Support

Platform-Specific Notes

Serenity OS

Out of the box support for Serenity OS was added.

Windows

Workaround a bug in most 32-bit Mingw builds, where the generated code, including the code in the gcc support library, assumes 16-byte stack alignment, which 32-bit Windows does not preserve. [GH #21313]

Internal Changes

  • PERL_RC_STACK build option added.

    This new build option is highly experimental and is not enabled by default. Perl can be built with it by using the Configure option -Accflags='-DPERL_RC_STACK'.

    It makes the argument stack bump the reference count of SVs pushed onto it. It is functional, but currently slow and incomplete.

    See perlguts.

  • Functions "sv_strftime_tm" in perlapi and "sv_strftime_ints" in perlapi have been added to the public API. These transparently handle UTF-8 for you. One takes as input a libc struct tm and the other takes integers specifying the time, in the same form as "strftime" in POSIX.

Selected Bug Fixes

  • use 5.36; or later didn't enable the post parse reporting of Name "%s::%s" used only once: possible typo warnings when enabling warnings. [GH #21271]

  • Fix a crash or assertion when cleaning up a closure that refers to an outside our sub. [GH #21067]

  • Fixed a number of issues where I32 was used as a string offset or size rather than SSize_t or STRLEN/size_t [GH #21012]

    • ~$str when $str was more than 2GB in size would do nothing or produce an incomplete result.

    • String repeat, $str x $count, didn't handle $str over 2GB in size, throwing an error. Now such strings are repeated.

    • Complex substitution after the 2GB point in a string could access incorrect or invalid offsets in the string.

    • sv_utf8_decode() would truncate the SVs pos() value. This wasn't visible via utf8::decode().

    • When compiling a constant folded hash key, the length was truncated when creating the shared SV. Since hash keys over 2GB are not supported, throw a compilation error instead.

  • msgrcv() incorrectly called get magic on the buffer SV and failed to call set magic on completion. [GH #21012]

  • msgrcv() used the size parameter to resize the buffer before validating it. [GH #21012]

  • Inheriting from a class that was hierarchically an ancestor of the new class, eg. class A::B :isa(A) { ... } , would not attempt to load the parent class. [GH #21332]

Acknowledgements

Perl 5.39.2 represents approximately 4 weeks of development since Perl 5.39.1 and contains approximately 38,000 lines of changes across 510 files from 24 authors.

Excluding auto-generated files, documentation and release tools, there were approximately 27,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.39.2:

Beckett Normington, Dagfinn Ilmari Mannsåker, David Golden, David Mitchell, Elvin Aslanov, Erik Huelsmann, Greg Kennedy, H.Merijn Brand, James E Keenan, James Raspass, Karen Etheridge, Karl Williamson, Leon Timmermans, Lukas Mai, Nicolas Mendoza, Nicolas R, OpossumPetya, Paul Evans, Raul E Rangel, Ricardo Signes, Richard Leach, Steve Hay, 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 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.