5 perl5355delta - what is new for perl v5.35.5
9 This document describes differences between the 5.35.4 release and the 5.35.5
12 If you are upgrading from an earlier release such as 5.35.3, first read
13 L<perl5354delta>, which describes differences between 5.35.3 and 5.35.4.
15 =head1 Core Enhancements
17 =head2 iterating over multiple values at a time
19 As of Perl 5.36, you can iterate over multiple values at a time by specifying
20 a list of lexicals within parentheses. For example,
22 for my ($key, $value) (%hash) { ... }
23 for my ($left, $right, $gripping) (@moties) { ... }
25 Attempting to specify a list after C<for my> was previously a syntax error.
27 For more detail see L<perlsyn/Compound Statements>.
29 =head1 Incompatible Changes
31 There are no changes intentionally incompatible with 5.35.4
32 If any exist, they are bugs, and we request that you submit a
33 report. See L</Reporting Bugs> below.
35 =head1 Modules and Pragmata
37 =head2 Updated Modules and Pragmata
43 L<B::Concise> has been upgraded from version 1.005 to 1.006.
47 L<B::Deparse> has been upgraded from version 1.58 to 1.59.
51 L<Digest> has been upgraded from version 1.19 to 1.20.
55 L<DynaLoader> has been upgraded from version 1.51 to 1.52.
59 L<Encode> has been upgraded from version 3.12 to 3.16.
63 L<Errno> has been upgraded from version 1.34 to 1.35.
67 L<experimental> has been upgraded from version 0.024 to 0.025.
71 L<File::Copy> has been upgraded from version 2.36 to 2.37.
75 L<FindBin> has been upgraded from version 1.52 to 1.53.
79 L<GDBM_File> has been upgraded from version 1.20 to 1.21.
83 L<HTTP::Tiny> has been upgraded from version 0.076 to 0.078.
87 L<I18N::Langinfo> has been upgraded from version 0.20 to 0.21.
91 L<Module::CoreList> has been upgraded from version 5.20210920 to 5.20211020.
95 L<POSIX> has been upgraded from version 1.99 to 2.01.
99 L<Scalar::Util> has been upgraded from version 1.56_001 to 1.60.
103 L<Test::Simple> has been upgraded from version 1.302185 to 1.302188.
107 L<Tie::Handle> has been upgraded from version 4.2 to 4.3.
111 L<Tie::Hash> has been upgraded from version 1.05 to 1.06.
115 L<Tie::Scalar> has been upgraded from version 1.05 to 1.06.
119 L<warnings> has been upgraded from version 1.54 to 1.55.
123 L<XS::APItest> has been upgraded from version 1.19 to 1.20.
129 =head2 Changes to Existing Documentation
131 We have attempted to update the documentation to reflect the changes
132 listed in this document. If you find any we have missed, open an issue
133 at L<https://github.com/Perl/perl5/issues>.
135 Additionally, the following selected changes have been made:
143 The election process has been finetuned to allow the vote to be skipped if there
144 are no more candidates than open seats.
148 A special election is now allowed to be postponed for up to twelve weeks, for
149 example until a normal election.
155 The following additions or changes have been made to diagnostic output,
156 including warnings and fatal error messages. For the complete list of
157 diagnostic messages, see L<perldiag>.
159 =head2 New Diagnostics
167 L<panic: newFORLOOP, %s|perldiag/"panic: newFORLOOP, %s">
169 The parser failed an internal consistency check while trying to parse
180 L<for my (...) is experimental|perldiag/"for my (...) is experimental">
182 This warning is emitted if you use C<for> to iterate multiple values at
183 a time. This syntax is currently experimental and its behaviour may
184 change in future releases of Perl.
188 =head2 Changes to Existing Diagnostics
192 =item * L<'E<sol>' does not take a repeat count in %s|perldiag/"'/' does not take a repeat count in %s">
194 This warning used to not include the C<in %s>.
198 =head1 Configuration and Compilation
204 The Perl C source code now uses some C99 features, which we have verified are
205 supported by all compilers we target. This means that Perl's headers now
206 contain some code that is legal in C99 but not C89.
208 This may cause problems for some XS modules that unconditionally add
209 C<-Werror=declaration-after-statement> to their C compiler flags if compiling
210 with gcc or clang. Earlier versions of Perl support long obsolete compilers
211 that are strict in rejecting certain C99 features, particularly mixed
212 declarations and code, and hence it makes sense for XS module authors to audit
213 that their code does not violate this. However, doing this is now only
214 possible on these earlier versions of Perl, hence these modules need to be
215 changed to only add this flag for C<<$] < 5.035005>>.
221 Tests were added and changed to reflect the other additions and
222 changes in this release. Furthermore, these significant changes were
227 =item * t/op/for-many.t was added
229 This tests for looping of multiple values as the same time
233 =head1 Platform Support
235 =head2 Discontinued Platforms
241 Support code for Novell NetWare has been removed. NetWare was a
242 server operating system by Novell. The port was last updated in July
243 2002, and the platform itself in May 2009.
245 Unrelated changes accidentally broke the build for the NetWare port in
246 September 2009, and in 12 years no-one has reported this.
250 =head2 Platform-Specific Notes
256 Support for old MSVC++ (pre-VC12) has been removed
258 These did not support C99 and hence can no longer be used to compile perl.
262 =head1 Internal Changes
268 Memory for hash iterator state (C<struct xpvhv_aux>) is now allocated as part
269 of the hash body, instead of as part of the block of memory allocated for the
272 Nothing else changes - memory for this structure is still allocated only when
273 needed, is still accessed via the C<HvAUX()> macro, and the macro should only
274 be called when C<SvOOK()> is true. Hashes are still always of type C<SVt_PVHV>,
275 hash bodies are still allocated from arenas, and the address of the hash
276 doesn't change, because the address is the pointer to the head structure, which
279 Internally, a second arena (the arena with index 1) is used to allocate larger
280 bodies with space for C<struct xpvhv_aux>, the body "upgraded", and the "head"
281 structure updated to reflect this (much the same way that the bodies of scalars
282 are upgraded). We already re-purpose arenas - arena with index 0 is used for
285 None of this affects documented public XS interfaces. The only code changes are
286 in F<hv.c> and F<sv.c>. As the rest of the core itself uses these macros but
287 needed no changes, likely no code on CPAN will be affected either.
291 =head1 Selected Bug Fixes
297 Calling C<untie> on a tied hash that is partway through iteration now frees the
298 iteration state immediately.
300 Iterating a tied hash causes perl to store a copy of the current hash key to
301 track the iteration state, with this stored copy passed as the second parameter
302 to C<NEXTKEY>. This internal state is freed immediately when tie hash iteration
303 completes, or if the hash is destroyed, but due to an implementation oversight,
304 it was not freed if the hash was untied. In that case, the internal copy of the
305 key would persist until the earliest of
311 C<tie> was called again on the same hash
315 The (now untied) hash was iterated (ie passed to any of C<keys>, C<values> or
320 The hash was destroyed.
324 This inconsistency is now fixed - the internal state is now freed immediately by
327 As the precise timing of this behaviour can be observed with pure Perl code
328 (the timing of C<DESTROY> on objects returned from C<FIRSTKEY> and C<NEXTKEY>)
329 it's just possible that some code is sensitive to it.
333 The C<Internals::getcwd()> function added for bootstrapping miniperl
334 in perl 5.30.0 is now only available in miniperl. [github #19122]
338 =head1 Acknowledgements
340 Perl 5.35.5 represents approximately 4 weeks of development since Perl
341 5.35.4 and contains approximately 32,000 lines of changes across 380 files
344 Excluding auto-generated files, documentation and release tools, there were
345 approximately 17,000 lines of changes to 260 .pm, .t, .c and .h files.
347 Perl continues to flourish into its fourth decade thanks to a vibrant
348 community of users and developers. The following people are known to have
349 contributed the improvements that became Perl 5.35.5:
351 Andrew Fresh, Chris 'BinGOs' Williams, Dagfinn Ilmari Mannsåker, Dan Book,
352 Dan Kogai, David Mitchell, E. Choroba, Hugo van der Sanden, James E Keenan,
353 Karl Williamson, Leon Timmermans, Matthew Horsfall, Nicholas Clark, Olaf
354 Alders, Paul Evans, Ricardo Signes, Richard Leach, Sergey Poznyakoff, Steve
355 Hay, TAKAI Kousuke, Tomasz Konojacki, Tony Cook.
357 The list above is almost certainly incomplete as it is automatically
358 generated from version control history. In particular, it does not include
359 the names of the (very much appreciated) contributors who reported issues to
360 the Perl bug tracker.
362 Many of the changes included in this version originated in the CPAN modules
363 included in Perl's core. We're grateful to the entire CPAN community for
364 helping Perl to flourish.
366 For a more complete list of all of Perl's historical contributors, please
367 see the F<AUTHORS> file in the Perl source distribution.
369 =head1 Reporting Bugs
371 If you find what you think is a bug, you might check the perl bug database
372 at L<https://github.com/Perl/perl5/issues>. There may also be information at
373 L<http://www.perl.org/>, the Perl Home Page.
375 If you believe you have an unreported bug, please open an issue at
376 L<https://github.com/Perl/perl5/issues>. Be sure to trim your bug down to a
377 tiny but sufficient test case.
379 If the bug you are reporting has security implications which make it
380 inappropriate to send to a public issue tracker, then see
381 L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION>
382 for details of how to report the issue.
386 If you wish to thank the Perl 5 Porters for the work we had done in Perl 5,
387 you can do so by running the C<perlthanks> program:
391 This will send an email to the Perl 5 Porters list with your show of thanks.
395 The F<Changes> file for an explanation of how to view exhaustive details on
398 The F<INSTALL> file for how to build Perl.
400 The F<README> file for general stuff.
402 The F<Artistic> and F<Copying> files for copyright information.