This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix typo in the name the .pm file is generated from.
[perl5.git] / pod / perldelta.pod
CommitLineData
44691e6f
AB
1=encoding utf8
2
3=head1 NAME
4
3ce6a296 5perldelta - what is new for perl v5.25.9
eabfc7bc 6
2cfe9b50 7=head1 DESCRIPTION
eabfc7bc 8
3ce6a296 9This document describes differences between the 5.25.8 release and the 5.25.9
4b8803f0 10release.
f3ed8cbf 11
3ce6a296
S
12If you are upgrading from an earlier release such as 5.25.7, first read
13L<perl5258delta>, which describes differences between 5.25.7 and 5.25.8.
14
733dba2b 15=head1 Core Enhancements
ce6646d7 16
77c8f263
KW
17=head2 New regular expression modifier C</xx>
18
19Specifying two C<x> characters to modify a regular expression pattern
20does everything that a single one does, but additionally TAB and SPACE
21characters within a bracketed character class are generally ignored and
22can be added to improve readability, like
23S<C</[ ^ A-Z d-f p-x ]/xx>>. Details are at
24L<perlre/E<sol>x and E<sol>xx>.
3ce6a296 25
3ce6a296
S
26=head1 Deprecations
27
5e50eae4 28=head2 String delimiters that aren't stand-alone graphemes are now deprecated
94749a5e
KW
29
30In order for Perl to eventually allow string delimiters to be Unicode
31grapheme clusters (which look like a single character, but may be
32a sequence of several ones), we have to stop allowing a single char
33delimiter that isn't a grapheme by itself. These are unlikely to exist
34in actual code, as they would typically display as attached to the
35character in front of them.
3ce6a296 36
733dba2b 37=head1 Performance Enhancements
226eba01 38
3ce6a296 39=over 4
8bbdbfcb 40
3ce6a296 41=item *
dd3d2a3f 42
4587a8b8
DM
43A hash in boolean context is now sometimes faster, e.g.
44
45 if (!%h) { ... }
46
47This was already special-cased, but some cases were missed, and even the
48ones which weren't have been improved.
dd3d2a3f 49
5e50eae4 50=item *
8bbdbfcb 51
5e50eae4 52Several other ops may now also be faster in boolean context.
8bbdbfcb 53
5e50eae4 54=back
3ce6a296 55
5e50eae4 56=head1 Modules and Pragmata
3ce6a296
S
57
58=head2 New Modules and Pragmata
8bbdbfcb
CG
59
60=over 4
61
62=item *
63
3ce6a296 64XXX
8bbdbfcb 65
3ce6a296
S
66=back
67
68=head2 Updated Modules and Pragmata
ff10d69b 69
3ce6a296 70=over 4
ff10d69b 71
76ea8b6a
JK
72=item *
73
3ce6a296 74L<XXX> has been upgraded from version A.xx to B.yy.
8bbdbfcb 75
d4151a23
S
76=item *
77
a4368cc3
KW
78L<re> has been upgraded from version 0.33 to 0.34;
79
80This adds support for the new L<C</xx>|perlre/E<sol>x and E<sol>xx>
81regular expression pattern modifier, and a change to the L<S<C<use re
82'strict'>>|re/'strict' mode> experimental feature. When S<C<re
83'strict'>> is enabled, a warning now will be generated for all
84unescaped uses of the two characters C<}> and C<]> in regular
85expression patterns (outside bracketed character classes) that are taken
86literally. This brings them more in line with the C<)> character which
87is always a metacharacter unless escaped. Being a metacharacter only
88sometimes, depending on action at a distance, can lead to silently
89having the pattern mean something quite different than was intended,
90which the S<C<re 'strict'>> mode is intended to minimize.
91
92=item *
93
ec34c8a4
JK
94L<B::Xref> has been upgraded from version 1.05 to 1.06.
95
96=item *
97
e34fc33f
JK
98L<Compress::Raw::Bzip2> has been upgraded from version 2.069 to 2.070.
99
100=item *
101
19f0376b
JK
102L<Compress::Raw::Zlib> has been upgraded from version 2.069 to 2.070.
103
104=item *
105
5e50eae4
A
106L<Data::Dumper> was upgraded from version 2.166 to 2.167.
107
108This fixes a stack management bug. [perl #130487].
109
110=item *
111
1146f1f7 112L<DB_File> has been upgraded from version 1.838 to 1.840.
ec34c8a4
JK
113
114=item *
115
1146f1f7 116L<Devel::SelfStubber> has been upgraded from version 1.05 to 1.06.
ec34c8a4
JK
117
118=item *
119
1146f1f7 120L<diagnostics> has been upgraded from version 1.35 to 1.36.
ec34c8a4
JK
121
122=item *
123
124L<DynaLoader> has been upgraded from version 1.40 to 1.41.
125
126=item *
127
128L<Errno> has been upgraded from version 1.27 to 1.28.
129
130=item *
131
132L<ExtUtils::Embed> has been upgraded from version 1.33 to 1.34.
133
134=item *
135
5e50eae4
A
136L<feature> has been upgraded from version 1.45 to 1.46.
137
138=item *
139
ec34c8a4
JK
140L<I18N::LangTags> has been upgraded from version 0.41 to 0.42.
141
142=item *
143
144L<lib> has been upgraded from version 0.63 to 0.64.
145
146=item *
147
59aeb939 148L<Module::CoreList> has been upgraded from version 5.20161220 to 5.20170120.
d4151a23 149
ec34c8a4
JK
150=item *
151
4ee2b8db 152L<OS2::Process> has been upgraded from version 1.11 to 1.12.
ec34c8a4
JK
153
154=item *
155
156L<perl5db.pl> has been upgraded from version 1.50 to 1.51.
157
158=item *
159
74ef8fd9 160L<Storable> has been upgraded from version 2.59 to 2.61.
5e50eae4 161Fixes [perl #130098].
ec34c8a4
JK
162
163=item *
164
165L<Symbol> has been upgraded from version 1.07 to 1.08.
166
167=item *
168
169L<Term::ReadLine> has been upgraded from version 1.15 to 1.16.
170
171=item *
172
173L<Test> has been upgraded from version 1.29 to 1.30.
174
175=item *
176
5e50eae4
A
177L<threads> has been upgraded from version 2.10 to 2.12.
178Fixes [perl #130469].
179
180=item *
181
58e76350 182L<threads::shared> has been upgraded from version 1.52 to 1.53.
5e50eae4 183This fixes [cpan #119529], [perl #130457]
58e76350
JH
184
185=item *
186
ec34c8a4
JK
187L<Unicode::UCD> has been upgraded from version 0.67 to 0.68.
188
189=item *
190
1146f1f7
JK
191L<VMS::DCLsym> has been upgraded from version 1.07 to 1.08.
192
193=item *
194
ec34c8a4
JK
195L<XSLoader> has been upgraded from version 0.24 to 0.26.
196
e770df11
JK
197=item *
198
199L<CPAN> has been upgraded from version 2.14_01 to 2.16.
200
3ce6a296 201=back
8bbdbfcb 202
3ce6a296
S
203=head2 Removed Modules and Pragmata
204
205=over 4
8bbdbfcb
CG
206
207=item *
208
3ce6a296 209XXX
8bbdbfcb 210
3ce6a296 211=back
8bbdbfcb 212
3ce6a296 213=head1 Documentation
8bbdbfcb 214
3ce6a296 215=head2 New Documentation
8bbdbfcb 216
5e50eae4 217=head3 L<perldeprecation>
3ce6a296 218
5e50eae4
A
219This file documents all upcoming deprecations, and some of the deprecations
220which already have been removed. The purpose of this documentation is
221two-fold: document what will disappear, and by which version, and serve
222as a guide for people dealing with code which has features that no longer
223work after an upgrade of their perl.
8bbdbfcb 224
3ce6a296 225=head1 Diagnostics
8bbdbfcb 226
3ce6a296
S
227The following additions or changes have been made to diagnostic output,
228including warnings and fatal error messages. For the complete list of
229diagnostic messages, see L<perldiag>.
230
3ce6a296
S
231=head2 New Diagnostics
232
3ce6a296
S
233=head3 New Warnings
234
235=over 4
8bbdbfcb
CG
236
237=item *
238
5e50eae4
A
239L<Use of unassigned code point or non-standalone grapheme for a delimiter will be a fatal error starting in Perl v5.30|perldiag/"Use of unassigned code point or non-standalone grapheme for a delimiter will be a fatal error starting in Perl v5.30">
240
241See L</Deprecations>
3ce6a296
S
242
243=back
244
245=head2 Changes to Existing Diagnostics
246
57b3a6b6 247As of Perl 5.25.9, all new deprecations will come with a version in
7ca0bfc4
A
248which the feature will disappear. And with a few exceptions, most
249existing deprecations will state when they'll disappear. As such, most
250deprecation messages have changed.
3ce6a296
S
251
252=over 4
bd5630ab 253
107db227 254=item *
2c4879e2 255
7ca0bfc4
A
256Attribute "locked" is deprecated, and will disappear in Perl 5.28
257
258=item *
259
260Attribute "unique" is deprecated, and will disappear in Perl 5.28
261
262=item *
263
264"\c%c" is more clearly written simply as "%s". This will be a fatal error
265in Perl 5.28
266
267=item *
268
269Constants from lexical variables potentially modified elsewhere are
270deprecated. This will not be allowed in Perl 5.32
271
272=item *
273
274Deprecated use of my() in false conditional. This will be a fatal error
275in Perl 5.30
276
277=item *
278
279dump() better written as CORE::dump(). dump() will no longer be available
280in Perl 5.30
281
282=item *
283
284${^ENCODING} is no longer supported. Its use will be fatal in Perl 5.28
285
286=item *
287
288File::Glob::glob() will disappear in perl 5.30. Use File::Glob::bsd_glob()
289instead.
290
291=item *
292
293%s() is deprecated on :utf8 handles. This will be a fatal error in Perl 5.30
294
295=item *
296
297$* is no longer supported. Its use will be fatal in Perl 5.30
298
299=item *
300
301$* is no longer supported. Its use will be fatal in Perl 5.30
302
303=item *
304
305Opening dirhandle %s also as a file. This will be a fatal error in Perl 5.28
306
307=item *
308
309Opening filehandle %s also as a directory. This will be a fatal
310error in Perl 5.28
311
312=item *
313
314Setting $/ to a reference to %s as a form of slurp is deprecated,
315treating as undef. This will be fatal in Perl 5.28
316
317=item *
318
319Unescaped left brace in regex is deprecated here (and will be fatal
320in Perl 5.30), passed through in regex; marked by S<<-- HERE> in m/%s/
321
322=item *
323
324Unknown charname '' is deprecated. Its use will be fatal in Perl 5.28
325
326=item *
327
328Use of bare << to mean <<"" is deprecated. Its use will be fatal in Perl 5.28
329
330=item *
331
332Use of code point 0x%s is deprecated; the permissible max is 0x%s.
333This will be fatal in Perl 5.28
334
335=item *
336
337Use of comma-less variable list is deprecated. Its use will be fatal
338in Perl 5.28
339
340=item *
341
342Use of inherited AUTOLOAD for non-method %s() is deprecated. This
343will be fatal in Perl 5.28
344
345=item *
346
347Use of strings with code points over 0xFF as arguments to %s operator
348is deprecated. This will be a fatal error in Perl 5.28
3ce6a296
S
349
350=back
351
352=head1 Utility Changes
353
5e50eae4 354=head2 F<c2ph> and F<pstruct>
3ce6a296 355
5e50eae4
A
356=over 4
357
358=item *
3ce6a296 359
5e50eae4
A
360These old utilities have long since superceeded by L<h2xs>, and are
361now gone from the distribution.
362
363=back
364
365=head2 F<Porting/sync-with-cpan>
3ce6a296
S
366
367=over 4
a09f502b 368
107db227 369=item *
8bbdbfcb 370
5e50eae4 371Many improvements
3ce6a296
S
372
373=back
374
3ce6a296 375
5e50eae4 376=head1 Configuration and Compilation
3ce6a296
S
377
378=over 4
8bbdbfcb 379
107db227 380=item *
8bbdbfcb 381
1e671560
TC
382The C<dtrace> build process has further changes:
383
384=over
385
386=item *
387
388If the C<-xnolibs> is available, use that so a F<dtrace> perl can be
389built within a FreeBSD jail.
390
391=item *
392
393On systems that build a dtrace object file (FreeBSD, Solaris and
394SystemTap's dtrace emulation), copy the input objects to a separate
395directory and process them there, and use those objects in the link,
396since C<dtrace -G> also modifies these objects.
397
398=item *
399
400Add libelf to the build on FreeBSD 10.x, since dtrace adds references
401to libelf symbols.
402
403=item *
404
405Generate a dummy dtrace_main.o if C<dtrace -G> fails to build it. A
406default build on Solaris generates probes from the unused inline
407functions, while they don't on FreeBSD, which causes C<dtrace -G> to
408fail.
409
410=back
411
412[perl #130108]
3ce6a296 413
8f7edc68
TC
414=item *
415
416You can now disable perl's use of the PERL_HASH_SEED and
417PERL_PERTURB_KEYS environment variables by configureing perl with
418C<-Accflags=NO_PERL_HASH_ENV>.
419
420=item *
421
422You can now disable perl's use of the PERL_HASH_SEED_DEBUG environment
423variable by configuring perl with
424C<-Accflags=-DNO_PERL_HASH_SEED_DEBUG>.
425
3ce6a296
S
426=back
427
3ce6a296
S
428=head1 Internal Changes
429
733dba2b 430=over 4
a09f502b 431
a07f6112 432=item *
a09f502b 433
a239b1e2
KW
434New versions of macros like C<isALPHA_utf8> and C<toLOWER_utf8> have
435been added, each with the
da8c1a98
KW
436suffix C<_safe>, like C<isSPACE_utf8_safe>. These take an extra
437parameter, giving an upper limit of how far into the string it is safe
438to read. Using the old versions could cause attempts to read beyond the
607313a1
KW
439end of the input buffer if the UTF-8 is not well-formed, and ther use
440now raises a deprecation warning. Details are at
da8c1a98
KW
441L<perlapi/Character classification>.
442
443=item *
444
86ae6e94
KW
445Calling macros like C<isALPHA_utf8> on malformed UTF-8 have issued a
446deprecation warning since Perl v5.18. They now die.
fa8ab374 447Similarly, macros like C<toLOWER_utf8> on malformed UTF-8 now die.
3ce6a296 448
d1f8d421
KW
449=item *
450
451Calling the functions C<utf8n_to_uvchr> and its derivatives, while
5a48568d
KW
452passing a string length of 0 is now asserted against in DEBUGGING
453builds, and otherwise returns the Unicode REPLACEMENT CHARACTER. If
454you have nothing to decode, you shouldn't call the decode function.
d1f8d421 455
94953955
KW
456=item *
457
458The functions C<utf8n_to_uvchr> and its derivatives now return the
459Unicode REPLACEMENT CHARACTER if called with UTF-8 that has the overlong
460malformation, and that malformation is allowed by the input parameters.
461This malformation is where the UTF-8 looks valid syntactically, but
462there is a shorter sequence that yields the same code point. This has
463been forbidden since Unicode version 3.1.
464
d60baaa7
KW
465=item *
466
467The functions C<utf8n_to_uvchr> and its derivatives now accept an input
468flag to allow the overflow malformation. This malformation is when the
469UTF-8 may be syntactically valid, but the code point it represents is
470not capable of being represented in the word length on the platform.
471What "allowed" means in this case is that the function doesn't return an
472error, and advances the parse pointer to beyond the UTF-8 in question,
473but it returns the Unicode REPLACEMENT CHARACTER as the value of the
474code point (since the real value is not representable).
475
3ce6a296
S
476=back
477
478=head1 Selected Bug Fixes
479
3ce6a296 480=over 4
a09f502b 481
36cabe94
YO
482=item *
483
6cdc5cd8
KW
484Under C<use utf8>, the entire Perl program is now checked that the UTF-8
485is wellformed. This resolves [perl #126310].
3ce6a296 486
d6c970c7
AC
487=item *
488
489The range operator C<..> on strings now handles its arguments correctly when in
490the scope of the L<< C<unicode_strings>|feature/"The 'unicode_strings' feature" >>
491feature. The previous behaviour was sufficiently unexpected that we believe no
492correct program could have made use of it.
493
14ebef5f
TC
494=item *
495
496The S<split> operator did not ensure enough space was allocated for
497its return value in scalar context. It could then write a single
498pointer immediately beyond the end of the memory block allocated for
499the stack. [perl #130262]
500
8ecef801
TC
501=item *
502
503Using a large code point with the C<W> pack template character with
504the current output position aligned at just the right point could
505cause a write a single zero byte immediately beyond the end of an
506allocated buffer. [perl #129149]
507
6f2279ab
TC
508=item *
509
510Supplying the form picture argument as part of the form argument list
511where the picture specifies modifying the argument could cause an
512access to the new freed compiled form. [perl #129125]
513
5e50eae4 514=item *
3ce6a296 515
5e50eae4
A
516Fix a problem with sort's build-in compare, where it would not sort
517correctly with 64-bit integers, and non-long doubles. [perl #130335]
3ce6a296 518
5e50eae4 519=item *
36cabe94 520
5e50eae4 521Fix issues with /(?{ ... <<EOF })/ that broke Method-Signatures. [perl #130398]
3ce6a296 522
5e50eae4
A
523=item *
524
525Fix a macro which caused syntax error on an EBCDIC build.
3ce6a296
S
526
527=item *
528
5e50eae4 529Prevent tests from getting hung up on 'NonStop' option. [perl #130445]
36cabe94 530
5e50eae4 531=item *
7d897bd0 532
5e50eae4
A
533Fixed an assertion failure with C<chop> and C<chomp>, which
534could be triggered by C<chop(@x =~ tr/1/1/)>. [perl #130198].
3ce6a296 535
5e50eae4
A
536=item *
537
538Fixed a comment skipping error under C</x>; it could stop skipping a
539byte early, which could be in the middle of a UTF-8 character.
540[perl #130495].
8bbdbfcb 541
3ce6a296
S
542=item *
543
5e50eae4 544F<perldb> now ignores F</dev/tty> on non-Unix systems. [perl #113960];
8bbdbfcb 545
5e50eae4
A
546=item *
547
548Fix assertion failure for C<{}->$x> when C<$x> isn't defined. [perl #130496].
549
550=item *
262514fd 551
5e50eae4
A
552DragonFly BSD now has support for setproctitle(). [perl #130068].
553
554=item *
555
556Fix an assertion error which could be triggered when lookahead string
557in patterns exceeded a minimum length. [perl #130522].
558
559=item *
560
561Only warn once per literal about a misplaced C<_>. [perl #70878].
562
d34728b9
A
563=item *
564
565Ensure range-start is set after error in C<tr///>. [perl #129342].
566
567=item *
568
569Don't read past start of string for unmatched backref; otherwise,
570we may have heap buffer overflow. [perl #129377].
571
572=item *
573
574Properly recognize mathematical digit ranges starting at U+1D7E.
575C<use re 'strict'> is supposed to warn if you use a range whose start
576and end digit aren't from the same group of 10. It didn't do that
577for five groups of mathematical digits starting at U+1D7E.
578
5e50eae4 579=back
a6a32e96 580
262514fd 581
3ce6a296 582=head1 Acknowledgements
226eba01 583
3ce6a296 584XXX Generate this with:
24528e8e 585
3ce6a296 586 perl Porting/acknowledgements.pl v5.25.5..HEAD
f5b73711 587
44691e6f
AB
588=head1 Reporting Bugs
589
c0ea3294
SH
590If you find what you think is a bug, you might check the perl bug database
591at L<https://rt.perl.org/> . There may also be information at
4b8803f0 592L<http://www.perl.org/> , the Perl Home Page.
44691e6f 593
e08634c5
SH
594If you believe you have an unreported bug, please run the L<perlbug> program
595included with your release. Be sure to trim your bug down to a tiny but
596sufficient test case. Your bug report, along with the output of C<perl -V>,
597will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
44691e6f 598
87c118b9
DM
599If the bug you are reporting has security implications which make it
600inappropriate to send to a publicly archived mailing list, then see
c0ea3294
SH
601L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION>
602for details of how to report the issue.
44691e6f
AB
603
604=head1 SEE ALSO
605
e08634c5
SH
606The F<Changes> file for an explanation of how to view exhaustive details on
607what changed.
44691e6f
AB
608
609The F<INSTALL> file for how to build Perl.
610
611The F<README> file for general stuff.
612
613The F<Artistic> and F<Copying> files for copyright information.
614
615=cut