5 perl5354delta - what is new for perl v5.35.4
9 This document describes differences between the 5.35.3 release and the 5.35.4
12 If you are upgrading from an earlier release such as 5.35.2, first read
13 L<perl5353delta>, which describes differences between 5.35.2 and 5.35.3.
15 =head1 Core Enhancements
17 =head2 C<defer> blocks
19 This release adds support for C<defer> blocks, which are blocks of code
20 prefixed by the C<defer> modifier. They provide a section of code which runs
21 at a later time, during scope exit.
23 For more information, see L<perlsyn/"defer blocks">.
25 =head2 Unicode 14.0 is supported
27 See L<https://www.unicode.org/versions/Unicode14.0.0/> for details.
29 =head2 SIGFPE no longer deferred
31 Floating-point exceptions are now delivered immediately, in the same way
32 as other "fault"-like signals such as SIGSEGV. This means one has at
33 least a chance to catch such a signal with a C<$SIG{FPE}> handler, e.g.
34 so that C<die> can report the line in perl that triggered it.
36 =head2 Stable boolean tracking
38 The "true" and "false" boolean values, often accessed by constructions like
39 C<!!0> and C<!!1>, as well as being returned from many core functions and
40 operators, now remember their boolean nature even through assignment into
41 variables. The new function C<isbool()> in L<Scalar::Util> can check whether
42 a value has boolean nature.
44 This is likely to be useful when interoperating with other languages or
45 data-type serialisation, among other places.
47 =head1 Incompatible Changes
49 There are no changes intentionally incompatible with 5.35.3.
50 If any exist, they are bugs, and we request that you submit a
51 report. See L</Reporting Bugs> below.
53 =head1 Performance Enhancements
59 We now probe for compiler support for C11 thread local storage, and where
60 available use this for "implicit context" for XS extensions making API calls for
61 a threaded Perl build. This requires fewer function calls at the C level than
62 POSIX thread specific storage. We continue to use the the pthreads approach if
63 the C11 approach is not available.
65 F<Configure> run with the defaults will build an unthreaded Perl (which is
66 slightly faster), but most operating systems ship a threaded Perl.
70 =head1 Modules and Pragmata
72 =head2 Updated Modules and Pragmata
78 L<attributes> has been upgraded from version 0.33 to 0.34.
82 L<B> has been upgraded from version 1.82 to 1.83.
86 L<B::Deparse> has been upgraded from version 1.57 to 1.58.
90 L<Devel::Peek> has been upgraded from version 1.31 to 1.32.
94 L<Exporter> has been upgraded from version 5.76 to 5.77.
98 L<ExtUtils::ParseXS> has been upgraded from version 3.43 to 3.44.
102 L<ExtUtils::Typemaps> has been upgraded from version 3.43 to 3.44.
106 L<feature> has been upgraded from version 1.67 to 1.68.
110 L<Hash::Util::FieldHash> has been upgraded from version 1.22 to 1.23.
114 L<IO> has been upgraded from version 1.47 to 1.48.
118 L<Module::CoreList> has been upgraded from version 5.20210820 to 5.20210920.
122 L<mro> has been upgraded from version 1.25_001 to 1.26.
126 L<Opcode> has been upgraded from version 1.53 to 1.54.
130 L<Pod::Html> has been upgraded from version 1.32 to 1.33.
134 L<Scalar::Util> has been upgraded from version 1.56 to 1.56_001.
138 L<Storable> has been upgraded from version 3.24 to 3.25.
142 L<Text::Tabs> has been upgraded from version 2021.0804 to 2021.0814.
146 L<Text::Wrap> has been upgraded from version 2021.0804 to 2021.0814.
150 L<threads::shared> has been upgraded from version 1.63 to 1.64.
154 L<Unicode::Collate> has been upgraded from version 1.30 to 1.31. Experimental
155 support for EBCDIC has been added.
159 L<Unicode::UCD> has been upgraded from version 0.77 to 0.78.
163 L<UNIVERSAL> has been upgraded from version 1.13 to 1.14.
167 L<warnings> has been upgraded from version 1.53 to 1.54.
171 L<XS::APItest> has been upgraded from version 1.18 to 1.19.
175 L<XS::Typemap> has been upgraded from version 0.18 to 0.19.
181 =head2 Changes to Existing Documentation
183 We have attempted to update the documentation to reflect the changes
184 listed in this document. If you find any we have missed, open an issue
185 at L<https://github.com/Perl/perl5/issues>.
187 Additionally, the following selected changes have been made:
195 Updated to discourage the use of the /d regexp modifier.
201 The following additions or changes have been made to diagnostic output,
202 including warnings and fatal error messages. For the complete list of
203 diagnostic messages, see L<perldiag>.
205 =head2 New Diagnostics
213 L<Can't "%s" out of a defer block|perldiag/"Can't "%s" out of a defer block">
215 (F) An attempt was made to jump out of the scope of a defer block by using
216 a control-flow statement such as C<return>, C<goto> or a loop control. This is
227 L<defer is experimental|perldiag/"defer is experimental">
229 (S experimental::defer) The C<defer> block modifier is experimental. If you
230 want to use the feature, disable the warning with
231 C<no warnings 'experimental::defer'>, but know that in doing so you are taking
232 the risk that your code may break in a future Perl version.
236 =head2 Changes to Existing Diagnostics
240 =item "unexpected constant lvalue entersub entry via type/targ %d:%d" now has a panic prefix
242 This makes it consistent with other checks of internal consistency when
243 compiling a subroutine.
245 =item Removed a number of diagnostics
247 Commit 6a3871b339 removes many diagnostics that have been removed from the
248 perl core across many years.
252 =head2 Platform-Specific Notes
256 =item C<keys %ENV> on VMS returns consistent results
258 On VMS entries in the C<%ENV> hash are loaded from the OS environment on
259 first access, hence the first iteration of C<%ENV> requires the entire
260 environment to be scanned to find all possible keys. This initialisation had
261 always been done correctly for full iteration, but previously was not
262 happening for C<%ENV> in scalar context, meaning that C<scalar %ENV> would
263 return 0 if called before any other C<%ENV> access, or would only return the
264 count of keys accessed if there had been no iteration.
266 These bugs are now fixed - C<%ENV> and C<keys %ENV> in scalar context now
267 return the correct result - the count of all keys in the environment.
271 =head1 Internal Changes
277 C<Perl_ptr_table_clear> has been deleted. This has been marked as deprecated
278 since v5.14.0 (released in 2011), and is not used by any code on CPAN.
282 Added new boolean macros and functions. See L</Stable boolean tracking> for
283 related information and L<perlapi> for documentation.
303 Added 4 missing functions for dealing with RVs:
327 C<xs_handshake()>'s two failure modes now provide distinct messages.
331 =head1 Acknowledgements
333 Perl 5.35.4 represents approximately 4 weeks of development since Perl
334 5.35.3 and contains approximately 64,000 lines of changes across 540 files
337 Excluding auto-generated files, documentation and release tools, there were
338 approximately 49,000 lines of changes to 310 .pm, .t, .c and .h files.
340 Perl continues to flourish into its fourth decade thanks to a vibrant
341 community of users and developers. The following people are known to have
342 contributed the improvements that became Perl 5.35.4:
344 Aristotle Pagaltzis, Chris 'BinGOs' Williams, Dagfinn Ilmari Mannsåker, Dan
345 Book, David Mitchell, Felipe Gasper, Hugo van der Sanden, James E Keenan,
346 Karen Etheridge, Karl Williamson, Matthew Horsfall, Nicholas Clark, Paul
347 Evans, Richard Leach, TAKAI Kousuke, Todd Rinaldo, Tomasz Konojacki,
348 Tomoyuki Sadahiro, Tony Cook, Unicode Consortium.
350 The list above is almost certainly incomplete as it is automatically
351 generated from version control history. In particular, it does not include
352 the names of the (very much appreciated) contributors who reported issues to
353 the Perl bug tracker.
355 Many of the changes included in this version originated in the CPAN modules
356 included in Perl's core. We're grateful to the entire CPAN community for
357 helping Perl to flourish.
359 For a more complete list of all of Perl's historical contributors, please
360 see the F<AUTHORS> file in the Perl source distribution.
362 =head1 Reporting Bugs
364 If you find what you think is a bug, you might check the perl bug database
365 at L<https://github.com/Perl/perl5/issues>. There may also be information at
366 L<http://www.perl.org/>, the Perl Home Page.
368 If you believe you have an unreported bug, please open an issue at
369 L<https://github.com/Perl/perl5/issues>. Be sure to trim your bug down to a
370 tiny but sufficient test case.
372 If the bug you are reporting has security implications which make it
373 inappropriate to send to a public issue tracker, then see
374 L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION>
375 for details of how to report the issue.
379 If you wish to thank the Perl 5 Porters for the work we had done in Perl 5,
380 you can do so by running the C<perlthanks> program:
384 This will send an email to the Perl 5 Porters list with your show of thanks.
388 The F<Changes> file for an explanation of how to view exhaustive details on
391 The F<INSTALL> file for how to build Perl.
393 The F<README> file for general stuff.
395 The F<Artistic> and F<Copying> files for copyright information.