NAME

perldelta - 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. [perl #133788].

Core Enhancements

Unicode 12.1 is supported

For details, see https://www.unicode.org/versions/Unicode12.1.0/.

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.

As of July 2018, another aspect of Unicode 11.0 is causing problems, and that is the changing the Georgian script to have both lower and uppercase letters. It turns out that many devices do not have fonts installed that can display the new uppercase letters, and people using Georgian are finding their text more or less illegible. It is being suggested that implementations delay their adoption of this portion of 11.0.

But since the next stable release of Perl is almost a year away, this aspect of 11.0 is being left in, with the option to back it out if things haven't improved by that time, or if we get too many complaints about the development release being unusable for Georgian users.

Unicode 12.1 differs from 12.0 only in the addition of a single character, that for the new Japanese era name.

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.

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.

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.

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 which have numeric value is between 0 and 5 inclusive.

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.

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.

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.

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.

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.

Variable length lookbehind in regular expression pattern matching is now experimentally supported

Using a lookbehind assertion (like (?<=foo) or (?<!bar) 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.

Incompatible Changes

Pattern delimiters must now be graphemes

This usage has been deprecated and scheduled for removal in 5.30. See "Use of unassigned code point or non-standalone grapheme for a delimiter." 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.

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.

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:

[perl #125760].

my() in false conditional prohibited

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

[perl #133543].

Fatalize $* and $#

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

[perl #133583].

Fatalize unqualified use of dump()

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

[perl #133584].

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.

[perl #133586].

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 agains potential security threats. This is considered a bug fix as well. [perl #131642].

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. [perl #133547].

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.

[perl #126706].

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

Internal Changes

Selected Bug Fixes

Acknowledgements

Perl 5.30.0 represents approximately 11 months of development since Perl 5.28.0 and contains approximately 630,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 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 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.