PERL5340DELTA(1) | Perl Programmers Reference Guide | PERL5340DELTA(1) |
perl5340delta - what is new for perl v5.34.0
This document describes differences between the 5.32.0 release and the 5.34.0 release.
If you are upgrading from an earlier release such as 5.30.0, first read perl5320delta, which describes differences between 5.30.0 and 5.32.0.
An initial experimental attempt at providing "try"/"catch" notation has been added.
use feature 'try'; try { a_function(); } catch ($e) { warn "An error occurred: $e"; }
For more information, see "Try Catch Exception Handling" in perlsyn.
An empty lower bound is now accepted for regular expression quantifiers, like "{,3}".
(in double-quotish contexts and regular expression patterns)
This means you can write things like "\x{ FFFC }" if you like. This applies to all such constructs, namely "\b{}", "\g{}", "\k{}", "\N{}", "\o{}", and "\x{}"; as well as the regular expression quantifier "{m,n}". "\p{}" and "\P{}" retain their already-existing, even looser, rules mandated by the Unicode standard (see "Properties accessible through \p{} and \P{}" in perluniprops).
This ability is in effect regardless of the presence of the "/x" regular expression pattern modifier.
Additionally, the comma in a regular expression braced quantifier may have blanks (tabs or spaces) before and/or after the comma, like "qr/a{ 5, 7 }/".
It is now possible to specify octal literals with "0o" prefixes, as in "0o123_456", parallel to the existing construct to specify hexadecimal literal "0xddddd" and binary literal "0bddddd". Also, the builtin "oct()" function now accepts this new syntax.
See "Scalar value constructors" in perldata and "oct EXPR" in perlfunc.
This module is a generalization of the "pl2bat" script. It being a script has led to at least two forks of this code; this module will unify them under one implementation with tests.
New "PERL_VERSION_*" comparison macros are now available.
"ppport.h --api-info" no longer includes non-API info unless that is the only match
Added the default enabled "bareword_filehandles" feature.
A new multidimensional feature has been added, which is enabled by default but allows turning off multi-dimensional array emulation.
New functions and compatibility for newer versions of GDBM. [GH #18435 <https://github.com/Perl/perl5/pull/18435>]
IO::Socket now stores error messages in $IO::Socket::errstr, in addition to in $@.
The "error" method now reports the error state for both the input and output streams for sockets and character devices. Similarly "clearerr" now clears the error state for both streams.
A spurious error reported for regular file handles has been fixed in IO::Handle. [GH #18019 <https://github.com/Perl/perl5/issues/18019>]
bin/zipdetails version 2.02
POSIX::signbit() behaviour has been improved. [GH #18441 <https://github.com/Perl/perl5/pull/18441>]
Documentation for "asctime" clarifies that the result is always in English. (Use "strftime" for a localized result.)
(See under "Internal Changes" for more information.)
Fix calling convention for "PFNRegGetValueA".
Added "Win32::IsSymlinkCreationAllowed()", "Win32::IsDeveloperModeEnabled()", and "Win32::GetProcessPrivileges()".
Removed old code for versions before Windows 2000.
perldocstyle
This document is a guide for the authorship and maintenance of the documentation that ships with Perl.
perlgov
This document describes the goals, scope, system, and rules for Perl's new governance model.
Other pod files, most notably perlpolicy, were amended to reflect its adoption.
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:
perlapi
perlcommunity
perldebguts
perldiag
perlfaq
perlfunc
perlgit
perlguts
perlop
perlpacktut
perlsyn
perlunifaq
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 Errors
This accompanies the new bareword_filehandles feature.
This accompanies the new multidimensional feature.
New Warnings
Attempts to put wide characters into environment variable keys via %ENV now provoke this warning.
An error was encountered in handling a user-defined property ("User-Defined Character Properties" in perlunicode). These are programmer written subroutines, hence subject to errors that may prevent them from compiling or running.
A user-defined property ("User-Defined Character Properties" in perlunicode) can depend on the definitions of other user-defined properties. If the chain of dependencies leads back to this property, infinite recursion would occur, were it not for the check that raised this error.
The first time a user-defined property ("User-Defined Character Properties" in perlunicode) is used, its definition is looked up and converted into an internal form for more efficient handling in subsequent uses. There could be a race if two or more threads tried to do this processing nearly simultaneously.
You specified to use a property within the "\p{...}" which was a syntactically valid user-defined property, but no definition was found for it
Subroutine argument-count mismatch errors now include the number of given and expected arguments.
Subroutine argument-count mismatch errors now include the number of given and expected arguments.
This warning was only issued for positive too-large values when incrementing, and only for negative ones when decrementing. It is now issued for both positive or negative too-large values. [GH #18333 <https://github.com/Perl/perl5/issues/18333>]
This error was incorrectly produced in some cases involving nested lookarounds. This has been fixed. [GH #18123 <https://github.com/Perl/perl5/issues/18123>]
This warning may now include the array or hash index when the uninitialized value is the result of an element not found. This will only happen if the index is a simple non-magical variable.
This option controls the minimum length a command must be to get stored in history. Traditionally, this has been fixed at 2. Changes to the debugger are often perilous, and new bugs should be reported so the debugger can be debugged.
The "i $var" and "l $var" commands work again with lexical variables.
stadtx support has been entirely removed. Previously, it could be requested with "PERL_HASH_FUNC_STADTX", and was default in 64-bit builds. It has been replaced with SipHash. SipHash has been more rigorously reviewed than stadtx.
A new probe checks for buggy libc implementations of the "gcvt"/"qgcvt" functions. [GH #18170 <https://github.com/Perl/perl5/issues/18170>]
Perl can now be built with strict on by default (using the configuration option "-Dusedefaultstrict".
These strict defaults do not apply when "perl" is run via "-e" or "-E".
This setting provides a diagnostic mechanism intended for development purposes only and is thus undefined by default.
On several systems the attempt to determine if we need "va_copy" or similar results in a SIGBUS instead of the expected SIGSEGV, which previously caused a core dump.
[GH #18148 <https://github.com/Perl/perl5/issues/18148>]
Tests were added and changed to reflect the other additions and changes in this release. Furthermore, these significant changes were made:
PERL_TEST_HARNESS_ASAP=1
while running the test suite.
Building with mingw.org compilers (version 3.4.5 or later) using mingw runtime versions < 3.22 now works again. This was broken in Perl 5.31.4.
Building with mingw.org compilers (version 3.4.5 or later) using mingw runtime versions >= 3.21 now works (for compilers up to version 5.3.0).
Makefile.mk, and thus support for dmake, has been removed. It is still possible to build Perl on Windows using nmake (Makefile) and GNU make (GNUmakefile). [GH #18511 <https://github.com/Perl/perl5/pull/18511>]
perl can now be built with "USE_QUADMATH" on MS Windows using (32-bit and 64-bit) mingw-w64 ports of gcc. [GH #18465 <https://github.com/Perl/perl5/pull/18465>]
The pl2bat.pl utility now needs to "use ExtUtils::PL2Bat". This could cause failures in parallel builds.
Windows now supports symlink() and readlink(), and lstat() is no longer an alias for stat(). [GH #18005 <https://github.com/Perl/perl5/issues/18005>].
Unlike POSIX systems, creating a symbolic link on Windows requires either elevated privileges or Windows 10 1703 or later with Developer Mode enabled.
stat(), including "stat FILEHANDLE", and lstat() now uses our own implementation that populates the device "dev" and inode numbers "ino" returned rather than always returning zero. The number of links "nlink" field is now always populated.
"${^WIN32_SLOPPY_STAT}" previously controlled whether the "nlink" field was populated requiring a separate Windows API call to fetch, since "nlink" and the other information required for "stat()" is now retrieved in a single API call.
The "-r" and "-w" operators now return true for the "STDIN", "STDOUT" and "STDERR" handles. Unfortunately it still won't return true for duplicates of those handles. [GH #8502 <https://github.com/Perl/perl5/issues/8502>].
The times returned by stat() and lstat() are no longer incorrect across Daylight Savings Time adjustments. [GH #6080 <https://github.com/Perl/perl5/issues/6080>].
"-x" on a filehandle should now match "-x" on the corresponding filename on Vista or later. [GH #4145 <https://github.com/Perl/perl5/issues/4145>].
"-e '"'" no longer incorrectly returns true. [GH #12431 <https://github.com/Perl/perl5/issues/12431>].
The same manifest is now used for Visual C++ and gcc builds.
Previously, MSVC builds were using the /manifestdependency flag instead of embedding perlexe.manifest, which caused issues such as "GetVersionEx()" returning the wrong version number on Windows 10.
This applies to "PerlIO_printf()", "croak()", "warn()", "sv_catpvf()" and their variants.
Previously in "quadmath" builds, code like:
PerlIO_printf(PerlIO_stderr(), "%g", somedouble);
or
PerlIO_printf(PerlIO_stderr(), "%Lg", somelongdouble);
would erroneously throw an exception "panic: quadmath invalid format ...", since the code added for quadmath builds assumed "NV"s were the only floating point format passed into these functions.
This code would also process the standard C long double specifier "L" as if it expected an "NV" ("__float128" for quadmath builds), resulting in undefined behaviour.
These functions now correctly accept doubles, long doubles and NVs.
And also, shifting INT_MIN bits used to yield the shiftee unchanged (treated as 0-bit shift instead of negative shift).
Previously if "NV == long double", now it is supported on all platforms that have long doubles. In particular that means it is now also supported on quadmath platforms.
Constant folding of chained comparison op trees could fail under certain conditions, causing perl to crash. As a quick fix, constant folding is now skipped for such op trees. This also addresses [GH #17917 <https://github.com/Perl/perl5/issues/17917>].
Buggy libc implementations of the "gcvt" and "qgcvt" functions caused "(s)printf" to incorrectly truncate %g formatted numbers. A new Configure probe now checks for this, with the result that the libc "sprintf" will be used in place of "gcvt" and "qgcvt".
Tests added as part of this fix also revealed related problems in some Windows builds. The makefiles for MINGW builds on Windows have thus been adjusted to use "USE_MINGW_ANSI_STDIO" by default, ensuring that they also provide correct "(s)printf" formatting of numbers.
The lexical topic feature experiment was removed in Perl v5.24 and declaring "my $_" became a compile time error. However, it was previously still possible to make this declaration if "use utf8" was in effect.
Fuzzing triggered an assertion failure in the regexp engine when too many characters were copied into a buffer.
[GH #18096 <https://github.com/Perl/perl5/issues/18096>]
None
None
Kent Fredric (KENTNL) passed away in February 2021. A native of New Zealand and a self-described "huge geek," Kent was the author or maintainer of 178 CPAN distributions, the Perl maintainer for the Gentoo Linux distribution and a contributor to the Perl core distribution. He is mourned by his family, friends and open source software communities worldwide.
Perl 5.34.0 represents approximately 11 months of development since Perl 5.32.0 and contains approximately 280,000 lines of changes across 2,100 files from 78 authors.
Excluding auto-generated files, documentation and release tools, there were approximately 150,000 lines of changes to 1,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.34.0:
Aaron Crane, Adam Hartley, Andy Dougherty, Ben Cornett, Branislav Zahradnik, brian d foy, Chris 'BinGOs' Williams, Christian Walde (Mithaldu), Craig A. Berry, Dagfinn Ilmari Mannsaaker, Dan Book, Daniel Boehmer, Daniel Lauegt, Dan Kogai, David Cantrell, David Mitchell, Dominic Hamon, E. Choroba, Ed J, Eric Herman, Eric Lindblad, Eugene Alvin Villar, Felipe Gasper, Giovanni Tataranni, Graham Knop, Graham Ollis, Hauke D, H.Merijn Brand, Hugo van der Sanden, Ichinose Shogo, Ivan Baidakou, Jae Bradley, James E Keenan, Jason McIntosh, jkahrman, John Karr, John Lightsey, Kang-min Liu, Karen Etheridge, Karl Williamson, Keith Thompson, Leon Timmermans, Marc Reisner, Marcus Holland-Moritz, Max Maischein, Michael G Schwern, Nicholas Clark, Nicolas R., Paul Evans, Petr PisaX, raiph, Renee Baecker, Ricardo Signes, Richard Leach, Romano, Ryan Voots, Samanta Navarro, Samuel Thibault, Sawyer X, Scott Baker, Sergey Poznyakoff, Sevan Janiyan, Shirakata Kentaro, Shlomi Fish, Sisyphus, Sizhe Zhao, Steve Hay, TAKAI Kousuke, Thibault Duponchelle, Todd Rinaldo, Tomasz Konojacki, Tom Hukins, Tom Stellard, Tony Cook, vividsnow, Yves Orton, Zakariyya Mughal, XXXXXX XXXXXXXX.
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.
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.
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.
2021-05-20 | perl v5.34.0 |