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