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