This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Perldelta final massage for 5.29.8 release
[perl5.git] / pod / perldelta.pod
CommitLineData
44691e6f
AB
1=encoding utf8
2
3=head1 NAME
4
65c75f8f 5perldelta - what is new for perl v5.29.8
e4c43fa1 6
4026b091
S
7=head1 DESCRIPTION
8
65c75f8f 9This document describes differences between the 5.29.7 release and the 5.29.8
4026b091
S
10release.
11
65c75f8f
A
12If you are upgrading from an earlier release such as 5.29.6, first read
13L<perl5297delta>, which describes differences between 5.29.6 and 5.29.7.
e0f0cf8a 14
65c75f8f 15=head1 Notice
0ce66d44 16
9e8e4a84 17sv_utf8_(downgrade|decode) are no longer marked as experimental [perl #133788]
5203d63d 18
65c75f8f 19=head1 Core Enhancements
21d34e95 20
9e8e4a84 21=head2 Use faster method to convert to UTF-8
e0f0cf8a 22
9e8e4a84
N
23There is a special inline function that's used when converting a single
24byte to UTF-8, that is faster than the more general one used prior to
25this commit.
4234ac96 26
0c8d0e83
KW
27=head2 Turkic UTF-8 locales are now seamlessly supported
28
29Turkic languages have different casing rules than other languages for
30the characters C<"i"> and C<"I">. The uppercase of C<"i"> is LATIN
31CAPITAL LETTER I WITH DOT ABOVE (U+0130); and the lowercase of C<"I"> is LATIN
32SMALL LETTER DOTLESS I (U+0131). Unicode furnishes alternate casing
33rules for use with Turkic languages. Previously, Perl ignored these,
34but now, it uses them when it detects that it is operating under a
35Turkic UTF-8 locale.
36
9e8e4a84 37=head2 Eliminate opASSIGN macro usage from core
72b2b1d9 38
9e8e4a84 39This macro is still defined but no longer used in core
72b2b1d9 40
65c75f8f 41=head1 Incompatible Changes
1ab3a811 42
7b97bf55
N
43=head2 JSON::PP enable allow_nonref by default
44
45As JSON::XS 4.0 changed its policy and enabled allow_nonref
9e8e4a84 46by default, JSON::PP also enabled allow_nonref by default.
3e52c030 47
65c75f8f
A
48=head1 Performance Enhancements
49
65c75f8f 50=over 4
3e52c030 51
9e8e4a84 52Eliminate recursion from finalize_op() [perl #108276]
3e52c030 53
65c75f8f 54=back
3e52c030 55
65c75f8f 56=head1 Modules and Pragmata
3e52c030 57
d9ed9e94 58=head2 Updated Modules and Pragmata
3e52c030 59
65c75f8f 60=over 4
3e52c030
A
61
62=item *
63
d9ed9e94 64L<B> has been upgraded from version 1.75 to 1.76.
3e52c030
A
65
66=item *
67
423dbb1d
N
68L<deprecate> has been upgraded from version 0.03 to 0.04.
69
70=item *
71
7b97bf55
N
72L<Encode> has been upgraded from version 2.97 to 3.00.
73
d9ed9e94
N
74=item *
75
423dbb1d
N
76L<ExtUtils::Miniperl> has been upgraded from version 1.08 to 1.09.
77
78=item *
79
80L<IO> has been upgraded from version 1.39 to 1.40.
81
82=item *
83
7b97bf55
N
84L<JSON::PP> has been upgraded from version 2.97001 to 4.00.
85JSON::PP as JSON::XS 4.0 enable allow_nonref by default
86
d9ed9e94 87=item *
7b97bf55 88
d9ed9e94 89L<Module::CoreList> has been upgraded from version 5.20190120 to 5.20190220.
7b97bf55 90
d9ed9e94 91Changes to B::Op_private and Config
7b97bf55 92
d9ed9e94 93=item *
7b97bf55 94
d9ed9e94 95L<Module::Load> has been upgraded from version 0.32 to 0.34.
65c75f8f 96
d9ed9e94 97=item *
65c75f8f 98
423dbb1d 99L<Net::Ping> has been upgraded from version 2.62 to 2.71.
65c75f8f 100
d9ed9e94 101=item *
65c75f8f 102
d9ed9e94 103L<perlfaq> has been upgraded from version 5.20180915 to 5.20190126.
3e52c030
A
104
105=item *
106
423dbb1d
N
107L<POSIX> has been upgraded from version 1.86 to 1.87.
108
109=item *
110
d9ed9e94
N
111L<Test::Simple> has been upgraded from version 1.302160 to 1.302162.
112
113=item *
114
115L<XS::APItest> has been upgraded from version 0.99 to 1.00.
3e52c030 116
4234ac96
AC
117=back
118
15f62f05 119=head1 Documentation
4234ac96 120
15f62f05 121=head2 Changes to Existing Documentation
4234ac96 122
15f62f05
KE
123We have attempted to update the documentation to reflect the changes
124listed in this document. If you find any we have missed, send email
125to L<perlbug@perl.org|mailto:perlbug@perl.org>.
4234ac96 126
15f62f05
KE
127Additionally, the following selected changes have been made:
128
129da27a 129=head3 L<perlfunc>
0ce66d44
A
130
131=over 4
132
0deccbc4
A
133=item *
134
129da27a
TC
135Try to clarify that C<< ref(qr/xx/) >> returns C<Regexp> rather than
136C<REGEXP> and why. [perl #133751]
0deccbc4
A
137
138=back
0ce66d44 139
9e8e4a84 140=head3 L<perllocale>
65c75f8f
A
141
142=over 4
143
144=item *
145
9e8e4a84
N
146There are actually two slightly different types of UTF-8 locales: one for Turkic
147languages and one for everything else. Starting in Perl v5.30, Perl seamlessly
148handles both types.
65c75f8f
A
149
150=back
151
9e8e4a84 152=head3 L<perlrecharclass>
65c75f8f
A
153
154=over 4
155
156=item *
157
423dbb1d 158Added a note for the ::xdigit:: character class.
65c75f8f
A
159
160=back
161
9e8e4a84
N
162=head1 Diagnostics
163
164The following additions or changes have been made to diagnostic output,
165including warnings and fatal error messages. For the complete list of
166diagnostic messages, see L<perldiag>.
4380f76d 167
9e8e4a84 168=head2 Changes to Existing Diagnostics
65c75f8f 169
4380f76d
KE
170=over 4
171
172=item *
173
9c406fbf
TC
174L<Type of arg %d to %s must be %s (not %s)|perldiag/"Type of arg %d to %s must be %s (not %s)">
175
176Attempts to push, pop, etc on a hash or glob now produce this message
177rather than complaining that they no longer work on scalars. [perl
178#130367]
65c75f8f
A
179
180=back
181
9e8e4a84 182=head1 Configuration and Compilation
65c75f8f
A
183
184=over 4
185
186=item *
187
9e8e4a84 188Improve detection of memrchr, strlcat, and strlcpy
65c75f8f
A
189
190=item *
191
9e8e4a84 192Improve Configure detection of memmem() [perl #133760].
0ce66d44 193
423dbb1d 194=item *
4234ac96 195
423dbb1d 196Fix -DPERL_GLOBAL_STRUCT_PRIVATE build option.
4234ac96 197
423dbb1d 198=item *
65c75f8f 199
423dbb1d 200Multiple improvements and fixes for -DPERL_GLOBAL_STRUCT build option.
65c75f8f 201
423dbb1d 202=back
65c75f8f 203
423dbb1d 204=head1 Testing
65c75f8f 205
4380f76d
KE
206Tests were added and changed to reflect the other additions and
207changes in this release. Furthermore, these significant changes were
208made:
209
4380f76d
KE
210=over 4
211
212=item *
213
9e8e4a84
N
214t/lib/croak/op [perl #130367]
215
216separate error for push etc on hash/glob
217
218=item *
219
220t/op/svleak.t [perl #133660]
221
222add test for goto &sub in overload leaking
223
224=item *
225
226Split t/re/fold_grind.t into multiple test files
65c75f8f
A
227
228=back
229
65c75f8f
A
230=head2 Platform-Specific Notes
231
65c75f8f
A
232=over 4
233
beaf1ce9 234=item Windows
65c75f8f 235
beaf1ce9
TC
236socket() now sets C<$!> if the protocol, address family and socket
237type combination is not found. [perl #133853]
65c75f8f
A
238
239=back
240
241=head1 Internal Changes
242
65c75f8f 243=over 4
4380f76d 244
1c4b2ed9 245=item *
ea89b333 246
2cbd034e
KW
247It is now forbidden to malloc more than C<PTRDIFF_T_MAX> bytes. Much
248code (including C optimizers) assumes that all data structures will not
249be larger than this, so this catches such attempts before overflow
250happens.
20ccb10a 251
e0f0cf8a 252=back
20ccb10a 253
1c4b2ed9 254=head1 Selected Bug Fixes
20ccb10a 255
e0f0cf8a 256=over 4
0ce66d44
A
257
258=item *
259
3fb29f09 260Regular expression matching no longer leaves stale UTF-8 length magic
9e8e4a84 261when updating C<$^R>. This could result in C<length($^R)> returning
3fb29f09 262an incorrect value.
b20a43d7 263
9e8e4a84 264=item *
0ce66d44 265
9e8e4a84 266Fix a qr/[...]/ bug introduced in v5.29.7
65c75f8f 267
9e8e4a84
N
268Using /il should not result in looking for a [:posix:] class
269that matches the code points given.
0ce66d44 270
ff2d4c11
TC
271=item *
272
9e8e4a84 273Reduce recursion on ops [perl #108276]
0ce66d44 274
9e8e4a84
N
275This can prevent stack overflow when processing extremely deep op
276trees.
990f9aa0 277
65c75f8f
A
278=item *
279
9e8e4a84 280Avoid leak in multiconcat with overloading. [perl #133789]
990f9aa0 281
73b95840
KW
282=item *
283
284The handling of user-defined C<\p{}> properties (see
285L<perlunicode/User-Defined Character Properties>) has been rewritten to
286be in C (instead of Perl). This speeds things up, but in the process
287several inconsistencies and bug fixes are made.
288
289=over
290
291=item 1
292
293A few error messages have minor wording changes. This is essentially
294because the new way is integrated into the regex error handling
295mechanism that marks the position in the input at which the error
296occurred. That was not possible previously. The messages now also
297contain additional back-trace-like information in case the error occurs
298deep in nested calls.
299
300=item 2
301
302A user-defined property is implemented as a perl subroutine with certain
303highly constrained naming conventions. It was documented previously
304that the sub would be in the current package if the package was
305unspecified. This turned out not to be true in all cases, but now it
306is.
307
308=item 3
309
310All recursive calls are treated as infinite recursion. Previously they
311would cause the interpreter to panic. Now, they cause the regex pattern
312to fail to compile.
313
314=item 4
315
316Similarly, any other error likely would lead to a panic; now to just the
317pattern failing to compile.
318
319=item 5
320
321The old mechanism did not detect illegal ranges in the definition of the
322property. Now, the range max must not be smaller than the range min.
323Otherwise, the pattern fails to compile.
324
325=item 6
326
327The intention was to have each sub called only once during the lifetime
328of the program, so that a property's definition is immutable. This was
329relaxed so that it could be called once for all /i compilations, and
330potentially a second time for non-/i (the sub is passed a parameter
331indicating which). However, in practice there were instances when this
332was broken, and multiple calls were possible. Those have been fixed.
333Now (besides the /i,non-/i cases) the only way a sub can be called
334multiple times is if some component of it has not been defined yet. For
335example, suppose we have sub IsA() whose definition is known at compile
336time, and it in turn calls isB() whose definition is not yet known.
337isA() will be called each time a pattern it appears in is compiled. If
338isA() also calls isC() and that definition is known, isC() will be
339called just once.
340
341=item 7
342
343There were some races and very long hangs should one thread be compiling
344the same property as another simultaneously. These have now been fixed.
345
346=back
347
75451d8c
KW
348=item * Assertion failure in compiling invalid regex pattern [perl #133767]
349
350This bug was introduced in the 5.29 series, so this should not be in the
351perldelta for 5.30.
352
98265db1
KW
353=item * Null pointer deref [perl #133770]
354
355This bug was introduced in the 5.29 series, so this should not be in the
356perldelta for 5.30.
357
65c75f8f 358=back
1c0558a0 359
65c75f8f 360=head1 Acknowledgements
1c0558a0 361
423dbb1d
N
362Perl 5.29.8 represents approximately 5 weeks of development since Perl
3635.29.7 and contains approximately 13,000 lines of changes across 290 files
364from 18 authors.
365
366Excluding auto-generated files, documentation and release tools, there were
367approximately 9,500 lines of changes to 210 .pm, .t, .c and .h files.
368
369Perl continues to flourish into its fourth decade thanks to a vibrant
370community of users and developers. The following people are known to have
371contributed the improvements that became Perl 5.29.8:
372
373Abigail, Andreas König, Andy Dougherty, Aristotle Pagaltzis, Chris 'BinGOs'
374Williams, Dagfinn Ilmari Mannsåker, Dan Kogai, David Mitchell, Jakub Wilk,
375James E Keenan, Karen Etheridge, Karl Williamson, Nicolas R., Pali, Sawyer
376X, Shlomi Fish, Tomasz Konojacki, Tony Cook.
377
378The list above is almost certainly incomplete as it is automatically
379generated from version control history. In particular, it does not include
380the names of the (very much appreciated) contributors who reported issues to
381the Perl bug tracker.
382
383Many of the changes included in this version originated in the CPAN modules
384included in Perl's core. We're grateful to the entire CPAN community for
385helping Perl to flourish.
1c0558a0 386
423dbb1d
N
387For a more complete list of all of Perl's historical contributors, please
388see the F<AUTHORS> file in the Perl source distribution.
f5b73711 389
44691e6f
AB
390=head1 Reporting Bugs
391
373fec1e 392If you find what you think is a bug, you might check the perl bug database
15f62f05
KE
393at L<https://rt.perl.org/>. There may also be information at
394L<http://www.perl.org/>, the Perl Home Page.
44691e6f 395
e08634c5
SH
396If you believe you have an unreported bug, please run the L<perlbug> program
397included with your release. Be sure to trim your bug down to a tiny but
398sufficient test case. Your bug report, along with the output of C<perl -V>,
423dbb1d 399will be sent off to perlbug@perl.org to be analyzed by the Perl porting team.
44691e6f 400
87c118b9
DM
401If the bug you are reporting has security implications which make it
402inappropriate to send to a publicly archived mailing list, then see
373fec1e
SH
403L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION>
404for details of how to report the issue.
44691e6f 405
390ae6f9
S
406=head1 Give Thanks
407
373fec1e
SH
408If you wish to thank the Perl 5 Porters for the work we had done in Perl 5,
409you can do so by running the C<perlthanks> program:
390ae6f9
S
410
411 perlthanks
412
413This will send an email to the Perl 5 Porters list with your show of thanks.
414
44691e6f
AB
415=head1 SEE ALSO
416
e08634c5
SH
417The F<Changes> file for an explanation of how to view exhaustive details on
418what changed.
44691e6f
AB
419
420The F<INSTALL> file for how to build Perl.
421
422The F<README> file for general stuff.
423
424The F<Artistic> and F<Copying> files for copyright information.
425
426=cut