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 / perl5252delta.pod
CommitLineData
228bfab9
MH
1=encoding utf8
2
3=head1 NAME
4
5perl5252delta - what is new for perl v5.25.2
6
7=head1 DESCRIPTION
8
9This document describes differences between the 5.25.1 release and the 5.25.2
10release.
11
12If you are upgrading from an earlier release such as 5.25.0, first read
13L<perl5251delta>, which describes differences between 5.25.0 and 5.25.1.
14
15=head1 Core Enhancements
16
17=head2 Perl can now do default collation in UTF-8 locales on platforms
18that support it
19
20Some platforms natively do a reasonable job of collating and sorting in
21UTF-8 locales. Perl now works with those. For portability and full
22control, L<Unicode::Collate> is still recommended, but now you may
23not need to do anything special to get good-enough results, depending on
24your application. See
25L<perllocale/Category C<LC_COLLATE>: Collation: Text Comparisons and Sorting>.
26
27=head2 Better locale collation of strings containing embedded C<NUL>
28characters
29
30In locales that have multi-level character weights, these are now
31ignored at the higher priority ones. There are still some gotchas in
32some strings, though. See
33L<perllocale/Collation of strings containing embedded C<NUL> characters>.
34
35=head2 Lexical subroutines are no longer experimental
36
37Using the C<lexical_subs> feature no longer emits a warning. Existing code that disables the C<experimental::lexical_subs> warning category that the
38feature previously used will continue to work. The C<lexical_subs> feature
39has no effect; all Perl code can use lexical subroutines, regardless of
40what feature declarations are in scope.
41
42=head2 C<CORE> subroutines for hash and array functions callable via
43reference
44
45The hash and array functions in the C<CORE> namespace--C<keys>, C<each>,
46C<values>, C<push>, C<pop>, C<shift>, C<unshift> and C<splice>--, can now
47be called with ampersand syntax (C<&CORE::keys(\%hash>) and via reference
48(C<< my $k = \&CORE::keys; $k->(\%hash) >>). Previously they could only be
49used when inlined.
50
51=head1 Security
52
53=head2 C<-Di> switch is now required for PerlIO debugging output
54
55Previously PerlIO debugging output would be sent to the file specified
56by the C<PERLIO_DEBUG> environment variable if perl wasn't running
57setuid and the C<-T> or C<-t> switches hadn't been parsed yet.
58
59If perl performed output at a point where it hadn't yet parsed its
60switches this could result in perl creating or overwriting the file
61named by C<PERLIO_DEBUG> even when the C<-T> switch had been supplied.
62
63Perl now requires the C<-Di> switch to produce PerlIO debugging
64output. By default this is written to C<stderr>, but can optionally
65be redirected to a file by setting the C<PERLIO_DEBUG> environment
66variable.
67
68If perl is running setuid or the C<-T> switch has supplied
69C<PERLIO_DEBUG> is ignored and the debugging output is sent to
70C<stderr> as for any other C<-D> switch.
71
72=head1 Incompatible Changes
73
74=head2 C<keys> returned from an lvalue subroutine
75
76C<keys> returned from an lvalue subroutine can no longer be assigned
77to in list context.
78
79 sub foo : lvalue { keys(%INC) }
80 (foo) = 3; # death
81 sub bar : lvalue { keys(@_) }
82 (bar) = 3; # also an error
83
84This makes the lvalue sub case consistent with C<(keys %hash) = ...> and
85C<(keys @_) = ...>, which are also errors. [perl #128187]
86
87=head1 Modules and Pragmata
88
89=head2 Updated Modules and Pragmata
90
91=over 4
92
93=item *
94
95L<CPAN> has been upgraded from version 2.11 to 2.14.
96
97=item *
98
99L<Devel::Peek> has been upgraded from version 1.23 to 1.24.
100
101=item *
102
103L<diagnostics> has been upgraded from version 1.34 to 1.35.
104
105=item *
106
107L<DynaLoader> has been upgraded from version 1.38 to 1.39.
108
109=item *
110
111L<ExtUtils::MakeMaker> has been upgraded from version 7.10_01 to 7.18.
112
113=item *
114
115L<ExtUtils::Miniperl> has been upgraded from version 1.05 to 1.06.
116
117=item *
118
119L<ExtUtils::ParseXS> has been upgraded from version 3.31 to 3.32.
120
121=item *
122
123L<ExtUtils::Typemaps> has been upgraded from version 3.31 to 3.32.
124
125=item *
126
127L<feature> has been upgraded from version 1.43 to 1.44.
128
129=item *
130
131L<File::Copy> has been upgraded from version 2.31 to 2.32.
132
133=item *
134
135L<File::Glob> has been upgraded from version 1.26 to 1.27.
136
137=item *
138
139L<File::Spec> has been upgraded from version 3.63 to 3.64.
140
141=item *
142
143L<FileHandle> has been upgraded from version 2.02 to 2.03.
144
145=item *
146
147L<Getopt::Long> has been upgraded from version 2.48 to 2.49.
148
149=item *
150
151L<HTTP::Tiny> has been upgraded from version 0.056 to 0.058.
152
153=item *
154
155L<JSON::PP> has been upgraded from version 2.27300 to 2.27400.
156
157=item *
158
159L<Locale::Codes> has been upgraded from version 3.38 to 3.39.
160
161=item *
162
163L<Module::CoreList> has been upgraded from 5.20160520 to 5.20160620.
164
165=item *
166
167L<Opcode> has been upgraded from version 1.34 to 1.35.
168
169=item *
170
171L<Pod::Checker> has been upgraded from version 1.60 to 1.73.
172
173=item *
174
175L<Pod::Functions> has been upgraded from version 1.10 to 1.11.
176
177=item *
178
179L<Pod::Usage> has been upgraded from version 1.68 to 1.69.
180
181=item *
182
183L<POSIX> has been upgraded from version 1.69 to 1.70.
184
185=item *
186
187L<Test::Simple> has been upgraded from version 1.302015 to 1.302026.
188
189=item *
190
191L<Thread::Queue> has been upgraded from version 3.09 to 3.11.
192
193=item *
194
195L<threads> has been upgraded from version 2.08 to 2.09.
196
197=item *
198
199L<Time::HiRes> has been upgraded from version 1.9733 to 1.9734.
200
201=item *
202
203L<Unicode::UCD> has been upgraded from version 0.64 to 0.65.
204
205=item *
206
207L<VMS::DCLsym> has been upgraded from version 1.06 to 1.07.
208
209=back
210
211=head1 Documentation
212
213=head2 Changes to Existing Documentation
214
215=head3 L<perlcommunity>
216
217=over 4
218
219=item *
220
221All references to Usenet have been removed.
222
223=back
224
225=head3 L<perldelta>
226
227=over 4
228
229=item *
230
231All references to Usenet have been removed.
232
233=back
234
235=head3 L<perllocale>
236
237=over 4
238
239=item *
240
241Document NUL collation handling.
242
243=back
244
245=head3 L<perlmodinstall>
246
247=over 4
248
249=item *
250
251All references to Usenet have been removed.
252
253=back
254
255=head3 L<perlmodlib>
256
257=over 4
258
259=item *
260
261Updated the mirror list.
262
263=item *
264
265All references to Usenet have been removed.
266
267=back
268
269=head3 L<perlnewmod>
270
271=over 4
272
273=item *
274
275All references to Usenet have been removed.
276
277=back
278
279=head1 Diagnostics
280
281The following additions or changes have been made to diagnostic output,
282including warnings and fatal error messages. For the complete list of
283diagnostic messages, see L<perldiag>.
284
285=head2 New Diagnostics
286
287=head3 New Errors
288
289=over 4
290
291=item *
292
293L<Version control conflict marker|perldiag/"Version control conflict marker">
294
295(F) The parser found a line starting with C<E<lt><<<<<<>,
296C<E<gt>E<gt>E<gt>E<gt>E<gt>E<gt>E<gt>>, or C<=======>. These may be left by a
297version control system to mark conflicts after a failed merge operation.
298
299=item *
300
301L<%s: command not found|perldiag/"%s: command not found">
302
303(A) You've accidentally run your script through B<bash> or another shell
304instead of Perl. Check the #! line, or manually feed your script into
305Perl yourself. The #! line at the top of your file could look like:
306
307 #!/usr/bin/perl
308
309=item *
310
311L<%s: command not found: %s|perldiag/"%s: command not found: %s">
312
313(A) You've accidentally run your script through B<zsh> or another shell
314instead of Perl. Check the #! line, or manually feed your script into
315Perl yourself. The #! line at the top of your file could look like:
316
317 #!/usr/bin/perl
318
319=item *
320
321L<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/">
322
323Unescaped left braces are already illegal in some contexts in regular
324expression patterns, but, due to an oversight, no deprecation warning
325was raised in other contexts where they are intended to become illegal.
326This warning is now raised in these contexts.
327
328=back
329
330=head2 Changes to Existing Diagnostics
331
332=over 4
333
334=item *
335
336L<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/">
337
338The word "here" has been added to the message that was raised in
339v5.25.1. This is to indicate that there are contexts in which unescaped
340left braces are not (yet) illegal.
341
342=back
343
344=head1 Configuration and Compilation
345
346=over 4
347
348=item *
349
350F<make_ext.pl> no longer updates a module's F<pm_to_blib> file when no
351files require updates. This could cause dependencies, F<perlmain.c>
352in particular, to be rebuilt unnecessarily. [perl #126710]
353
354=item *
355
356The output of C<perl -V> has been reformatted so that each configuration
357and compile-time option is now listed one per line, to improve
358readability.
359
360=back
361
362=head1 Testing
363
364=over 4
365
366=item *
367
368F<t/harness> now tries really hard not to run tests outside of the Perl
369source tree. [perl #124050]
370
371=back
372
373=head1 Internal Changes
374
375=over 4
376
377=item *
378
379Perl no longer panics when switching into some locales on machines with
380buggy C<strxfrm()> implementations in their libc. [perl #121734]
381
382=back
383
384=head1 Selected Bug Fixes
385
386=over 4
387
388=item *
389
390C< until ($x = 1) { ... } > and C< ... until $x = 1 > now properly
391warn when syntax warnings are enabled. [perl #127333]
392
393=item *
394
395socket() now leaves the error code returned by the system in C<$!> on
396failure. [perl #128316]
397
398=item *
399
400Assignment variants of any bitwise ops under the C<bitwise> feature would
401crash if the left-hand side was an array or hash. [perl #128204]
402
403=item *
404
405C<require> followed by a single colon (as in C<foo() ? require : ...> is
406now parsed correctly as C<require> with implicit $_, rather than
407C<require "">. [perl #128307]
408
409=item *
410
411Scalar C<keys %hash> can now be assigned to consistently in all scalar
412lvalue contexts. Previously it worked for some contexts but not others.
413
414=item *
415
416List assignment to C<vec> or C<substr> with an array or hash for its first
417argument used to result in crashes or "Can't coerce" error messages at run
418time, unlike scalar assignment, which would give an error at compile time.
419List assignment now gives a compile-time error, too. [perl #128260]
420
421=back
422
423=head1 Acknowledgements
424
425Perl 5.25.2 represents approximately 4 weeks of development since Perl 5.25.1
426and contains approximately 32,000 lines of changes across 430 files from 28
427authors.
428
429Excluding auto-generated files, documentation and release tools, there were
430approximately 27,000 lines of changes to 300 .pm, .t, .c and .h files.
431
432Perl continues to flourish into its third decade thanks to a vibrant community
433of users and developers. The following people are known to have contributed the
434improvements that became Perl 5.25.2:
435
436Aaron Crane, Andreas König, Andy Lester, Chad Granum, Chase Whitener, Chris
437'BinGOs' Williams, Craig A. Berry, Dagfinn Ilmari Mannsåker, Dan Collins,
438David Mitchell, Dominic Hargreaves, Ed Avis, Father Chrysostomos, H.Merijn
439Brand, Ivan Pozdeev, James E Keenan, Jarkko Hietaniemi, Jerry D. Hedden, Jim
440Cromie, Karl Williamson, Lukas Mai, Matthew Horsfall, Misty De Meo, Samuel
441Thibault, Sawyer X, Sullivan Beck, Tony Cook, Yves Orton.
442
443The list above is almost certainly incomplete as it is automatically generated
444from version control history. In particular, it does not include the names of
445the (very much appreciated) contributors who reported issues to the Perl bug
446tracker.
447
448Many of the changes included in this version originated in the CPAN modules
449included in Perl's core. We're grateful to the entire CPAN community for
450helping Perl to flourish.
451
452For a more complete list of all of Perl's historical contributors, please see
453the F<AUTHORS> file in the Perl source distribution.
454
455=head1 Reporting Bugs
456
457If you find what you think is a bug, you might check the perl bug database
458at L<https://rt.perl.org/> . There may also be information at
459L<http://www.perl.org/> , the Perl Home Page.
460
461If you believe you have an unreported bug, please run the L<perlbug> program
462included with your release. Be sure to trim your bug down to a tiny but
463sufficient test case. Your bug report, along with the output of C<perl -V>,
464will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
465
466If the bug you are reporting has security implications which make it
467inappropriate to send to a publicly archived mailing list, then see
468L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION>
469for details of how to report the issue.
470
471=head1 SEE ALSO
472
473The F<Changes> file for an explanation of how to view exhaustive details on
474what changed.
475
476The F<INSTALL> file for how to build Perl.
477
478The F<README> file for general stuff.
479
480The F<Artistic> and F<Copying> files for copyright information.
481
482=cut