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

NAME

perldelta - what is new for perl v5.37.2

DESCRIPTION

This document describes differences between the 5.37.1 release and the 5.37.2 release.

If you are upgrading from an earlier release such as 5.37.0, first read perl5371delta, which describes differences between 5.37.0 and 5.37.1.

Performance Enhancements

  • Use Perl_fabs rather than hand-coded abs expressions in sv.c.

  • Replace a runtime check with compile-time static assertion in sv.c.

Modules and Pragmata

New Modules and Pragmata

  • Added the is_tainted() builtin function. [github #19854]

  • Added the export_lexically() builtin function as per RFC 0020. [github #19895]

Updated Modules and Pragmata

  • builtin has been upgraded from version 0.007 to 0.008.

  • B has been upgraded from version 1.84 to 1.85.

  • B::Concise has been upgraded from version 1.006 to 1.007.

  • B::Deparse has been upgraded from version 1.64 to 1.65.

  • bignum has been upgraded from version 0.65 to 0.66.

  • Compress::Raw::Bzip2 has been upgraded from version 2.103 to 2.201.

  • Compress::Raw::Zlib has been upgraded from version 2.105 to 2.202.

  • CPAN has been upgraded from version 2.33 to 2.34.

  • Data::Dumper has been upgraded from version 2.185 to 2.186.

  • DB_File has been upgraded from version 1.857 to 1.858.

  • Encode has been upgraded from version 3.17 to 3.18.

  • feature has been upgraded from version 1.74 to 1.75.

    The bareword_filehandles feature has been removed from the :5.38 feature bundle. [github #19924]

  • File::Glob has been upgraded from version 1.37 to 1.38.

  • File::Spec has been upgraded from version 3.85 to 3.86.

  • Filter::Util::Call has been upgraded from version 1.60 to 1.61.

  • Hash::Util has been upgraded from version 0.28 to 0.29.

  • IO::Compress has been upgraded from version 2.106 to 2.201.

  • JSON::PP has been upgraded from version 4.07 to 4.10.

  • Math::BigInt has been upgraded from version 1.999830 to 1.999837.

  • Math::BigInt::FastCalc has been upgraded from version 0.5012 to 0.5013.

  • Math::BigRat has been upgraded from version 0.2621 to 0.2624.

  • Module::CoreList has been upgraded from version 5.20220620 to 5.20220720.

  • Opcode has been upgraded from version 1.58 to 1.59.

  • PerlIO::via::QuotedPrint has been upgraded from version 0.09 to 0.10.

  • Pod::Checker has been upgraded from version 1.74 to 1.75.

  • Pod::Usage has been upgraded from version 2.01 to 2.03.

  • Socket has been upgraded from version 2.033 to 2.035.

  • Storable has been upgraded from version 3.26 to 3.27.

  • Test::Simple has been upgraded from version 1.302190 to 1.302191.

  • Text::Balanced has been upgraded from version 2.04 to 2.06.

  • threads::shared has been upgraded from version 1.64 to 1.65.

  • XS::APItest has been upgraded from version 1.23 to 1.24.

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, open an issue at https://github.com/Perl/perl5/issues.

Additionally, the following selected changes have been made:

  • Perl API: Better documentation of experimental and deprecated elements.

  • Add comments better explaining ANYOF nodes in regcomp.h

  • perlunicode: Clarify user-defined properties

  • regex: Add POSIXA1R node

  • Improve sorting of documentation for better reading.

Configuration and Compilation

  • Properly populate osvers on Dragonfly BSD when the hostname isn't set.

  • Fix typos for C99 macro name PRIX64.

Testing

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

Platform Support

Platform-Specific Notes

DragonflyBSD

Skip tests to workaround an apparent bug in setproctitle(). [github #19894]

FreeBSD

Replace the first part of archname with `uname -p` [github #19791]

Synology

Update Synology Readme for DSM 7.

Solaris

Avoid some compiler and compilation issues on NetBSD/Solaris from regexec.c and regcomp.c.

Windows

Fix win32 memory alignment needed for gcc-12 from vmem.h.

Internal Changes

  • New formatting symbols were added for printing values declared as U32 or I32:

    I32df -- Like %d
    U32of -- Like %o
    U32uf -- Like %u
    U32xf -- Like %x
    U32Xf -- Like %X

    These are used in the same way already existing similar symbols, such as IVdf, are used. See "I/O Formats" in perlapi.

  • new 'HvHasAUX' macro

  • regexec.c: Add some branch predictions reorder conds

  • locale: Change macro name to be C conformant

  • Rename the PADNAMEt_* constants to PADNAMEf_*

  • Changes all the API macros that retrieve a PV into a call to an inline function so as to evaluate the parameter just once.

  • regexec.c: multiple code refactor to make the code more readable

  • perl.h: Change macro name to be C conformant (remove leading _ from NOT_IN_NUMERIC macros)

  • regcomp.h: add new BITMAP_BIT macro in addition to the existing BITMAP_BYTE and BITMAP_TEST ones.

  • Create new regnode type ANYOFH. populate_ANYOF_from_invlist was renamed to populate_bitmap_from_invlist

  • regex: Refactor bitmap vs non-bitmap of qr/[]/

  • regcomp.c: add new functions to convert from an inversion list to a bitmap (and vice versa) populate_bitmap_from_invlist and populate_invlist_from_bitmap.

  • Add newAVav() to create an AV from an existing AV. Add newAVhv() to create an AV using keys and values from an existing HV.

  • Fix definition of Perl_atof.

  • Fix undefined behavior with overflow related OPTIMIZE_INFTY and delta in regcomp.c.

  • Fix regnode pointer alignment issue in <regcomp.h>.

Selected Bug Fixes

  • Disabling the bareword_filehandles feature no longer treats print Class-method> as an error. [github #19704]

  • When a Perl subroutine tail-calls an XS subroutine using goto &xs_sub, the XS subroutine can now correctly determine its calling context. Previously it was always reported as scalar.

    In addition, where the Perl subroutine is freed at the same time:

        sub foo { *foo = sub {}; goto &xs_sub }

    this formerly could lead to crashes if the XS subroutine tried to use the value of PL_op, since this was being set to NULL. This is now fixed.

    [github #19936]

  • setsockopt() now uses the mechanism added in 5.36 to better distinguish between numeric and string values supplied as the OPTVAL parameter. [github #18761]

  • 4-argument select() now rejects strings with code points above 255. Additionally, for code points 128-255, this operator will now always give the corresponding octet to the OS, regardless of how Perl stores such code points in memory. (Previously Perl leaked its internal string storage to the OS.) [github #19882]

  • Fix panic issue from val {} inside /(?{...})/ [github #19390]

  • Fix multiple compiler warnings from regexp.c., locale.c [github #19915]

  • Fix querying locale without LC_NUMERIC on platform [github #19890]

  • Prevent undefined behaviour in S_maybe_multideref().

  • Avoid signed integer overflow in use integer ops.

  • Avoid adding an offset to a NULL pointer in hv_delete_common.

Acknowledgements

Perl 5.37.2 represents approximately 4 weeks of development since Perl 5.37.1 and contains approximately 35,000 lines of changes across 440 files from 24 authors.

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

Branislav Zahradník, Craig A. Berry, Dagfinn Ilmari Mannsåker, Dan Kogai, David Mitchell, Felipe Gasper, Graham Knop, H.Merijn Brand, James E Keenan, James Raspass, Karl Williamson, Kenichi Ishigaki, Leon Timmermans, Loren Merritt, Marcel Telka, Matthew Horsfall, Nicolas R, Paul Evans, Ricardo Signes, Richard Leach, Sisyphus, TAKAI Kousuke, 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.