5 [ this is a template for a new perldelta file. Any text flagged as XXX needs
6 to be processed before release. ]
8 perldelta - what is new for perl v5.25.7
12 This document describes differences between the 5.25.6 release and the 5.25.7
15 If you are upgrading from an earlier release such as 5.25.5, first read
16 L<perl5256delta>, which describes differences between 5.25.5 and 5.25.6.
18 =head1 Core Enhancements
20 XXX New core language features go here. Summarize user-visible core language
21 enhancements. Particularly prominent performance optimisations could go
22 here, but most should go in the L</Performance Enhancements> section.
24 [ List each enhancement as a =head2 entry ]
26 =head2 Indented Here-documents
28 This adds a new modifier '~' to here-docs that tells the parser
29 that it should look for /^\s*$DELIM\n/ as the closing delimiter.
31 These syntaxes are all supported:
42 The '~' modifier will strip, from each line in the here-doc, the
43 same whitespace that appears before the delimiter.
45 Newlines will be copied as is, and lines that don't include the
46 proper beginning whitespace will cause perl to croak.
56 prints "Hello there\n" with no leading whitespace.
60 Perl now provides a way to build perl without C<.> in @INC by default. If you
61 want this feature, you can build with -Ddefault_inc_excludes_dot
63 Because the testing / make process for perl modules do not function well with
64 C<.> missing from @INC, Perl now supports the environment variable
65 PERL_USE_UNSAFE_INC=1 which makes Perl behave as it previously did, returning
66 C<.> to @INC in all child processes.
68 WARNING: PERL_USE_UNSAFE_INC has been provided during the perl 5.25 development
69 cycle and is not guaranteed to function in perl 5.26.
71 =head2 create a safer utf8_hop() called utf8_hop_safe()
73 Unlike utf8_hop(), utf8_hop_safe() won't navigate before the beginning or after
74 the end of the supplied buffer.
76 =head2 Fix taint handling in list assignment
78 commit v5.25.6-79-gb09ed99 reworked list assignment, and
79 accidentally broke taint handling at the same time.
81 =head2 @{^CAPTURE}, %{^CAPTURE}, and %{^CAPTURE_ALL}
83 @{^CAPTURE} exposes the capture buffers of the last match as an array. So $1 is
86 %{^CAPTURE} is the equivalent to %+ (ie named captures)
88 %{^CAPTURE_ALL} is the equivalent to %- (ie all named captures).
90 =head2 hv.h: rework HEK_FLAGS to a proper member in struct hek
92 Move the store of HEK_FLAGS off the end of the allocated hek_key into the hek
93 struct, simplifying access and providing clarity to the code.
95 =head2 op.c: silence compiler warning in fold_constants()
97 op.c: In function ‘S_fold_constants’:
98 op.c:4374:28: warning: argument ‘o’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Wclobbered]
99 S_fold_constants(pTHX_ OP *o)
102 This warning has been silenced.
104 =head2 White space changed to avoid C++ deprecation warning
106 C++11 requires space between the end of a string literal and a macro, so that a
107 feature can unambiguously be added to the language. Starting in g++ 6.2, the
108 compiler emits a warning when there isn't a space (presumably so that future
109 versions can support C++11)
113 XXX Any security-related notices go here. In particular, any security
114 vulnerabilities closed should be noted here rather than in the
115 L</Selected Bug Fixes> section.
117 [ List each security issue as a =head2 entry ]
119 =head1 Incompatible Changes
121 XXX For a release on a stable branch, this section aspires to be:
123 There are no changes intentionally incompatible with 5.XXX.XXX
124 If any exist, they are bugs, and we request that you submit a
125 report. See L</Reporting Bugs> below.
127 [ List each incompatible change as a =head2 entry ]
129 =head2 Eliminate OPpRUNTIME private PMOP flag
131 This flag was added in 5.004 and even then it didn't seem to be used for
132 anything. It gets set and unset in various places, but is never tested.
134 =head2 Eliminate SVpbm_VALID flag
136 This flag is set on an SV to indicate that it has PERL_MAGIC_bm (fast
137 Boyer-Moore) magic attached. Instead just directly check whether it has such
140 =head2 Eliminate SVpbm_TAIL/SvTAIL_on()/SvTAIL_off()
142 This flag is only set on SVs that have Boyer-Moore magic attached. Such SVs
143 already re-purpose the unused IVX slot of that SV to store BmUSEFUL. This
144 commit repurposes the unused NVX slot to store this boolean value instead.
146 =head2 Eliminate SVrepl_EVAL and SvEVALED()
148 This flag is only used to indicate that the SV holding the text of the
149 replacement part of a s/// has seen at least one /e. Instead, set the IVX
150 field in the SV to a true value. (We already set the NVX field on that SV to
151 indicate a multi-src-line substitution).
155 Document that symbols should be removed from metaconfig.h
157 Remove almost-all symbols from metaconfig.h
159 =head2 Change hv_fetch(…, "…", …, …) to hv_fetchs(…, "…", …)
161 The dual-life dists all use Devel::PPPort, so they can use this function even
162 though it was only added in 5.10.
166 XXX Any deprecated features, syntax, modules etc. should be listed here.
168 =head2 Module removals
170 XXX Remove this section if inapplicable.
172 The following modules will be removed from the core distribution in a
173 future release, and will at that time need to be installed from CPAN.
174 Distributions on CPAN which require these modules will need to list them as
177 The core versions of these modules will now issue C<"deprecated">-category
178 warnings to alert you to this fact. To silence these deprecation warnings,
179 install the modules in question from CPAN.
181 Note that these are (with rare exceptions) fine modules that you are encouraged
182 to continue to use. Their disinclusion from core primarily hinges on their
183 necessity to bootstrapping a fully functional, CPAN-capable Perl installation,
184 not usually on concerns over their design.
190 XXX Note that deprecated modules should be listed here even if they are listed
191 as an updated module in the L</Modules and Pragmata> section.
195 [ List each other deprecation as a =head2 entry ]
197 =head1 Performance Enhancements
199 XXX Changes which enhance performance without changing behaviour go here.
200 There may well be none in a stable release.
202 [ List each enhancement as a =item entry ]
208 Reduce cost of SvVALID().
212 C<$ref1 = $ref2> has been optimized.
216 Array and hash assignment are now faster, e.g.
221 especially when the RHS is empty.
225 Reduce the number of odd special cases for the SvSCREAM flag.
229 Aavoid sv_catpvn() in do_vop() when unneeded.
233 Enhancements in Regex concat COW implementation.
237 Speed up AV and HV clearing/undeffing.
241 Better optimise array and hash assignment
245 =head1 Modules and Pragmata
247 XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
248 go here. If Module::CoreList is updated, generate an initial draft of the
249 following sections using F<Porting/corelist-perldelta.pl>. A paragraph summary
250 for important changes should then be added by hand. In an ideal world,
251 dual-life modules would have a F<Changes> file that could be cribbed.
253 [ Within each section, list entries as a =item entry ]
255 =head2 New Modules and Pragmata
265 =head2 Updated Modules and Pragmata
271 L<Time::HiRes> has been updated to use clockid_t.
275 L<Data::Dumper> the XS implementation now supports Deparse.
279 L<Unicode::Normalize> is now maintained by p5p and has been moved to dist/
283 L<Errno> Document that using C<%!> loads Errno for you.
287 L<Unicode::Collate> has been upgraded from version 1.14 to 1.18.
291 L<Math::BigInt> has been upgraded from version 1.999726(_01) to 1.999727.
293 There have also been some core customizations.
297 L<podlators> has been upgraded from version 4.08 to 4.09.
301 L<Archive::Tar> has been upgraded from version 2.16 to 2.18.
303 Capture STDERR when necessary.
305 Several minor updates.
309 L<Net::Ping> remove sudo from 500_ping_icmp.t.
311 Upgrade from version 2.51 to 2.55.
313 Avoid stderr noise in tests
315 Check for echo in new Net::Ping tests.
319 L<Test::Simple> has been upgraded from version 1.302059 to 1.302062.
323 L<Term::ANSIColor> has been upgraded from version 4.05 to 4.06.
327 L<Scalar::Utils> and L<List::Utils> have been customized in core.
331 L<Math::Complex> has been customized in core.
335 L<JSON::PP> Customized in core.
339 L<POSIX> Version Bump
343 L<Unicode::UCD> has had its documentation updated to give a recipe for
344 using it to get the information contained in F<unicore/Name.pl>. It has
345 long been deprecated to use any file from F<unicore/>, and their
346 contents or even existence may change at any time without notice.
350 L<XXX> has been upgraded from version A.xx to B.yy.
354 =head2 Removed Modules and Pragmata
366 XXX Changes to files in F<pod/> go here. Consider grouping entries by
367 file and be sure to link to the appropriate page, e.g. L<perlfunc>.
369 =head2 New Documentation
371 XXX Changes which create B<new> files in F<pod/> go here.
375 XXX Description of the purpose of the new file here
377 =head2 Changes to Existing Documentation
379 XXX Changes which significantly change existing files in F<pod/> go here.
380 However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
389 Defined on aggregates is no longer allowed. Perlfunc was still reporting it as
390 deprecated, and that it will be deleted in the future.
400 Use of single character variables, with the variable name a non printable
401 character in the range \x80-\xFF is no longer allowed. Update the docs to
412 Added a section on calling methods using their fully qualified names.
416 Do not discourage manual @ISA.
426 Clarify behavior single quote regexps.
436 Some locales aren't compatible with Perl. Note the potential bad
437 consequences of using them.
447 Deprecations are to be marked with a D.
448 C<"%s() is deprecated on :utf8 handles"> use a deprecation message, and as
449 such, such be marked C<"(D deprecated)"> and not C<"(W deprecated)">.
459 add pTHX_ to magic method examples.
469 Document @ISA. Was documented other places, not not in perlvar.
493 Document Tab VS Space.
503 Don't impugn the stability of all (?…) constructs.
507 Summarise full syntax for (?(cond)then|else) constructs.
511 Minor tweaks and formatting changes.
515 perlre: regularise list items
519 Document the package for C<$REGMARK> and C<$REGERROR>.
525 The following additions or changes have been made to diagnostic output,
526 including warnings and fatal error messages. For the complete list of
527 diagnostic messages, see L<perldiag>.
529 XXX New or changed warnings emitted by the core's C<C> code go here. Also
530 include any changes in L<perldiag> that reconcile it to the C<C> code.
532 =head2 New Diagnostics
534 XXX Newly added diagnostic messages go under here, separated into New Errors
543 XXX L<message|perldiag/"message">
553 XXX L<message|perldiag/"message">
557 =head2 Changes to Existing Diagnostics
559 XXX Changes (i.e. rewording) of diagnostic messages go here
565 Improve error for missing tie() package/method. This brings the error messages
566 in line with the ones used for normal method calls, despite not using
571 Make the sysread()/syswrite/() etc :utf8 handle warnings default. These
572 warnings were under 'deprecated' previously.
576 'do' errors now refer to 'do' (not 'require').
580 =head1 Utility Changes
582 XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go here.
583 Most of these are built within the directory F<utils>.
585 [ List utility changes as a =head2 entry for each utility and =item
586 entries for each change
587 Use L<XXX> with program names to get proper documentation linking. ]
597 Removed spurious executable bit.
599 Account for possibility of DOS file endings.
605 Tidy file, rename some symbols.
609 Porting/checkAUTHORS.pl
611 Replace obscure character range with \w.
617 try to be more helpful when tests fail.
623 Avoid infinite loop for enums.
627 =head1 Configuration and Compilation
629 XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
630 go here. Any other changes to the Perl build process should be listed here.
631 However, any platform-specific changes should be listed in the
632 L</Platform Support> section, instead.
634 [ List changes as a =item entry ].
640 Remove "Warning: perl appears in your path"
642 This install warning is more or less obsolete, since most platforms already
643 *will* have a /usr/bin/perl or similar provided by the OS.
647 Reduce verbosity of "make install.man"
649 Previously, two progress messages were emitted for each manpage: one by
650 installman itself, and one by the function in install_lib.pl that it calls to
651 actually install the file. Disabling the second of those in each case saves
652 over 750 lines of unhelpful output.
656 Cleanup for clang -Weverything support. [perl 129961]
660 Configure: signbit scan was assuming too much, stop assuming negative 0.
664 Various compiler warnings have been silenced.
670 XXX Any significant changes to the testing of a freshly built perl should be
671 listed here. Changes which create B<new> files in F<t/> go here as do any
672 large changes to the testing harness (e.g. when parallel testing was added).
673 Changes to existing files in F<t/> aren't worth summarizing, although the bugs
674 that they represent may be covered elsewhere.
676 [ List each test improvement as a =item entry ]
682 XS-APItest/t/utf8.t: Several small fixes and enhancements.
686 Tests for locales were erroneously using locales incompatible with Perl.
690 =head1 Platform Support
692 XXX Any changes to platform support should be listed in the sections below.
694 [ Within the sections, list each platform as a =item entry with specific
695 changes as paragraphs below it. ]
699 XXX List any platforms that this version of perl compiles on, that previous
700 versions did not. These will either be enabled by new files in the F<hints/>
701 directories, or new subdirectories and F<README> files at the top level of the
706 =item XXX-some-platform
714 don't treat -Dprefix=/usr as special, instead require an extra option
715 -Ddarwin_distribution to produce the same results.
719 Finish removing POSIX deprecated functions.
723 OS X El Capitan doesn't implement the clock_gettime() or clock_getrez() APIs,
724 emulate them as necessary.
728 Deprecated syscall(2) on macOS 10.12.
732 Several tests have been updated to work (or be skipped) on EBCDIC platforms.
736 L<Net::Ping> UDP test is skipped on HP-UX.
740 Move _pDEPTH and _aDEPTH after config.h otherwise DEBUGGING may not be defined
745 Fix some breakage, add 'undef' value for default_inc_excludes_dot in build
750 Drop support for Linux a.out Linux has used ELF for over twenty years.
754 Test fixes and minor updates.
756 Account for lack of C<inf>, C<nan>, and C<-0.0> support.
760 fp definitions have been updated.
764 OpenBSD 6 still does not support returning pid, gid or uid with SA_SIGINFO.
765 Make sure this is accounted for.
769 t/uni/overload.t: Skip hanging test on FreeBSD.
773 =head2 Discontinued Platforms
775 XXX List any platforms that this version of perl no longer compiles on.
781 VAXC has not been a possibility for a good long while, and the versions of the
782 DEC/Compaq/HP/VSI C compiler that report themselves as "DEC" in a listing file
783 are 15 years or more out-of-date and can be safely desupported.
785 =item XXX-some-platform
791 =head2 Platform-Specific Notes
793 XXX List any changes for specific platforms. This could include configuration
794 and compilation changes or changes in portability/compatibility. However,
795 changes within modules for platforms should generally be listed in the
796 L</Modules and Pragmata> section.
800 =item XXX-some-platform
806 =head1 Internal Changes
808 XXX Changes which affect the interface available to C<XS> code go here. Other
809 significant internal changes for future core maintainers should be noted as
812 [ List each change as a =item entry ]
822 =head1 Selected Bug Fixes
824 XXX Important bug fixes in the core language are summarized here. Bug fixes in
825 files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>.
827 [ List each fix as a =item entry ]
833 Handle SvIMMORTALs in LHS of list assign. [perl #129991]
837 [perl #130010] a5540cf breaks texinfo
839 This involved user-defined Unicode properties.
843 Fix error message for unclosed C<\N{> in regcomp.
845 An unclosed C<\N{> could give the wrong error message
846 C<"\N{NAME} must be resolved by the lexer">.
850 List assignment in list context where the LHS contained aggregates and
851 where there were not enough RHS elements, used to skip scalar lvalues.
852 Previously, C<(($a,$b,@c,$d) = (1))> in list context returned C<($a)>; now
853 it returns C<($a,$b,$d)>. C<(($a,$b,$c) = (1))> is unchanged: it still
854 returns <($a,$b,$c)>. This can be seen in the following:
856 sub inc { $_++ for @_ }
857 inc(($a,$b,@c,$d) = (10))
859 Formerly, the values of C<($a,$b,$d)> would be left as C<(11,undef,undef)>;
860 now they are C<(11,1,1)>.
866 The basic problem is that code like this: /(?{ s!!! })/ can trigger infinite
867 recursion on the C stack (not the normal perl stack) when the last successful
868 pattern in scope is itself. Since the C stack overflows this manifests as an
869 untrappable error/segfault, which then kills perl.
871 We avoid the segfault by simply forbidding the use of the empty pattern when it
872 would resolve to the currently executing pattern.
876 [perl 128997] Avoid reading beyond the end of the line buffer when there's a
877 short UTF-8 character at the end.
881 [perl 129950] fix firstchar bitmap under utf8 with prefix optimisation.
885 [perl 129954] Carp/t/arg_string.t: be liberal in f/p formats.
889 [perl 129928] make do "a\0b" fail silently instead of throwing.
893 [perl 129130] make chdir allocate the stack it needs.
897 =head1 Known Problems
899 XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
900 tests that had to be C<TODO>ed for the release would be noted here. Unfixed
901 platform specific bugs also go here.
903 [ List each fix as a =item entry ]
913 =head1 Errata From Previous Releases
919 XXX Add anything here that we forgot to add, or were mistaken about, in
920 the perldelta of a previous release.
926 XXX If any significant core contributor has died, we've added a short obituary
929 =head1 Acknowledgements
931 XXX Generate this with:
933 perl Porting/acknowledgements.pl v5.25.5..HEAD
935 =head1 Reporting Bugs
937 If you find what you think is a bug, you might check the perl bug database
938 at L<https://rt.perl.org/> . There may also be information at
939 L<http://www.perl.org/> , the Perl Home Page.
941 If you believe you have an unreported bug, please run the L<perlbug> program
942 included with your release. Be sure to trim your bug down to a tiny but
943 sufficient test case. Your bug report, along with the output of C<perl -V>,
944 will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
946 If the bug you are reporting has security implications which make it
947 inappropriate to send to a publicly archived mailing list, then see
948 L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION>
949 for details of how to report the issue.
953 The F<Changes> file for an explanation of how to view exhaustive details on
956 The F<INSTALL> file for how to build Perl.
958 The F<README> file for general stuff.
960 The F<Artistic> and F<Copying> files for copyright information.