NAME

perldelta - what is new for perl v5.19.10

DESCRIPTION

This document describes differences between the 5.19.9 release and the 5.19.10 release.

If you are upgrading from an earlier release such as 5.19.8, first read perl5199delta, which describes differences between 5.19.8 and 5.19.9.

Deprecations

Discouraged features

  • The "interpreter-based threads" provided by Perl are not the fast, lightweight system for multitasking that one might expect or hope for. Threads are implemented in a way that make them easy to misuse. Few people know how to use them correctly or will be able to provide help.

    The use of interpreter-based threads in perl is officially discouraged.

Performance Enhancements

  • When doing a global regex match on a string that came from the readline or <> operator, the data is no longer copied unnecessarily. [perl #121259]

  • Executing a regex that contains the ^ anchor (or its variant under the /m flag) has been made much faster in several situations.

  • It is now faster to create certain sorts of lists, including array and hash slices.

  • The optimisation for arrays indexed with a small constant integer is now applied for integers in the range -128..127, rather than 0..255. This should speed up Perl code using expressions like $x[-1], at the expense of (presumably much rarer) code using expressions like $x[200].

  • Dereferencing (as in $obj->[0] or $obj->{k}) is now faster when $obj is an instance of a class that has overloaded methods, but doesn't overload any of the dereferencing methods @{}, %{}, and so on.

  • The first iteration over a large hash (using keys or each) is now faster. This is achieved by preallocating the hash's internal iterator state, rather than lazily creating it when the hash is first iterated. (For small hashes, the iterator is still created only when first needed. The assumption is that small hashes are more likely to be used as objects, and therefore never allocated. For large hashes, that's less likely to be true, and the cost of allocating the iterator is swamped by the cost of allocating space for the hash itself.)

  • Perl's optimiser no longer skips optimising code that follows certain eval {} expressions (including those with an apparent infinite loop).

  • The implementation now does a better job of avoiding meaningless work at runtime. Internal effect-free "null" operations (created as a side-effect of parsing Perl programs) are normally deleted during compilation. That deletion is now applied in some situations that weren't previously handled.

  • A few micro-optimisations have been applied to performance-sensitive parts of the implementation, including subroutine invocation and scope exit.

  • Perl now does less disk I/O when dealing with Unicode properties that cover up to three ranges of consecutive code points.

Modules and Pragmata

Updated Modules and Pragmata

  • Attribute::Handlers has been upgraded from version 0.95 to 0.96.

  • autouse has been upgraded from version 1.07 to 1.08.

  • B::Deparse has been upgraded from version 1.25 to 1.26.

  • base has been upgraded from version 2.21 to 2.22.

    Co-exist more gracefully with CORE::GLOBAL::require overrides. [perl #121196]

  • Carp has been upgraded from version 1.32 to 1.33.

  • charnames has been upgraded from version 1.39 to 1.40.

  • CPAN has been upgraded from version 2.03 to 2.04.

    Fixes a bug preventing "force install" from working. [cpan #91706]

    Fixes an infinite-loop bug when using the make command in the CPAN shell. [cpan #86915]

  • CPAN::Meta has been upgraded from version 2.133380 to 2.140640.

    Added a load_string() method that guesses whether the string is YAML or JSON.

  • CPAN::Meta::YAML has been upgraded from version 0.011 to 0.012.

  • Data::Dumper has been upgraded from version 2.150 to 2.151.

  • Devel::PPPort has been upgraded from version 3.21 to 3.22.

  • Digest::SHA has been upgraded from version 5.87 to 5.88.

  • ExtUtils::Install has been upgraded from version 1.62 to 1.63.

  • ExtUtils::MakeMaker has been upgraded from version 6.88 to 6.92.

  • ExtUtils::ParseXS has been upgraded from version 3.23 to 3.24.

  • ExtUtils::Typemaps has been upgraded from version 3.23 to 3.24.

  • feature has been upgraded from version 1.35 to 1.36.

  • File::Find has been upgraded from version 1.26 to 1.27.

  • Filter::Simple has been upgraded from version 0.90 to 0.91.

  • Hash::Util::FieldHash has been upgraded from version 1.14 to 1.15.

  • HTTP::Tiny has been upgraded from version 0.042 to 0.043.

    No longer sends absolute request URI when tunneling SSL via proxy and fixes regression in setting host name to verify SSL.

  • IO has been upgraded from version 1.30 to 1.31.

  • IO::Socket::IP has been upgraded from version 0.28 to 0.29.

  • Locale::Codes has been upgraded from version 3.29 to 3.30.

    Fixed a problem that was preventing rename_* functions to work. [cpan #92680]

  • Module::CoreList has been upgraded from version 3.06 to 3.09.

  • Module::Load has been upgraded from version 0.30 to 0.32.

    Fix tests to support statically built perls.

  • mro has been upgraded from version 1.15 to 1.16.

  • Parse::CPAN::Meta has been upgraded from version 1.4413 to 1.4414.

    Added load_string, which uses heuristics to guess YAML/JSON content. load_file will now attempt to detect YAML/JSON content if the suffix is not .json, .yml or .yaml.

  • Pod::Perldoc has been upgraded from version 3.21 to 3.23.

  • POSIX has been upgraded from version 1.38_02 to 1.38_03.

  • Thread::Queue has been upgraded from version 3.02 to 3.05.

  • threads has been upgraded from version 1.92 to 1.93.

  • warnings has been upgraded from version 1.22 to 1.23.

  • XS::Typemap has been upgraded from version 0.12 to 0.13.

Documentation

Changes to Existing Documentation

  • The perllexwarn documentation used to describe the hierarchy of warning categories understood by the warnings pragma. That description has now been moved to the warnings documentation itself, leaving perllexwarn as a stub that points to it. This change consolidates all documentation for lexical warnings in a single place.

Diagnostics

The following 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

  • When use re "debug" executes a regex containing a backreference, the debugging output now shows what string is being matched.

Configuration and Compilation

  • Where possible, the build now avoids recursive invocations of make when building pure-Perl extensions, without removing any parallelism from the build. Currently around 80 extensions can be processed directly by the make_ext.pl tool, meaning that 80 invocations of make and 160 invocations of miniperl are no longer made.

  • The build system now works correctly when compiling under GCC or Clang with link-time optimization enabled (the -flto option). [perl #113022]

Testing

  • The test suite no longer fails when the user's interactive shell maintains a $PWD environment variable, but the /bin/sh used for running tests doesn't.

  • The test.valgrind make target now allows tests to be run in parallel. This target allows Perl's test suite to be run under Valgrind, which detects certain sorts of C programming errors, though at significant cost in running time. On suitable hardware, allowing parallel execution claws back a lot of that additional cost. [perl #121431]

Platform Support

Platform-Specific Notes

Linux

The hints file now looks for libgdbm_compat only if libgdbm itself is also wanted. The former is never useful without the latter, and in some circumstances, including it could actually prevent building.

Mac OS

The build system now honours an ld setting supplied by the user running Configure.

Win32

Killing a process tree with "kill" in perlfunc and a negative signal, was broken starting in 5.18.0. In this bug, kill always returned 0 for a negative signal even for valid PIDs, and no processes were terminated. This has been fixed [perl #121230].

Internal Changes

  • The Perl core now consistently uses av_tindex() ("the top index of an array") as a more clearly-named synonym for av_len().

  • The obscure interpreter variable PL_timesbuf is expected to be removed early in the 5.21.x development series, so that Perl 5.22.0 will not provide it to XS authors. While the variable still exists in 5.19.10 (and will continue to exist in 5.20.0), we hope that this advance warning of the deprecation will help anyone who is using that variable.

Selected Bug Fixes

  • Static builds, as configured with -Uusedl now build correctly. [perl #121291]

  • Regexes with backreferences nested inside subpattern references now behave more consistently: match variables are dynamically scoped during the execution of the subpattern call. [perl #121299]

Acknowledgements

Perl 5.19.10 represents approximately 4 weeks of development since Perl 5.19.9 and contains approximately 13,000 lines of changes across 330 files from 20 authors.

Excluding auto-generated files, documentation and release tools, there were approximately 8,800 lines of changes to 220 .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.19.10:

Aaron Crane, Andy Dougherty, Aristotle Pagaltzis, Chris 'BinGOs' Williams, Craig A. Berry, Daniel Dragan, David Mitchell, Father Chrysostomos, H.Merijn Brand, Jerry D. Hedden, Karl Williamson, Matthew Horsfall, Nicholas Clark, Paul Johnson, Peter Rabbitson, Ricardo Signes, Steffen Müller, Steve Hay, Tony Cook, Yves Orton.

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 articles recently posted to the comp.lang.perl.misc newsgroup and 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 please send it to perl5-security-report@perl.org. This points to a closed subscription unarchived mailing list, which includes all the core committers, who will be able to help assess the impact of issues, figure out a resolution, and help co-ordinate the release of patches to mitigate or fix the problem across all platforms on which Perl is supported. Please only use this address for security issues in the Perl core, not for modules independently distributed on CPAN.

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.