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