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