This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
sv.c: Fix typo in comment
[perl5.git] / pod / perldelta.pod
CommitLineData
44691e6f
AB
1=encoding utf8
2
3=head1 NAME
4
e6a2e5ca
SH
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.27.6
89853d76 9
b5cbfe35 10=head1 DESCRIPTION
89853d76 11
e6a2e5ca 12This document describes differences between the 5.27.5 release and the 5.27.6
b5cbfe35 13release.
89853d76 14
e6a2e5ca
SH
15If you are upgrading from an earlier release such as 5.27.4, first read
16L<perl5275delta>, which describes differences between 5.27.4 and 5.27.5.
17
18=head1 Notice
19
20XXX Any important notices here
21
22=head1 Core Enhancements
23
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.
27
28[ List each enhancement as a =head2 entry ]
29
f99042c8
Z
30=head2 Initialisation of aggregate state variables
31
32A persistent lexical array or hash variable can now be initialized,
33by an expression such as C<state @a = qw(x y z)>. Initialization of a
34list of persistent lexical variables is still not possible.
35
e6a2e5ca
SH
36=head1 Security
37
38XXX Any security-related notices go here. In particular, any security
39vulnerabilities closed should be noted here rather than in the
40L</Selected Bug Fixes> section.
41
42[ List each security issue as a =head2 entry ]
43
44=head1 Incompatible Changes
45
46XXX For a release on a stable branch, this section aspires to be:
47
48 There are no changes intentionally incompatible with 5.XXX.XXX
49 If any exist, they are bugs, and we request that you submit a
50 report. See L</Reporting Bugs> below.
51
52[ List each incompatible change as a =head2 entry ]
53
54=head1 Deprecations
55
56XXX Any deprecated features, syntax, modules etc. should be listed here.
57
58=head2 Module removals
59
60XXX Remove this section if inapplicable.
61
62The following modules will be removed from the core distribution in a
63future release, and will at that time need to be installed from CPAN.
64Distributions on CPAN which require these modules will need to list them as
65prerequisites.
66
67The core versions of these modules will now issue C<"deprecated">-category
68warnings to alert you to this fact. To silence these deprecation warnings,
69install the modules in question from CPAN.
70
71Note that these are (with rare exceptions) fine modules that you are encouraged
72to continue to use. Their disinclusion from core primarily hinges on their
73necessity to bootstrapping a fully functional, CPAN-capable Perl installation,
74not usually on concerns over their design.
75
76=over
77
78=item XXX
79
80XXX Note that deprecated modules should be listed here even if they are listed
81as an updated module in the L</Modules and Pragmata> section.
82
83=back
84
85[ List each other deprecation as a =head2 entry ]
a8ba758d 86
cf663f87
AC
87=head1 Performance Enhancements
88
e6a2e5ca
SH
89XXX Changes which enhance performance without changing behaviour go here.
90There may well be none in a stable release.
91
92[ List each enhancement as an =item entry ]
93
1b510166
S
94=over 4
95
96=item *
97
8ed1839e
DM
98Many string concatenation expressions are now considerably faster, due
99to the introduction internally of a C<multiconcat> opcode which combines
100multiple concatenations, and optionally a C<=> or C<.=>, into a single
101action. For example, apart from retrieving C<$s>, C<$a> and C<$b>, this
102whole expression is now handled as a single op:
103
104 $s .= "a=$a b=$b\n"
105
106As a special case, if the LHS of an assign is a lexical variable or
107C<my $s>, the op itself handles retrieving the lexical variable, which
108is faster.
109
110In general, the more the expression includes a mix of constant strings and
111variable expressions, the longer the expression, and the more it mixes
112together non-utf8 and utf8 strings, the more marked the performance
113improvement. For example on a C<x86_64> system, this code has been
114benchmarked running four times faster:
115
116 my $s;
117 my $a = "ab\x{100}cde";
118 my $b = "fghij";
119 my $c = "\x{101}klmn";
120
121 for my $i (1..10_000_000) {
122 $s = "\x{100}wxyz";
123 $s .= "foo=$a bar=$b baz=$c";
124 }
125
126In addition, C<sprintf> expressions which have a constant format
127containing only C<%s> and C<%%> format elements, and which have a fixed
128number of arguments, are now also optimised into a C<multiconcat> op.
d912eab8 129
c83a3d01 130=back
d912eab8 131
c83a3d01 132=head1 Modules and Pragmata
af94b3ac 133
e6a2e5ca
SH
134XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
135go here. If Module::CoreList is updated, generate an initial draft of the
136following sections using F<Porting/corelist-perldelta.pl>. A paragraph summary
137for important changes should then be added by hand. In an ideal world,
138dual-life modules would have a F<Changes> file that could be cribbed.
139
140The list of new and updated modules is modified automatically as part of
141preparing a Perl release, so the only reason to manually add entries here is if
142you're summarising the important changes in the module update. (Also, if the
143manually-added details don't match the automatically-generated ones, the
144release manager will have to investigate the situation carefully.)
145
146[ Within each section, list entries as an =item entry ]
147
148=head2 New Modules and Pragmata
a8ba758d
JSA
149
150=over 4
ba2fe89f
AC
151
152=item *
153
e6a2e5ca 154XXX
64b9a139 155
e6a2e5ca 156=back
64b9a139 157
e6a2e5ca
SH
158=head2 Updated Modules and Pragmata
159
160=over 4
64b9a139
SH
161
162=item *
163
b5af74de
FC
164L<Carp> has been upgraded from version 1.43 to 1.44.
165
166If a package on the call stack contains a constant named C<ISA>, Carp no
167longer throws a "Not a GLOB reference" error.
64b9a139 168
e6a2e5ca 169=back
64b9a139 170
e6a2e5ca
SH
171=head2 Removed Modules and Pragmata
172
173=over 4
64b9a139
SH
174
175=item *
176
e6a2e5ca 177XXX
64b9a139 178
e6a2e5ca 179=back
64b9a139 180
e6a2e5ca 181=head1 Documentation
64b9a139 182
e6a2e5ca
SH
183XXX Changes to files in F<pod/> go here. Consider grouping entries by
184file and be sure to link to the appropriate page, e.g. L<perlfunc>.
64b9a139 185
e6a2e5ca 186=head2 New Documentation
64b9a139 187
e6a2e5ca 188XXX Changes which create B<new> files in F<pod/> go here.
64b9a139 189
e6a2e5ca 190=head3 L<XXX>
64b9a139 191
e6a2e5ca 192XXX Description of the purpose of the new file here
64b9a139 193
e6a2e5ca 194=head2 Changes to Existing Documentation
64b9a139 195
e6a2e5ca
SH
196We have attempted to update the documentation to reflect the changes
197listed in this document. If you find any we have missed, send email
198to L<perlbug@perl.org|mailto:perlbug@perl.org>.
64b9a139 199
e6a2e5ca
SH
200XXX Changes which significantly change existing files in F<pod/> go here.
201However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
202section.
64b9a139 203
e6a2e5ca
SH
204Additionally, the following selected changes have been made:
205
754dd754
KW
206=head3 L<perldiag/Variable length lookbehind not implemented in regex m/%s/>
207
208This now gives more ideas as to workarounds to the issue that was
209introduced in Perl 5.18 (but not documented explicitly in its perldelta)
210for the fact that some Unicode C</i> rules cause a few sequences such as
211
212 (?<!st)
213
214to be considered variable length, and hence disallowed.
64b9a139 215
e6a2e5ca 216=over 4
64b9a139
SH
217
218=item *
219
e6a2e5ca 220XXX Description of the change here
64b9a139 221
e6a2e5ca 222=back
64b9a139 223
e6a2e5ca 224=head1 Diagnostics
64b9a139 225
e6a2e5ca
SH
226The following additions or changes have been made to diagnostic output,
227including warnings and fatal error messages. For the complete list of
228diagnostic messages, see L<perldiag>.
64b9a139 229
e6a2e5ca
SH
230XXX New or changed warnings emitted by the core's C<C> code go here. Also
231include any changes in L<perldiag> that reconcile it to the C<C> code.
64b9a139 232
e6a2e5ca 233=head2 New Diagnostics
64b9a139 234
e6a2e5ca
SH
235XXX Newly added diagnostic messages go under here, separated into New Errors
236and New Warnings
64b9a139 237
e6a2e5ca 238=head3 New Errors
64b9a139 239
e6a2e5ca 240=over 4
64b9a139
SH
241
242=item *
243
e6a2e5ca 244XXX L<message|perldiag/"message">
64b9a139 245
e6a2e5ca
SH
246=back
247
248=head3 New Warnings
64b9a139 249
e6a2e5ca 250=over 4
64b9a139
SH
251
252=item *
253
e6a2e5ca 254XXX L<message|perldiag/"message">
64b9a139 255
e6a2e5ca
SH
256=back
257
258=head2 Changes to Existing Diagnostics
64b9a139 259
e6a2e5ca
SH
260XXX Changes (i.e. rewording) of diagnostic messages go here
261
262=over 4
64b9a139
SH
263
264=item *
265
f99042c8
Z
266The diagnostic C<Initialization of state variables in list context
267currently forbidden> has changed to C<Initialization of state variables
268in list currently forbidden>, because list-context initialization of
269single aggregate state variables is now permitted.
270
271=item *
272
e6a2e5ca
SH
273XXX Describe change here
274
275=back
276
277=head1 Utility Changes
278
279XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go here.
280Most of these are built within the directory F<utils>.
281
282[ List utility changes as a =head2 entry for each utility and =item
283entries for each change
284Use L<XXX> with program names to get proper documentation linking. ]
285
286=head2 L<XXX>
287
288=over 4
64b9a139
SH
289
290=item *
291
e6a2e5ca
SH
292XXX
293
294=back
295
296=head1 Configuration and Compilation
297
298XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
299go here. Any other changes to the Perl build process should be listed here.
300However, any platform-specific changes should be listed in the
301L</Platform Support> section, instead.
302
303[ List changes as an =item entry ].
304
305=over 4
64b9a139 306
dea26044 307=item New probes
64b9a139 308
dea26044
MB
309=over 2
310
311=item HAS_BUILTIN_ADD_OVERFLOW
312
313=item HAS_BUILTIN_MUL_OVERFLOW
314
315=item HAS_BUILTIN_SUB_OVERFLOW
316
317=item HAS_THREAD_SAFE_NL_LANGINFO_L
318
319=item HAS_LOCALECONV_L
320
321=item HAS_MBRLEN
322
323=item HAS_MBRTOWC
324
325=item HAS_MEMRCHR
326
327=item HAS_NANOSLEEP
328
329=item HAS_STRNLEN
330
331=item HAS_STRTOLD_L
332
333=item I_WCHAR
334
335=back
e6a2e5ca
SH
336
337=back
338
339=head1 Testing
340
341XXX Any significant changes to the testing of a freshly built perl should be
342listed here. Changes which create B<new> files in F<t/> go here as do any
343large changes to the testing harness (e.g. when parallel testing was added).
344Changes to existing files in F<t/> aren't worth summarizing, although the bugs
345that they represent may be covered elsewhere.
346
347XXX If there were no significant test changes, say this:
348
349Tests were added and changed to reflect the other additions and changes
350in this release.
351
352XXX If instead there were significant changes, say this:
353
354Tests were added and changed to reflect the other additions and
355changes in this release. Furthermore, these significant changes were
356made:
357
358[ List each test improvement as an =item entry ]
359
360=over 4
64b9a139
SH
361
362=item *
363
e6a2e5ca 364XXX
cf663f87 365
a8ba758d
JSA
366=back
367
a8ba758d 368=head1 Platform Support
cf663f87 369
e6a2e5ca
SH
370XXX Any changes to platform support should be listed in the sections below.
371
372[ Within the sections, list each platform as an =item entry with specific
373changes as paragraphs below it. ]
374
375=head2 New Platforms
376
377XXX List any platforms that this version of perl compiles on, that previous
378versions did not. These will either be enabled by new files in the F<hints/>
379directories, or new subdirectories and F<README> files at the top level of the
380source tree.
381
382=over 4
383
384=item XXX-some-platform
385
386XXX
387
388=back
389
390=head2 Discontinued Platforms
391
392XXX List any platforms that this version of perl no longer compiles on.
393
394=over 4
395
396=item XXX-some-platform
397
398XXX
399
400=back
401
a8ba758d
JSA
402=head2 Platform-Specific Notes
403
e6a2e5ca
SH
404XXX List any changes for specific platforms. This could include configuration
405and compilation changes or changes in portability/compatibility. However,
406changes within modules for platforms should generally be listed in the
407L</Modules and Pragmata> section.
408
a8ba758d 409=over 4
9ef07b78 410
e6a2e5ca 411=item XXX-some-platform
a8ba758d 412
e6a2e5ca 413XXX
a8ba758d
JSA
414
415=back
416
e6a2e5ca
SH
417=head1 Internal Changes
418
419XXX Changes which affect the interface available to C<XS> code go here. Other
420significant internal changes for future core maintainers should be noted as
421well.
422
423[ List each change as an =item entry ]
a8ba758d 424
a8ba758d 425=over 4
cf663f87 426
21741043 427=item *
c83a3d01 428
8ed1839e
DM
429A new optimisation phase has been added to the compiler,
430C<optimize_optree()>, which does a top-down scan of a complete optree
431just before the peephole optimiser is run. This phase is not currently
432hookable.
433
434=item *
435
436An C<OP_MULTICONCAT> op has been added. At C<optimize_optree()> time, a
437chain of C<OP_CONCAT> and C<OP_CONST> ops, together optionally with an
438C<OP_STRINGIFY> and/or C<OP_SASSIGN>, are combined into a single
439C<OP_MULTICONCAT> op. The op is of type C<UNOP_AUX>, and the aux array
440contains the argument count, plus a pointer to a constant string and a set
441of segment lengths. For example with
442
443 my $x = "foo=$foo, bar=$bar\n";
444
445the constant string would be C<"foo=, bar=\n"> and the segment lengths
446would be (4,6,1). If the string contains characters such as C<\x80>, whose
447representation changes under utf8, two sets of strings plus lengths are
448precomputed and stored.
a8ba758d 449
e6a2e5ca
SH
450=back
451
452=head1 Selected Bug Fixes
453
454XXX Important bug fixes in the core language are summarized here. Bug fixes in
455files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>.
834e1dc6 456
e6a2e5ca
SH
457[ List each fix as an =item entry ]
458
459=over 4
77baf8eb
SH
460
461=item *
462
a155eb05
TC
463C<stat()>, C<lstat()>, and file test operators now fail if given a
464filename containing a nul character, in the same way that C<open()>
465already fails.
466
467=item *
468
5bad3c4f
DIM
469The in-place reverse optimisation now correctly strengthens weak
470references using the L<C<sv_rvunweaken()>|perlapi/sv_rvunweaken>
471API function.
e6a2e5ca 472
4faa3060
TC
473=item *
474
475Fixed a read before buffer when parsing a range starting with C<\N{}>
476at the beginning of the character set for the transliteration
477operator. [perl #132245]
478
479=item *
480
481Fixed a leaked SV when parsing an empty C<\N{}> at compile-time.
482[perl #132245]
483
e6a2e5ca
SH
484=back
485
486=head1 Known Problems
487
488XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
489tests that had to be C<TODO>ed for the release would be noted here. Unfixed
490platform specific bugs also go here.
491
492[ List each fix as an =item entry ]
493
494=over 4
77baf8eb
SH
495
496=item *
497
e6a2e5ca 498XXX
834e1dc6 499
a8ba758d
JSA
500=back
501
e6a2e5ca
SH
502=head1 Errata From Previous Releases
503
504=over 4
8abafd33 505
e6a2e5ca
SH
506=item *
507
508XXX Add anything here that we forgot to add, or were mistaken about, in
509the perldelta of a previous release.
8abafd33 510
e6a2e5ca 511=back
b2e49ab9 512
e6a2e5ca 513=head1 Obituary
b2e49ab9 514
e6a2e5ca
SH
515XXX If any significant core contributor has died, we've added a short obituary
516here.
b2e49ab9 517
e6a2e5ca 518=head1 Acknowledgements
b2e49ab9 519
e6a2e5ca 520XXX Generate this with:
b2e49ab9 521
cab780cc 522 perl Porting/acknowledgements.pl v5.27.5..HEAD
f5b73711 523
44691e6f
AB
524=head1 Reporting Bugs
525
b5cbfe35
S
526If you find what you think is a bug, you might check the perl bug database
527at L<https://rt.perl.org/> . There may also be information at
528L<http://www.perl.org/> , the Perl Home Page.
44691e6f 529
e08634c5
SH
530If you believe you have an unreported bug, please run the L<perlbug> program
531included with your release. Be sure to trim your bug down to a tiny but
532sufficient test case. Your bug report, along with the output of C<perl -V>,
b5cbfe35 533will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
44691e6f 534
87c118b9
DM
535If the bug you are reporting has security implications which make it
536inappropriate to send to a publicly archived mailing list, then see
c0ea3294
SH
537L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION>
538for details of how to report the issue.
44691e6f 539
390ae6f9
S
540=head1 Give Thanks
541
542If you wish to thank the Perl 5 Porters for the work we had done in Perl 5,
543you can do so by running the C<perlthanks> program:
544
545 perlthanks
546
547This will send an email to the Perl 5 Porters list with your show of thanks.
548
44691e6f
AB
549=head1 SEE ALSO
550
e08634c5
SH
551The F<Changes> file for an explanation of how to view exhaustive details on
552what changed.
44691e6f
AB
553
554The F<INSTALL> file for how to build Perl.
555
556The F<README> file for general stuff.
557
558The F<Artistic> and F<Copying> files for copyright information.
559
560=cut