This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add musical score paired delimiters
[perl5.git] / pod / perldelta.pod
1 =encoding utf8
2
3 =head1 NAME
4
5 [ this is a template for a new perldelta file.  Any text flagged as XXX needs
6 to be processed before release. ]
7
8 perldelta - what is new for perl v5.35.10
9
10 =head1 DESCRIPTION
11
12 This document describes differences between the 5.35.9 release and the 5.35.10
13 release.
14
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.
17
18 =head1 Notice
19
20 XXX Any important notices here
21
22 =head1 Core Enhancements
23
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.
27
28 =head2 New function C<builtin::trim>
29
30 This function treats its argument as a string, returning the result of
31 removing all white space at its beginning and ending.  See
32 L<builtin/trim>
33
34 =head2 Variable length lookbehind is mostly no longer considered experimental.
35
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
40
41     "aaz"=~/(?=z)(?<=(a|aa))/
42
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.
47
48 =head2 Added 'builtin::indexed'
49
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:
55
56     use builtin 'indexed';
57
58     foreach my ($index, $val) (indexed @array) {
59         ...
60     }
61
62 =head2 Added experimental feature 'extra_paired_delimiters'
63
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
70 details.
71
72 =head1 Security
73
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.
77
78 [ List each security issue as a =head2 entry ]
79
80 =head1 Incompatible Changes
81
82 XXX For a release on a stable branch, this section aspires to be:
83
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.
87
88 [ List each incompatible change as a =head2 entry ]
89
90 =head1 Deprecations
91
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.
95
96 =head2 Module removals
97
98 XXX Remove this section if not applicable.
99
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
103 prerequisites.
104
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.
108
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.
113
114 =over
115
116 =item XXX
117
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.
120
121 =back
122
123 [ List each other deprecation as a =head2 entry ]
124
125 =head1 Performance Enhancements
126
127 XXX Changes which enhance performance without changing behaviour go here.
128 There may well be none in a stable release.
129
130 [ List each enhancement as an =item entry ]
131
132 =over 4
133
134 =item *
135
136 Large hashes no longer allocate their keys from the shared string table.
137
138 The same internal datatype (C<PVHV>) is used for all of
139
140 =over 4
141
142 =item *
143
144 Symbol tables
145
146 =item *
147
148 Objects (by default)
149
150 =item *
151
152 Associative arrays
153
154 =back
155
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.
162
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
166 in other hashes.
167
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.
178
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.
183
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.
188
189 =back
190
191 =head1 Modules and Pragmata
192
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.
198
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.)
204
205 [ Within each section, list entries as an =item entry ]
206
207 =head2 New Modules and Pragmata
208
209 =over 4
210
211 =item *
212
213 XXX Remove this section if not applicable.
214
215 =back
216
217 =head2 Updated Modules and Pragmata
218
219 =over 4
220
221 =item *
222
223 L<XXX> has been upgraded from version A.xx to B.yy.
224
225 If there was something important to note about this change, include that here.
226
227 =back
228
229 =head2 Removed Modules and Pragmata
230
231 =over 4
232
233 =item *
234
235 XXX
236
237 =back
238
239 =head1 Documentation
240
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>.
243
244 =head2 New Documentation
245
246 XXX Changes which create B<new> files in F<pod/> go here.
247
248 =head3 L<XXX>
249
250 XXX Description of the purpose of the new file here
251
252 =head2 Changes to Existing Documentation
253
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>.
257
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>
260 section.
261
262 Additionally, the following selected changes have been made:
263
264 =head3 L<XXX>
265
266 =over 4
267
268 =item *
269
270 XXX Description of the change here
271
272 =back
273
274 =head1 Diagnostics
275
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>.
279
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.
282
283 =head2 New Diagnostics
284
285 XXX Newly added diagnostic messages go under here, separated into New Errors
286 and New Warnings
287
288 =head3 New Errors
289
290 =over 4
291
292 =item *
293
294 XXX L<message|perldiag/"message">
295
296 =item *
297
298 L<Wide character in $0|perldiag/"Wide character in %s">
299
300 Attempts to put wide characters into the program name (C<$0>) now
301 provoke this warning.
302
303 =back
304
305 =head3 New Warnings
306
307 =over 4
308
309 =item *
310
311 XXX L<message|perldiag/"message">
312
313 =back
314
315 =head2 Changes to Existing Diagnostics
316
317 XXX Changes (i.e. rewording) of diagnostic messages go here
318
319 =over 4
320
321 =item *
322
323 XXX Describe change here
324
325 =item * New 'scalar' category for "Useless use of sort in scalar context"
326
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>.
330
331 =back
332
333 =head1 Utility Changes
334
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>.
337
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. ]
341
342 =head2 L<XXX>
343
344 =over 4
345
346 =item *
347
348 XXX
349
350 =back
351
352 =head1 Configuration and Compilation
353
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.
358
359 [ List changes as an =item entry ].
360
361 =over 4
362
363 =item *
364
365 XXX
366
367 =back
368
369 =head1 Testing
370
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.
376
377 XXX If there were no significant test changes, say this:
378
379 Tests were added and changed to reflect the other additions and changes
380 in this release.
381
382 XXX If instead there were significant changes, say this:
383
384 Tests were added and changed to reflect the other additions and
385 changes in this release.  Furthermore, these significant changes were
386 made:
387
388 [ List each test improvement as an =item entry ]
389
390 =over 4
391
392 =item *
393
394 XXX
395
396 =back
397
398 =head1 Platform Support
399
400 XXX 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
403 changes as paragraphs below it. ]
404
405 =head2 New Platforms
406
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
410 source tree.
411
412 =over 4
413
414 =item XXX-some-platform
415
416 XXX
417
418 =back
419
420 =head2 Discontinued Platforms
421
422 XXX List any platforms that this version of perl no longer compiles on.
423
424 =over 4
425
426 =item XXX-some-platform
427
428 XXX
429
430 =back
431
432 =head2 Platform-Specific Notes
433
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.
438
439 =over 4
440
441 =item XXX-some-platform
442
443 XXX
444
445 =back
446
447 =head1 Internal Changes
448
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
451 well.
452
453 [ List each change as an =item entry ]
454
455 =over 4
456
457 =item *
458
459 XXX
460
461 =item *
462
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>.
467
468 =back
469
470 =head1 Selected Bug Fixes
471
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>.
474
475 [ List each fix as an =item entry ]
476
477 =over 4
478
479 =item *
480
481 XXX
482
483 =back
484
485 =head1 Known Problems
486
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.
490
491 [ List each fix as an =item entry ]
492
493 =over 4
494
495 =item *
496
497 XXX
498
499 =back
500
501 =head1 Errata From Previous Releases
502
503 =over 4
504
505 =item *
506
507 XXX Add anything here that we forgot to add, or were mistaken about, in
508 the perldelta of a previous release.
509
510 =back
511
512 =head1 Obituary
513
514 XXX If any significant core contributor or member of the CPAN community has
515 died, add a short obituary here.
516
517 =head1 Acknowledgements
518
519 XXX Generate this with:
520
521   perl Porting/acknowledgements.pl v5.35.9..HEAD
522
523 =head1 Reporting Bugs
524
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.
528
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.
532
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.
537
538 =head1 Give Thanks
539
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:
542
543     perlthanks
544
545 This will send an email to the Perl 5 Porters list with your show of thanks.
546
547 =head1 SEE ALSO
548
549 The F<Changes> file for an explanation of how to view exhaustive details on
550 what changed.
551
552 The F<INSTALL> file for how to build Perl.
553
554 The F<README> file for general stuff.
555
556 The F<Artistic> and F<Copying> files for copyright information.
557
558 =cut