5 perldelta - what is new for perl v5.25.2
9 This document describes differences between the 5.25.1 release and the 5.25.2
12 If you are upgrading from an earlier release such as 5.25.0, first read
13 L<perl5251delta>, which describes differences between 5.25.0 and 5.25.1.
15 =head1 Core Enhancements
17 =head2 Perl can now do default collation in UTF-8 locales on platforms
20 Some platforms natively do a reasonable job of collating and sorting in
21 UTF-8 locales. Perl now works with those. For portability and full
22 control, L<Unicode::Collate> is still recommended, but now you may
23 not need to do anything special to get good-enough results, depending on
25 L<perllocale/Category C<LC_COLLATE>: Collation: Text Comparisons and Sorting>
27 =head2 Better locale collation of strings containing embedded C<NUL>
30 In locales that have multi-level character weights, these are now
31 ignored at the higher priority ones. There are still some gotchas in
32 some strings, though. See
33 L<perllocale/Collation of strings containing embedded C<NUL> characters>.
35 =head2 Lexical subroutines are no longer experimental
37 Using the C<lexical_subs> feature no longer emits a warning. Existing code that disables the C<experimental::lexical_subs> warning category that the
38 feature previously used will continue to work. The C<lexical_subs> feature
39 has no effect; all Perl code can use lexical subroutines, regardless of
40 what feature declarations are in scope.
42 =head2 C<CORE> subroutines for hash and array functions callable via
45 The hash and array functions in the C<CORE> namespace--C<keys>, C<each>,
46 C<values>, C<push>, C<pop>, C<shift>, C<unshift> and C<splice>--, can now
47 be called with ampersand syntax (C<&CORE::keys(\%hash>) and via reference
48 (C<<my $k = \&CORE::keys; $k->(\%hash) >>). Previously they could only be
53 =head2 C<-Di> switch is now required for PerlIO debugging output
55 Previously PerlIO debugging output would be sent to the file specified
56 by the C<PERLIO_DEBUG> environment variable if perl wasn't running
57 setuid and the C<-T> or C<-t> switches hadn't been parsed yet.
59 If perl performed output at a point where it hadn't yet parsed its
60 switches this could result in perl creating or overwriting the file
61 named by C<PERLIO_DEBUG> even when the C<-T> switch had been supplied.
63 Perl now requires the C<-Di> switch to produce PerlIO debugging
64 output. By default this is written to C<stderr>, but can optionally
65 be redirected to a file by setting the C<PERLIO_DEBUG> environment
68 If perl is running setuid or the C<-T> switch has supplied
69 C<PERLIO_DEBUG> is ignored and the debugging output is sent to
70 C<stderr> as for any other C<-D> switch.
72 =head1 Incompatible Changes
74 =head2 C<keys> returned from an lvalue subroutine
76 C<keys> returned from an lvalue subroutine can no longer be assigned
79 sub foo : lvalue { keys(%INC) }
81 sub bar : lvalue { keys(@_) }
82 (bar) = 3; # also an error
84 This makes the lvalue sub case consistent with C<(keys %hash) = ...> and
85 C<(keys @_) = ...>, which are also errors. [perl #128187]
87 =head1 Modules and Pragmata
89 XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
90 go here. If Module::CoreList is updated, generate an initial draft of the
91 following sections using F<Porting/corelist-perldelta.pl>. A paragraph summary
92 for important changes should then be added by hand. In an ideal world,
93 dual-life modules would have a F<Changes> file that could be cribbed.
95 [ Within each section, list entries as a =item entry ]
97 =head2 New Modules and Pragmata
107 =head2 Updated Modules and Pragmata
113 L<XXX> has been upgraded from version A.xx to B.yy.
117 L<Module::CoreList> has been upgraded from 5.20160520 to 5.20160620.
121 =head2 Removed Modules and Pragmata
133 =head2 Changes to Existing Documentation
141 Document NUL collation handling.
151 Updated the mirror list.
157 The following additions or changes have been made to diagnostic output,
158 including warnings and fatal error messages. For the complete list of
159 diagnostic messages, see L<perldiag>.
161 =head2 New Diagnostics
169 L<Version control conflict marker|perldiag/"Version control conflict marker">
171 (F) The parser found a line starting with C<E<lt><<<<<<>,
172 C<E<gt>E<gt>E<gt>E<gt>E<gt>E<gt>E<gt>>, or C<=======>. These may be left by a
173 version control system to mark conflicts after a failed merge operation.
177 L<%s: command not found|perldiag/"%s: command not found">
179 (A) You've accidentally run your script through B<bash> or another shell
180 instead of Perl. Check the #! line, or manually feed your script into
181 Perl yourself. The #! line at the top of your file could look like
187 L<%s: command not found: %s|perldiag/"%s: command not found: %s">
189 (A) You've accidentally run your script through B<zsh> or another shell
190 instead of Perl. Check the #! line, or manually feed your script into
191 Perl yourself. The #! line at the top of your file could look like
197 L<Unescaped left brace in regex is deprecated here, passed through in regex; marked by S<<-- HERE> in mE<sol>%sE<sol>|perldiag/"Unescaped left brace in regex is deprecated here, passed through in regex; marked by S<<-- HERE> in m/%s/">
199 Unescaped left braces are already illegal in some contexts in regular
200 expression patterns, but, due to an oversight, no deprecation warning
201 was raised in other contexts where they are intended to become illegal.
202 This warning is now raised in these contexts.
206 =head2 Changes to Existing Diagnostics
212 L<Unescaped left brace in regex is illegal here in regex; marked by S<<-- HERE> in mE<sol>%sE<sol>|perldiag/"Unescaped left brace in regex is illegal here in regex; marked by S<<-- HERE> in m/%s/">
214 The word "here" has been added to the message that was raised in
215 v5.25.1. This is to indicate that there are contexts in which unescaped
216 left braces are not (yet) illegal.
220 =head1 Configuration and Compilation
226 F<make_ext.pl> no longer updates a module's F<pm_to_blib> file when no
227 files require updates. This could cause dependencies, F<perlmain.c>
228 in particular, to be rebuilt unnecessarily. [perl #126710]
232 The output of C<perl -V> has been reformatted so that each configuration
233 and compile-time option is now listed one per line, to improve
244 F<t/harness> now tries really hard not to run tests outside of the Perl
245 source tree. [perl #124050]
249 =head1 Internal Changes
255 Perl no longer panics when switching into some locales on machines with
256 buggy C<strxfrm()> implementations in their libc. [perl #121734]
260 =head1 Selected Bug Fixes
266 C< until ($x = 1) { ... } > and C< ... until $x = 1 > now properly
267 warn when syntax warnings are enabled. [perl #127333]
271 socket() now leaves the error code returned by the system in C<$!> on
272 failure. [perl #128316]
276 Assignment variants of any bitwise ops under the C<bitwise> feature would
277 crash if the left-hand side was an array or hash. [perl #128204]
281 C<require> followed by a single colon (as in C<foo() ? require : ...> is
282 now parsed correctly as C<require> with implicit $_, rather than
283 C<require "">. [perl #128307]
287 Scalar C<keys %hash> can now be assigned to consistently in all scalar
288 lvalue contexts. Previously it worked for some contexts but not others.
292 List assignment to C<vec> or C<substr> with an array or hash for its first
293 argument used to result in crashes or "Can't coerce" error messages at run
294 time, unlike scalar assignment, which would give an error at compile time.
295 List assignment now gives a compile-time error, too. [perl #128260]
299 =head1 Acknowledgements
301 XXX Generate this with:
303 perl Porting/acknowledgements.pl v5.25.1..HEAD
305 =head1 Reporting Bugs
307 If you find what you think is a bug, you might check the perl bug database
308 at L<https://rt.perl.org/> . There may also be information at
309 L<http://www.perl.org/> , the Perl Home Page.
311 If you believe you have an unreported bug, please run the L<perlbug> program
312 included with your release. Be sure to trim your bug down to a tiny but
313 sufficient test case. Your bug report, along with the output of C<perl -V>,
314 will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
316 If the bug you are reporting has security implications which make it
317 inappropriate to send to a publicly archived mailing list, then see
318 L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION>
319 for details of how to report the issue.
323 The F<Changes> file for an explanation of how to view exhaustive details on
326 The F<INSTALL> file for how to build Perl.
328 The F<README> file for general stuff.
330 The F<Artistic> and F<Copying> files for copyright information.