This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
epigraph for 5.27.1
[perl5.git] / pod / perldelta.pod
CommitLineData
44691e6f
AB
1=encoding utf8
2
3=head1 NAME
4
1b510166 5perldelta - what is new for perl v5.27.1
89853d76 6
b5cbfe35 7=head1 DESCRIPTION
89853d76 8
1b510166 9This document describes differences between the 5.27.0 release and the 5.27.1
b5cbfe35 10release.
89853d76 11
1b510166
S
12If you are upgrading from an earlier release such as 5.26.0, first read
13L<perl5270delta>, which describes differences between 5.26.0 and 5.27.0.
14
1b510166
S
15=head1 Core Enhancements
16
1e426ec5
DIM
17=head2 L<C<delete>|perlfunc/delete EXPR> on key/value slices
18
19L<C<delete>|perlfunc/delete EXPR> can now be used on key/value slices,
20returning the keys along with the deleted values.
21L<[perl #131328]|https://rt.perl.org/Ticket/Display.html?id=131328>
22
1b510166
S
23=head1 Security
24
fbdbf2a7
YO
25=head2 Default Hash Function Change
26
90d63dc7 27Perl 5.27.1 retires various older hash functions which are not viewed as
fbdbf2a7
YO
28sufficiently secure for use in Perl. We now support four general purpose
29hash functions, Siphash (2-4 and 1-3 variants), and Zaphod32, and StadtX
30hash. In addition we support SBOX32 (a form of tabular hashing) for hashing
31short strings, in conjunction with any of the other hash functions provided.
32
33By default Perl is configured to support SBOX hashing of strings up to 24
34characters, in conjunction with StadtX hashing on 64 bit builds, and
35Zaphod32 hashing for 32 bit builds.
36
37You may control these settings with the following options to Configure:
38
39 -DPERL_HASH_FUNC_SIPHASH
40 -DPERL_HASH_FUNC_SIPHASH13
41 -DPERL_HASH_FUNC_STADTX
42 -DPERL_HASH_FUNC_ZAPHOD32
43
44To disable SBOX hashing you can use
45
46 -DPERL_HASH_USE_SBOX32_ALSO=0
47
48And to set the maximum length to use SBOX32 hashing on with:
49
50 -DSBOX32_MAX_LEN=16
51
52The maximum length allowed is 256. There probably isn't much point
53in setting it higher than the default.
1b510166
S
54
55=head1 Incompatible Changes
56
c7321345
DIM
57=head2 Comma-less variable lists in formats are no longer allowed
58
59Omitting the commas between variables passed to formats is no longer
1cf41740 60allowed. This has been deprecated since Perl 5.000.
c7321345 61
85cd139f
DIM
62=head2 The C<:locked> and C<:unique> attributes have been removed
63
1cf41740 64These have been no-ops and deprecated since Perl 5.12 and 5.10,
85cd139f
DIM
65respectively.
66
be332ba0
KW
67=head2 C<\N{}> with nothing between the braces is now illegal.
68
69This has been deprecated since Perl 5.24.
70
489c16bf
DIM
71=head2 Opening the same symbol as both a file and directory handle is no longer allowed
72
3f72b2c8 73Using C<open()> and C<opendir()> to associate both a filehandle and a dirhandle
489c16bf
DIM
74to the same symbol (glob or scalar) has been deprecated since Perl 5.10.
75
c6e25b09
DIM
76=head2 Use of bare C<< << >> to mean C<< <<"" >> is no longer allowed
77
78Use of a bare terminator has been deprecated since Perl 5.000.
79
520b6fb6
DIM
80=head2 Setting $/ to a reference to a non-positive integer no longer allowed
81
82This used to work like setting it to C<undef>, but has been deprecated
83since Perl 5.20.
84
02729eab
A
85=head2 Unicode code points with values exceeding C<IV_MAX> are now fatal.
86
87This was deprecated since Perl 5.24.
88
d0d6d4ce
A
89=head2 C<B::OP::terse> no longer exists.
90
91Use C<B::Concise::b_terse> instead.
92
64278e8c
A
93=head2 Use of inherited AUTOLOAD for non-methods is no longer allowed.
94
95This was deprecated in Perl 5.004.
96
5d09ee1c
A
97=head2 Use of strings with code points over 0xFF is not allowed for
98bitwise string operators
99
3f72b2c8 100Code points over C<0xFF> do not make sense for bitwise operators.
5d09ee1c 101
fd503f5c
DIM
102=head2 Setting C<${^ENCODING}> to a defined value is now illegal
103
104This has been deprecated since Perl 5.22 and a no-op since Perl 5.26.
105
c8787424
TC
106=head2 Backslash no longer escapes colon in PATH for the -S switch
107
108Previously the C<-S> switch incorrectly treated backslash ("\") as an
109escape for colon when traversing the C<PATH> environment variable.
110[perl #129183]
111
9a4e033c
DM
112=head2 the -DH (DEBUG_H) misfeature has been removed
113
114On a perl built with debugging support, the C<H> flag to the C<-D>
115debugging option has been removed. This was supposed to dump hash values,
116but has been broken for many years.
117
1b510166
S
118=head1 Deprecations
119
315f3fc1
KW
120=head2 Use of L<C<vec>|perlfunc/vec EXPR,OFFSET,BITS> on strings with code
121points above 0xFF is deprecated.
122
123Use of these is nonsensical, as C<vec> is a bit-oriented operation,
124which operates on the underlying UTF-8 representation these strings must
125be in, and will likely give unexpected results.
126
53fdf12a
KW
127=head2 Some uses of unescaped C<"{"> are no longer fatal
128
129Perl 5.26.0 fatalized some uses of an unescaped left brace, but an
130exception was made at the last minute, specifically crafted to be a
131minimal change to allow GNU Autoconf to work. This code is heavily
132depended upon, and continues to use the deprecated usage. Its use of an
133unescaped left brace is one where we have no intention of repurposing
134C<"{"> to be something other than itself.
135
136That exception is now generalized to include various other such cases
137where the C<"{"> will not be repurposed. This is to get real experience
138with this more complicated change now, in case we need to issue a dot
139release if we find other things like Autoconf that are important to work
140around.
141
142Note that these uses continue to raise a deprecation message.
143
1b510166
S
144=head1 Performance Enhancements
145
1b510166
S
146=over 4
147
148=item *
149
3f72b2c8 150L<File::Glob> has been modified to remove unnecessary backtracking and
b3452811
YO
151recursion, thanks to Russ Cox. See L<https://research.swtch.com/glob>
152for more details.
1b510166 153
9a4e033c
DM
154=item *
155
3f72b2c8 156The C<ref()> builtin is now much faster in boolean context, since it no
9a4e033c
DM
157longer bothers to construct a temporary string like C<Foo=ARRAY(0x134af48)>.
158
1b510166 159=back
16beba24 160
b5cbfe35 161=head1 Modules and Pragmata
2c8edc25 162
a049258c
S
163=head2 Updated Modules and Pragmata
164
165=over 4
fbe3f407 166
759020c9 167=item *
7ca0bfc4 168
90d63dc7 169L<Archive::Tar> has been upgraded from version 2.24 to 2.26.
1b510166 170
9a4e033c
DM
171=item *
172
173L<B::Deparse> has been upgraded from version 1.40 to 1.41. It includes
174many bug fixes, and in particular, it now deparses variable attributes
175correctly:
176
177 my $x :foo; # used to deparse as
178 # 'attributes'->import('main', \$x, 'foo'), my $x;
179
1b510166
S
180=item *
181
90d63dc7 182L<charnames> has been upgraded from version 1.44 to 1.45.
1b510166 183
90d63dc7 184=item *
1b510166 185
90d63dc7 186L<Devel::PPPort> has been upgraded from version 3.35 to 3.36.
1b510166 187
90d63dc7 188=item *
1b510166 189
90d63dc7 190L<DirHandle> has been upgraded from version 1.04 to 1.05.
1b510166 191
90d63dc7 192=item *
f717dc4d 193
90d63dc7 194L<ExtUtils::Install> has been upgraded from version 2.04 to 2.14.
1b510166 195
90d63dc7 196=item *
1b510166 197
90d63dc7 198L<ExtUtils::MakeMaker> has been upgraded from version 7.24 to 7.30.
a049258c 199
2c8edc25 200=item *
d5c7a4fc 201
90d63dc7 202L<File::Path> has been upgraded from version 2.12_01 to 2.14.
a049258c 203
90d63dc7 204=item *
3abe9611 205
90d63dc7 206L<Filter::Util::Call> has been upgraded from version 1.55 to 1.57.
1b510166 207
90d63dc7 208=item *
1b510166 209
90d63dc7 210L<GDBM_File> has been upgraded from version 1.15 to 1.16.
1b510166 211
90d63dc7 212=item *
1b510166 213
90d63dc7 214L<Getopt::Long> has been upgraded from version 2.49 to 2.5.
1b510166 215
90d63dc7 216=item *
1b510166 217
90d63dc7 218L<if> has been upgraded from version 0.0606 to 0.0607.
1b510166
S
219
220=item *
221
90d63dc7 222L<IO::Socket::IP> has been upgraded from version 0.38 to 0.39.
1b510166 223
90d63dc7 224=item *
1b510166 225
90d63dc7 226L<IPC::Cmd> has been upgraded from version 0.96 to 0.98.
1b510166
S
227
228=item *
229
90d63dc7 230L<JSON::PP> has been upgraded from version 2.27400_02 to 2.94.
1b510166 231
90d63dc7 232=item *
1b510166 233
90d63dc7 234L<Locale::Codes> has been upgraded from version 3.42 to 3.52.
1b510166 235
90d63dc7 236=item *
1b510166 237
90d63dc7 238L<Module::CoreList> has been upgraded from version 5.20170620 to 5.20170621.
1b510166
S
239
240=item *
241
90d63dc7 242L<mro> has been upgraded from version 1.20 to 1.21.
1b510166 243
90d63dc7 244=item *
0cc8c746 245
90d63dc7 246L<PerlIO::scalar> has been upgraded from version 0.26 to 0.27.
0cc8c746 247
90d63dc7 248=item *
0cc8c746 249
90d63dc7 250L<PerlIO::via> has been upgraded from version 0.16 to 0.17.
0cc8c746 251
90d63dc7 252=item *
0cc8c746 253
90d63dc7 254L<Storable> has been upgraded from version 2.62 to 2.63.
1b510166
S
255
256=item *
257
90d63dc7 258L<Test::Harness> has been upgraded from version 3.38 to 3.39.
1b510166 259
90d63dc7 260=item *
1b510166 261
90d63dc7 262L<threads> has been upgraded from version 2.15 to 2.16.
1b510166 263
90d63dc7 264=item *
1b510166 265
90d63dc7 266L<threads::shared> has been upgraded from version 1.56 to 1.57.
1b510166
S
267
268=item *
269
90d63dc7 270L<version> has been upgraded from version 0.9917 to 0.9918.
1b510166
S
271
272=back
273
274=head1 Testing
275
f717dc4d
KW
276Tests were added and changed to reflect the other additions and
277changes in this release. Furthermore, these significant changes were
278made:
1b510166
S
279
280=over 4
281
282=item *
283
f717dc4d
KW
284Testing of the XS-APItest directory is now done in parallel, where
285applicable.
1b510166 286
10b7d799
TC
287=item *
288
289Perl now includes a default F<.travis.yml> file for Travis CI testing
290on github mirrors. [perl #123981]
291
1b510166
S
292=back
293
294=head1 Platform Support
295
90d63dc7 296=head2 Platform-Specific Notes
1b510166
S
297
298=over 4
299
d8efeb46 300=item Windows
1b510166 301
d8efeb46
SH
302=over 4
303
304=item *
305
306Support for compiling perl on Windows using Microsoft Visual Studio 2017
307(containing Visual C++ 14.1) has been added.
308
309=back
1b510166
S
310
311=back
312
1b510166
S
313=head1 Internal Changes
314
1b510166
S
315=over 4
316
317=item *
318
7e30e49f 319The C<PL_statbuf> interpreter variable has been removed.
1b510166 320
f566c7cf
KW
321=item *
322
323The deprecated function C<to_utf8_case()>, accessible from XS code, has
324been removed.
325
0cbf5865
KW
326=item *
327
328A new function
329L<C<is_utf8_invariant_string_loc()>|perlapi/is_utf8_invariant_string_loc>
330has been added that is like
331L<C<is_utf8_invariant_string()>|perlapi/is_utf8_invariant_string>
332but takes an extra pointer parameter into which is stored the location
333of the first variant character, if any are found.
334
1b510166
S
335=back
336
337=head1 Selected Bug Fixes
338
1b510166
S
339=over 4
340
341=item *
342
8ee6927b
TC
343Fetching the name of a glob that was previously UTF-8 but wasn't any
344longer would return that name flagged as UTF-8. [perl #131263]
1b510166 345
9a4e033c
DM
346=item *
347
81ee0f04
S
348The perl C<sprintf()> function (via the underlying C function
349C<Perl_sv_vcatpvfn_flags()>) has been heavily reworked to fix many minor
9a4e033c
DM
350bugs, including the integer wrapping of large width and precision
351specifiers and potential buffer overruns. It has also been made faster in
352many cases.
353
354=item *
355
356Exiting from an C<eval>, whether normally or via an exception, now always
357frees temporary values (possibly calling destructors) I<before> setting
358C<$@>. For example:
359
360 sub DESTROY { eval { die "died in DESTROY"; } }
361 eval { bless []; };
362 # $@ used to be equal to "died in DESTROY" here; it's now "".
363
1b510166
S
364=back
365
90d63dc7 366=head1 Acknowledgements
1b510166 367
90d63dc7
EH
368Perl 5.27.1 represents approximately 3 weeks of development since Perl 5.27.0
369and contains approximately 62,000 lines of changes across 510 files from 30
370authors.
1b510166 371
90d63dc7
EH
372Excluding auto-generated files, documentation and release tools, there were
373approximately 55,000 lines of changes to 380 .pm, .t, .c and .h files.
1b510166 374
90d63dc7
EH
375Perl continues to flourish into its third decade thanks to a vibrant community
376of users and developers. The following people are known to have contributed the
377improvements that became Perl 5.27.1:
1b510166 378
90d63dc7
EH
379Aaron Crane, Abigail, Andy Dougherty, Andy Lester, Aristotle Pagaltzis, Chris
380'BinGOs' Williams, Craig A. Berry, Dagfinn Ilmari Mannsåker, Dan Collins,
381David Mitchell, Eric Herman, Eugen Konkov, Father Chrysostomos, Graham Knop,
382H.Merijn Brand, Jacques Germishuys, James E Keenan, Jerry D. Hedden, John
383Peacock, Karl Williamson, Ken Cotterill, Lukas Mai, Matthew Horsfall, Sawyer X,
384Steve Hay, Sullivan Beck, Thomas Sibley, Tony Cook, Yves Orton, Zefram.
1b510166 385
90d63dc7
EH
386The list above is almost certainly incomplete as it is automatically generated
387from version control history. In particular, it does not include the names of
388the (very much appreciated) contributors who reported issues to the Perl bug
389tracker.
0cc8c746 390
90d63dc7
EH
391Many of the changes included in this version originated in the CPAN modules
392included in Perl's core. We're grateful to the entire CPAN community for
393helping Perl to flourish.
2e0dcc12 394
90d63dc7
EH
395For a more complete list of all of Perl's historical contributors, please see
396the F<AUTHORS> file in the Perl source distribution.
f5b73711 397
44691e6f
AB
398=head1 Reporting Bugs
399
b5cbfe35
S
400If you find what you think is a bug, you might check the perl bug database
401at L<https://rt.perl.org/> . There may also be information at
402L<http://www.perl.org/> , the Perl Home Page.
44691e6f 403
e08634c5
SH
404If you believe you have an unreported bug, please run the L<perlbug> program
405included with your release. Be sure to trim your bug down to a tiny but
406sufficient test case. Your bug report, along with the output of C<perl -V>,
b5cbfe35 407will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
44691e6f 408
87c118b9
DM
409If the bug you are reporting has security implications which make it
410inappropriate to send to a publicly archived mailing list, then see
c0ea3294
SH
411L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION>
412for details of how to report the issue.
44691e6f 413
390ae6f9
S
414=head1 Give Thanks
415
416If you wish to thank the Perl 5 Porters for the work we had done in Perl 5,
417you can do so by running the C<perlthanks> program:
418
419 perlthanks
420
421This will send an email to the Perl 5 Porters list with your show of thanks.
422
44691e6f
AB
423=head1 SEE ALSO
424
e08634c5
SH
425The F<Changes> file for an explanation of how to view exhaustive details on
426what changed.
44691e6f
AB
427
428The F<INSTALL> file for how to build Perl.
429
430The F<README> file for general stuff.
431
432The F<Artistic> and F<Copying> files for copyright information.
433
434=cut