You are viewing the version of this documentation from Perl 5.41.1. This is a development version of Perl.

CONTENTS

NAME

perl5300delta - what is new for perl v5.30.0

DESCRIPTION

This document describes differences between the 5.28.0 release and the 5.30.0 release.

If you are upgrading from an earlier release such as 5.26.0, first read perl5280delta, which describes differences between 5.26.0 and 5.28.0.

Notice

sv_utf8_(downgrade|decode) are no longer marked as experimental. [GH #16822].

Core Enhancements

Limited variable length lookbehind in regular expression pattern matching is now experimentally supported

Using a lookbehind assertion (like (?<=foo?) or (?<!ba{1,9}r) previously would generate an error and refuse to compile. Now it compiles (if the maximum lookbehind is at most 255 characters), but raises a warning in the new experimental::vlb warnings category. This is to caution you that the precise behavior is subject to change based on feedback from use in the field.

See "(?<=pattern)" in perlre and "(?<!pattern)" in perlre.

The upper limit "n" specifiable in a regular expression quantifier of the form "{m,n}" has been doubled to 65534

The meaning of an unbounded upper quantifier "{m,}" remains unchanged. It matches 2**31 - 1 times on most platforms, and more on ones where a C language short variable is more than 4 bytes long.

Unicode 12.1 is supported

Because of a change in Unicode release cycles, Perl jumps from Unicode 10.0 in Perl 5.28 to Unicode 12.1 in Perl 5.30.

For details on the Unicode changes, see https://www.unicode.org/versions/Unicode11.0.0/ for 11.0; https://www.unicode.org/versions/Unicode12.0.0/ for 12.0; and https://www.unicode.org/versions/Unicode12.1.0/ for 12.1. (Unicode 12.1 differs from 12.0 only in the addition of a single character, that for the new Japanese era name.)

The Word_Break property, as in past Perl releases, remains tailored to behave more in line with expectations of Perl users. This means that sequential runs of horizontal white space characters are not broken apart, but kept as a single run. Unicode 11 changed from past versions to be more in line with Perl, but it left several white space characters as causing breaks: TAB, NO BREAK SPACE, and FIGURE SPACE (U+2007). We have decided to continue to use the previous Perl tailoring with regards to these.

Wildcards in Unicode property value specifications are now partially supported

You can now do something like this in a regular expression pattern

qr! \p{nv= /(?x) \A [0-5] \z / }!

which matches all Unicode code points whose numeric value is between 0 and 5 inclusive. So, it could match the Thai or Bengali digits whose numeric values are 0, 1, 2, 3, 4, or 5.

This marks another step in implementing the regular expression features the Unicode Consortium suggests.

Most properties are supported, with the remainder planned for 5.32. Details are in "Wildcards in Property Values" in perlunicode.

qr'\N{name}' is now supported

Previously it was an error to evaluate a named character \N{...} within a single quoted regular expression pattern (whose evaluation is deferred from the normal place). This restriction is now removed.

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.

It is now possible to compile perl to always use thread-safe locale operations

Previously, these calls were only used when the perl was compiled to be multi-threaded. To always enable them, add

-Accflags='-DUSE_THREAD_SAFE_LOCALE'

to your Configure flags.

Eliminate opASSIGN macro usage from core

This macro is still defined but no longer used in core

-Drv now means something on -DDEBUGGING builds

Now, adding the verbose flag (-Dv) to the -Dr flag turns on all possible regular expression debugging.

Incompatible Changes

Assigning non-zero to $[ is fatal

Setting $[ to a non-zero value has been deprecated since Perl 5.12 and now throws a fatal error. See "Assigning non-zero to $[ is fatal" in perldeprecation.

Delimiters must now be graphemes

See "Use of unassigned code point or non-standalone grapheme for a delimiter." in perldeprecation

Some formerly deprecated uses of an unescaped left brace "{" in regular expression patterns are now illegal

But to avoid breaking code unnecessarily, most instances that issued a deprecation warning, remain legal and now have a non-deprecation warning raised. See "Unescaped left braces in regular expressions" in perldeprecation.

Previously deprecated sysread()/syswrite() on :utf8 handles is now fatal

Calling sysread(), syswrite(), send() or recv() on a :utf8 handle, whether applied explicitly or implicitly, is now fatal. This was deprecated in perl 5.24.

There were two problems with calling these functions on :utf8 handles:

[GH #14839].

my() in false conditional prohibited

Declarations such as my $x if 0 are no longer permitted.

[GH #16702].

Fatalize $* and $#

These special variables, long deprecated, now throw exceptions when used.

[GH #16718].

Fatalize unqualified use of dump()

The dump() function, long discouraged, may no longer be used unless it is fully qualified, i.e., CORE::dump().

[GH #16719].

Remove File::Glob::glob()

The File::Glob::glob() function, long deprecated, has been removed and now throws an exception which advises use of File::Glob::bsd_glob() instead.

[GH #16721].

pack() no longer can return malformed UTF-8

It croaks if it would otherwise return a UTF-8 string that contains malformed UTF-8. This protects against potential security threats. This is considered a bug fix as well. [GH #16035].

There are several sets of digits in the Common script. [0-9] is the most familiar. But there are also [\x{FF10}-\x{FF19}] (FULLWIDTH DIGIT ZERO - FULLWIDTH DIGIT NINE), and several sets for use in mathematical notation, such as the MATHEMATICAL DOUBLE-STRUCK DIGITs. Any of these sets should be able to appear in script runs of, say, Greek. But the design of 5.30 overlooked all but the ASCII digits [0-9], so the design was flawed. This has been fixed, so is both a bug fix and an incompatibility. [GH #16704].

All digits in a run still have to come from the same set of ten digits.

JSON::PP enables 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.

Deprecations

In XS code, use of various macros dealing with UTF-8

This deprecation was scheduled to become fatal in 5.30, but has been delayed to 5.32 due to problems that showed up with some CPAN modules. For details of what's affected, see perldeprecation.

Performance Enhancements

Modules and Pragmata

Updated Modules and Pragmata

Removed Modules and Pragmata

The following modules will be removed from the core distribution in a future release, and will at that time need to be installed from CPAN. Distributions on CPAN which require these modules will need to list them as prerequisites.

The core versions of these modules will now issue "deprecated"-category warnings to alert you to this fact. To silence these deprecation warnings, install the modules in question from CPAN.

Note that these are (with rare exceptions) fine modules that you are encouraged to continue to use. Their disinclusion from core primarily hinges on their necessity to bootstrapping a fully functional, CPAN-capable Perl installation, not usually on concerns over their design.

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.

perlapi

perlop

perlreapi, perlvar

perlfunc

perlreref

perllocale

perlrecharclass

perlvar

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

Utility Changes

xsubpp

Configuration and Compilation

Testing

Platform Support

Platform-Specific Notes

HP-UX 11.11

An obscure problem in pack() when compiling with HP C-ANSI-C has been fixed by disabling optimizations in pp_pack.c.

Mac OS X

Perl's build and testing process on Mac OS X for -Duseshrplib builds is now compatible with Mac OS X System Integrity Protection (SIP).

SIP prevents binaries in /bin (and a few other places) being passed the DYLD_LIBRARY_PATH environment variable. For our purposes this prevents DYLD_LIBRARY_PATH from being passed to the shell, which prevents that variable being passed to the testing or build process, so running perl couldn't find libperl.dylib.

To work around that, the initial build of the perl executable expects to find libperl.dylib in the build directory, and the library path is then adjusted during installation to point to the installed library.

[GH #15057].

Minix3

Some support for Minix3 has been re-added.

Cygwin

Cygwin doesn't make cuserid visible.

Win32 Mingw

C99 math functions are now available.

Windows
  • The USE_CPLUSPLUS build option which has long been available in win32/Makefile (for nmake) and win32/makefile.mk (for dmake) is now also available in win32/GNUmakefile (for gmake).

  • The nmake makefile no longer defaults to Visual C++ 6.0 (a very old version which is unlikely to be widely used today). As a result, it is now a requirement to specify the CCTYPE since there is no obvious choice of which modern version to default to instead. Failure to specify CCTYPE will result in an error being output and the build will stop.

    (The dmake and gmake makefiles will automatically detect which compiler is being used, so do not require CCTYPE to be set. This feature has not yet been added to the nmake makefile.)

  • sleep() with warnings enabled for a USE_IMP_SYS build no longer warns about the sleep timeout being too large. [GH #16631].

  • Support for compiling perl on Windows using Microsoft Visual Studio 2019 (containing Visual C++ 14.2) has been added.

  • socket() now sets $! if the protocol, address family and socket type combination is not found. [GH #16849].

  • The Windows Server 2003 SP1 Platform SDK build, with its early x64 compiler and tools, was accidentally broken in Perl 5.27.9. This has now been fixed.

Internal Changes

Selected Bug Fixes

Acknowledgements

Perl 5.30.0 represents approximately 11 months of development since Perl 5.28.0 and contains approximately 620,000 lines of changes across 1,300 files from 58 authors.

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

Aaron Crane, Abigail, Alberto Simões, Alexandr Savca, Andreas König, Andy Dougherty, Aristotle Pagaltzis, Brian Greenfield, Chad Granum, Chris 'BinGOs' Williams, Craig A. Berry, Dagfinn Ilmari Mannsåker, Dan Book, Dan Dedrick, Daniel Dragan, Dan Kogai, David Cantrell, David Mitchell, Dominic Hargreaves, E. Choroba, Ed J, Eugen Konkov, François Perrad, Graham Knop, Hauke D, H.Merijn Brand, Hugo van der Sanden, Jakub Wilk, James Clarke, James E Keenan, Jerry D. Hedden, Jim Cromie, John SJ Anderson, Karen Etheridge, Karl Williamson, Leon Timmermans, Matthias Bethke, Nicholas Clark, Nicolas R., Niko Tyni, Pali, Petr Písař, Phil Pearl (Lobbes), Richard Leach, Ryan Voots, Sawyer X, Shlomi Fish, Sisyphus, Slaven Rezic, Steve Hay, Sullivan Beck, Tina Müller, Tomasz Konojacki, Tom Wyant, Tony Cook, Unicode Consortium, Yves Orton, Zak B. Elep.

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 most of the (very much appreciated) contributors who reported issues to the Perl bug tracker. Noteworthy in this release were the large number of bug fixes made possible by Sergey Aleynikov's high quality perlbug reports for issues he discovered by fuzzing with AFL.

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