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