summaryrefslogtreecommitdiff
path: root/pod/perldelta.pod
blob: 8b4cda23b2892f7eca03cca4dd853a90f130b0a2 (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
=encoding utf8

=head1 NAME

perldelta - what is new for perl v5.29.8

=head1 DESCRIPTION

This document describes differences between the 5.29.7 release and the 5.29.8
release.

If you are upgrading from an earlier release such as 5.29.6, first read
L<perl5297delta>, which describes differences between 5.29.6 and 5.29.7.

=head1 Notice

sv_utf8_(downgrade|decode) are no longer marked as experimental [perl #133788]

=head1 Core Enhancements

=head2 Use faster method to convert to UTF-8

There is a special inline function that's used when converting a single
byte to UTF-8, that is faster than the more general one used prior to
this commit.

=head2 Turkic UTF-8 locales are now seamlessly supported

Turkic languages have different casing rules than other languages for
the characters C<"i"> and C<"I">.  The uppercase of C<"i"> is LATIN
CAPITAL LETTER I WITH DOT ABOVE (U+0130); and the lowercase of C<"I"> is LATIN
SMALL LETTER DOTLESS I (U+0131).  Unicode furnishes alternate casing
rules for use with Turkic languages.  Previously, Perl ignored these,
but now, it uses them when it detects that it is operating under a
Turkic UTF-8 locale.

=head2 Eliminate opASSIGN macro usage from core

This macro is still defined but no longer used in core

=head1 Incompatible Changes

=head2 JSON::PP enable allow_nonref by default

As JSON::XS 4.0 changed its policy and enabled allow_nonref
by default, JSON::PP also enabled allow_nonref by default.

=head1 Performance Enhancements

=over 4

Eliminate recursion from finalize_op() [perl #108276]

=back

=head1 Modules and Pragmata

=head2 Updated Modules and Pragmata

=over 4

=item *

L<B> has been upgraded from version 1.75 to 1.76.

=item *

L<deprecate> has been upgraded from version 0.03 to 0.04.

=item *

L<Encode> has been upgraded from version 2.97 to 3.00.

=item *

L<ExtUtils::Miniperl> has been upgraded from version 1.08 to 1.09.

=item *

L<IO> has been upgraded from version 1.39 to 1.40.

=item *

L<JSON::PP> has been upgraded from version 2.97001 to 4.00.
JSON::PP as JSON::XS 4.0 enable allow_nonref by default

=item *

L<Module::CoreList> has been upgraded from version 5.20190120 to 5.20190220.

Changes to B::Op_private and Config

=item *

L<Module::Load> has been upgraded from version 0.32 to 0.34.

=item *

L<Net::Ping> has been upgraded from version 2.62 to 2.71.

=item *

L<perlfaq> has been upgraded from version 5.20180915 to 5.20190126.

=item *

L<POSIX> has been upgraded from version 1.86 to 1.87.

=item *

L<Test::Simple> has been upgraded from version 1.302160 to 1.302162.

=item *

L<XS::APItest> has been upgraded from version 0.99 to 1.00.

=back

=head1 Documentation

=head2 Changes to Existing Documentation

We have attempted to update the documentation to reflect the changes
listed in this document.  If you find any we have missed, send email
to L<perlbug@perl.org|mailto:perlbug@perl.org>.

Additionally, the following selected changes have been made:

=head3 L<perlfunc>

=over 4

=item *

Try to clarify that C<< ref(qr/xx/) >> returns C<Regexp> rather than
C<REGEXP> and why.  [perl #133751]

=back

=head3 L<perllocale>

=over 4

=item *

There are actually two slightly different types of UTF-8 locales: one for Turkic
languages and one for everything else. Starting in Perl v5.30, Perl seamlessly 
handles both types.

=back

=head3 L<perlrecharclass>

=over 4

=item *

Added a note for the ::xdigit:: character class.

=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 Changes to Existing Diagnostics

=over 4

=item *

L<Type of arg %d to %s must be %s (not %s)|perldiag/"Type of arg %d to %s must be %s (not %s)">

Attempts to push, pop, etc on a hash or glob now produce this message
rather than complaining that they no longer work on scalars. [perl
#130367]

=back

=head1 Configuration and Compilation

=over 4

=item *

Improve detection of memrchr, strlcat, and strlcpy

=item *

Improve Configure detection of memmem() [perl #133760].

=item *

Fix -DPERL_GLOBAL_STRUCT_PRIVATE build option.

=item *

Multiple improvements and fixes for -DPERL_GLOBAL_STRUCT build option.

=back

=head1 Testing

Tests were added and changed to reflect the other additions and
changes in this release.  Furthermore, these significant changes were
made:

=over 4

=item *

t/lib/croak/op [perl #130367]

separate error for push etc on hash/glob

=item *

t/op/svleak.t [perl #133660]

add test for goto &sub in overload leaking

=item *

Split t/re/fold_grind.t into multiple test files

=back

=head2 Platform-Specific Notes

=over 4

=item Windows

socket() now sets C<$!> if the protocol, address family and socket
type combination is not found.  [perl #133853]

=back

=head1 Internal Changes

=over 4

=item *

It is now forbidden to malloc more than C<PTRDIFF_T_MAX> bytes.  Much
code (including C optimizers) assumes that all data structures will not
be larger than this, so this catches such attempts before overflow
happens.

=back

=head1 Selected Bug Fixes

=over 4

=item *

Regular expression matching no longer leaves stale UTF-8 length magic
when updating C<$^R>. This could result in C<length($^R)> returning
an incorrect value.

=item *

Fix a qr/[...]/ bug introduced in v5.29.7

Using /il should not result in looking for a [:posix:] class
that matches the code points given.

=item *

Reduce recursion on ops [perl #108276]

This can prevent stack overflow when processing extremely deep op
trees.

=item *

Avoid leak in multiconcat with overloading. [perl #133789]

=item *

The handling of user-defined C<\p{}> properties (see
L<perlunicode/User-Defined Character Properties>) has been rewritten to
be in C (instead of Perl).  This speeds things up, but in the process
several inconsistencies and bug fixes are made.

=over

=item 1

A few error messages have minor wording changes.  This is essentially
because the new way is integrated into the regex error handling
mechanism that marks the position in the input at which the error
occurred.  That was not possible previously.  The messages now also
contain additional back-trace-like information in case the error occurs
deep in nested calls.

=item 2

A user-defined property is implemented as a perl subroutine with certain
highly constrained naming conventions.  It was documented previously
that the sub would be in the current package if the package was
unspecified.  This turned out not to be true in all cases, but now it
is.

=item 3

All recursive calls are treated as infinite recursion.  Previously they
would cause the interpreter to panic.  Now, they cause the regex pattern
to fail to compile.

=item 4

Similarly, any other error likely would lead to a panic; now to just the
pattern failing to compile.

=item 5

The old mechanism did not detect illegal ranges in the definition of the
property.  Now, the range max must not be smaller than the range min.
Otherwise, the pattern fails to compile.

=item 6

The intention was to have each sub called only once during the lifetime
of the program, so that a property's definition is immutable.  This was
relaxed so that it could be called once for all /i compilations, and
potentially a second time for non-/i (the sub is passed a parameter
indicating which).  However, in practice there were instances when this
was broken, and multiple calls were possible.  Those have been fixed.
Now (besides the /i,non-/i cases) the only way a sub can be called
multiple times is if some component of it has not been defined yet.  For
example, suppose we have sub IsA() whose definition is known at compile
time, and it in turn calls isB() whose definition is not yet known.
isA() will be called each time a pattern it appears in is compiled.  If
isA() also calls isC() and that definition is known, isC() will be
called just once.

=item 7

There were some races and very long hangs should one thread be compiling
the same property as another simultaneously.  These have now been fixed.

=back

=item * Assertion failure in compiling invalid regex pattern [perl #133767]

This bug was introduced in the 5.29 series, so this should not be in the
perldelta for 5.30.

=item * Null pointer deref [perl #133770]

This bug was introduced in the 5.29 series, so this should not be in the
perldelta for 5.30.

=back

=head1 Acknowledgements

Perl 5.29.8 represents approximately 5 weeks of development since Perl
5.29.7 and contains approximately 13,000 lines of changes across 290 files
from 18 authors.

Excluding auto-generated files, documentation and release tools, there were
approximately 9,500 lines of changes to 210 .pm, .t, .c and .h files.

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

Abigail, Andreas König, Andy Dougherty, Aristotle Pagaltzis, Chris 'BinGOs'
Williams, Dagfinn Ilmari Mannsåker, Dan Kogai, David Mitchell, Jakub Wilk,
James E Keenan, Karen Etheridge, Karl Williamson, Nicolas R., Pali, Sawyer
X, Shlomi Fish, Tomasz Konojacki, Tony Cook.

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 analyzed 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 Give Thanks

If you wish to thank the Perl 5 Porters for the work we had done in Perl 5,
you can do so by running the C<perlthanks> program:

    perlthanks

This will send an email to the Perl 5 Porters list with your show of thanks.

=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