NAME
perl5252delta - what is new for perl v5.25.2
DESCRIPTION
This document describes differences between the 5.25.1 release and the 5.25.2 release.
If you are upgrading from an earlier release such as 5.25.0, first read perl5251delta, which describes differences between 5.25.0 and 5.25.1.
Core Enhancements
Perl can now do default collation in UTF-8 locales on platforms that support it
Some platforms natively do a reasonable job of collating and sorting in UTF-8 locales. Perl now works with those. For portability and full control, Unicode::Collate is still recommended, but now you may not need to do anything special to get good-enough results, depending on your application. See "Category LC_COLLATE
: Collation: Text Comparisons and Sorting" in perllocale.
Better locale collation of strings containing embedded NUL
characters
In locales that have multi-level character weights, these are now ignored at the higher priority ones. There are still some gotchas in some strings, though. See "Collation of strings containing embedded NUL
characters" in perllocale.
Lexical subroutines are no longer experimental
Using the lexical_subs
feature no longer emits a warning. Existing code that disables the experimental::lexical_subs
warning category that the feature previously used will continue to work. The lexical_subs
feature has no effect; all Perl code can use lexical subroutines, regardless of what feature declarations are in scope.
CORE
subroutines for hash and array functions callable via reference
The hash and array functions in the CORE
namespace--keys
, each
, values
, push
, pop
, shift
, unshift
and splice
--, can now be called with ampersand syntax (&CORE::keys(\%hash
) and via reference (my $k = \&CORE::keys; $k->(\%hash)
). Previously they could only be used when inlined.
Security
-Di
switch is now required for PerlIO debugging output
Previously PerlIO debugging output would be sent to the file specified by the PERLIO_DEBUG
environment variable if perl wasn't running setuid and the -T
or -t
switches hadn't been parsed yet.
If perl performed output at a point where it hadn't yet parsed its switches this could result in perl creating or overwriting the file named by PERLIO_DEBUG
even when the -T
switch had been supplied.
Perl now requires the -Di
switch to produce PerlIO debugging output. By default this is written to stderr
, but can optionally be redirected to a file by setting the PERLIO_DEBUG
environment variable.
If perl is running setuid or the -T
switch has supplied PERLIO_DEBUG
is ignored and the debugging output is sent to stderr
as for any other -D
switch.
Incompatible Changes
keys
returned from an lvalue subroutine
keys
returned from an lvalue subroutine can no longer be assigned to in list context.
sub foo : lvalue { keys(%INC) }
(foo) = 3; # death
sub bar : lvalue { keys(@_) }
(bar) = 3; # also an error
This makes the lvalue sub case consistent with (keys %hash) = ...
and (keys @_) = ...
, which are also errors. [perl #128187]
Modules and Pragmata
Updated Modules and Pragmata
CPAN has been upgraded from version 2.11 to 2.14.
Devel::Peek has been upgraded from version 1.23 to 1.24.
diagnostics has been upgraded from version 1.34 to 1.35.
DynaLoader has been upgraded from version 1.38 to 1.39.
ExtUtils::MakeMaker has been upgraded from version 7.10_01 to 7.18.
ExtUtils::Miniperl has been upgraded from version 1.05 to 1.06.
ExtUtils::ParseXS has been upgraded from version 3.31 to 3.32.
ExtUtils::Typemaps has been upgraded from version 3.31 to 3.32.
feature has been upgraded from version 1.43 to 1.44.
File::Copy has been upgraded from version 2.31 to 2.32.
File::Glob has been upgraded from version 1.26 to 1.27.
File::Spec has been upgraded from version 3.63 to 3.64.
FileHandle has been upgraded from version 2.02 to 2.03.
Getopt::Long has been upgraded from version 2.48 to 2.49.
HTTP::Tiny has been upgraded from version 0.056 to 0.058.
JSON::PP has been upgraded from version 2.27300 to 2.27400.
Locale::Codes has been upgraded from version 3.38 to 3.39.
Module::CoreList has been upgraded from 5.20160520 to 5.20160620.
Opcode has been upgraded from version 1.34 to 1.35.
Pod::Checker has been upgraded from version 1.60 to 1.73.
Pod::Functions has been upgraded from version 1.10 to 1.11.
Pod::Usage has been upgraded from version 1.68 to 1.69.
POSIX has been upgraded from version 1.69 to 1.70.
Test::Simple has been upgraded from version 1.302015 to 1.302026.
Thread::Queue has been upgraded from version 3.09 to 3.11.
threads has been upgraded from version 2.08 to 2.09.
Time::HiRes has been upgraded from version 1.9733 to 1.9734.
Unicode::UCD has been upgraded from version 0.64 to 0.65.
VMS::DCLsym has been upgraded from version 1.06 to 1.07.
Documentation
Changes to Existing Documentation
perlcommunity
All references to Usenet have been removed.
perldelta
All references to Usenet have been removed.
perllocale
Document NUL collation handling.
perlmodinstall
All references to Usenet have been removed.
perlmodlib
Updated the mirror list.
All references to Usenet have been removed.
perlnewmod
All references to Usenet have been removed.
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
Version control conflict marker
(F) The parser found a line starting with
<<<<<<<
,>>>>>>>
, or=======
. These may be left by a version control system to mark conflicts after a failed merge operation.-
(A) You've accidentally run your script through bash or another shell instead of Perl. Check the #! line, or manually feed your script into Perl yourself. The #! line at the top of your file could look like:
#!/usr/bin/perl
-
(A) You've accidentally run your script through zsh or another shell instead of Perl. Check the #! line, or manually feed your script into Perl yourself. The #! line at the top of your file could look like:
#!/usr/bin/perl
-
Unescaped left braces are already illegal in some contexts in regular expression patterns, but, due to an oversight, no deprecation warning was raised in other contexts where they are intended to become illegal. This warning is now raised in these contexts.
Changes to Existing Diagnostics
Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/%s/
The word "here" has been added to the message that was raised in v5.25.1. This is to indicate that there are contexts in which unescaped left braces are not (yet) illegal.
Configuration and Compilation
make_ext.pl no longer updates a module's pm_to_blib file when no files require updates. This could cause dependencies, perlmain.c in particular, to be rebuilt unnecessarily. [perl #126710]
The output of
perl -V
has been reformatted so that each configuration and compile-time option is now listed one per line, to improve readability.
Testing
t/harness now tries really hard not to run tests outside of the Perl source tree. [perl #124050]
Internal Changes
Perl no longer panics when switching into some locales on machines with buggy
strxfrm()
implementations in their libc. [perl #121734]
Selected Bug Fixes
until ($x = 1) { ... }
and... until $x = 1
now properly warn when syntax warnings are enabled. [perl #127333]socket() now leaves the error code returned by the system in
$!
on failure. [perl #128316]Assignment variants of any bitwise ops under the
bitwise
feature would crash if the left-hand side was an array or hash. [perl #128204]require
followed by a single colon (as infoo() ? require : ...
is now parsed correctly asrequire
with implicit $_, rather thanrequire ""
. [perl #128307]Scalar
keys %hash
can now be assigned to consistently in all scalar lvalue contexts. Previously it worked for some contexts but not others.List assignment to
vec
orsubstr
with an array or hash for its first argument used to result in crashes or "Can't coerce" error messages at run time, unlike scalar assignment, which would give an error at compile time. List assignment now gives a compile-time error, too. [perl #128260]
Acknowledgements
Perl 5.25.2 represents approximately 4 weeks of development since Perl 5.25.1 and contains approximately 32,000 lines of changes across 430 files from 28 authors.
Excluding auto-generated files, documentation and release tools, there were approximately 27,000 lines of changes to 300 .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.25.2:
Aaron Crane, Andreas König, Andy Lester, Chad Granum, Chase Whitener, Chris 'BinGOs' Williams, Craig A. Berry, Dagfinn Ilmari Mannsåker, Dan Collins, David Mitchell, Dominic Hargreaves, Ed Avis, Father Chrysostomos, H.Merijn Brand, Ivan Pozdeev, James E Keenan, Jarkko Hietaniemi, Jerry D. Hedden, Jim Cromie, Karl Williamson, Lukas Mai, Matthew Horsfall, Misty De Meo, Samuel Thibault, Sawyer X, Sullivan Beck, 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 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.
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.