NAME

DESCRIPTION

This document describes differences between the 5.27.7 release and the 5.27.8 release.

If you are upgrading from an earlier release such as 5.27.6, first read perl5277delta, which describes differences between 5.27.6 and 5.27.7.

Core Enhancements

Close-on-exec flag set atomically

When opening a file descriptor, perl now generally opens it with its close-on-exec flag already set, on platforms that support doing so. This improves thread safety, because it means that an exec initiated by one thread can no longer cause a file descriptor in the process of being opened by another thread to be accidentally passed to the executed program.

Additionally, perl now sets the close-on-exec flag more reliably, whether it does so atomically or not. Most file descriptors were getting the flag set, but some were being missed.

Mixed Unicode scripts are now detectable

A mixture of scripts, such as Cyrillic and Latin, in a string is often the sign of a spoofing attack. A new regular expression construct now allows for easy detection of these. For example, you can say

qr/(?script_run: \d+ \b )/x

And the digits matched will all be from the same set of 10. You won't get a look-alike digit from a different script that has a different value than what it appears to be.

String- and number-specific bitwise ops are no longer experimental

The new string-specific (&. |. ^. ~.) and number-specific (& | ^ ~) bitwise operators introduced in Perl 5.22 are no longer experimental. Because the number-specific ops are spelled the same way as the existing operators that choose their behaviour based on their operands, these operators must still be enabled via the "bitwise" feature, in either of these two ways:

use feature "bitwise";
use v5.28; # "bitwise" now included

They are also now enabled by the -E command-line switch.

The "bitwise" feature no longer emits a warning. Existing code that disables the "experimental::bitwise" warning category that the feature previously used will continue to work.

One caveat that module authors ought to be aware of is that the numeric operators now pass a fifth TRUE argument to overload methods. Any methods that check the number of operands may croak if they do not expect so many. XS authors in particular should be aware that this:

SV *
bitop_handler (lobj, robj, swap)

may need to be changed to this:

SV *
bitop_handler (lobj, robj, swap, ...)

Incompatible Changes

Smartmatch and switch reversion

The changes to the experimental smart match operator (~~) and switch (given/when) constructs that were made in Perl 5.27.7 have been reverted due to the extent of the trouble caused to CPAN modules. It is expected that smartmatch will be changed again in the future, but preceded by some kind of explicit deprecation.

Subroutine attribute and signature order

The experimental subroutine signatures feature has been changed so that subroutine attributes must now come before the signature rather than after. This is because attributes like :lvalue can affect the compilation of code within the signature, for example:

Deprecations

Use of code points over 0xFF in string bitwise operators

Some uses of these already are illegal after a previous deprecation cycle. This deprecates the remaining uses. See perldeprecation.

Use of unescaped "{" immediately after a "(" in regular expression patterns

Using unescaped left braces is officially deprecated everywhere, but it is not enforced in contexts where their use does not interfere with expected extensions to the language. A deprecation is added in this release when the brace appears immediately after an opening parenthesis. Before this, even if the brace was part of a legal quantifier, it was not interpreted as such, but as the literal characters, unlike other quantifiers that follow a "(" which are considered errors. Now, their use will raise a deprecation message, unless turned off.

Performance Enhancements

The performance of pattern matching [[:ascii:]] and [[:^ascii:]] has been improved significantly except on EBCDIC platforms.

Changes to Existing Diagnostics

Testing

Tests were added and changed to reflect the other additions and changes in this release. Furthermore, these significant changes were made:

Allow override of watchdog timer count in re/pat_psycho.t.

This test can take a long time to run, so there is a timer to keep this in check (currently, 5 minutes). This commit adds checking the environment variable PERL_TEST_TIME_OUT_FACTOR; if set, the time out setting is multiplied by its value.

Platform Support

Platform-Specific Notes

Cygwin

A build with the quadmath library can now be done on Cygwin.

FreeBSD

FreeBSD's /usr/share/mk/sys.mk specifies -O2 for architectures other than arm and mips. By default, compile perl with the same optimization levels.

tr/non_utf8/long_non_utf8/c could give the wrong results when the length of the replacement character list was greater than 0x7fff.

tr/non_utf8/non_utf8/cd failed to add the implied \x{100}-\x{7fffffff} to the search character list.

Known Problems

The bugfix for [perl #2754] in Perl 5.27.7 turned out to cause so much trouble on CPAN [perl #132577] that it is being postponed. The bug has been restored, so exit(0) in a UNITCHECK or CHECK block now once again permits the main program to run, and exit(0) in a BEGIN block once again permits INIT blocks to run before exiting. The bug will be fixed again for Perl 5.30.

Acknowledgements

Perl 5.27.8 represents approximately 4 weeks of development since Perl 5.27.7 and contains approximately 33,000 lines of changes across 290 files from 17 authors.

Excluding auto-generated files, documentation and release tools, there were approximately 25,000 lines of changes to 160 .pm, .t, .c and .h files.

Perl continues to flourish into its third decade thanks to a vibrant community of users and developers. The following people are known to have contributed the improvements that became Perl 5.27.8:

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 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.