This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add @_ in signatured sub being experimental to perldelta.pod
[perl5.git] / pod / perl5354delta.pod
CommitLineData
74f6ed49
MH
1=encoding utf8
2
3=head1 NAME
4
5perl5354delta - what is new for perl v5.35.4
6
7=head1 DESCRIPTION
8
9This document describes differences between the 5.35.3 release and the 5.35.4
10release.
11
12If you are upgrading from an earlier release such as 5.35.2, first read
13L<perl5353delta>, which describes differences between 5.35.2 and 5.35.3.
14
15=head1 Core Enhancements
16
17=head2 C<defer> blocks
18
19This release adds support for C<defer> blocks, which are blocks of code
20prefixed by the C<defer> modifier. They provide a section of code which runs
21at a later time, during scope exit.
22
23For more information, see L<perlsyn/"defer blocks">.
24
25=head2 Unicode 14.0 is supported
26
27See L<https://www.unicode.org/versions/Unicode14.0.0/> for details.
28
29=head2 SIGFPE no longer deferred
30
31Floating-point exceptions are now delivered immediately, in the same way
32as other "fault"-like signals such as SIGSEGV. This means one has at
33least a chance to catch such a signal with a C<$SIG{FPE}> handler, e.g.
34so that C<die> can report the line in perl that triggered it.
35
36=head2 Stable boolean tracking
37
38The "true" and "false" boolean values, often accessed by constructions like
39C<!!0> and C<!!1>, as well as being returned from many core functions and
40operators, now remember their boolean nature even through assignment into
41variables. The new function C<isbool()> in L<Scalar::Util> can check whether
42a value has boolean nature.
43
44This is likely to be useful when interoperating with other languages or
45data-type serialisation, among other places.
46
47=head1 Incompatible Changes
48
49There are no changes intentionally incompatible with 5.35.3.
50If any exist, they are bugs, and we request that you submit a
51report. See L</Reporting Bugs> below.
52
53=head1 Performance Enhancements
54
55=over 4
56
57=item *
58
59We now probe for compiler support for C11 thread local storage, and where
60available use this for "implicit context" for XS extensions making API calls for
61a threaded Perl build. This requires fewer function calls at the C level than
62POSIX thread specific storage. We continue to use the the pthreads approach if
63the C11 approach is not available.
64
65F<Configure> run with the defaults will build an unthreaded Perl (which is
66slightly faster), but most operating systems ship a threaded Perl.
67
68=back
69
70=head1 Modules and Pragmata
71
72=head2 Updated Modules and Pragmata
73
74=over 4
75
76=item *
77
78L<attributes> has been upgraded from version 0.33 to 0.34.
79
80=item *
81
82L<B> has been upgraded from version 1.82 to 1.83.
83
84=item *
85
86L<B::Deparse> has been upgraded from version 1.57 to 1.58.
87
88=item *
89
90L<Devel::Peek> has been upgraded from version 1.31 to 1.32.
91
92=item *
93
94L<Exporter> has been upgraded from version 5.76 to 5.77.
95
96=item *
97
98L<ExtUtils::ParseXS> has been upgraded from version 3.43 to 3.44.
99
100=item *
101
102L<ExtUtils::Typemaps> has been upgraded from version 3.43 to 3.44.
103
104=item *
105
106L<feature> has been upgraded from version 1.67 to 1.68.
107
108=item *
109
110L<Hash::Util::FieldHash> has been upgraded from version 1.22 to 1.23.
111
112=item *
113
114L<IO> has been upgraded from version 1.47 to 1.48.
115
116=item *
117
118L<Module::CoreList> has been upgraded from version 5.20210820 to 5.20210920.
119
120=item *
121
122L<mro> has been upgraded from version 1.25_001 to 1.26.
123
124=item *
125
126L<Opcode> has been upgraded from version 1.53 to 1.54.
127
128=item *
129
130L<Pod::Html> has been upgraded from version 1.32 to 1.33.
131
132=item *
133
134L<Scalar::Util> has been upgraded from version 1.56 to 1.56_001.
135
136=item *
137
138L<Storable> has been upgraded from version 3.24 to 3.25.
139
140=item *
141
142L<Text::Tabs> has been upgraded from version 2021.0804 to 2021.0814.
143
144=item *
145
146L<Text::Wrap> has been upgraded from version 2021.0804 to 2021.0814.
147
148=item *
149
150L<threads::shared> has been upgraded from version 1.63 to 1.64.
151
152=item *
153
154L<Unicode::Collate> has been upgraded from version 1.30 to 1.31. Experimental
155support for EBCDIC has been added.
156
157=item *
158
159L<Unicode::UCD> has been upgraded from version 0.77 to 0.78.
160
161=item *
162
163L<UNIVERSAL> has been upgraded from version 1.13 to 1.14.
164
165=item *
166
167L<warnings> has been upgraded from version 1.53 to 1.54.
168
169=item *
170
171L<XS::APItest> has been upgraded from version 1.18 to 1.19.
172
173=item *
174
175L<XS::Typemap> has been upgraded from version 0.18 to 0.19.
176
177=back
178
179=head1 Documentation
180
181=head2 Changes to Existing Documentation
182
183We have attempted to update the documentation to reflect the changes
184listed in this document. If you find any we have missed, open an issue
185at L<https://github.com/Perl/perl5/issues>.
186
187Additionally, the following selected changes have been made:
188
189=head3 L<perlre>
190
191=over 4
192
193=item *
194
195Updated to discourage the use of the /d regexp modifier.
196
197=back
198
199=head1 Diagnostics
200
201The following additions or changes have been made to diagnostic output,
202including warnings and fatal error messages. For the complete list of
203diagnostic messages, see L<perldiag>.
204
205=head2 New Diagnostics
206
207=head3 New Errors
208
209=over 4
210
211=item *
212
213L<Can't "%s" out of a defer block|perldiag/"Can't "%s" out of a defer block">
214
215(F) An attempt was made to jump out of the scope of a defer block by using
216a control-flow statement such as C<return>, C<goto> or a loop control. This is
217not permitted.
218
219=back
220
221=head3 New Warnings
222
223=over 4
224
225=item *
226
227L<defer is experimental|perldiag/"defer is experimental">
228
229(S experimental::defer) The C<defer> block modifier is experimental. If you
230want to use the feature, disable the warning with
231C<no warnings 'experimental::defer'>, but know that in doing so you are taking
232the risk that your code may break in a future Perl version.
233
234=back
235
236=head2 Changes to Existing Diagnostics
237
238=over 4
239
240=item "unexpected constant lvalue entersub entry via type/targ %d:%d" now has a panic prefix
241
242This makes it consistent with other checks of internal consistency when
243compiling a subroutine.
244
245=item Removed a number of diagnostics
246
247Commit 6a3871b339 removes many diagnostics that have been removed from the
248perl core across many years.
249
250=back
251
252=head2 Platform-Specific Notes
253
254=over 4
255
256=item C<keys %ENV> on VMS returns consistent results
257
258On VMS entries in the C<%ENV> hash are loaded from the OS environment on
259first access, hence the first iteration of C<%ENV> requires the entire
260environment to be scanned to find all possible keys. This initialisation had
261always been done correctly for full iteration, but previously was not
262happening for C<%ENV> in scalar context, meaning that C<scalar %ENV> would
263return 0 if called before any other C<%ENV> access, or would only return the
264count of keys accessed if there had been no iteration.
265
266These bugs are now fixed - C<%ENV> and C<keys %ENV> in scalar context now
267return the correct result - the count of all keys in the environment.
268
269=back
270
271=head1 Internal Changes
272
273=over 4
274
275=item *
276
277C<Perl_ptr_table_clear> has been deleted. This has been marked as deprecated
278since v5.14.0 (released in 2011), and is not used by any code on CPAN.
279
280=item *
281
282Added new boolean macros and functions. See L</Stable boolean tracking> for
283related information and L<perlapi> for documentation.
284
285=over 4
286
287=item *
288
289sv_setbool
290
291=item *
292
293sv_setbool_mg
294
295=item *
296
297SvIsBOOL
298
299=back
300
301=item *
302
303Added 4 missing functions for dealing with RVs:
304
305=over 4
306
307=item *
308
309sv_setrv_noinc
310
311=item *
312
313sv_setrv_noinc_mg
314
315=item *
316
317sv_setrv_inc
318
319=item *
320
321sv_setrv_inc_mg
322
323=back
324
325=item *
326
327C<xs_handshake()>'s two failure modes now provide distinct messages.
328
329=back
330
331=head1 Acknowledgements
332
333Perl 5.35.4 represents approximately 4 weeks of development since Perl
3345.35.3 and contains approximately 64,000 lines of changes across 540 files
335from 19 authors.
336
337Excluding auto-generated files, documentation and release tools, there were
338approximately 49,000 lines of changes to 310 .pm, .t, .c and .h files.
339
340Perl continues to flourish into its fourth decade thanks to a vibrant
341community of users and developers. The following people are known to have
342contributed the improvements that became Perl 5.35.4:
343
344Aristotle Pagaltzis, Chris 'BinGOs' Williams, Dagfinn Ilmari Mannsåker, Dan
345Book, David Mitchell, Felipe Gasper, Hugo van der Sanden, James E Keenan,
346Karen Etheridge, Karl Williamson, Matthew Horsfall, Nicholas Clark, Paul
347Evans, Richard Leach, TAKAI Kousuke, Todd Rinaldo, Tomasz Konojacki,
348Tomoyuki Sadahiro, Tony Cook, Unicode Consortium.
349
350The list above is almost certainly incomplete as it is automatically
351generated from version control history. In particular, it does not include
352the names of the (very much appreciated) contributors who reported issues to
353the Perl bug tracker.
354
355Many of the changes included in this version originated in the CPAN modules
356included in Perl's core. We're grateful to the entire CPAN community for
357helping Perl to flourish.
358
359For a more complete list of all of Perl's historical contributors, please
360see the F<AUTHORS> file in the Perl source distribution.
361
362=head1 Reporting Bugs
363
364If you find what you think is a bug, you might check the perl bug database
365at L<https://github.com/Perl/perl5/issues>. There may also be information at
366L<http://www.perl.org/>, the Perl Home Page.
367
368If you believe you have an unreported bug, please open an issue at
369L<https://github.com/Perl/perl5/issues>. Be sure to trim your bug down to a
370tiny but sufficient test case.
371
372If the bug you are reporting has security implications which make it
373inappropriate to send to a public issue tracker, then see
374L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION>
375for details of how to report the issue.
376
377=head1 Give Thanks
378
379If you wish to thank the Perl 5 Porters for the work we had done in Perl 5,
380you can do so by running the C<perlthanks> program:
381
382 perlthanks
383
384This will send an email to the Perl 5 Porters list with your show of thanks.
385
386=head1 SEE ALSO
387
388The F<Changes> file for an explanation of how to view exhaustive details on
389what changed.
390
391The F<INSTALL> file for how to build Perl.
392
393The F<README> file for general stuff.
394
395The F<Artistic> and F<Copying> files for copyright information.
396
397=cut