perldelta - what is new for perl v5.27.1
This document describes differences between the 5.27.0 release and the 5.27.1 release.
If you are upgrading from an earlier release such as 5.26.0, first read perl5270delta, which describes differences between 5.26.0 and 5.27.0.
delete
delete can now be used on key/value slices, returning the keys along with the deleted values. [perl #131328]
Perl 5.27.1 retires various older hash functions which are not viewed as sufficiently secure for use in Perl. We now support four general purpose hash functions, Siphash (2-4 and 1-3 variants), and Zaphod32, and StadtX hash. In addition we support SBOX32 (a form of tabular hashing) for hashing short strings, in conjunction with any of the other hash functions provided.
By default Perl is configured to support SBOX hashing of strings up to 24 characters, in conjunction with StadtX hashing on 64 bit builds, and Zaphod32 hashing for 32 bit builds.
You may control these settings with the following options to Configure:
-DPERL_HASH_FUNC_SIPHASH -DPERL_HASH_FUNC_SIPHASH13 -DPERL_HASH_FUNC_STADTX -DPERL_HASH_FUNC_ZAPHOD32
To disable SBOX hashing you can use
-DPERL_HASH_USE_SBOX32_ALSO=0
And to set the maximum length to use SBOX32 hashing on with:
-DSBOX32_MAX_LEN=16
The maximum length allowed is 256. There probably isn't much point in setting it higher than the default.
Omitting the commas between variables passed to formats is no longer allowed. This has been deprecated since Perl 5.000.
:locked
:unique
These have been no-ops and deprecated since Perl 5.12 and 5.10, respectively.
\N{}
This has been deprecated since Perl 5.24.
Using open() and opendir() to associate both a filehandle and a dirhandle to the same symbol (glob or scalar) has been deprecated since Perl 5.10.
open()
opendir()
<<
<<""
Use of a bare terminator has been deprecated since Perl 5.000.
This used to work like setting it to undef, but has been deprecated since Perl 5.20.
undef
IV_MAX
This was deprecated since Perl 5.24.
B::OP::terse
Use B::Concise::b_terse instead.
B::Concise::b_terse
This was deprecated in Perl 5.004.
Code points over 0xFF do not make sense for bitwise operators.
0xFF
${^ENCODING}
This has been deprecated since Perl 5.22 and a no-op since Perl 5.26.
Previously the -S switch incorrectly treated backslash ("\") as an escape for colon when traversing the PATH environment variable. [perl #129183]
-S
PATH
On a perl built with debugging support, the H flag to the -D debugging option has been removed. This was supposed to dump hash values, but has been broken for many years.
H
-D
vec
Use of these is nonsensical, as vec is a bit-oriented operation, which operates on the underlying UTF-8 representation these strings must be in, and will likely give unexpected results.
"{"
Perl 5.26.0 fatalized some uses of an unescaped left brace, but an exception was made at the last minute, specifically crafted to be a minimal change to allow GNU Autoconf to work. This code is heavily depended upon, and continues to use the deprecated usage. Its use of an unescaped left brace is one where we have no intention of repurposing "{" to be something other than itself.
That exception is now generalized to include various other such cases where the "{" will not be repurposed. This is to get real experience with this more complicated change now, in case we need to issue a dot release if we find other things like Autoconf that are important to work around.
Note that these uses continue to raise a deprecation message.
File::Glob has been modified to remove unnecessary backtracking and recursion, thanks to Russ Cox. See https://research.swtch.com/glob for more details.
The ref() builtin is now much faster in boolean context, since it no longer bothers to construct a temporary string like Foo=ARRAY(0x134af48).
ref()
Foo=ARRAY(0x134af48)
Archive::Tar has been upgraded from version 2.24 to 2.26.
B::Deparse has been upgraded from version 1.40 to 1.41. It includes many bug fixes, and in particular, it now deparses variable attributes correctly:
my $x :foo; # used to deparse as # 'attributes'->import('main', \$x, 'foo'), my $x;
charnames has been upgraded from version 1.44 to 1.45.
Devel::PPPort has been upgraded from version 3.35 to 3.36.
DirHandle has been upgraded from version 1.04 to 1.05.
ExtUtils::Install has been upgraded from version 2.04 to 2.14.
ExtUtils::MakeMaker has been upgraded from version 7.24 to 7.30.
File::Path has been upgraded from version 2.12_01 to 2.14.
Filter::Util::Call has been upgraded from version 1.55 to 1.57.
GDBM_File has been upgraded from version 1.15 to 1.16.
Getopt::Long has been upgraded from version 2.49 to 2.5.
if has been upgraded from version 0.0606 to 0.0607.
IO::Socket::IP has been upgraded from version 0.38 to 0.39.
IPC::Cmd has been upgraded from version 0.96 to 0.98.
JSON::PP has been upgraded from version 2.27400_02 to 2.94.
Locale::Codes has been upgraded from version 3.42 to 3.52.
Module::CoreList has been upgraded from version 5.20170620 to 5.20170621.
mro has been upgraded from version 1.20 to 1.21.
PerlIO::scalar has been upgraded from version 0.26 to 0.27.
PerlIO::via has been upgraded from version 0.16 to 0.17.
Storable has been upgraded from version 2.62 to 2.63.
Test::Harness has been upgraded from version 3.38 to 3.39.
threads has been upgraded from version 2.15 to 2.16.
threads::shared has been upgraded from version 1.56 to 1.57.
version has been upgraded from version 0.9917 to 0.9918.
Tests were added and changed to reflect the other additions and changes in this release. Furthermore, these significant changes were made:
Testing of the XS-APItest directory is now done in parallel, where applicable.
Perl now includes a default .travis.yml file for Travis CI testing on github mirrors. [perl #123981]
Support for compiling perl on Windows using Microsoft Visual Studio 2017 (containing Visual C++ 14.1) has been added.
The PL_statbuf interpreter variable has been removed.
PL_statbuf
The deprecated function to_utf8_case(), accessible from XS code, has been removed.
to_utf8_case()
A new function is_utf8_invariant_string_loc() has been added that is like is_utf8_invariant_string() but takes an extra pointer parameter into which is stored the location of the first variant character, if any are found.
is_utf8_invariant_string_loc()
is_utf8_invariant_string()
Fetching the name of a glob that was previously UTF-8 but wasn't any longer would return that name flagged as UTF-8. [perl #131263]
The perl sprintf() function (via the underlying C function Perl_sv_vcatpvfn_flags()) has been heavily reworked to fix many minor bugs, including the integer wrapping of large width and precision specifiers and potential buffer overruns. It has also been made faster in many cases.
sprintf()
Perl_sv_vcatpvfn_flags()
Exiting from an eval, whether normally or via an exception, now always frees temporary values (possibly calling destructors) before setting $@. For example:
eval
$@
sub DESTROY { eval { die "died in DESTROY"; } } eval { bless []; }; # $@ used to be equal to "died in DESTROY" here; it's now "".
Perl 5.27.1 represents approximately 3 weeks of development since Perl 5.27.0 and contains approximately 62,000 lines of changes across 510 files from 30 authors.
Excluding auto-generated files, documentation and release tools, there were approximately 55,000 lines of changes to 380 .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.27.1:
Aaron Crane, Abigail, Andy Dougherty, Andy Lester, Aristotle Pagaltzis, Chris 'BinGOs' Williams, Craig A. Berry, Dagfinn Ilmari Mannsåker, Dan Collins, David Mitchell, Eric Herman, Eugen Konkov, Father Chrysostomos, Graham Knop, H.Merijn Brand, Jacques Germishuys, James E Keenan, Jerry D. Hedden, John Peacock, Karl Williamson, Ken Cotterill, Lukas Mai, Matthew Horsfall, Sawyer X, Steve Hay, Sullivan Beck, Thomas Sibley, Tony Cook, Yves Orton, Zefram.
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.
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.
perl -V
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.
If you wish to thank the Perl 5 Porters for the work we had done in Perl 5, you can do so by running the perlthanks program:
perlthanks
This will send an email to the Perl 5 Porters list with your show of thanks.
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.
To install utf8, copy and paste the appropriate command in to your terminal.
cpanm
cpanm utf8
CPAN shell
perl -MCPAN -e shell install utf8
For more information on module installation, please visit the detailed CPAN module installation guide.