5 perl5257delta - what is new for perl v5.25.7
9 This document describes differences between the 5.25.6 release and the 5.25.7
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.
15 =head1 Core Enhancements
17 =head2 Indented Here-documents
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.
22 These syntaxes are all supported:
33 The '~' modifier will strip, from each line in the here-doc, the
34 same whitespace that appears before the delimiter.
36 Newlines will be copied as is, and lines that don't include the
37 proper beginning whitespace will cause perl to croak.
47 prints "Hello there\n" with no leading whitespace.
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
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.
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.
62 =head2 create a safer utf8_hop() called utf8_hop_safe()
64 Unlike utf8_hop(), utf8_hop_safe() won't navigate before the beginning or after
65 the end of the supplied buffer.
67 =head2 Fix taint handling in list assignment
69 commit v5.25.6-79-gb09ed99 reworked list assignment, and
70 accidentally broke taint handling at the same time.
72 =head2 @{^CAPTURE}, %{^CAPTURE}, and %{^CAPTURE_ALL}
74 @{^CAPTURE} exposes the capture buffers of the last match as an array. So $1 is
77 %{^CAPTURE} is the equivalent to %+ (ie named captures)
79 %{^CAPTURE_ALL} is the equivalent to %- (ie all named captures).
81 =head2 op.c: silence compiler warning in fold_constants()
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)
88 This warning has been silenced.
90 =head1 Performance Enhancements
96 Reduce cost of SvVALID().
100 C<$ref1 = $ref2> has been optimized.
104 Array and hash assignment are now faster, e.g.
109 especially when the RHS is empty.
113 Reduce the number of odd special cases for the SvSCREAM flag.
117 Avoid sv_catpvn() in do_vop() when unneeded.
121 Enhancements in Regex concat COW implementation.
125 Speed up AV and HV clearing/undeffing.
129 Better optimise array and hash assignment
133 =head1 Modules and Pragmata
135 =head2 Updated Modules and Pragmata
141 L<podlators> has been upgraded from version 4.08 to 4.09.
145 L<Archive::Tar> has been upgraded from version 2.14 to 2.18.
149 L<B> has been upgraded from version 1.64 to 1.65.
153 L<Data::Dumper> has been upgraded from version 2.162 to 2.165.
155 The XS implementation now supports Deparse.
159 L<Devel::Peek> has been upgraded from version 1.25 to 1.26.
163 L<DynaLoader> has been upgraded from version 1.39 to 1.40.
167 L<Errno> has been upgraded from version 1.26 to 1.27.
169 Document that using C<%!> loads Errno for you.
173 L<File::Spec> has been upgraded from version 3.65 to 3.66.
177 L<Hash::Util> has been upgraded from version 0.21 to 0.22.
181 L<JSON::PP> has been upgraded from version 2.27400_01 to 2.27400_02.
185 L<List::Util> has been upgraded from version 1.46 to 1.46_02.
189 L<Math::BigInt> has been upgraded from version 1.999726(_01) to 1.999727.
191 There have also been some core customizations.
195 L<Math::Complex> has been upgraded from version 1.59 to 1.5901.
199 L<Module::CoreList> has been upgraded from version 5.20161020 to 5.20161120.
203 L<mro> has been upgraded from version 1.19 to 1.20.
207 L<Net::Ping> has been upgraded from version 2.51 to 2.55.
209 Remove sudo from 500_ping_icmp.t.
211 Avoid stderr noise in tests
213 Check for echo in new Net::Ping tests.
217 L<Opcode> has been upgraded from version 1.38 to 1.39.
221 L<POSIX> has been upgraded from version 1.73 to 1.75.
225 L<Scalar::Util> has been upgraded from version 1.46 to 1.46_02.
229 L<Storable> has been upgraded from version 2.58 to 2.59.
233 L<Term::ANSIColor> has been upgraded from version 4.05 to 4.06.
237 L<Test::Simple> has been upgraded from version 1.302059 to 1.302062.
241 L<threads> has been upgraded from version 2.09 to 2.10.
245 L<Time::HiRes> has been upgraded from version 1.9740_01 to 1.9740_03.
251 L<Unicode::Collate> has been upgraded from version 1.14 to 1.18.
255 L<Unicode::Normalize> is now maintained by p5p and has been moved to dist/
259 L<Unicode::UCD> has been upgraded from version 0.66 to 0.67.
263 L<XS::Typemap> has been upgraded from version 0.14 to 0.15.
269 =head2 Changes to Existing Documentation
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.
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
300 Added a section on calling methods using their fully qualified names.
304 Do not discourage manual @ISA.
314 Clarify behavior single quote regexps.
324 Some locales aren't compatible with Perl. Note the potential bad
325 consequences of using them.
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)">.
347 add pTHX_ to magic method examples.
357 Document @ISA. Was documented other places, not not in perlvar.
381 Document Tab VS Space.
391 Several minor enhancements to the documentation.
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>.
401 =head2 Changes to Existing Diagnostics
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
413 Make the sysread()/syswrite/() etc :utf8 handle warnings default. These
414 warnings were under 'deprecated' previously.
418 'do' errors now refer to 'do' (not 'require').
422 =head1 Utility Changes
430 Removed spurious executable bit.
432 Account for possibility of DOS file endings.
438 Tidy file, rename some symbols.
442 Porting/checkAUTHORS.pl
444 Replace obscure character range with \w.
450 try to be more helpful when tests fail.
456 Avoid infinite loop for enums.
460 =head1 Configuration and Compilation
466 Remove "Warning: perl appears in your path"
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.
473 Reduce verbosity of "make install.man"
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.
482 Cleanup for clang -Weverything support. [perl 129961]
486 Configure: signbit scan was assuming too much, stop assuming negative 0.
490 Various compiler warnings have been silenced.
494 Several smaller changes have been made to remove impediments to compiling under
505 XS-APItest/t/utf8.t: Several small fixes and enhancements.
509 Tests for locales were erroneously using locales incompatible with Perl.
513 =head1 Platform Support
515 =head2 Platform-Specific Notes
521 don't treat -Dprefix=/usr as special, instead require an extra option
522 -Ddarwin_distribution to produce the same results.
526 Finish removing POSIX deprecated functions.
530 OS X El Capitan doesn't implement the clock_gettime() or clock_getres() APIs,
531 emulate them as necessary.
535 Deprecated syscall(2) on macOS 10.12.
539 Several tests have been updated to work (or be skipped) on EBCDIC platforms.
543 L<Net::Ping> UDP test is skipped on HP-UX.
547 Move _pDEPTH and _aDEPTH after config.h otherwise DEBUGGING may not be defined
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.
556 Fix some breakage, add 'undef' value for default_inc_excludes_dot in build
561 Drop support for Linux a.out Linux has used ELF for over twenty years.
565 Test fixes and minor updates.
567 Account for lack of C<inf>, C<nan>, and C<-0.0> support.
571 fp definitions have been updated.
575 OpenBSD 6 still does not support returning pid, gid or uid with SA_SIGINFO.
576 Make sure this is accounted for.
580 t/uni/overload.t: Skip hanging test on FreeBSD.
584 =head1 Internal Changes
590 The meanings of some internal SV flags have been changed
592 OPpRUNTIME, SVpbm_VALID, SVpbm_TAIL, SvTAIL_on, SvTAIL_off, SVrepl_EVAL,
597 Change C<hv_fetch(…, "…", …, …)> to C<hv_fetchs(…, "…", …)>
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.
604 =head1 Selected Bug Fixes
610 Handle SvIMMORTALs in LHS of list assign. [perl #129991]
614 [perl #130010] a5540cf breaks texinfo
616 This involved user-defined Unicode properties.
620 Fix error message for unclosed C<\N{> in regcomp.
622 An unclosed C<\N{> could give the wrong error message
623 C<"\N{NAME} must be resolved by the lexer">.
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:
633 sub inc { $_++ for @_ }
634 inc(($a,$b,@c,$d) = (10))
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)>.
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.
648 We avoid the segfault by simply forbidding the use of the empty pattern when it
649 would resolve to the currently executing pattern.
653 [perl 128997] Avoid reading beyond the end of the line buffer when there's a
654 short UTF-8 character at the end.
658 [perl 129950] fix firstchar bitmap under utf8 with prefix optimisation.
662 [perl 129954] Carp/t/arg_string.t: be liberal in f/p formats.
666 [perl 129928] make do "a\0b" fail silently instead of throwing.
670 [perl 129130] make chdir allocate the stack it needs.
674 =head1 Acknowledgements
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
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.
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:
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
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
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.
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.
706 =head1 Reporting Bugs
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.
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.
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.
724 The F<Changes> file for an explanation of how to view exhaustive details on
727 The F<INSTALL> file for how to build Perl.
729 The F<README> file for general stuff.
731 The F<Artistic> and F<Copying> files for copyright information.