++ed by:
GENEHACK LEEJO JAYALLEN TALINA CHANKEY

100 PAUSE users
198 non-PAUSE users.

David Golden
and 1 contributors

NAME

perldelta - what is new for perl v5.23.6

DESCRIPTION

This document describes differences between the 5.23.5 release and the 5.23.6 release.

If you are upgrading from an earlier release such as 5.23.4, first read perl5235delta, which describes differences between 5.23.4 and 5.23.5.

Incompatible Changes

Regular expression compilation errors

Some regular expression patterns that had runtime errors now don't compile at all.

This should have been in the perldelta for 5.23.4, but was omitted.

Almost all Unicode properties using the \p{} and \P{} regular expression pattern constructs are now checked for validity at pattern compilation time, and invalid ones will cause the program to not compile. In earlier releases, this check was often deferred until run time. Whenever an error check is moved from run- to compile time, erroneous code is caught 100% of the time, whereas before it would only get caught if and when the offending portion actually gets executed, which for unreachable code might be never.

Deprecations

Using code points above the platform's IV_MAX is now deprecated

Unicode defines code points in the range 0..0x10FFFF. Some standards at one time defined them up to 2**31 - 1, but Perl has allowed them to be as high as anything that will fit in a word on the platform being used. However, use of those above the platform's IV_MAX is broken in some constructs, notably tr///, regular expression patterns involving quantifiers, and in some arithmetic and comparison operations, such as being the upper limit of a loop. Now the use of such code points raises a deprecation warning, unless that warning category is turned off. IV_MAX is typically 2**31 -1 on 32-bit platforms, and 2**63-1 on 64-bit ones.

Doing bitwise operations on strings containing code points above 0xFF is deprecated

The string bitwise operators treat their operands as strings of bytes, and values beyond 0xFF are nonsensical in this context. To operate on encoded bytes, first encode the strings. To operate on code points' numeric values, use split and map ord. In the future, this warning will be replaced by an exception.

Performance Enhancements

  • Many languages, such as Chinese, are caseless. Perl now knows about most modern commercially important ones, and skips much of the work when a program tries to change case in them (like ucfirst()) or match caselessly (qr//i). This will speed up a program, such as a web server, that can operate on multiple languages, while operating on a caseless one.

Modules and Pragmata

Updated Modules and Pragmata

  • The modules sigtrap, DB, and the perl debugger could have, under rare circumstances, output raw control characters. This has been fixed.

  • B::Deparse has been upgraded from version 1.35 to 1.36.

    Uses of < > are now always deparsed as either glob() or readline(), and uses of glob() or readline() are never deparsed as < >. This fixes the deparsing of readline ${"a"}. [perl #116677]

  • base has been upgraded from version 2.22_01 to 2.23.

  • Benchmark has been upgraded from version 1.2 to 1.21.

  • CPAN::Meta::Requirements has been upgraded from version 2.133 to 2.140.

    Adds a method for getting structured requirements and adds better error messages.

  • CPAN::Meta::YAML has been upgraded from version 0.017 to 0.018, with no change since 0.017.

  • Data::Dumper has been upgraded from version 2.158 to 2.159.

    This adds a "Trailingcomma" option, which when enabled adds a trailing comma after the last element of dumped arrays and hashes that would otherwise be followed immediately by a line break. [perl #126813]

    The internals have also been substantially refactored and cleaned up. It may be more efficient on some platforms.

  • DynaLoader has been upgraded from version 1.36 to 1.37.

    Fixed an else nesting issue in dynamic loading support for OS/390 (and similar systems) that was introduced in 1.36.

  • encoding::warnings has been upgraded from version 0.11 to 0.12.

  • fields has been upgraded from version 2.22_01 to 2.23.

  • File::Spec and Cwd have been upgraded from version 3.59 to 3.60, adding File::Spec::AmigaOS.

  • Hash::Util::FieldHash has been upgraded from version 1.18 to 1.19.

  • locale has been upgraded from version 1.07 to 1.08.

  • Locale::Codes has been upgraded from version 3.36 to 3.37.

  • Math::BigInt::FastCalc has been updated from version 0.37 to 0.38.

  • Module::CoreList has been updated from version 5.20151120 to 5.20151220.

  • Module::Metadata has been updated from version 1.000030 to 1.000031, with no functional changes.

  • Opcode has been upgraded from version 1.33 to 1.34.

  • PerlIO::mmap has been upgraded from version 0.015 to 0.016.

  • Pod::Perldoc has been upgraded from version 3.25_01 to 3.25_02.

  • SDBM_File has been upgraded from version 1.13 to 1.14.

  • strict has been upgraded from version 1.09 to 1.10, with only a documentation change.

  • Term::ANSIColor has been upgraded from version 4.03 to 4.04, with no functional changes.

  • Test has been upgraded from version 1.27 to 1.28.

  • threads has been upgraded from version 2.04 to 2.05.

  • threads::shared has been upgraded from version 1.49 to 1.50.

  • Unicode::Normalize has been updated from version 1.23 to 1.24, with no functional changes.

  • utf8 has been upgraded from version 1.17 to 1.18.

    Partly reverted a micro-optimization to lib/utf_heavy.pl that caused self-recursion when it was loaded with ${^ENCODING} set. [perl #126593]

Documentation

Changes to Existing Documentation

perlfunc

  • The documentation of hex has been revised to clarify valid inputs.

perlop

  • The documentation of qx// now describes how $? is affected.

perlvar

  • The documentation of $@ was reworded to clarify that it is not just for syntax errors in eval. [perl #124034]

perlxs

  • The documentation of PROTOTYPES has been clarified; they are disabled by default, not enabled.

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 Errors

Configuration and Compilation

  • make_ext.pl is no longer inappropriately silent. This was caused by an operator precedence error introduced in 5.23.4.

Platform Support

New Platforms

OpenIndiana

OpenIndiana (continuation of OpenSolaris) builds were not working due to problems with the Perl shared library. This should be working now. [perl #126958]

Platform-Specific Notes

EBCDIC platforms, such as z/OS

UTF-EBCDIC is like UTF-8, but for EBCDIC platforms. It now has been extended so that it can represent code points up to 2 ** 64 - 1 on platforms with 64-bit words. This brings it into parity with UTF-8. This enhancement requires an incompatible change to the representation of code points in the range 2 ** 30 to 2 ** 31 -1 (the latter was the previous maximum representable code point). This means that a file that contains one of these code points, written out with previous versions of perl cannot be read in, without conversion, by a perl containing this change. We do not believe any such files are in existence, but if you do have one, submit a ticket at perlbug@perl.org, and we will write a conversion script for you.

Cygwin

Tests are more robust against unusual cygdrive prefixes. [perl #126834]

OS X/Darwin

Builds with both -DDEBUGGING and threading enabled would fail with a "panic: free from wrong pool" error when built or tested from Terminal on OS X. This was caused by perl's internal management of the environment conflicting with an atfork handler using the libc setenv() function to update the environment.

Perl now uses setenv()/unsetenv() to update the environment on OS X. [perl #126240]

ppc64el floating point

The floating point format of ppc64el (Debian naming for little-endian PowerPC) is now detected correctly.

Solaris

All Solaris now builds shared libperl.

Solaris and variants like OpenIndiana now always build with the shared Perl library (Configure -Duseshrplib). This was required for the OpenIndiana builds, but this has also been the setting for Oracle/Sun Perl builds for several years.

Internal Changes

  • Perl core code and the threads extension have been annotated so that, if Perl is configured to use threads, then during compile-time clang (3.6 or later) will warn about suspicious uses of mutexes. See http://clang.llvm.org/docs/ThreadSafetyAnalysis.html for more information.

  • The signbit() emulation has been enhanced. This will help older and/or more exotic platforms or configurations.

  • The to_utf8_case function is discouraged in favor of toUPPER_utf8, toTITLE_utf8, toLOWER_utf8, and toFOLD_utf8.

  • EBCDIC code paths have largely been unified to avoid repetition.

  • MSWin32 code for $^X has been moved out of the win32 directory to caretx.c, where other operating systems set that variable.

Selected Bug Fixes

  • /...\G/ no longer crashes on utf8 strings. When \G is a fixed number of characters from the start of the regex, perl needs to count back that many characters from the current pos() position and start matching from there. However, it was counting back bytes rather than characters, which could lead to panics on utf8 strings.

  • In some cases operators that return integers would return negative integers as large positive integers. [perl #126635]

  • The pipe() operator would assert for DEBUGGING builds instead of producing the correct error message. The condition asserted on is detected and reported on correctly without the assertions, so the assertions were removed. [perl #126480]

  • In some cases, failing to parse a here-doc would attempt to use freed memory. This was caused by a pointer not being restored correctly. [perl #126443]

  • @x = sort { *a = 0; $a <=> $b } 0 .. 1 no longer frees the GP for *a before restoring its SV slot. [perl #124097]

  • Multiple problems with the new hexadecimal floating point printf format %a were fixed: [perl #126582], [perl #126586], [perl #126822]

  • Calling mg_set() in leave_scope() no longer leaks.

  • A regression from Perl v5.20 was fixed in which debugging output of regular expression compilation was wrong. (The pattern was correctly compiled, but what got displayed for it was wrong.)

Acknowledgements

Perl 5.23.6 represents approximately 4 weeks of development since Perl 5.23.5 and contains approximately 11,000 lines of changes across 260 files from 22 authors.

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

Aaron Crane, Abigail, Achim Gratz, Andy Broad, Aristotle Pagaltzis, Chris 'BinGOs' Williams, Craig A. Berry, Dagfinn Ilmari Mannsåker, Daniel Dragan, David Golden, David Mitchell, Doug Bell, Ed Avis, Jarkko Hietaniemi, Karen Etheridge, Karl Williamson, Lukas Mai, Ricardo Signes, Shlomi Fish, Steve Hay, Sullivan Beck, Tony Cook.

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.