5 [ this is a template for a new perldelta file. Any text flagged as XXX needs
6 to be processed before release. ]
8 perldelta - what is new for perl v5.35.10
12 This document describes differences between the 5.35.9 release and the 5.35.10
15 If you are upgrading from an earlier release such as 5.35.8, first read
16 L<perl5359delta>, which describes differences between 5.35.8 and 5.35.9.
20 XXX Any important notices here
22 =head1 Core Enhancements
24 XXX New core language features go here. Summarize user-visible core language
25 enhancements. Particularly prominent performance optimisations could go
26 here, but most should go in the L</Performance Enhancements> section.
28 =head2 New function C<builtin::trim>
30 This function treats its argument as a string, returning the result of
31 removing all white space at its beginning and ending. See
34 =head2 Variable length lookbehind is mostly no longer considered experimental.
36 Prior to this release any form of variable length lookbehind was
37 considered experimental. With this release the experimental status has
38 been reduced to cover only lookbehind that contains capturing parenthesis.
39 This is because it is not clear if
41 "aaz"=~/(?=z)(?<=(a|aa))/
43 should match and leave $1 equaling "a" or "aa". Currently it will match
44 the longest possible alternative, "aa". We are confident that the overall
45 construct will now match only when it should, we are not confident that we
46 will keep the current "longest match" behavior.
48 =head2 Added 'builtin::indexed'
50 A new function has been added to the C<builtin> package, called C<indexed>.
51 It returns a list twice as big as its argument list, where each item is
52 preceeded by its index within that list. This is primarily useful for using
53 the new C<foreach> syntax with multiple iterator variables to iterate over
54 an array or list, while also tracking the index of each item:
56 use builtin 'indexed';
58 foreach my ($index, $val) (indexed @array) {
62 =head2 Added experimental feature 'extra_paired_delimiters'
64 Perl traditionally has allowed just four pairs of string/pattern
65 delimiters: S<C<( )>> S<C<{ }>> S<C<[ ]>> and S<C<< < > >>>, all in the
66 ASCII range. Unicode has hundreds more possibilities, and using this
67 feature enables many of them. When enabled, you can say S<C<qr« »>> for
68 example, or S<C<use utf8; <q𝄃string𝄂>>. See
69 L<feature/The 'extra_paired_delimiters' feature> for
74 XXX Any security-related notices go here. In particular, any security
75 vulnerabilities closed should be noted here rather than in the
76 L</Selected Bug Fixes> section.
78 [ List each security issue as a =head2 entry ]
80 =head1 Incompatible Changes
82 XXX For a release on a stable branch, this section aspires to be:
84 There are no changes intentionally incompatible with 5.XXX.XXX
85 If any exist, they are bugs, and we request that you submit a
86 report. See L</Reporting Bugs> below.
88 [ List each incompatible change as a =head2 entry ]
92 Using any of the characters enabled by
93 L</Added experimental feature 'extra_paired_delimiters'> as a
94 non-paired string delimiter is now deprecated.
96 =head2 Module removals
98 XXX Remove this section if not applicable.
100 The following modules will be removed from the core distribution in a
101 future release, and will at that time need to be installed from CPAN.
102 Distributions on CPAN which require these modules will need to list them as
105 The core versions of these modules will now issue C<"deprecated">-category
106 warnings to alert you to this fact. To silence these deprecation warnings,
107 install the modules in question from CPAN.
109 Note that these are (with rare exceptions) fine modules that you are encouraged
110 to continue to use. Their disinclusion from core primarily hinges on their
111 necessity to bootstrapping a fully functional, CPAN-capable Perl installation,
112 not usually on concerns over their design.
118 XXX Note that deprecated modules should be listed here even if they are listed
119 as an updated module in the L</Modules and Pragmata> section.
123 [ List each other deprecation as a =head2 entry ]
125 =head1 Performance Enhancements
127 XXX Changes which enhance performance without changing behaviour go here.
128 There may well be none in a stable release.
130 [ List each enhancement as an =item entry ]
136 Large hashes no longer allocate their keys from the shared string table.
138 The same internal datatype (C<PVHV>) is used for all of
156 The shared string table was originally added to improve performance for blessed
157 hashes used as objects, because every object instance has the same keys, so it
158 is an optimisation to share memory between them. It also makes sense for symbol
159 tables, where derived classes will have the same keys (typically method names),
160 and the OP trees built for method calls can also share memory. The shared
161 string table behaves roughly like a cache for hash keys.
163 But for hashes actually used as associative arrays - mapping keys to values -
164 typically the keys are not re-used in other hashes. For example, "seen" hashes
165 are keyed by object IDs (or addresses), and logically these keys won't repeat
168 Storing these "used just once" keys in the shared string table increases CPU
169 and RAM use for no gain. For such keys the shared string table behaves as a
170 cache with a 0% hit rate. Storing all the keys there increases the total size
171 of the shared string table, as well as increasing the number of times it is
172 resized as it grows. B<Worse> - in any environment that has "copy on write"
173 memory for child process (such as a pre-forking server), the memory pages used
174 for the shared string table rapidly need to be copied as the child process
175 manipulates hashes. Hence if most of the shared string table is such keys that
176 are used only in one place, there is no benefit from re-use within the perl
177 interpreter, but a high cost due to more pages for the OS to copy.
179 The perl interpreter now disables shared hash keys for "large" hashes (that are
180 neither objects nor symbol tables). "Large" is a heuristic - currently the
181 heuristic is that sharing is disabled when adding a key to a hash triggers
182 allocation of more storage, and the hash has more than 42 keys.
184 This B<might> cause slightly increased memory usage for programs that create
185 (unblessed) data structures that contain multiple large hashes that share the
186 same keys. But generally our testing suggests that for the specific cases
187 described it is a win, and other code is unaffected.
191 =head1 Modules and Pragmata
193 XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
194 go here. If Module::CoreList is updated, generate an initial draft of the
195 following sections using F<Porting/corelist-perldelta.pl>. A paragraph summary
196 for important changes should then be added by hand. In an ideal world,
197 dual-life modules would have a F<Changes> file that could be cribbed.
199 The list of new and updated modules is modified automatically as part of
200 preparing a Perl release, so the only reason to manually add entries here is if
201 you're summarising the important changes in the module update. (Also, if the
202 manually-added details don't match the automatically-generated ones, the
203 release manager will have to investigate the situation carefully.)
205 [ Within each section, list entries as an =item entry ]
207 =head2 New Modules and Pragmata
213 XXX Remove this section if not applicable.
217 =head2 Updated Modules and Pragmata
223 L<XXX> has been upgraded from version A.xx to B.yy.
225 If there was something important to note about this change, include that here.
229 =head2 Removed Modules and Pragmata
241 XXX Changes to files in F<pod/> go here. Consider grouping entries by
242 file and be sure to link to the appropriate page, e.g. L<perlfunc>.
244 =head2 New Documentation
246 XXX Changes which create B<new> files in F<pod/> go here.
250 XXX Description of the purpose of the new file here
252 =head2 Changes to Existing Documentation
254 We have attempted to update the documentation to reflect the changes
255 listed in this document. If you find any we have missed, open an issue
256 at L<https://github.com/Perl/perl5/issues>.
258 XXX Changes which significantly change existing files in F<pod/> go here.
259 However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
262 Additionally, the following selected changes have been made:
270 XXX Description of the change here
276 The following additions or changes have been made to diagnostic output,
277 including warnings and fatal error messages. For the complete list of
278 diagnostic messages, see L<perldiag>.
280 XXX New or changed warnings emitted by the core's C<C> code go here. Also
281 include any changes in L<perldiag> that reconcile it to the C<C> code.
283 =head2 New Diagnostics
285 XXX Newly added diagnostic messages go under here, separated into New Errors
294 XXX L<message|perldiag/"message">
298 L<Wide character in $0|perldiag/"Wide character in %s">
300 Attempts to put wide characters into the program name (C<$0>) now
301 provoke this warning.
311 XXX L<message|perldiag/"message">
315 =head2 Changes to Existing Diagnostics
317 XXX Changes (i.e. rewording) of diagnostic messages go here
323 XXX Describe change here
325 =item * New 'scalar' category for "Useless use of sort in scalar context"
327 When C<sort> is used in scalar context, it provokes a warning that this is not
328 useful. This warning used to be in the C<void> category. A new category for
329 warnings about scalar context has now been added, called C<scalar>.
333 =head1 Utility Changes
335 XXX Changes to installed programs such as F<perldoc> and F<xsubpp> go here.
336 Most of these are built within the directory F<utils>.
338 [ List utility changes as a =head2 entry for each utility and =item
339 entries for each change
340 Use L<XXX> with program names to get proper documentation linking. ]
352 =head1 Configuration and Compilation
354 XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
355 go here. Any other changes to the Perl build process should be listed here.
356 However, any platform-specific changes should be listed in the
357 L</Platform Support> section, instead.
359 [ List changes as an =item entry ].
371 XXX Any significant changes to the testing of a freshly built perl should be
372 listed here. Changes which create B<new> files in F<t/> go here as do any
373 large changes to the testing harness (e.g. when parallel testing was added).
374 Changes to existing files in F<t/> aren't worth summarizing, although the bugs
375 that they represent may be covered elsewhere.
377 XXX If there were no significant test changes, say this:
379 Tests were added and changed to reflect the other additions and changes
382 XXX If instead there were significant changes, say this:
384 Tests were added and changed to reflect the other additions and
385 changes in this release. Furthermore, these significant changes were
388 [ List each test improvement as an =item entry ]
398 =head1 Platform Support
400 XXX Any changes to platform support should be listed in the sections below.
402 [ Within the sections, list each platform as an =item entry with specific
403 changes as paragraphs below it. ]
407 XXX List any platforms that this version of perl compiles on, that previous
408 versions did not. These will either be enabled by new files in the F<hints/>
409 directories, or new subdirectories and F<README> files at the top level of the
414 =item XXX-some-platform
420 =head2 Discontinued Platforms
422 XXX List any platforms that this version of perl no longer compiles on.
426 =item XXX-some-platform
432 =head2 Platform-Specific Notes
434 XXX List any changes for specific platforms. This could include configuration
435 and compilation changes or changes in portability/compatibility. However,
436 changes within modules for platforms should generally be listed in the
437 L</Modules and Pragmata> section.
441 =item XXX-some-platform
447 =head1 Internal Changes
449 XXX Changes which affect the interface available to C<XS> code go here. Other
450 significant internal changes for future core maintainers should be noted as
453 [ List each change as an =item entry ]
463 C<sv_dump> (and L<Devel::Peek>’s C<Dump> function) now escapes high-bit
464 octets in the PV as hex rather than octal. Since most folks understand hex
465 more readily than octal, this should make these dumps a bit more legible.
466 This does B<not> affect any other diagnostic interfaces like C<pv_display>.
470 =head1 Selected Bug Fixes
472 XXX Important bug fixes in the core language are summarized here. Bug fixes in
473 files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>.
475 [ List each fix as an =item entry ]
485 =head1 Known Problems
487 XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
488 tests that had to be C<TODO>ed for the release would be noted here. Unfixed
489 platform specific bugs also go here.
491 [ List each fix as an =item entry ]
501 =head1 Errata From Previous Releases
507 XXX Add anything here that we forgot to add, or were mistaken about, in
508 the perldelta of a previous release.
514 XXX If any significant core contributor or member of the CPAN community has
515 died, add a short obituary here.
517 =head1 Acknowledgements
519 XXX Generate this with:
521 perl Porting/acknowledgements.pl v5.35.9..HEAD
523 =head1 Reporting Bugs
525 If you find what you think is a bug, you might check the perl bug database
526 at L<https://github.com/Perl/perl5/issues>. There may also be information at
527 L<http://www.perl.org/>, the Perl Home Page.
529 If you believe you have an unreported bug, please open an issue at
530 L<https://github.com/Perl/perl5/issues>. Be sure to trim your bug down to a
531 tiny but sufficient test case.
533 If the bug you are reporting has security implications which make it
534 inappropriate to send to a public issue tracker, then see
535 L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION>
536 for details of how to report the issue.
540 If you wish to thank the Perl 5 Porters for the work we had done in Perl 5,
541 you can do so by running the C<perlthanks> program:
545 This will send an email to the Perl 5 Porters list with your show of thanks.
549 The F<Changes> file for an explanation of how to view exhaustive details on
552 The F<INSTALL> file for how to build Perl.
554 The F<README> file for general stuff.
556 The F<Artistic> and F<Copying> files for copyright information.