This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix two broken links in perldelta.
[perl5.git] / pod / perl5257delta.pod
1 =encoding utf8
2
3 =head1 NAME
4
5 perl5257delta - what is new for perl v5.25.7
6
7 =head1 DESCRIPTION
8
9 This document describes differences between the 5.25.6 release and the 5.25.7
10 release.
11
12 If you are upgrading from an earlier release such as 5.25.5, first read
13 L<perl5256delta>, which describes differences between 5.25.5 and 5.25.6.
14
15 =head1 Core Enhancements
16
17 =head2 Indented Here-documents
18
19 This adds a new modifier '~' to here-docs that tells the parser
20 that it should look for /^\s*$DELIM\n/ as the closing delimiter.
21
22 These syntaxes are all supported:
23
24     <<~EOF;
25     <<~\EOF;
26     <<~'EOF';
27     <<~"EOF";
28     <<~`EOF`;
29     <<~ 'EOF';
30     <<~ "EOF";
31     <<~ `EOF`;
32
33 The '~' modifier will strip, from each line in the here-doc, the
34 same whitespace that appears before the delimiter.
35
36 Newlines will be copied as is, and lines that don't include the
37 proper beginning whitespace will cause perl to croak.
38
39 For example:
40
41     if (1) {
42       print <<~EOF;
43         Hello there
44         EOF
45     }
46
47 prints "Hello there\n" with no leading whitespace.
48
49 =head2 '.' and @INC
50
51 Perl now provides a way to build perl without C<.> in @INC by default. If you
52 want this feature, you can build with -Ddefault_inc_excludes_dot
53
54 Because the testing / make process for perl modules do not function well with
55 C<.> missing from @INC, Perl now supports the environment variable
56 PERL_USE_UNSAFE_INC=1 which makes Perl behave as it previously did, returning
57 C<.> to @INC in all child processes.
58
59 WARNING: PERL_USE_UNSAFE_INC has been provided during the perl 5.25 development
60 cycle and is not guaranteed to function in perl 5.26.
61
62 =head2 create a safer utf8_hop() called utf8_hop_safe()
63
64 Unlike utf8_hop(), utf8_hop_safe() won't navigate before the beginning or after
65 the end of the supplied buffer.
66
67 =head2 Fix taint handling in list assignment
68
69 commit v5.25.6-79-gb09ed99 reworked list assignment, and
70 accidentally broke taint handling at the same time.
71
72 =head2 @{^CAPTURE}, %{^CAPTURE}, and %{^CAPTURE_ALL}
73
74 @{^CAPTURE} exposes the capture buffers of the last match as an array. So $1 is
75 ${^CAPTURE}[0].
76
77 %{^CAPTURE} is the equivalent to %+ (ie named captures)
78
79 %{^CAPTURE_ALL} is the equivalent to %- (ie all named captures).
80
81 =head2 op.c: silence compiler warning in fold_constants()
82
83     op.c: In function ‘S_fold_constants’:
84     op.c:4374:28: warning: argument ‘o’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Wclobbered]
85      S_fold_constants(pTHX_ OP *o)
86                                 ^
87
88 This warning has been silenced.
89
90 =head1 Performance Enhancements
91
92 =over 4
93
94 =item *
95
96 Reduce cost of SvVALID().
97
98 =item *
99
100 C<$ref1 = $ref2> has been optimized.
101
102 =item *
103
104 Array and hash assignment are now faster, e.g.
105
106     (..., @a) = (...);
107     (..., %h) = (...);
108
109 especially when the RHS is empty.
110
111 =item *
112
113 Reduce the number of odd special cases for the SvSCREAM flag.
114
115 =item *
116
117 Avoid sv_catpvn() in do_vop() when unneeded.
118
119 =item *
120
121 Enhancements in Regex concat COW implementation.
122
123 =item *
124
125 Speed up AV and HV clearing/undeffing.
126
127 =item *
128
129 Better optimise array and hash assignment
130
131 =back
132
133 =head1 Modules and Pragmata
134
135 =head2 Updated Modules and Pragmata
136
137 =over 4
138
139 =item *
140
141 L<podlators> has been upgraded from version 4.08 to 4.09.
142
143 =item *
144
145 L<Archive::Tar> has been upgraded from version 2.14 to 2.18.
146
147 =item *
148
149 L<B> has been upgraded from version 1.64 to 1.65.
150
151 =item *
152
153 L<Data::Dumper> has been upgraded from version 2.162 to 2.165.
154
155 The XS implementation now supports Deparse.
156
157 =item *
158
159 L<Devel::Peek> has been upgraded from version 1.25 to 1.26.
160
161 =item *
162
163 L<DynaLoader> has been upgraded from version 1.39 to 1.40.
164
165 =item *
166
167 L<Errno> has been upgraded from version 1.26 to 1.27.
168
169 Document that using C<%!> loads Errno for you.
170
171 =item *
172
173 L<File::Spec> has been upgraded from version 3.65 to 3.66.
174
175 =item *
176
177 L<Hash::Util> has been upgraded from version 0.21 to 0.22.
178
179 =item *
180
181 L<JSON::PP> has been upgraded from version 2.27400_01 to 2.27400_02.
182
183 =item *
184
185 L<List::Util> has been upgraded from version 1.46 to 1.46_02.
186
187 =item *
188
189 L<Math::BigInt> has been upgraded from version 1.999726(_01) to 1.999727.
190
191 There have also been some core customizations.
192
193 =item *
194
195 L<Math::Complex> has been upgraded from version 1.59 to 1.5901.
196
197 =item *
198
199 L<Module::CoreList> has been upgraded from version 5.20161020 to 5.20161120.
200
201 =item *
202
203 L<mro> has been upgraded from version 1.19 to 1.20.
204
205 =item *
206
207 L<Net::Ping> has been upgraded from version 2.51 to 2.55.
208
209 Remove sudo from 500_ping_icmp.t.
210
211 Avoid stderr noise in tests
212
213 Check for echo in new Net::Ping tests.
214
215 =item *
216
217 L<Opcode> has been upgraded from version 1.38 to 1.39.
218
219 =item *
220
221 L<POSIX> has been upgraded from version 1.73 to 1.75.
222
223 =item *
224
225 L<Scalar::Util> has been upgraded from version 1.46 to 1.46_02.
226
227 =item *
228
229 L<Storable> has been upgraded from version 2.58 to 2.59.
230
231 =item *
232
233 L<Term::ANSIColor> has been upgraded from version 4.05 to 4.06.
234
235 =item *
236
237 L<Test::Simple> has been upgraded from version 1.302059 to 1.302062.
238
239 =item *
240
241 L<threads> has been upgraded from version 2.09 to 2.10.
242
243 =item *
244
245 L<Time::HiRes> has been upgraded from version 1.9740_01 to 1.9740_03.
246
247 Now uses clockid_t.
248
249 =item *
250
251 L<Unicode::Collate> has been upgraded from version 1.14 to 1.18.
252
253 =item *
254
255 L<Unicode::Normalize> is now maintained by p5p and has been moved to dist/
256
257 =item *
258
259 L<Unicode::UCD> has been upgraded from version 0.66 to 0.67.
260
261 =item *
262
263 L<XS::Typemap> has been upgraded from version 0.14 to 0.15.
264
265 =back
266
267 =head1 Documentation
268
269 =head2 Changes to Existing Documentation
270
271 =head3 L<perlfunc>
272
273 =over 4
274
275 =item *
276
277 Defined on aggregates is no longer allowed. Perlfunc was still reporting it as
278 deprecated, and that it will be deleted in the future.
279
280 =back
281
282 =head3 L<perldata>
283
284 =over 4
285
286 =item *
287
288 Use of single character variables, with the variable name a non printable
289 character in the range \x80-\xFF is no longer allowed. Update the docs to
290 reflect this.
291
292 =back
293
294 =head3 L<perlobj>
295
296 =over 4
297
298 =item *
299
300 Added a section on calling methods using their fully qualified names.
301
302 =item *
303
304 Do not discourage manual @ISA.
305
306 =back
307
308 =head3 L<perlop>
309
310 =over 4
311
312 =item *
313
314 Clarify behavior single quote regexps.
315
316 =back
317
318 =head3 L<perllocale>
319
320 =over 4
321
322 =item *
323
324 Some locales aren't compatible with Perl.  Note the potential bad
325 consequences of using them.
326
327 =back
328
329 =head3 L<perldiag>
330
331 =over 4
332
333 =item *
334
335 Deprecations are to be marked with a D.
336 C<"%s() is deprecated on :utf8 handles"> use a deprecation message, and as
337 such, such be marked C<"(D deprecated)"> and not C<"(W deprecated)">.
338
339 =back
340
341 =head3 L<perlguts>
342
343 =over 4
344
345 =item *
346
347 add pTHX_ to magic method examples.
348
349 =back
350
351 =head3 L<perlvar>
352
353 =over 4
354
355 =item *
356
357 Document @ISA. Was documented other places, not not in perlvar.
358
359 =back
360
361 =head3 L<perlootut>
362
363 =over 4
364
365 =item *
366
367 Tidy the document.
368
369 =item *
370
371 Mention Moo more.
372
373 =back
374
375 =head3 L<perlhack>
376
377 =over 4
378
379 =item *
380
381 Document Tab VS Space.
382
383 =back
384
385 =head3 L<perlre>
386
387 =over 4
388
389 =item *
390
391 Several minor enhancements to the documentation.
392
393 =back
394
395 =head1 Diagnostics
396
397 The following additions or changes have been made to diagnostic output,
398 including warnings and fatal error messages.  For the complete list of
399 diagnostic messages, see L<perldiag>.
400
401 =head2 Changes to Existing Diagnostics
402
403 =over 4
404
405 =item *
406
407 Improve error for missing tie() package/method. This brings the error messages
408 in line with the ones used for normal method calls, despite not using
409 call_method().
410
411 =item *
412
413 Make the sysread()/syswrite/() etc :utf8 handle warnings default. These
414 warnings were under 'deprecated' previously.
415
416 =item *
417
418 'do' errors now refer to 'do' (not 'require').
419
420 =back
421
422 =head1 Utility Changes
423
424 =over 4
425
426 =item *
427
428 Porting/pod_lib.pl
429
430 Removed spurious executable bit.
431
432 Account for possibility of DOS file endings.
433
434 =item *
435
436 perf/benchmarks
437
438 Tidy file, rename some symbols.
439
440 =item *
441
442 Porting/checkAUTHORS.pl
443
444 Replace obscure character range with \w.
445
446 =item *
447
448 t/porting/regen.t
449
450 try to be more helpful when tests fail.
451
452 =item *
453
454 utils/h2xs.PL
455
456 Avoid infinite loop for enums.
457
458 =back
459
460 =head1 Configuration and Compilation
461
462 =over 4
463
464 =item *
465
466 Remove "Warning: perl appears in your path"
467
468 This install warning is more or less obsolete, since most platforms already
469 *will* have a /usr/bin/perl or similar provided by the OS.
470
471 =item *
472
473 Reduce verbosity of "make install.man"
474
475 Previously, two progress messages were emitted for each manpage: one by
476 installman itself, and one by the function in install_lib.pl that it calls to
477 actually install the file. Disabling the second of those in each case saves
478 over 750 lines of unhelpful output.
479
480 =item *
481
482 Cleanup for clang -Weverything support. [perl 129961]
483
484 =item *
485
486 Configure: signbit scan was assuming too much, stop assuming negative 0.
487
488 =item *
489
490 Various compiler warnings have been silenced.
491
492 =item *
493
494 Several smaller changes have been made to remove impediments to compiling under
495 C++11.
496
497 =back
498
499 =head1 Testing
500
501 =over 4
502
503 =item *
504
505 XS-APItest/t/utf8.t: Several small fixes and enhancements.
506
507 =item *
508
509 Tests for locales were erroneously using locales incompatible with Perl.
510
511 =back
512
513 =head1 Platform Support
514
515 =head2 Platform-Specific Notes
516
517 =over 4
518
519 =item Darwin
520
521 don't treat -Dprefix=/usr as special, instead require an extra option
522 -Ddarwin_distribution to produce the same results.
523
524 =item POSIX
525
526 Finish removing POSIX deprecated functions.
527
528 =item OS X
529
530 OS X El Capitan doesn't implement the clock_gettime() or clock_getres() APIs,
531 emulate them as necessary.
532
533 =item macOS
534
535 Deprecated syscall(2) on macOS 10.12.
536
537 =item EBCDIC
538
539 Several tests have been updated to work (or be skipped) on EBCDIC platforms.
540
541 =item HP-UX
542
543 L<Net::Ping> UDP test is skipped on HP-UX.
544
545 =item VMS
546
547 Move _pDEPTH and _aDEPTH after config.h otherwise DEBUGGING may not be defined
548 yet.
549
550 VAXC has not been a possibility for a good long while, and the versions of the
551 DEC/Compaq/HP/VSI C compiler that report themselves as "DEC" in a listing file
552 are 15 years or more out-of-date and can be safely desupported.
553
554 =item VMS And Win32
555
556 Fix some breakage, add 'undef' value for default_inc_excludes_dot in build
557 scripts.
558
559 =item Linux
560
561 Drop support for Linux a.out Linux has used ELF for over twenty years.
562
563 =item NetBSD-VAX
564
565 Test fixes and minor updates.
566
567 Account for lack of C<inf>, C<nan>, and C<-0.0> support.
568
569 =item Win32
570
571 fp definitions have been updated.
572
573 =item OpenBSD 6
574
575 OpenBSD 6 still does not support returning pid, gid or uid with SA_SIGINFO.
576 Make sure this is accounted for.
577
578 =item FreeBSD
579
580 t/uni/overload.t: Skip hanging test on FreeBSD.
581
582 =back
583
584 =head1 Internal Changes
585
586 =over 4
587
588 =item *
589
590 The meanings of some internal SV flags have been changed
591
592 OPpRUNTIME, SVpbm_VALID, SVpbm_TAIL, SvTAIL_on, SvTAIL_off, SVrepl_EVAL,
593 SvEVALED
594
595 =item *
596
597 Change C<hv_fetch(…, "…", …, …)> to C<hv_fetchs(…, "…", …)>
598
599 The dual-life dists all use Devel::PPPort, so they can use this function even
600 though it was only added in 5.10.
601
602 =back
603
604 =head1 Selected Bug Fixes
605
606 =over 4
607
608 =item *
609
610 Handle SvIMMORTALs in LHS of list assign. [perl #129991]
611
612 =item *
613
614 [perl #130010] a5540cf breaks texinfo
615
616 This involved user-defined Unicode properties.
617
618 =item *
619
620 Fix error message for unclosed C<\N{> in regcomp.
621
622 An unclosed C<\N{> could give the wrong error message
623 C<"\N{NAME} must be resolved by the lexer">.
624
625 =item *
626
627 List assignment in list context where the LHS contained aggregates and
628 where there were not enough RHS elements, used to skip scalar lvalues.
629 Previously, C<(($a,$b,@c,$d) = (1))> in list context returned C<($a)>; now
630 it returns C<($a,$b,$d)>. C<(($a,$b,$c) = (1))> is unchanged: it still
631 returns C<($a,$b,$c)>. This can be seen in the following:
632
633     sub inc { $_++ for @_ }
634     inc(($a,$b,@c,$d) = (10))
635
636 Formerly, the values of C<($a,$b,$d)> would be left as C<(11,undef,undef)>;
637 now they are C<(11,1,1)>.
638
639 =item *
640
641 [perl 129903]
642
643 The basic problem is that code like this: /(?{ s!!! })/ can trigger infinite
644 recursion on the C stack (not the normal perl stack) when the last successful
645 pattern in scope is itself. Since the C stack overflows this manifests as an
646 untrappable error/segfault, which then kills perl.
647
648 We avoid the segfault by simply forbidding the use of the empty pattern when it
649 would resolve to the currently executing pattern.
650
651 =item *
652
653 [perl 128997] Avoid reading beyond the end of the line buffer when there's a
654 short UTF-8 character at the end.
655
656 =item *
657
658 [perl 129950] fix firstchar bitmap under utf8 with prefix optimisation.
659
660 =item *
661
662 [perl 129954] Carp/t/arg_string.t: be liberal in f/p formats.
663
664 =item *
665
666 [perl 129928] make do "a\0b" fail silently instead of throwing.
667
668 =item *
669
670 [perl 129130] make chdir allocate the stack it needs.
671
672 =back
673
674 =head1 Acknowledgements
675
676 Perl 5.25.7 represents approximately 4 weeks of development since Perl 5.25.6
677 and contains approximately 83,000 lines of changes across 630 files from 26
678 authors.
679
680 Excluding auto-generated files, documentation and release tools, there were
681 approximately 13,000 lines of changes to 340 .pm, .t, .c and .h files.
682
683 Perl continues to flourish into its third decade thanks to a vibrant community
684 of users and developers. The following people are known to have contributed the
685 improvements that became Perl 5.25.7:
686
687 Aaron Crane, Abigail, Andrew Fresh, Andy Lester, Aristotle Pagaltzis, Chad
688 Granum, Chris 'BinGOs' Williams, Craig A. Berry, Dagfinn Ilmari Mannsåker, Dan
689 Collins, Dave Rolsky, David Mitchell, Hauke D, H.Merijn Brand, Hugo van der
690 Sanden, James E Keenan, Jarkko Hietaniemi, Karl Williamson, Lukas Mai, Matthew
691 Horsfall, Nicolas R., Stefan Seifert, Steve Hay, Todd Rinaldo, Tony Cook, Yves
692 Orton.
693
694 The list above is almost certainly incomplete as it is automatically generated
695 from version control history. In particular, it does not include the names of
696 the (very much appreciated) contributors who reported issues to the Perl bug
697 tracker.
698
699 Many of the changes included in this version originated in the CPAN modules
700 included in Perl's core. We're grateful to the entire CPAN community for
701 helping Perl to flourish.
702
703 For a more complete list of all of Perl's historical contributors, please see
704 the F<AUTHORS> file in the Perl source distribution.
705
706 =head1 Reporting Bugs
707
708 If you find what you think is a bug, you might check the perl bug database
709 at L<https://rt.perl.org/> .  There may also be information at
710 L<http://www.perl.org/> , the Perl Home Page.
711
712 If you believe you have an unreported bug, please run the L<perlbug> program
713 included with your release.  Be sure to trim your bug down to a tiny but
714 sufficient test case.  Your bug report, along with the output of C<perl -V>,
715 will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
716
717 If the bug you are reporting has security implications which make it
718 inappropriate to send to a publicly archived mailing list, then see
719 L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION>
720 for details of how to report the issue.
721
722 =head1 SEE ALSO
723
724 The F<Changes> file for an explanation of how to view exhaustive details on
725 what changed.
726
727 The F<INSTALL> file for how to build Perl.
728
729 The F<README> file for general stuff.
730
731 The F<Artistic> and F<Copying> files for copyright information.
732
733 =cut