summaryrefslogtreecommitdiff
path: root/pod/perl5252delta.pod
blob: 0410a923c1c576a231b6e56f8626c0efde232a20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
=encoding utf8

=head1 NAME

perl5252delta - what is new for perl v5.25.2

=head1 DESCRIPTION

This document describes differences between the 5.25.1 release and the 5.25.2
release.

If you are upgrading from an earlier release such as 5.25.0, first read
L<perl5251delta>, which describes differences between 5.25.0 and 5.25.1.

=head1 Core Enhancements

=head2 Perl can now do default collation in UTF-8 locales on platforms
that support it

Some platforms natively do a reasonable job of collating and sorting in
UTF-8 locales.  Perl now works with those.  For portability and full
control, L<Unicode::Collate> is still recommended, but now you may
not need to do anything special to get good-enough results, depending on
your application.  See
L<perllocale/Category C<LC_COLLATE>: Collation: Text Comparisons and Sorting>.

=head2 Better locale collation of strings containing embedded C<NUL>
characters

In locales that have multi-level character weights, these are now
ignored at the higher priority ones.  There are still some gotchas in
some strings, though.  See
L<perllocale/Collation of strings containing embedded C<NUL> characters>.

=head2 Lexical subroutines are no longer experimental

Using the C<lexical_subs> feature no longer emits a warning.  Existing code that disables the C<experimental::lexical_subs> warning category that the
feature previously used will continue to work.  The C<lexical_subs> feature
has no effect; all Perl code can use lexical subroutines, regardless of
what feature declarations are in scope.

=head2 C<CORE> subroutines for hash and array functions callable via
reference

The hash and array functions in the C<CORE> namespace--C<keys>, C<each>,
C<values>, C<push>, C<pop>, C<shift>, C<unshift> and C<splice>--, can now
be called with ampersand syntax (C<&CORE::keys(\%hash>) and via reference
(C<< my $k = \&CORE::keys; $k->(\%hash) >>).  Previously they could only be
used when inlined.

=head1 Security

=head2 C<-Di> switch is now required for PerlIO debugging output

Previously PerlIO debugging output would be sent to the file specified
by the C<PERLIO_DEBUG> environment variable if perl wasn't running
setuid and the C<-T> or C<-t> switches hadn't been parsed yet.

If perl performed output at a point where it hadn't yet parsed its
switches this could result in perl creating or overwriting the file
named by C<PERLIO_DEBUG> even when the C<-T> switch had been supplied.

Perl now requires the C<-Di> switch to produce PerlIO debugging
output.  By default this is written to C<stderr>, but can optionally
be redirected to a file by setting the C<PERLIO_DEBUG> environment
variable.

If perl is running setuid or the C<-T> switch has supplied
C<PERLIO_DEBUG> is ignored and the debugging output is sent to
C<stderr> as for any other C<-D> switch.

=head1 Incompatible Changes

=head2 C<keys> returned from an lvalue subroutine

C<keys> returned from an lvalue subroutine can no longer be assigned
to in list context.

    sub foo : lvalue { keys(%INC) }
    (foo) = 3; # death
    sub bar : lvalue { keys(@_) }
    (bar) = 3; # also an error

This makes the lvalue sub case consistent with C<(keys %hash) = ...> and
C<(keys @_) = ...>, which are also errors.  [perl #128187]

=head1 Modules and Pragmata

=head2 Updated Modules and Pragmata

=over 4

=item *

L<CPAN> has been upgraded from version 2.11 to 2.14.

=item *

L<Devel::Peek> has been upgraded from version 1.23 to 1.24.

=item *

L<diagnostics> has been upgraded from version 1.34 to 1.35.

=item *

L<DynaLoader> has been upgraded from version 1.38 to 1.39.

=item *

L<ExtUtils::MakeMaker> has been upgraded from version 7.10_01 to 7.18.

=item *

L<ExtUtils::Miniperl> has been upgraded from version 1.05 to 1.06.

=item *

L<ExtUtils::ParseXS> has been upgraded from version 3.31 to 3.32.

=item *

L<ExtUtils::Typemaps> has been upgraded from version 3.31 to 3.32.

=item *

L<feature> has been upgraded from version 1.43 to 1.44.

=item *

L<File::Copy> has been upgraded from version 2.31 to 2.32.

=item *

L<File::Glob> has been upgraded from version 1.26 to 1.27.

=item *

L<File::Spec> has been upgraded from version 3.63 to 3.64.

=item *

L<FileHandle> has been upgraded from version 2.02 to 2.03.

=item *

L<Getopt::Long> has been upgraded from version 2.48 to 2.49.

=item *

L<HTTP::Tiny> has been upgraded from version 0.056 to 0.058.

=item *

L<JSON::PP> has been upgraded from version 2.27300 to 2.27400.

=item *

L<Locale::Codes> has been upgraded from version 3.38 to 3.39.

=item *

L<Module::CoreList> has been upgraded from 5.20160520 to 5.20160620.

=item *

L<Opcode> has been upgraded from version 1.34 to 1.35.

=item *

L<Pod::Checker> has been upgraded from version 1.60 to 1.73.

=item *

L<Pod::Functions> has been upgraded from version 1.10 to 1.11.

=item *

L<Pod::Usage> has been upgraded from version 1.68 to 1.69.

=item *

L<POSIX> has been upgraded from version 1.69 to 1.70.

=item *

L<Test::Simple> has been upgraded from version 1.302015 to 1.302026.

=item *

L<Thread::Queue> has been upgraded from version 3.09 to 3.11.

=item *

L<threads> has been upgraded from version 2.08 to 2.09.

=item *

L<Time::HiRes> has been upgraded from version 1.9733 to 1.9734.

=item *

L<Unicode::UCD> has been upgraded from version 0.64 to 0.65.

=item *

L<VMS::DCLsym> has been upgraded from version 1.06 to 1.07.

=back

=head1 Documentation

=head2 Changes to Existing Documentation

=head3 L<perlcommunity>

=over 4

=item *

All references to Usenet have been removed.

=back

=head3 L<perldelta>

=over 4

=item *

All references to Usenet have been removed.

=back

=head3 L<perllocale>

=over 4

=item *

Document NUL collation handling.

=back

=head3 L<perlmodinstall>

=over 4

=item *

All references to Usenet have been removed.

=back

=head3 L<perlmodlib>

=over 4

=item *

Updated the mirror list.

=item *

All references to Usenet have been removed.

=back

=head3 L<perlnewmod>

=over 4

=item *

All references to Usenet have been removed.

=back

=head1 Diagnostics

The following additions or changes have been made to diagnostic output,
including warnings and fatal error messages.  For the complete list of
diagnostic messages, see L<perldiag>.

=head2 New Diagnostics

=head3 New Errors

=over 4

=item *

L<Version control conflict marker|perldiag/"Version control conflict marker">

(F) The parser found a line starting with C<E<lt><<<<<<>,
C<E<gt>E<gt>E<gt>E<gt>E<gt>E<gt>E<gt>>, or C<=======>. These may be left by a
version control system to mark conflicts after a failed merge operation.

=item *

L<%s: command not found|perldiag/"%s: command not found">

(A) You've accidentally run your script through B<bash> or another shell
instead of Perl.  Check the #! line, or manually feed your script into
Perl yourself.  The #! line at the top of your file could look like:

  #!/usr/bin/perl

=item *

L<%s: command not found: %s|perldiag/"%s: command not found: %s">

(A) You've accidentally run your script through B<zsh> or another shell
instead of Perl.  Check the #! line, or manually feed your script into
Perl yourself.  The #! line at the top of your file could look like:

  #!/usr/bin/perl

=item *

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/">

Unescaped left braces are already illegal in some contexts in regular
expression patterns, but, due to an oversight, no deprecation warning
was raised in other contexts where they are intended to become illegal.
This warning is now raised in these contexts.

=back

=head2 Changes to Existing Diagnostics

=over 4

=item *

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/">

The word "here" has been added to the message that was raised in
v5.25.1.  This is to indicate that there are contexts in which unescaped
left braces are not (yet) illegal.

=back

=head1 Configuration and Compilation

=over 4

=item *

F<make_ext.pl> no longer updates a module's F<pm_to_blib> file when no
files require updates.  This could cause dependencies, F<perlmain.c>
in particular, to be rebuilt unnecessarily.  [perl #126710]

=item *

The output of C<perl -V> has been reformatted so that each configuration
and compile-time option is now listed one per line, to improve
readability.

=back

=head1 Testing

=over 4

=item *

F<t/harness> now tries really hard not to run tests outside of the Perl
source tree. [perl #124050]

=back

=head1 Internal Changes

=over 4

=item *

Perl no longer panics when switching into some locales on machines with
buggy C<strxfrm()> implementations in their libc. [perl #121734]

=back

=head1 Selected Bug Fixes

=over 4

=item *

C< until ($x = 1) { ... } > and C< ... until $x = 1 > now properly
warn when syntax warnings are enabled.  [perl #127333]

=item *

socket() now leaves the error code returned by the system in C<$!> on
failure.  [perl #128316]

=item *

Assignment variants of any bitwise ops under the C<bitwise> feature would
crash if the left-hand side was an array or hash.  [perl #128204]

=item *

C<require> followed by a single colon (as in C<foo() ? require : ...> is
now parsed correctly as C<require> with implicit $_, rather than
C<require "">.  [perl #128307]

=item *

Scalar C<keys %hash> can now be assigned to consistently in all scalar
lvalue contexts.  Previously it worked for some contexts but not others.

=item *

List assignment to C<vec> or C<substr> with an array or hash for its first
argument used to result in crashes or "Can't coerce" error messages at run
time, unlike scalar assignment, which would give an error at compile time.
List assignment now gives a compile-time error, too.  [perl #128260]

=back

=head1 Acknowledgements

Perl 5.25.2 represents approximately 4 weeks of development since Perl 5.25.1
and contains approximately 32,000 lines of changes across 430 files from 28
authors.

Excluding auto-generated files, documentation and release tools, there were
approximately 27,000 lines of changes to 300 .pm, .t, .c and .h files.

Perl continues to flourish into its third decade thanks to a vibrant community
of users and developers. The following people are known to have contributed the
improvements that became Perl 5.25.2:

Aaron Crane, Andreas König, Andy Lester, Chad Granum, Chase Whitener, Chris
'BinGOs' Williams, Craig A. Berry, Dagfinn Ilmari Mannsåker, Dan Collins,
David Mitchell, Dominic Hargreaves, Ed Avis, Father Chrysostomos, H.Merijn
Brand, Ivan Pozdeev, James E Keenan, Jarkko Hietaniemi, Jerry D. Hedden, Jim
Cromie, Karl Williamson, Lukas Mai, Matthew Horsfall, Misty De Meo, Samuel
Thibault, Sawyer X, Sullivan Beck, Tony Cook, Yves Orton.

The list above is almost certainly incomplete as it is automatically generated
from version control history. In particular, it does not include the names of
the (very much appreciated) contributors who reported issues to the Perl bug
tracker.

Many of the changes included in this version originated in the CPAN modules
included in Perl's core. We're grateful to the entire CPAN community for
helping Perl to flourish.

For a more complete list of all of Perl's historical contributors, please see
the F<AUTHORS> file in the Perl source distribution.

=head1 Reporting Bugs

If you find what you think is a bug, you might check the perl bug database
at L<https://rt.perl.org/> .  There may also be information at
L<http://www.perl.org/> , the Perl Home Page.

If you believe you have an unreported bug, please run the L<perlbug> program
included with your release.  Be sure to trim your bug down to a tiny but
sufficient test case.  Your bug report, along with the output of C<perl -V>,
will be sent off to perlbug@perl.org to be analysed by the Perl porting team.

If the bug you are reporting has security implications which make it
inappropriate to send to a publicly archived mailing list, then see
L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION>
for details of how to report the issue.

=head1 SEE ALSO

The F<Changes> file for an explanation of how to view exhaustive details on
what changed.

The F<INSTALL> file for how to build Perl.

The F<README> file for general stuff.

The F<Artistic> and F<Copying> files for copyright information.

=cut