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

NAME

perl5197delta - what is new for perl v5.19.7

DESCRIPTION

This document describes differences between the 5.19.6 release and the 5.19.7 release.

If you are upgrading from an earlier release such as 5.19.5, first read perl5196delta, which describes differences between 5.19.5 and 5.19.6.

Core Enhancements

Postfix syntax for maximum array index

The postfix notation ->$#* has been added, to match the similar postfix operators added in 5.19.5. $foo->$#* is equivalent to $#$foo. See perlref.

Incompatible Changes

Data::Dumper's output may change

Depending on the data structures dumped and the settings set for Data::Dumper, the dumped output may have changed from previous versions.

If you have tests that depend on the exact output of Data::Dumper, they may fail.

To avoid this problem in your code, test against the data structure from evaluating the dumped structure, instead of the dump itself.

Deprecations

CGI.pm

The CGI.pm module has been deprecated since version 3.64.

Modules and Pragmata

Updated Modules and Pragmata

  • base has been upgraded from version 2.19 to 2.20.

    base now only ignores load failure on the requested module. [perl #120685]

  • CGI has been upgraded from version 3.63 to 3.64.

    Avoids a warning about "undefined variable in user_agent" in some cases, and updates CGI::Cookie documentation to reflect that "HttpOnly" is widely supported.

    NOTE: CGI is deprecated and may be removed from a future version of Perl.

  • constant has been upgraded from version 1.29 to 1.30.

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

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

    Regular expression objects are now dumped in a form closer to their original source, eg. qr/abc/i is dumped as exactly that instead of qr/(?^i:abc)/ . [perl #82948]

    Dumping of hash keys is now more consistent between the XS and perl implementations of Data::Dumper, including how the quotekeys option behaves. This may make tests that depend on the exact output of Data::Dumper to fail. [perl #120384]

  • DynaLoader has been upgraded from version 1.21 to 1.22.

  • ExtUtils::MakeMaker has been upgraded from version 6.82 to 6.84.

  • File::Fetch has been upgraded from version 0.44 to 0.46.

    Blacklists "ftp" on DragonflyBSD.

  • HTTP::Tiny has been upgraded from version 0.038 to 0.039.

  • inc::latest has been upgraded from version 0.4202 to 0.4203. NOTE: inc::latest is deprecated and may be removed from a future version of Perl.

  • Locale::Codes has been upgraded from version 3.27 to 3.28.

  • Module::Build has been upgraded from version 0.4202 to 0.4203. NOTE: Module::Build is deprecated and may be removed from a future version of Perl.

  • Module::CoreList has been upgraded from version 3.01 to 3.02.

  • PerlIO::encoding has been upgraded from version 0.16 to 0.17.

  • PerlIO::via has been upgraded from version 0.13 to 0.14.

  • POSIX has been upgraded from version 1.36 to 1.37.

  • SDBM_File has been upgraded from 1.10 to 1.11.

    Added access to SDBM constants and to opening SDBM files with explicit page and directory file names. [perl #114350]

  • Storable has been upgraded from version 2.47 to 2.48.

  • threads has been upgraded from version 1.90 to 1.91.

  • Time::Piece has been upgraded from version 1.23 to 1.24.

  • Unicode::Collate has been upgraded from version 1.02 to 1.04.

  • Win32 has been upgraded from version 0.47 to 0.48.

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

Changes to Existing Diagnostics

  • The error messages for my($a?$b$c) and my(do{}) now mention "conditional expression" and "do block", respectively, instead of reading 'Can't declare null operation in "my"'.

Utility Changes

Porting/corelist-perldelta.pl

  • Ensure that the latest version of Module::CoreList is used when running the script.

Testing

  • Various tests in t/porting/ are no longer skipped when the perl .git directory is outside the perl tree and pointed to by $GIT_DIR. [perl #120505]

Platform Support

Platform-Specific Notes

Windows

Experimental support for building with Intel C++ Compiler has been extended to cover the dmake makefile (win32/makefile.mk) as well.

Internal Changes

  • The sv argument in "sv_2pv_flags" in perlapi, "sv_2iv_flags" in perlapi, "sv_2uv_flags" in perlapi, and "sv_2nv_flags" in perlapi and their older wrappers sv_2pv, sv_2iv, sv_2uv, sv_2nv, is now non-NULL. Passing NULL now will crash. When the non-NULL marker was introduced en masse in 5.9.3 the functions were marked non-NULL, but since the creation of the SV API in 5.0 alpha 2, if NULL was passed, the functions returned 0 or false-type values. The code that supports sv argument being non-NULL dates to 5.0 alpha 2 directly, and indirectly to Perl 1.0 (pre 5.0 api). The lack of documentation that the functions accepted a NULL sv was corrected in 5.11.0 and between 5.11.0 and 5.19.5 the functions were marked NULLOK. As an optimization the NULLOK code has now been removed, and the functions became non-NULL marked again, because core getter-type macros never pass NULL to these functions and would crash before ever passing NULL.

    The only way a NULL sv can be passed to sv_2*v* functions is if XS code directly calls sv_2*v*. This is unlikely as XS code uses Sv*V* macros to get the underlying value out of the SV. One possible situation which leads to a NULL sv being passed to sv_2*v* functions, is if XS code defines its own getter type Sv*V* macros, which check for NULL before dereferencing and checking the SV's flags through public API Sv*OK* macros or directly using private API SvFLAGS, and if sv is NULL, then calling the sv_2*v functions with a NULL litteral or passing the sv containing a NULL value.

Selected Bug Fixes

  • semctl(..., SETVAL, ...) would set the semaphore to the top 32-bits of the supplied integer instead of the bottom 32-bits on 64-bit big-endian systems. [perl #120635]

  • A regression since v5.18.0 has been fixed in which qr/[[:^ascii:]]/d failed to match any character in the range \x80 - \xFF if its surrounding character class contained anything else. (That is, the bug didn't happen if the [:^ascii:] was the only element of the character class.) [perl #120799]

  • readdir() now only sets $! on error. $! is no longer set to EBADF when then terminating undef is read from the directory unless the system call sets $!. [perl #118651]

  • &CORE::glob no longer causes an intermittent crash due to perl's stack getting corrupted. [perl #119993]

  • open with layers that load modules (e.g., "<:encoding(utf8)") no longer runs the risk of crashing due to stack corruption.

  • When a reference to a reference to an overloaded object was returned from a regular expression (??{...}) code block, an incorrect implicit dereference could take place if the inner reference had been returned by a code block previously.

  • A tied variable returned from (??{...}) sees the inner values of match variables (i.e., the $1 etc. from any matches inside the block) in its FETCH method. This was not the case if a reference to an overloaded object was the last thing assigned to the tied variable. Instead, the match variables referred to the outer pattern during the FETCH call.

  • Perl 5.18 broke autoloading via ->SUPER::foo method calls by looking up AUTOLOAD from the current package rather than the current package's superclass. This has been fixed. [perl #120694]

  • A longstanding bug causing do {} until CONSTANT, where the constant holds a true value, to read unallocated memory has been resolved. This would usually happen after a syntax error. In past versions of Perl it has crashed intermittently. [perl #72406]

  • Fix HP-UX $! failure. HP-UX strerror() returns an empty string for an unknown error code. This caused an assertion to fail under DEBUGGING builds. This patch removes the assertion and changes the return into a non-empty string indicating the errno is for an unknown error.

  • Fix unexpected tainting via regexp using locale. Previously, under certain conditions, the use of character classes could cause tainting when it shouldn't. Some character classes are locale-dependent, but before this patch, sometimes tainting was happening even for character classes that don't depend on the locale. [perl #120675]

  • Under certain conditions, Perl would throw an error if in an lookbehind assertion in a regexp, the assertion referred to a named subpattern, complaining the lookbehind was variable when it wasn't. This has been fixed. [perl #120600], [perl #120618]. The current fix may be improved on in the future.

Acknowledgements

Perl 5.19.7 represents approximately 4 weeks of development since Perl 5.19.6 and contains approximately 90,000 lines of changes across 390 files from 26 authors.

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

Abigail, Abir Viqar, Brian Childs, Brian Fraser, Chris 'BinGOs' Williams, Craig A. Berry, Dabrien 'Dabe' Murphy, Daniel Dragan, David Mitchell, Dennis Kaarsemaker, Evan Zacks, Father Chrysostomos, François Perrad, Graham Knop, James E Keenan, Jess Robinson, Karl Williamson, Kevin Ryde, Martin McGrath, Matthew Horsfall, Nicholas Clark, Peter Martini, Ricardo Signes, 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.