Commit | Line | Data |
---|---|---|
915366d4 A |
1 | =encoding utf8 |
2 | ||
3 | =head1 NAME | |
4 | ||
5 | perl5278delta - what is new for perl v5.27.8 | |
6 | ||
7 | =head1 DESCRIPTION | |
8 | ||
9 | This document describes differences between the 5.27.7 release and the 5.27.8 | |
10 | release. | |
11 | ||
12 | If you are upgrading from an earlier release such as 5.27.6, first read | |
13 | L<perl5277delta>, which describes differences between 5.27.6 and 5.27.7. | |
14 | ||
15 | =head1 Core Enhancements | |
16 | ||
17 | =head2 Close-on-exec flag set atomically | |
18 | ||
19 | When opening a file descriptor, perl now generally opens it with its | |
20 | close-on-exec flag already set, on platforms that support doing so. | |
21 | This improves thread safety, because it means that an C<exec> initiated | |
22 | by one thread can no longer cause a file descriptor in the process | |
23 | of being opened by another thread to be accidentally passed to the | |
24 | executed program. | |
25 | ||
26 | Additionally, perl now sets the close-on-exec flag more reliably, whether | |
27 | it does so atomically or not. Most file descriptors were getting the | |
28 | flag set, but some were being missed. | |
29 | ||
30 | =head2 Mixed Unicode scripts are now detectable | |
31 | ||
32 | A mixture of scripts, such as Cyrillic and Latin, in a string is often | |
33 | the sign of a spoofing attack. A new regular expression construct | |
34 | now allows for easy detection of these. For example, you can say | |
35 | ||
85a85487 | 36 | qr/(+script_run: \d+ \b )/x |
915366d4 A |
37 | |
38 | And the digits matched will all be from the same set of 10. You won't | |
39 | get a look-alike digit from a different script that has a different | |
40 | value than what it appears to be. | |
41 | ||
42 | =head2 String- and number-specific bitwise ops are no longer experimental | |
43 | ||
44 | The new string-specific (C<&. |. ^. ~.>) and number-specific (C<& | ^ ~>) | |
45 | bitwise operators introduced in Perl 5.22 are no longer experimental. | |
46 | Because the number-specific ops are spelled the same way as the existing | |
47 | operators that choose their behaviour based on their operands, these | |
48 | operators must still be enabled via the "bitwise" feature, in either of | |
49 | these two ways: | |
50 | ||
51 | use feature "bitwise"; | |
52 | ||
53 | use v5.28; # "bitwise" now included | |
54 | ||
55 | They are also now enabled by the B<-E> command-line switch. | |
56 | ||
57 | The "bitwise" feature no longer emits a warning. Existing code that | |
58 | disables the "experimental::bitwise" warning category that the feature | |
59 | previously used will continue to work. | |
60 | ||
61 | One caveat that module authors ought to be aware of is that the numeric | |
62 | operators now pass a fifth TRUE argument to overload methods. Any methods | |
63 | that check the number of operands may croak if they do not expect so many. | |
64 | XS authors in particular should be aware that this: | |
65 | ||
66 | SV * | |
67 | bitop_handler (lobj, robj, swap) | |
68 | ||
69 | may need to be changed to this: | |
70 | ||
71 | SV * | |
72 | bitop_handler (lobj, robj, swap, ...) | |
73 | ||
74 | =head1 Incompatible Changes | |
75 | ||
76 | =head2 Smartmatch and switch reversion | |
77 | ||
78 | The changes to the experimental smart match operator (C<~~>) and switch | |
79 | (C<given>/C<when>) constructs that were made in Perl 5.27.7 have been | |
80 | reverted due to the extent of the trouble caused to CPAN modules. | |
81 | It is expected that smartmatch will be changed again in the future, | |
82 | but preceded by some kind of explicit deprecation. | |
83 | ||
84 | =head2 Subroutine attribute and signature order | |
85 | ||
86 | The experimental subroutine signatures feature has been changed so that | |
87 | subroutine attributes must now come before the signature rather than | |
88 | after. This is because attributes like C<:lvalue> can affect the | |
89 | compilation of code within the signature, for example: | |
90 | ||
91 | sub f :lvalue ($a = do { $x = "abc"; return substr($x,0,1)}) { ...} | |
92 | ||
93 | Note that this the second time they have been flipped: | |
94 | ||
9264a512 DM |
95 | sub f :lvalue ($a, $b) { ... }; # 5.20; 5.28 onwards |
96 | sub f ($a, $b) :lvalue { ... }; # 5.22 - 5.26 | |
915366d4 A |
97 | |
98 | =head1 Deprecations | |
99 | ||
100 | =head2 Use of code points over 0xFF in string bitwise operators | |
101 | ||
102 | Some uses of these already are illegal after a previous deprecation | |
103 | cycle. This deprecates the remaining uses. See L<perldeprecation>. | |
104 | ||
105 | =head2 Use of unescaped C<"{"> immediately after a C<"("> in regular | |
106 | expression patterns | |
107 | ||
108 | Using unescaped left braces is officially deprecated everywhere, but it | |
109 | is not enforced in contexts where their use does not interfere with | |
110 | expected extensions to the language. A deprecation is added in this | |
111 | release when the brace appears immediately after an opening parenthesis. | |
112 | Before this, even if the brace was part of a legal quantifier, it was | |
113 | not interpreted as such, but as the literal characters, unlike other | |
114 | quantifiers that follow a C<"("> which are considered errors. Now, | |
115 | their use will raise a deprecation message, unless turned off. | |
116 | ||
117 | =head1 Performance Enhancements | |
118 | ||
119 | =over 4 | |
120 | ||
121 | =item * | |
122 | ||
123 | The performance of pattern matching C<[[:ascii:]]> and C<[[:^ascii:]]> | |
124 | has been improved significantly except on EBCDIC platforms. | |
125 | ||
126 | =back | |
127 | ||
128 | =head1 Modules and Pragmata | |
129 | ||
130 | =head2 Updated Modules and Pragmata | |
131 | ||
132 | =over 4 | |
133 | ||
134 | =item * | |
135 | ||
136 | L<B> has been upgraded from version 1.73 to 1.74. | |
137 | ||
138 | =item * | |
139 | ||
140 | L<B::Deparse> has been upgraded from version 1.46 to 1.47. | |
141 | ||
142 | =item * | |
143 | ||
144 | L<Data::Dumper> has been upgraded from version 2.169 to 2.170. | |
145 | ||
146 | =item * | |
147 | ||
148 | L<Devel::PPPort> has been upgraded from version 3.37 to 3.38. | |
149 | ||
150 | =item * | |
151 | ||
152 | L<Digest::SHA> has been upgraded from version 6.00 to 6.01. | |
153 | ||
154 | =item * | |
155 | ||
156 | L<Encode> has been upgraded from version 2.93 to 2.94. | |
157 | ||
158 | =item * | |
159 | ||
160 | L<ExtUtils::Miniperl> has been upgraded from version 1.07 to 1.08. | |
161 | ||
162 | =item * | |
163 | ||
164 | L<feature> has been upgraded from version 1.50 to 1.51. | |
165 | ||
166 | =item * | |
167 | ||
168 | L<File::Spec> has been upgraded from version 3.71 to 3.72. | |
169 | ||
170 | =item * | |
171 | ||
172 | L<JSON::PP> has been upgraded from version 2.97000 to 2.97001. | |
173 | ||
174 | =item * | |
175 | ||
176 | L<Module::CoreList> has been upgraded from version 5.20171220 to 5.20180120. | |
177 | ||
178 | =item * | |
179 | ||
180 | L<Opcode> has been upgraded from version 1.42 to 1.43. | |
181 | ||
182 | =item * | |
183 | ||
184 | L<overload> has been upgraded from version 1.29 to 1.30. | |
185 | ||
186 | =item * | |
187 | ||
188 | L<Pod::Functions> has been upgraded from version 1.12 to 1.13. | |
189 | ||
190 | =item * | |
191 | ||
192 | L<Pod::Html> has been upgraded from version 1.23 to 1.24. | |
193 | ||
194 | =item * | |
195 | ||
196 | The podlators bundle has been upgraded from version 4.09 to 4.10. | |
197 | ||
198 | Man page references and function names now follow the Linux man page | |
199 | formatting standards, instead of the Solaris standard. | |
200 | ||
201 | =item * | |
202 | ||
203 | L<Socket> has been upgraded from version 2.020_04 to 2.027. | |
204 | ||
205 | =item * | |
206 | ||
207 | L<Time::HiRes> has been upgraded from version 1.9748 to 1.9752. | |
208 | ||
209 | =item * | |
210 | ||
211 | L<Unicode::UCD> has been upgraded from version 0.69 to 0.70. | |
212 | ||
213 | The function C<num> now accepts an optional parameter to help in | |
214 | diagnosing error returns. | |
215 | ||
216 | =item * | |
217 | ||
218 | L<utf8> has been upgraded from version 1.20 to 1.21. | |
219 | ||
220 | =item * | |
221 | ||
222 | L<warnings> has been upgraded from version 1.39 to 1.40. | |
223 | ||
224 | =item * | |
225 | ||
226 | L<XSLoader> has been upgraded from version 0.29 to 0.30. | |
227 | ||
228 | Platforms that use C<mod2fname> to edit the names of loadable | |
229 | libraries now look for bootstrap (.bs) files under the correct, | |
230 | non-edited name. | |
231 | ||
232 | =back | |
233 | ||
234 | =head1 Documentation | |
235 | ||
236 | =head2 Changes to Existing Documentation | |
237 | ||
238 | We have attempted to update the documentation to reflect the changes | |
239 | listed in this document. If you find any we have missed, send email | |
240 | to L<perlbug@perl.org|mailto:perlbug@perl.org>. | |
241 | ||
242 | Additionally, the following selected changes have been made: | |
243 | ||
244 | =head3 L<perlembed> | |
245 | ||
246 | =over 4 | |
247 | ||
248 | =item * | |
249 | ||
250 | An example in L<perlembed> used the string value of C<ERRSV> as a | |
251 | format string when calling croak(). If that string contains format | |
252 | codes such as C<%s> this could crash the program. | |
253 | ||
254 | This has been changed to a call to croak_sv(). | |
255 | ||
256 | An alternative could have been to supply a trivial format string: | |
257 | ||
258 | croak("%s", SvPV_nolen(ERRSV)); | |
259 | ||
260 | or as a special case for C<ERRSV> simply: | |
261 | ||
262 | croak(NULL); | |
263 | ||
264 | =back | |
265 | ||
266 | =head3 L<perlfunc> | |
267 | ||
268 | =over 4 | |
269 | ||
270 | =item * | |
271 | ||
272 | Improve the documentation of C<each> with a slightly more | |
273 | explicit description of the sharing of iterator state, and with | |
274 | caveats regarding the fragility of while-each loops. [perl #132644] | |
275 | ||
276 | =back | |
277 | ||
278 | =head3 L<perlfunc>, L<perlop>, L<perlsyn> | |
279 | ||
280 | =over 4 | |
281 | ||
282 | =item * | |
283 | ||
284 | Improve the documentation of while condition magic in various | |
285 | places. [perl #132644] | |
286 | ||
287 | =back | |
288 | ||
289 | =head3 L<perlrun> | |
290 | ||
291 | =over 4 | |
292 | ||
293 | =item * | |
294 | ||
295 | Clarify the documentation of B<< -m >>. [perl #131518] | |
296 | ||
297 | =back | |
298 | ||
299 | =head1 Diagnostics | |
300 | ||
301 | The following additions or changes have been made to diagnostic output, | |
302 | including warnings and fatal error messages. For the complete list of | |
303 | diagnostic messages, see L<perldiag>. | |
304 | ||
305 | =head2 New Diagnostics | |
306 | ||
307 | =head3 New Errors | |
308 | ||
309 | =over 4 | |
310 | ||
311 | =item * | |
312 | ||
313 | L<Can't "goto" into a binary or list expression|perldiag/"Can't E<quot>gotoE<quot> into a binary or list expression"> | |
314 | ||
315 | Use of C<goto> to jump into the parameter of a binary or list operator has | |
316 | been prohibited, to prevent crashes and stack corruption. [perl #130936] | |
317 | ||
318 | =back | |
319 | ||
320 | =head2 Changes to Existing Diagnostics | |
321 | ||
322 | =over 4 | |
323 | ||
324 | =item * | |
325 | ||
326 | The C<< Unable to flush stdout >> error message was missing a trailing | |
327 | newline. [debian #875361] | |
328 | ||
329 | =back | |
330 | ||
331 | =head1 Testing | |
332 | ||
333 | Tests were added and changed to reflect the other additions and | |
334 | changes in this release. Furthermore, these significant changes were | |
335 | made: | |
336 | ||
337 | =over 4 | |
338 | ||
339 | =item * | |
340 | ||
341 | Allow override of watchdog timer count in F<re/pat_psycho.t>. | |
342 | ||
343 | This test can take a long time to run, so there is a timer to keep | |
344 | this in check (currently, 5 minutes). This commit adds checking | |
345 | the environment variable C<< PERL_TEST_TIME_OUT_FACTOR >>; if set, | |
346 | the time out setting is multiplied by its value. | |
347 | ||
348 | =back | |
349 | ||
350 | =head1 Platform Support | |
351 | ||
352 | =head2 Platform-Specific Notes | |
353 | ||
354 | =over 4 | |
355 | ||
356 | =item Cygwin | |
357 | ||
358 | A build with the quadmath library can now be done on Cygwin. | |
359 | ||
360 | =item FreeBSD | |
361 | ||
362 | FreeBSD's F<< /usr/share/mk/sys.mk >> specifies C<< -O2 >> for | |
363 | architectures other than arm and mips. By default, compile perl | |
364 | with the same optimization levels. | |
365 | ||
366 | =item VMS | |
367 | ||
368 | Several fix-ups for F<configure.com>, marking function VMS has | |
369 | (or doesn't have). | |
370 | ||
371 | ||
372 | =back | |
373 | ||
374 | =head1 Internal Changes | |
375 | ||
376 | =over 4 | |
377 | ||
378 | =item * | |
379 | ||
380 | The format of the non-utf8 transliteration table attached to the C<op_pv> | |
381 | field of C<OP_TRANS>/C<OP_TRANSR> ops has changed. It's now a | |
382 | C<struct OPtrans_map>. | |
383 | ||
384 | =back | |
385 | ||
386 | =head1 Selected Bug Fixes | |
387 | ||
388 | =over 4 | |
389 | ||
390 | =item * | |
391 | ||
392 | The C<printf> format specifier C<%.0f> no longer rounds incorrectly | |
393 | [perl #47602], and now shows the correct sign for a negative zero. | |
394 | ||
395 | =item * | |
396 | ||
397 | Fixed a use after free bug in pp_list introduced in 5.27.1. [perl #131954] | |
398 | ||
399 | =item * | |
400 | ||
401 | Don't stringify numeric first arguments to | |
402 | C<< system() >> on Windows or VMS. [perl #132633] | |
403 | ||
404 | =item * | |
405 | ||
406 | Fixed an issue where the error C<< Scalar value @arrayname[0] better | |
407 | written as $arrayname >> would give an error C<< Cannot printf Inf with 'c' >> | |
408 | when arrayname starts with C<< Inf >>. [perl #132645] | |
409 | ||
410 | =item * | |
411 | ||
412 | The Perl implementation of C<< getcwd() >> in C<< Cwd >> in the PathTools | |
413 | distribution now behaves the same as XS implementation on errors: it | |
414 | returns an error, and sets C<< $! >>. [perl #132648] | |
415 | ||
416 | =item * | |
417 | ||
418 | Fixed argument counting in multiconcat when concatenating adjacent constants. | |
419 | [perl #132646] | |
420 | ||
421 | =item * | |
422 | ||
423 | Vivify array elements when putting them on the stack. | |
424 | Fixes [perl #8910] (reported in April 2002). | |
425 | ||
426 | =item * | |
427 | ||
428 | Fixed parsing of braced subscript after parens. Fixes [perl #8045] | |
429 | (reported in December 2001). | |
430 | ||
431 | =item * | |
432 | ||
433 | C<tr/non_utf8/long_non_utf8/c> could give the wrong results when the | |
434 | length of the replacement character list was greater than 0x7fff. | |
435 | ||
436 | =item * | |
437 | ||
438 | C<tr/non_utf8/non_utf8/cd> failed to add the implied | |
439 | C<\x{100}-\x{7fffffff}> to the search character list. | |
440 | ||
441 | =back | |
442 | ||
443 | =head1 Known Problems | |
444 | ||
445 | =over 4 | |
446 | ||
447 | =item * | |
448 | ||
449 | The bugfix for [perl #2754] in Perl 5.27.7 turned out to cause so much | |
450 | trouble on CPAN [perl #132577] that it is being postponed. The bug has | |
451 | been restored, so C<exit(0)> in a C<UNITCHECK> or C<CHECK> block now | |
452 | once again permits the main program to run, and C<exit(0)> in a C<BEGIN> | |
453 | block once again permits C<INIT> blocks to run before exiting. The bug | |
454 | will be fixed again for Perl 5.30. | |
455 | ||
456 | =back | |
457 | ||
458 | =head1 Acknowledgements | |
459 | ||
460 | Perl 5.27.8 represents approximately 4 weeks of development since Perl | |
461 | 5.27.7 and contains approximately 33,000 lines of changes across 290 files | |
462 | from 17 authors. | |
463 | ||
464 | Excluding auto-generated files, documentation and release tools, there were | |
465 | approximately 25,000 lines of changes to 160 .pm, .t, .c and .h files. | |
466 | ||
467 | Perl continues to flourish into its third decade thanks to a vibrant | |
468 | community of users and developers. The following people are known to have | |
469 | contributed the improvements that became Perl 5.27.8: | |
470 | ||
471 | Abigail, Chris 'BinGOs' Williams, Craig A. Berry, Dagfinn Ilmari Mannsåker, | |
472 | David Mitchell, Father Chrysostomos, James E Keenan, Karen Etheridge, Karl | |
473 | Williamson, Niko Tyni, Pali, Peter John Acklam, Scott Lanning, Tomasz | |
474 | Konojacki, Tom Hukins, Tony Cook, Zefram. | |
475 | ||
476 | The list above is almost certainly incomplete as it is automatically | |
477 | generated from version control history. In particular, it does not include | |
478 | the names of the (very much appreciated) contributors who reported issues to | |
479 | the Perl bug tracker. | |
480 | ||
481 | Many of the changes included in this version originated in the CPAN modules | |
482 | included in Perl's core. We're grateful to the entire CPAN community for | |
483 | helping Perl to flourish. | |
484 | ||
485 | For a more complete list of all of Perl's historical contributors, please | |
486 | see the F<AUTHORS> file in the Perl source distribution. | |
487 | ||
488 | =head1 Reporting Bugs | |
489 | ||
490 | If you find what you think is a bug, you might check the perl bug database | |
491 | at L<https://rt.perl.org/> . There may also be information at | |
492 | L<http://www.perl.org/> , the Perl Home Page. | |
493 | ||
494 | If you believe you have an unreported bug, please run the L<perlbug> program | |
495 | included with your release. Be sure to trim your bug down to a tiny but | |
496 | sufficient test case. Your bug report, along with the output of C<perl -V>, | |
497 | will be sent off to perlbug@perl.org to be analysed by the Perl porting team. | |
498 | ||
499 | If the bug you are reporting has security implications which make it | |
500 | inappropriate to send to a publicly archived mailing list, then see | |
501 | L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION> | |
502 | for details of how to report the issue. | |
503 | ||
504 | =head1 Give Thanks | |
505 | ||
506 | If you wish to thank the Perl 5 Porters for the work we had done in Perl 5, | |
507 | you can do so by running the C<perlthanks> program: | |
508 | ||
509 | perlthanks | |
510 | ||
511 | This will send an email to the Perl 5 Porters list with your show of thanks. | |
512 | ||
513 | =head1 SEE ALSO | |
514 | ||
515 | The F<Changes> file for an explanation of how to view exhaustive details on | |
516 | what changed. | |
517 | ||
518 | The F<INSTALL> file for how to build Perl. | |
519 | ||
520 | The F<README> file for general stuff. | |
521 | ||
522 | The F<Artistic> and F<Copying> files for copyright information. | |
523 | ||
524 | =cut |