NAME
perl5298delta - what is new for perl v5.29.8
DESCRIPTION
This document describes differences between the 5.29.7 release and the 5.29.8 release.
If you are upgrading from an earlier release such as 5.29.6, first read perl5297delta, which describes differences between 5.29.6 and 5.29.7.
Notice
sv_utf8_(downgrade|decode) are no longer marked as experimental [perl #133788]
Core Enhancements
Use faster method to convert to UTF-8
There is a special inline function that's used when converting a single byte to UTF-8, that is faster than the more general one used prior to this commit.
Turkic UTF-8 locales are now seamlessly supported
Turkic languages have different casing rules than other languages for the characters "i"
and "I"
. The uppercase of "i"
is LATIN CAPITAL LETTER I WITH DOT ABOVE (U+0130); and the lowercase of "I"
is LATIN SMALL LETTER DOTLESS I (U+0131). Unicode furnishes alternate casing rules for use with Turkic languages. Previously, Perl ignored these, but now, it uses them when it detects that it is operating under a Turkic UTF-8 locale.
Eliminate opASSIGN macro usage from core
This macro is still defined but no longer used in core
Incompatible Changes
JSON::PP enable allow_nonref by default
As JSON::XS 4.0 changed its policy and enabled allow_nonref by default, JSON::PP also enabled allow_nonref by default.
Performance Enhancements
Eliminate recursion from finalize_op() [perl #108276]
Modules and Pragmata
Updated Modules and Pragmata
B has been upgraded from version 1.75 to 1.76.
deprecate has been upgraded from version 0.03 to 0.04.
Devel::PPPort has been upgraded from version 3.43 to 3.44.
Encode has been upgraded from version 2.97 to 3.00.
ExtUtils::Miniperl has been upgraded from version 1.08 to 1.09.
IO has been upgraded from version 1.39 to 1.40.
JSON::PP has been upgraded from version 2.97001 to 4.00. JSON::PP as JSON::XS 4.0 enable allow_nonref by default
Module::CoreList has been upgraded from version 5.20190120 to 5.20190220.
Changes to B::Op_private and Config
Module::Load has been upgraded from version 0.32 to 0.34.
Net::Ping has been upgraded from version 2.62 to 2.71.
perlfaq has been upgraded from version 5.20180915 to 5.20190126.
POSIX has been upgraded from version 1.86 to 1.87.
Test::Simple has been upgraded from version 1.302160 to 1.302162.
XS::APItest has been upgraded from version 0.99 to 1.00.
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:
perlfunc
Try to clarify that
ref(qr/xx/)
returnsRegexp
rather thanREGEXP
and why. [perl #133751]
perllocale
There are actually two slightly different types of UTF-8 locales: one for Turkic languages and one for everything else. Starting in Perl v5.30, Perl seamlessly handles both types.
perlrecharclass
Added a note for the ::xdigit:: character class.
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.
Changes to Existing Diagnostics
Type of arg %d to %s must be %s (not %s)
Attempts to push, pop, etc on a hash or glob now produce this message rather than complaining that they no longer work on scalars. [perl #130367]
Configuration and Compilation
Improve detection of memrchr, strlcat, and strlcpy
Improve Configure detection of memmem() [perl #133760].
Fix -DPERL_GLOBAL_STRUCT_PRIVATE build option.
Multiple improvements and fixes for -DPERL_GLOBAL_STRUCT build option.
Testing
Tests were added and changed to reflect the other additions and changes in this release. Furthermore, these significant changes were made:
t/lib/croak/op [perl #130367]
separate error for push etc on hash/glob
t/op/svleak.t [perl #133660]
add test for goto &sub in overload leaking
Split t/re/fold_grind.t into multiple test files
Platform-Specific Notes
- Windows
-
socket() now sets
$!
if the protocol, address family and socket type combination is not found. [perl #133853]
Internal Changes
It is now forbidden to malloc more than
PTRDIFF_T_MAX
bytes. Much code (including C optimizers) assumes that all data structures will not be larger than this, so this catches such attempts before overflow happens.
Selected Bug Fixes
Regular expression matching no longer leaves stale UTF-8 length magic when updating
$^R
. This could result inlength($^R)
returning an incorrect value.Fix a qr/[...]/ bug introduced in v5.29.7
Using /il should not result in looking for a [:posix:] class that matches the code points given.
Reduce recursion on ops [perl #108276]
This can prevent stack overflow when processing extremely deep op trees.
Avoid leak in multiconcat with overloading. [perl #133789]
The handling of user-defined
\p{}
properties (see "User-Defined Character Properties" in perlunicode) has been rewritten to be in C (instead of Perl). This speeds things up, but in the process several inconsistencies and bug fixes are made.A few error messages have minor wording changes. This is essentially because the new way is integrated into the regex error handling mechanism that marks the position in the input at which the error occurred. That was not possible previously. The messages now also contain additional back-trace-like information in case the error occurs deep in nested calls.
A user-defined property is implemented as a perl subroutine with certain highly constrained naming conventions. It was documented previously that the sub would be in the current package if the package was unspecified. This turned out not to be true in all cases, but now it is.
All recursive calls are treated as infinite recursion. Previously they would cause the interpreter to panic. Now, they cause the regex pattern to fail to compile.
Similarly, any other error likely would lead to a panic; now to just the pattern failing to compile.
The old mechanism did not detect illegal ranges in the definition of the property. Now, the range max must not be smaller than the range min. Otherwise, the pattern fails to compile.
The intention was to have each sub called only once during the lifetime of the program, so that a property's definition is immutable. This was relaxed so that it could be called once for all /i compilations, and potentially a second time for non-/i (the sub is passed a parameter indicating which). However, in practice there were instances when this was broken, and multiple calls were possible. Those have been fixed. Now (besides the /i,non-/i cases) the only way a sub can be called multiple times is if some component of it has not been defined yet. For example, suppose we have sub IsA() whose definition is known at compile time, and it in turn calls isB() whose definition is not yet known. isA() will be called each time a pattern it appears in is compiled. If isA() also calls isC() and that definition is known, isC() will be called just once.
There were some races and very long hangs should one thread be compiling the same property as another simultaneously. These have now been fixed.
Assertion failure in compiling invalid regex pattern [perl #133767]
This bug was introduced in the 5.29 series, so this should not be in the perldelta for 5.30.
Null pointer deref [perl #133770]
This bug was introduced in the 5.29 series, so this should not be in the perldelta for 5.30.
Acknowledgements
Perl 5.29.8 represents approximately 5 weeks of development since Perl 5.29.7 and contains approximately 13,000 lines of changes across 290 files from 18 authors.
Excluding auto-generated files, documentation and release tools, there were approximately 9,500 lines of changes to 210 .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.29.8:
Abigail, Andreas König, Andy Dougherty, Aristotle Pagaltzis, Chris 'BinGOs' Williams, Dagfinn Ilmari Mannsåker, Dan Kogai, David Mitchell, Jakub Wilk, James E Keenan, Karen Etheridge, Karl Williamson, Nicolas R., Pali, Sawyer X, Shlomi Fish, Tomasz Konojacki, Tony Cook.
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 analyzed 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.