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

DESCRIPTION

This document describes differences between the 5.23.8 release and the 5.23.9 release.

If you are upgrading from an earlier release such as 5.23.7, first read perl5238delta, which describes differences between 5.23.7 and 5.23.8.

Core Enhancements

perl will now croak when closing an in-place output file fails

Until now, failure to close the output file for an in-place edit was not detected, meaning that the input file could be clobbered without the edit being successfully completed. Now, when the output file cannot be closed successfully, an exception is raised.

Security

Remove duplicate environment variables from environ

Previously, if an environment variable appeared more than once in environ[], %ENV would contain the last entry for that name, while a typical getenv() would return the first entry. We now make sure %ENV contains the same as what getenv returns.

Second, we remove duplicates from environ[], so if a setting with that name is set in %ENV we won't pass an unsafe value to a child process.

[CVE-2016-2381]

Performance Enhancements

  • The number of calls to add_cp_to_invlist has been reduced. This optimizes the compilation of inverted character classes.

Modules and Pragmata

Updated Modules and Pragmata

  • autouse has been upgraded from version 1.08 to 1.11.

  • bytes has been upgraded from version 1.04 to 1.05.

  • Carp has been upgraded from version 1.38 to 1.40.

    longmess now returns the error in scalar context. [CPAN #107225]

  • Errno has been upgraded from version 1.24 to 1.25.

    It now exports Winsock error constants.

  • ExtUtils::Embed has been upgraded from version 1.32 to 1.33.

  • File::Find has been upgraded from version 1.33 to 1.34.

  • File::Glob has been upgraded from version 1.25 to 1.26.

  • IPC::SysV has been upgraded from version 2.05 to 2.06_01.

  • List::Util has been upgraded from version 1.42_01 to 1.42_02.

  • Module::CoreList has been upgraded from version 5.20160121 to 5.20160320.

  • Pod::Functions has been upgraded from version 1.09 to 1.10.

  • POSIX has been upgraded from version 1.63 to 1.64.

    It now exports Winsock error constants.

  • Scalar::Util has been upgraded from version 1.42_01 to 1.42_02.

  • SelfLoader has been upgraded from version 1.22 to 1.23.

  • Socket has been upgraded from version 2.020_02 to 2.020_03.

  • Storable has been upgraded from version 2.55 to 2.56.

  • strict has been upgraded from version 1.10 to 1.11.

    Narrowed the filename check.

  • Thread::Queue has been upgraded from version 3.07 to 3.08.

  • threads has been upgraded from version 2.05 to 2.06.

  • Tie::File has been upgraded from version 1.01 to 1.02.

  • Time::HiRes has been upgraded from version 1.9730 to 1.9732.

  • version has been upgraded from version 0.9909 to 0.9916.

  • warnings has been upgraded from version 1.35 to 1.36.

    Narrowed the filename check.

  • Win32API::File has been upgraded from version 0.1202 to 0.1203.

Documentation

Changes to Existing Documentation

perlfunc

  • The perlfunc manual page got a cleanup: there's more consistency now (in POD usage, grammar, code examples), better practices in code examples (use of my, removal of bareword filehandles, dropped usage of & when calling subroutines, ...), etc.

Configuration and Compilation

  • Dtrace builds now build successfully on systems with a newer dtrace that require an input object file that uses the probes in the .d file.

    Previously the probe would fail and cause a build failure. [perl #122287]

  • installman no longer warns if a module doesn't contain documentation, as this isn't actually an error. Now missing documentation will only be reported when using the --verbose switch, and if it does, the missing documentation will be reported on STDOUT instead of STDERR.

  • The u option to the ar command was removed. This was redundant anyway, and on some systems, it caused a warning.

  • Added Configure probes for newlocale, freelocale, and uselocale.

  • Fix up dtrace compile/link for Solaris. [perl #127543]

Platform Support

Platform-Specific Notes

Win32
  • Building a 64-bit perl with a 64-bit GCC but a 32-bit gmake would result in an invalid $Config{archname} for the resulting perl. [perl #127584]

  • Errors set by Winsock functions are now put directly into $^E, and the relevant WSAE* error codes are now exported from the Errno and POSIX modules for testing this against.

    The previous behaviour of putting the errors (converted to POSIX-style E* error codes since Perl 5.20.0) into $! was buggy due to the non-equivalence of like-named Winsock and POSIX error constants, a relationship between which has unfortunately been established in one way or another since Perl 5.8.0.

    The new behaviour provides a much more robust solution for checking Winsock errors in portable software without accidentally matching POSIX tests that were intended for other OSes and may have different meanings for Winsock.

    The old behaviour is currently retained, warts and all, for backwards compatibility, but users are encouraged to change any code that tests $! against E* constants for Winsock errors to instead test $^E against WSAE* constants. After a suitable deprecation period, the old behaviour may be removed, leaving $! unchanged after Winsock function calls, to avoid any possible confusion over which error variable to check.

Selected Bug Fixes

  • It now works properly to specify a user-defined property, such as

     qr/\p{mypkg1::IsMyProperty}/i

    with /i caseless matching, an explicit package name, and IsMyProperty not defined at the time of the pattern compilation.

  • Perl's memcpy(), memmove(), memset() and memcmp() fallbacks are now more compatible with the originals. [perl #127619]

  • The peak memory usage when compiling some regular expression patterns is now significantly smaller. [perl #127392]

  • A case has been fixed in which malformed UTF-8 in the source of a Perl script caused an assertion failure instead of an error message. [perl #127262]

  • Fixed a buffer overrun issue in Socked.xs which was reported by Coverity. [CPAN #111707]

  • Fixed a possible division by 0 error in Scalar::List::Utils::product (reported by Coverity). [CPAN #105415]

  • Fixed the issue where a s///r) with -DPERL_NO_COW attempts to modify the source SV, resulting in the program dying. [perl #127635]

  • Fixed a spurious warning about posix character classes. [perl #127581]

  • Fixed an obscure case where a pattern could fail to match. This only occurred when matching characters from the set of C1 controls, when the target matched string was in UTF-8, and only on EBCDIC platforms.

  • Fixed over eager warnings for /[.foo.]/.

    This prevents Perl from warning about constructs like /[.].*[.]/. [perl #127582, #127604]

  • Narrow the filename check in strict.pm and warnings.pm. Previously, it assumed that if the filename (without the .pmc? extension) differed from the package name, if was a misspelled use statement (i.e. use Strict instead of use strict). We now check whether there's really a miscapitalization happening, and not another issue.

  • Turn an assertion into a more user friendly failure when parsing regexes. [perl #127599]

  • Correctly raise an error when trying to compile patterns with unterminated character classes while there are trailing backslashes. [perl #126141].

  • Added a guard against malformed UTF-8. [perl #127262]

  • Only test semctl if we have everything needed to use it. In a FreeBSD the semctl entry point may exist, but it can be disabled by policy. [perl #127533]

  • Handle NOTHING regops and EXACTFU_SS regops in make_trie properly. [perl #126206]

  • Fix a Solaris optimiser bug which prevented certain regular expression to be compiled. [perl #127455]

  • Improved the detection of infinite recursion in regular expressions. Previously, perl would in certain cases slowly consume resources until finally running out of memory. [perl #126182]

Acknowledgements

Perl 5.23.9 represents approximately 4 weeks of development since Perl 5.23.8 and contains approximately 21,000 lines of changes across 230 files from 23 authors.

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

Abigail, Alex Vandiver, Andy Broad, Aristotle Pagaltzis, Chris 'BinGOs' Williams, Craig A. Berry, Dagfinn Ilmari Mannsåker, Daniel Dragan, David Mitchell, Father Chrysostomos, H.Merijn Brand, Jarkko Hietaniemi, John Peacock, Karl Williamson, Leon Timmermans, Lukas Mai, Matthew Horsfall, Ricardo Signes, Sawyer X, Shlomi Fish, 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.