This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update Module::CoreList for 5.35.10
[perl5.git] / pod / perldelta.pod
CommitLineData
0382c61d 1=encoding utf8
7b0fb693 2
0382c61d 3=head1 NAME
7b0fb693 4
d84985bf
RB
5[ this is a template for a new perldelta file. Any text flagged as XXX needs
6to be processed before release. ]
7
8perldelta - what is new for perl v5.35.10
2f9090fc 9
b129a266 10=head1 DESCRIPTION
2f9090fc 11
d84985bf 12This document describes differences between the 5.35.9 release and the 5.35.10
b129a266 13release.
2f9090fc 14
d84985bf
RB
15If you are upgrading from an earlier release such as 5.35.8, first read
16L<perl5359delta>, which describes differences between 5.35.8 and 5.35.9.
17
18=head1 Notice
19
20XXX Any important notices here
9d30331d 21
9e71a8df 22=head1 Core Enhancements
9623941f 23
d84985bf
RB
24XXX New core language features go here. Summarize user-visible core language
25enhancements. Particularly prominent performance optimisations could go
26here, but most should go in the L</Performance Enhancements> section.
088588be 27
42a429a3
KW
28=head2 New function C<builtin::trim>
29
30This function treats its argument as a string, returning the result of
31removing all white space at its beginning and ending. See
32L<builtin/trim>
088588be 33
c15a34bf
YO
34=head2 Variable length lookbehind is mostly no longer considered experimental.
35
36Prior to this release any form of variable length lookbehind was
37considered experimental. With this release the experimental status has
38been reduced to cover only lookbehind that contains capturing parenthesis.
39This is because it is not clear if
40
41 "aaz"=~/(?=z)(?<=(a|aa))/
42
43should match and leave $1 equaling "a" or "aa". Currently it will match
44the longest possible alternative, "aa". We are confident that the overall
45construct will now match only when it should, we are not confident that we
46will keep the current "longest match" behavior.
47
fa5eb2fe
PE
48=head2 Added 'builtin::indexed'
49
50A new function has been added to the C<builtin> package, called C<indexed>.
51It returns a list twice as big as its argument list, where each item is
52preceeded by its index within that list. This is primarily useful for using
53the new C<foreach> syntax with multiple iterator variables to iterate over
54an array or list, while also tracking the index of each item:
55
56 use builtin 'indexed';
57
58 foreach my ($index, $val) (indexed @array) {
59 ...
60 }
61
9c9853e8
KW
62=head2 Added experimental feature 'extra_paired_delimiters'
63
64Perl traditionally has allowed just four pairs of string/pattern
65delimiters: S<C<( )>> S<C<{ }>> S<C<[ ]>> and S<C<< < > >>>, all in the
66ASCII range. Unicode has hundreds more possibilities, and using this
67feature enables many of them. When enabled, you can say S<C<qr« »>> for
3e9e4fd8
KW
68example, or S<C<use utf8; <q𝄃string𝄂>>. See
69L<feature/The 'extra_paired_delimiters' feature> for
9c9853e8
KW
70details.
71
d84985bf 72=head1 Security
088588be 73
d84985bf
RB
74XXX Any security-related notices go here. In particular, any security
75vulnerabilities closed should be noted here rather than in the
76L</Selected Bug Fixes> section.
088588be 77
d84985bf 78[ List each security issue as a =head2 entry ]
088588be 79
d84985bf 80=head1 Incompatible Changes
a6a6eee6 81
d84985bf 82XXX For a release on a stable branch, this section aspires to be:
a6a6eee6 83
d84985bf
RB
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.
a6a6eee6 87
d84985bf 88[ List each incompatible change as a =head2 entry ]
a6a6eee6 89
d84985bf 90=head1 Deprecations
a6a6eee6 91
9c9853e8
KW
92Using any of the characters enabled by
93L</Added experimental feature 'extra_paired_delimiters'> as a
94non-paired string delimiter is now deprecated.
a6a6eee6 95
d84985bf 96=head2 Module removals
a6a6eee6 97
d84985bf 98XXX Remove this section if not applicable.
a6a6eee6 99
d84985bf
RB
100The following modules will be removed from the core distribution in a
101future release, and will at that time need to be installed from CPAN.
102Distributions on CPAN which require these modules will need to list them as
103prerequisites.
157bd0a3 104
d84985bf
RB
105The core versions of these modules will now issue C<"deprecated">-category
106warnings to alert you to this fact. To silence these deprecation warnings,
107install the modules in question from CPAN.
157bd0a3 108
d84985bf
RB
109Note that these are (with rare exceptions) fine modules that you are encouraged
110to continue to use. Their disinclusion from core primarily hinges on their
111necessity to bootstrapping a fully functional, CPAN-capable Perl installation,
112not usually on concerns over their design.
157bd0a3 113
d84985bf 114=over
9cb26ed2 115
d84985bf 116=item XXX
9cb26ed2 117
d84985bf
RB
118XXX Note that deprecated modules should be listed here even if they are listed
119as an updated module in the L</Modules and Pragmata> section.
9cb26ed2 120
d84985bf
RB
121=back
122
123[ List each other deprecation as a =head2 entry ]
9d30331d 124
d84985bf 125=head1 Performance Enhancements
58fdfae4 126
d84985bf
RB
127XXX Changes which enhance performance without changing behaviour go here.
128There may well be none in a stable release.
58fdfae4 129
d84985bf 130[ List each enhancement as an =item entry ]
58fdfae4 131
d84985bf 132=over 4
58fdfae4 133
d84985bf 134=item *
58fdfae4 135
fa92924b
NC
136Large hashes no longer allocate their keys from the shared string table.
137
138The same internal datatype (C<PVHV>) is used for all of
139
140=over 4
141
142=item *
143
144Symbol tables
145
146=item *
147
148Objects (by default)
149
150=item *
151
152Associative arrays
153
154=back
155
156The shared string table was originally added to improve performance for blessed
157hashes used as objects, because every object instance has the same keys, so it
158is an optimisation to share memory between them. It also makes sense for symbol
159tables, where derived classes will have the same keys (typically method names),
160and the OP trees built for method calls can also share memory. The shared
161string table behaves roughly like a cache for hash keys.
162
163But for hashes actually used as associative arrays - mapping keys to values -
164typically the keys are not re-used in other hashes. For example, "seen" hashes
165are keyed by object IDs (or addresses), and logically these keys won't repeat
166in other hashes.
167
168Storing these "used just once" keys in the shared string table increases CPU
169and RAM use for no gain. For such keys the shared string table behaves as a
170cache with a 0% hit rate. Storing all the keys there increases the total size
171of the shared string table, as well as increasing the number of times it is
172resized as it grows. B<Worse> - in any environment that has "copy on write"
173memory for child process (such as a pre-forking server), the memory pages used
174for the shared string table rapidly need to be copied as the child process
175manipulates hashes. Hence if most of the shared string table is such keys that
176are used only in one place, there is no benefit from re-use within the perl
177interpreter, but a high cost due to more pages for the OS to copy.
178
179The perl interpreter now disables shared hash keys for "large" hashes (that are
180neither objects nor symbol tables). "Large" is a heuristic - currently the
181heuristic is that sharing is disabled when adding a key to a hash triggers
182allocation of more storage, and the hash has more than 42 keys.
183
184This B<might> cause slightly increased memory usage for programs that create
185(unblessed) data structures that contain multiple large hashes that share the
186same keys. But generally our testing suggests that for the specific cases
187described it is a win, and other code is unaffected.
58fdfae4 188
d84985bf 189=back
58fdfae4 190
4f5dddfd 191=head1 Modules and Pragmata
1ee7332f 192
d84985bf
RB
193XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
194go here. If Module::CoreList is updated, generate an initial draft of the
195following sections using F<Porting/corelist-perldelta.pl>. A paragraph summary
196for important changes should then be added by hand. In an ideal world,
197dual-life modules would have a F<Changes> file that could be cribbed.
198
199The list of new and updated modules is modified automatically as part of
200preparing a Perl release, so the only reason to manually add entries here is if
201you're summarising the important changes in the module update. (Also, if the
202manually-added details don't match the automatically-generated ones, the
203release manager will have to investigate the situation carefully.)
204
205[ Within each section, list entries as an =item entry ]
206
207=head2 New Modules and Pragmata
9d30331d
N
208
209=over 4
2fac577b 210
4f5dddfd 211=item *
234aaa34 212
d84985bf 213XXX Remove this section if not applicable.
2fac577b 214
d84985bf 215=back
2fac577b 216
d84985bf
RB
217=head2 Updated Modules and Pragmata
218
219=over 4
9d30331d 220
81ff15d3 221=item *
9d30331d 222
d84985bf 223L<XXX> has been upgraded from version A.xx to B.yy.
1ee7332f 224
d84985bf 225If there was something important to note about this change, include that here.
1ee7332f 226
d84985bf 227=back
9d30331d 228
d84985bf 229=head2 Removed Modules and Pragmata
9d30331d 230
d84985bf 231=over 4
9d30331d 232
81ff15d3 233=item *
9d30331d 234
d84985bf 235XXX
9d30331d 236
d84985bf 237=back
9d30331d 238
d84985bf 239=head1 Documentation
9d30331d 240
d84985bf
RB
241XXX Changes to files in F<pod/> go here. Consider grouping entries by
242file and be sure to link to the appropriate page, e.g. L<perlfunc>.
9d30331d 243
d84985bf 244=head2 New Documentation
234aaa34 245
d84985bf 246XXX Changes which create B<new> files in F<pod/> go here.
234aaa34 247
d84985bf 248=head3 L<XXX>
9d30331d 249
d84985bf 250XXX Description of the purpose of the new file here
9d30331d 251
d84985bf 252=head2 Changes to Existing Documentation
1ee7332f 253
d84985bf
RB
254We have attempted to update the documentation to reflect the changes
255listed in this document. If you find any we have missed, open an issue
256at L<https://github.com/Perl/perl5/issues>.
1ee7332f 257
d84985bf
RB
258XXX Changes which significantly change existing files in F<pod/> go here.
259However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
260section.
9d30331d 261
d84985bf 262Additionally, the following selected changes have been made:
9d30331d 263
d84985bf
RB
264=head3 L<XXX>
265
266=over 4
1ee7332f 267
81ff15d3 268=item *
9d30331d 269
d84985bf 270XXX Description of the change here
1ee7332f 271
d84985bf
RB
272=back
273
274=head1 Diagnostics
1ee7332f 275
d84985bf
RB
276The following additions or changes have been made to diagnostic output,
277including warnings and fatal error messages. For the complete list of
278diagnostic messages, see L<perldiag>.
1ee7332f 279
d84985bf
RB
280XXX New or changed warnings emitted by the core's C<C> code go here. Also
281include any changes in L<perldiag> that reconcile it to the C<C> code.
282
283=head2 New Diagnostics
1ee7332f 284
d84985bf
RB
285XXX Newly added diagnostic messages go under here, separated into New Errors
286and New Warnings
287
288=head3 New Errors
289
290=over 4
1ee7332f 291
81ff15d3 292=item *
1ee7332f 293
d84985bf
RB
294XXX L<message|perldiag/"message">
295
2d3b3561
FG
296=item *
297
298L<Wide character in $0|perldiag/"Wide character in %s">
299
300Attempts to put wide characters into the program name (C<$0>) now
301provoke this warning.
302
d84985bf
RB
303=back
304
305=head3 New Warnings
306
307=over 4
1ee7332f 308
81ff15d3 309=item *
9d30331d 310
d84985bf
RB
311XXX L<message|perldiag/"message">
312
313=back
314
315=head2 Changes to Existing Diagnostics
316
317XXX Changes (i.e. rewording) of diagnostic messages go here
318
319=over 4
9d30331d
N
320
321=item *
1ee7332f 322
d84985bf 323XXX Describe change here
9d30331d 324
aae97602
PE
325=item * New 'scalar' category for "Useless use of sort in scalar context"
326
327When C<sort> is used in scalar context, it provokes a warning that this is not
328useful. This warning used to be in the C<void> category. A new category for
329warnings about scalar context has now been added, called C<scalar>.
330
9d30331d
N
331=back
332
d84985bf 333=head1 Utility Changes
9d30331d 334
d84985bf
RB
335XXX Changes to installed programs such as F<perldoc> and F<xsubpp> go here.
336Most of these are built within the directory F<utils>.
9d30331d 337
d84985bf
RB
338[ List utility changes as a =head2 entry for each utility and =item
339entries for each change
340Use L<XXX> with program names to get proper documentation linking. ]
341
342=head2 L<XXX>
1ee7332f
NB
343
344=over 4
234aaa34
NB
345
346=item *
347
d84985bf 348XXX
9d30331d 349
d84985bf 350=back
234aaa34 351
d84985bf
RB
352=head1 Configuration and Compilation
353
354XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
355go here. Any other changes to the Perl build process should be listed here.
356However, any platform-specific changes should be listed in the
357L</Platform Support> section, instead.
234aaa34 358
d84985bf 359[ List changes as an =item entry ].
234aaa34 360
d84985bf 361=over 4
234aaa34 362
81ff15d3 363=item *
234aaa34 364
d84985bf 365XXX
6247a13a 366
d84985bf 367=back
6247a13a 368
d84985bf 369=head1 Testing
2fac577b 370
d84985bf
RB
371XXX Any significant changes to the testing of a freshly built perl should be
372listed here. Changes which create B<new> files in F<t/> go here as do any
373large changes to the testing harness (e.g. when parallel testing was added).
374Changes to existing files in F<t/> aren't worth summarizing, although the bugs
375that they represent may be covered elsewhere.
2fac577b 376
d84985bf 377XXX If there were no significant test changes, say this:
1ee7332f 378
d84985bf
RB
379Tests were added and changed to reflect the other additions and changes
380in this release.
1ee7332f 381
d84985bf
RB
382XXX If instead there were significant changes, say this:
383
384Tests were added and changed to reflect the other additions and
385changes in this release. Furthermore, these significant changes were
386made:
387
388[ List each test improvement as an =item entry ]
1ee7332f
NB
389
390=over 4
391
81ff15d3 392=item *
2fac577b 393
d84985bf
RB
394XXX
395
396=back
397
398=head1 Platform Support
399
400XXX Any changes to platform support should be listed in the sections below.
401
402[ Within the sections, list each platform as an =item entry with specific
403changes as paragraphs below it. ]
404
405=head2 New Platforms
406
407XXX List any platforms that this version of perl compiles on, that previous
408versions did not. These will either be enabled by new files in the F<hints/>
409directories, or new subdirectories and F<README> files at the top level of the
410source tree.
411
412=over 4
413
414=item XXX-some-platform
994b363a 415
d84985bf 416XXX
96eb1788 417
1ee7332f
NB
418=back
419
d84985bf
RB
420=head2 Discontinued Platforms
421
422XXX List any platforms that this version of perl no longer compiles on.
1ee7332f 423
5e4fe298
TK
424=over 4
425
d84985bf 426=item XXX-some-platform
5e4fe298 427
d84985bf 428XXX
5e4fe298 429
d84985bf 430=back
123732b0 431
d84985bf 432=head2 Platform-Specific Notes
123732b0 433
d84985bf
RB
434XXX List any changes for specific platforms. This could include configuration
435and compilation changes or changes in portability/compatibility. However,
436changes within modules for platforms should generally be listed in the
437L</Modules and Pragmata> section.
123732b0
NC
438
439=over 4
440
d84985bf 441=item XXX-some-platform
123732b0 442
d84985bf 443XXX
123732b0 444
d84985bf 445=back
123732b0 446
d84985bf
RB
447=head1 Internal Changes
448
449XXX Changes which affect the interface available to C<XS> code go here. Other
450significant internal changes for future core maintainers should be noted as
451well.
452
453[ List each change as an =item entry ]
454
455=over 4
123732b0 456
d84985bf 457=item *
123732b0 458
d84985bf 459XXX
123732b0 460
8131b14b
FG
461=item *
462
463C<sv_dump> (and L<Devel::Peek>’s C<Dump> function) now escapes high-bit
464octets in the PV as hex rather than octal. Since most folks understand hex
465more readily than octal, this should make these dumps a bit more legible.
466This does B<not> affect any other diagnostic interfaces like C<pv_display>.
467
123732b0
NC
468=back
469
d84985bf
RB
470=head1 Selected Bug Fixes
471
472XXX Important bug fixes in the core language are summarized here. Bug fixes in
473files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>.
474
475[ List each fix as an =item entry ]
476
477=over 4
123732b0
NC
478
479=item *
480
d84985bf 481XXX
123732b0 482
d84985bf 483=back
123732b0 484
d84985bf 485=head1 Known Problems
123732b0 486
d84985bf
RB
487XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
488tests that had to be C<TODO>ed for the release would be noted here. Unfixed
489platform specific bugs also go here.
490
491[ List each fix as an =item entry ]
492
493=over 4
494
495=item *
496
497XXX
123732b0 498
5e4fe298 499=back
96eb1788 500
d84985bf 501=head1 Errata From Previous Releases
2fac577b 502
d84985bf
RB
503=over 4
504
505=item *
2fac577b 506
d84985bf
RB
507XXX Add anything here that we forgot to add, or were mistaken about, in
508the perldelta of a previous release.
2fac577b 509
d84985bf
RB
510=back
511
512=head1 Obituary
9d30331d 513
d84985bf
RB
514XXX If any significant core contributor or member of the CPAN community has
515died, add a short obituary here.
9d30331d 516
d84985bf 517=head1 Acknowledgements
deaec9bf 518
d84985bf 519XXX Generate this with:
b129a266 520
d84985bf 521 perl Porting/acknowledgements.pl v5.35.9..HEAD
8424e368 522
44691e6f
AB
523=head1 Reporting Bugs
524
5b68d8ff
SH
525If you find what you think is a bug, you might check the perl bug database
526at L<https://github.com/Perl/perl5/issues>. There may also be information at
46a21c0a 527L<http://www.perl.org/>, the Perl Home Page.
44691e6f 528
8166b4e0 529If you believe you have an unreported bug, please open an issue at
0382c61d 530L<https://github.com/Perl/perl5/issues>. Be sure to trim your bug down to a
8166b4e0 531tiny but sufficient test case.
44691e6f 532
87c118b9 533If the bug you are reporting has security implications which make it
8166b4e0 534inappropriate to send to a public issue tracker, then see
5b68d8ff
SH
535L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION>
536for details of how to report the issue.
44691e6f 537
390ae6f9
S
538=head1 Give Thanks
539
5b68d8ff
SH
540If you wish to thank the Perl 5 Porters for the work we had done in Perl 5,
541you can do so by running the C<perlthanks> program:
390ae6f9
S
542
543 perlthanks
544
545This will send an email to the Perl 5 Porters list with your show of thanks.
546
44691e6f
AB
547=head1 SEE ALSO
548
e08634c5
SH
549The F<Changes> file for an explanation of how to view exhaustive details on
550what changed.
44691e6f
AB
551
552The F<INSTALL> file for how to build Perl.
553
554The F<README> file for general stuff.
555
556The F<Artistic> and F<Copying> files for copyright information.
557
558=cut