The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

perldelta - what is new for perl v5.27.9

DESCRIPTION

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

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

Core Enhancements

New read-only predefined variable ${^SAFE_LOCALES}

This variable is 1 if the Perl interpreter is operating in an environment where it is safe to use and change locales (see perllocale.) This variable is true when the perl is unthreaded, or compiled in a platform that supports thread-safe locale operation (see next item).

Locales are now thread-safe on systems that support them

These systems include Windows starting with Visual Studio 2005, and in POSIX 2008 systems.

The implication is that you are now free to use locales and changes them in a threaded environment. Your changes affect only your thread. See "Multi-threaded operation" in perllocale

Script runs now are specified with a different syntax

This isn't really an enhancement, but is being put in this category because it changes an enhancement from 5.27.8, and there is a new abbreviated form for it. The syntax is now either of:

 (*script_run:...)
 (*sr:...)

Previously a "+" was used instead of the "*".

There is a new form for script runs which combines with (?>...) (or *atomic:...))

(*asr:... is an easier way to write (*sr:(?>...)), which is expected to be a commonly used idiom. (*atomic_script_run:... is also available. See "Script Runs" in perlre.

Experimentally, there are now alphabetic synonyms for some regular expression assertions

If you find it difficult to remember how to write certain of the pattern assertions, there are now alphabetic synonyms.

 CURRENT                NEW SYNONYMS
 ------                 ------------
 (?=...)        (*pla:...) or (*positive_lookahead:...)
 (?!...)        (*nla:...) or (*negative_lookahead:...)
 (?<=...)       (*plb:...) or (*positive_lookbehind:...)
 (?<!...)       (*nlb:...) or (*negative_lookbehind:...)
 (?>...)        (*atomic:...)

These are considered experimental, so using any of these will raise (unless turned off) a warning in the experimental::alpha_assertions category.

Performance Enhancements

  • Various optimizations have been applied to matching regular expression patterns, so under the right circumstances, significant performance gains may be noticed. But in an application with many varied patterns, little overall improvement likely will be seen.

  • Other optimizations have been applied to UTF-8 handling, but these are not typically a major factor in most applications.

Modules and Pragmata

Updated Modules and Pragmata

  • bignum has been upgraded from version 0.47 to 0.49.

  • Carp has been upgraded from version 1.45 to 1.46.

  • Devel::PPPort has been upgraded from version 3.38 to 3.39.

  • Encode has been upgraded from version 2.94 to 2.96.

  • encoding has been upgraded from version 2.21 to 2.22.

  • Errno has been upgraded from version 1.28 to 1.29.

  • ExtUtils::MakeMaker has been upgraded from version 7.30 to 7.32.

  • ExtUtils::ParseXS has been upgraded from version 3.36 to 3.38.

  • ExtUtils::Typemaps has been upgraded from version 3.37 to 3.38.

  • File::Spec has been upgraded from version 3.72 to 3.74.

  • if has been upgraded from version 0.0607 to 0.0608.

  • IPC::Cmd has been upgraded from version 0.98 to 1.00.

  • Module::CoreList has been upgraded from version 5.20180120 to 5.20180220.

  • mro has been upgraded from version 1.21 to 1.22.

  • PerlIO::encoding has been upgraded from version 0.25 to 0.26.

  • POSIX has been upgraded from version 1.81 to 1.82.

  • Storable has been upgraded from version 2.65 to 3.06.

  • Test::Simple has been upgraded from version 1.302120 to 1.302122.

  • threads has been upgraded from version 2.21 to 2.22.

  • Time::HiRes has been upgraded from version 1.9752 to 1.9753.

  • warnings has been upgraded from version 1.40 to 1.41.

  • XXX has been upgraded from version A.xx to B.yy.

    If there was something important to note about this change, include that here.

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.

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.

New Diagnostics

New Warnings

Testing

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

  • harness no longer waits for 30 seconds when running t/io/openpid.t. [perl #121028][perl #132867]

Platform Support

New Platforms

VMS

CRTL features can now be set by embedders before invoking Perl by using the decc$feature_set and decc$feature_set_value functions. Previously any attempt to set features after image initialization were ignored.

Internal Changes

  • A new compiler #define, dTHX_DEBUGGING. has been added. This is useful for XS or C code that only need the thread context because their debugging statements that get compiled only under -DDEBUGGING need one.

  • A new API function "Perl_setlocale" in perlapi has been added.

  • "sync_locale" in perlapi has been revised to return a boolean as to whether the system was using the global locale or not.

  • A new kind of magic scalar, called a "nonelem" scalar, has been introduced. It is stored in an array to denote a nonexistent element, whenever such an element is accessed in a potential lvalue context. It replaces the existing "defelem" (deferred element) magic wherever this is possible, being significantly more efficient. This means that some_sub($sparse_array[$nonelem]) no longer has to create a new magic defelem scalar each time, as long as the element is within the array.

    It partially fixes the rare bug of deferred elements getting out of synch with their arrays when the array is shifted or unshifted. [perl #132729]

Selected Bug Fixes

  • Failures while compiling code within other constructs, such as with string interpolation and the right part of s///e now cause compilation to abort earlier.

    Previously compilation could continue in order to report other errors, but the failed sub-parse could leave partly parsed constructs on the parser shift-reduce stack, confusing the parser, leading to perl crashes. [perl #125351]

  • On threaded perls where the decimal point (radix) character is not a dot, it has been possible for a race to occur between threads when one needs to use the real radix character. This has now been fixed by use of a mutex on systems without thread-safe locales, and the problem just doesn't come up on those with thread-safe locales.

Acknowledgements

Perl 5.27.9 represents approximately 5 weeks of development since Perl 5.27.8 and contains approximately 29,000 lines of changes across 360 files from 26 authors.

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

, Aaron Crane, Abigail, Chris 'BinGOs' Williams, Craig A. Berry, Dagfinn Ilmari Mannsåker, David Mitchell, Father Chrysostomos, George Hartzell, H.Merijn Brand, Hugo van der Sanden, James E Keenan, Jerry D. Hedden, Karl Williamson, Matthew Horsfall, Pali, Reini Urban, Sawyer X, Slaven Rezic, Steve Hay, Todd Rinaldo, Tomasz Konojacki, Tom Wyant, Tony Cook, Yves Orton, Zefram.

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.