summaryrefslogtreecommitdiff
path: root/pod/perl5354delta.pod
blob: 032e06f08928fcc647d12390468e6848fbc85f21 (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
=encoding utf8

=head1 NAME

perl5354delta - what is new for perl v5.35.4

=head1 DESCRIPTION

This document describes differences between the 5.35.3 release and the 5.35.4
release.

If you are upgrading from an earlier release such as 5.35.2, first read
L<perl5353delta>, which describes differences between 5.35.2 and 5.35.3.

=head1 Core Enhancements

=head2 C<defer> blocks

This release adds support for C<defer> blocks, which are blocks of code
prefixed by the C<defer> modifier. They provide a section of code which runs
at a later time, during scope exit.

For more information, see L<perlsyn/"defer blocks">.

=head2 Unicode 14.0 is supported

See L<https://www.unicode.org/versions/Unicode14.0.0/> for details.

=head2 SIGFPE no longer deferred

Floating-point exceptions are now delivered immediately, in the same way
as other "fault"-like signals such as SIGSEGV. This means one has at
least a chance to catch such a signal with a C<$SIG{FPE}> handler, e.g.
so that C<die> can report the line in perl that triggered it.

=head2 Stable boolean tracking

The "true" and "false" boolean values, often accessed by constructions like
C<!!0> and C<!!1>, as well as being returned from many core functions and
operators, now remember their boolean nature even through assignment into
variables. The new function C<isbool()> in L<Scalar::Util> can check whether
a value has boolean nature.

This is likely to be useful when interoperating with other languages or
data-type serialisation, among other places.

=head1 Incompatible Changes

There are no changes intentionally incompatible with 5.35.3.
If any exist, they are bugs, and we request that you submit a
report.  See L</Reporting Bugs> below.

=head1 Performance Enhancements

=over 4

=item *

We now probe for compiler support for C11 thread local storage, and where
available use this for "implicit context" for XS extensions making API calls for
a threaded Perl build.  This requires fewer function calls at the C level than
POSIX thread specific storage. We continue to use the the pthreads approach if
the C11 approach is not available.

F<Configure> run with the defaults will build an unthreaded Perl (which is
slightly faster), but most operating systems ship a threaded Perl.

=back

=head1 Modules and Pragmata

=head2 Updated Modules and Pragmata

=over 4

=item *

L<attributes> has been upgraded from version 0.33 to 0.34.

=item *

L<B> has been upgraded from version 1.82 to 1.83.

=item *

L<B::Deparse> has been upgraded from version 1.57 to 1.58.

=item *

L<Devel::Peek> has been upgraded from version 1.31 to 1.32.

=item *

L<Exporter> has been upgraded from version 5.76 to 5.77.

=item *

L<ExtUtils::ParseXS> has been upgraded from version 3.43 to 3.44.

=item *

L<ExtUtils::Typemaps> has been upgraded from version 3.43 to 3.44.

=item *

L<feature> has been upgraded from version 1.67 to 1.68.

=item *

L<Hash::Util::FieldHash> has been upgraded from version 1.22 to 1.23.

=item *

L<IO> has been upgraded from version 1.47 to 1.48.

=item *

L<Module::CoreList> has been upgraded from version 5.20210820 to 5.20210920.

=item *

L<mro> has been upgraded from version 1.25_001 to 1.26.

=item *

L<Opcode> has been upgraded from version 1.53 to 1.54.

=item *

L<Pod::Html> has been upgraded from version 1.32 to 1.33.

=item *

L<Scalar::Util> has been upgraded from version 1.56 to 1.56_001.

=item *

L<Storable> has been upgraded from version 3.24 to 3.25.

=item *

L<Text::Tabs> has been upgraded from version 2021.0804 to 2021.0814.

=item *

L<Text::Wrap> has been upgraded from version 2021.0804 to 2021.0814.

=item *

L<threads::shared> has been upgraded from version 1.63 to 1.64.

=item *

L<Unicode::Collate> has been upgraded from version 1.30 to 1.31.  Experimental
support for EBCDIC has been added.

=item *

L<Unicode::UCD> has been upgraded from version 0.77 to 0.78.

=item *

L<UNIVERSAL> has been upgraded from version 1.13 to 1.14.

=item *

L<warnings> has been upgraded from version 1.53 to 1.54.

=item *

L<XS::APItest> has been upgraded from version 1.18 to 1.19.

=item *

L<XS::Typemap> has been upgraded from version 0.18 to 0.19.

=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, open an issue
at L<https://github.com/Perl/perl5/issues>.

Additionally, the following selected changes have been made:

=head3 L<perlre>

=over 4

=item *

Updated to discourage the use of the /d regexp modifier.

=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 New Diagnostics

=head3 New Errors

=over 4

=item *

L<Can't "%s" out of a defer block|perldiag/"Can't "%s" out of a defer block">

(F) An attempt was made to jump out of the scope of a defer block by using
a control-flow statement such as C<return>, C<goto> or a loop control. This is
not permitted.

=back

=head3 New Warnings

=over 4

=item *

L<defer is experimental|perldiag/"defer is experimental">

(S experimental::defer) The C<defer> block modifier is experimental. If you
want to use the feature, disable the warning with
C<no warnings 'experimental::defer'>, but know that in doing so you are taking
the risk that your code may break in a future Perl version.

=back

=head2 Changes to Existing Diagnostics

=over 4

=item "unexpected constant lvalue entersub entry via type/targ %d:%d" now has a panic prefix

This makes it consistent with other checks of internal consistency when
compiling a subroutine.

=item Removed a number of diagnostics

Commit 6a3871b339 removes many diagnostics that have been removed from the
perl core across many years.

=back

=head2 Platform-Specific Notes

=over 4

=item C<keys %ENV> on VMS returns consistent results

On VMS entries in the C<%ENV> hash are loaded from the OS environment on
first access, hence the first iteration of C<%ENV> requires the entire
environment to be scanned to find all possible keys. This initialisation had
always been done correctly for full iteration, but previously was not
happening for C<%ENV> in scalar context, meaning that C<scalar %ENV> would
return 0 if called before any other C<%ENV> access, or would only return the
count of keys accessed if there had been no iteration.

These bugs are now fixed - C<%ENV> and C<keys %ENV> in scalar context now
return the correct result - the count of all keys in the environment.

=back

=head1 Internal Changes

=over 4

=item *

C<Perl_ptr_table_clear> has been deleted. This has been marked as deprecated
since v5.14.0 (released in 2011), and is not used by any code on CPAN.

=item *

Added new boolean macros and functions. See L</Stable boolean tracking> for
related information and L<perlapi> for documentation.

=over 4

=item *

sv_setbool

=item *

sv_setbool_mg

=item *

SvIsBOOL

=back

=item *

Added 4 missing functions for dealing with RVs:

=over 4

=item *

sv_setrv_noinc

=item *

sv_setrv_noinc_mg

=item *

sv_setrv_inc

=item *

sv_setrv_inc_mg

=back

=item *

C<xs_handshake()>'s two failure modes now provide distinct messages.

=back

=head1 Acknowledgements

Perl 5.35.4 represents approximately 4 weeks of development since Perl
5.35.3 and contains approximately 64,000 lines of changes across 540 files
from 19 authors.

Excluding auto-generated files, documentation and release tools, there were
approximately 49,000 lines of changes to 310 .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.35.4:

Aristotle Pagaltzis, Chris 'BinGOs' Williams, Dagfinn Ilmari Mannsåker, Dan
Book, David Mitchell, Felipe Gasper, Hugo van der Sanden, James E Keenan,
Karen Etheridge, Karl Williamson, Matthew Horsfall, Nicholas Clark, Paul
Evans, Richard Leach, TAKAI Kousuke, Todd Rinaldo, Tomasz Konojacki,
Tomoyuki Sadahiro, Tony Cook, Unicode Consortium.

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://github.com/Perl/perl5/issues>.  There may also be information at
L<http://www.perl.org/>, the Perl Home Page.

If you believe you have an unreported bug, please open an issue at
L<https://github.com/Perl/perl5/issues>.  Be sure to trim your bug down to a
tiny but sufficient test case.

If the bug you are reporting has security implications which make it
inappropriate to send to a public issue tracker, 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