This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
return inode numbers as strings where necessary
[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
e6a2e5ca 258XXX Description of the change here
64b9a139 259
e6a2e5ca 260=back
64b9a139 261
e6a2e5ca 262=head1 Diagnostics
64b9a139 263
e6a2e5ca
SH
264The following additions or changes have been made to diagnostic output,
265including warnings and fatal error messages. For the complete list of
266diagnostic messages, see L<perldiag>.
64b9a139 267
e6a2e5ca
SH
268XXX New or changed warnings emitted by the core's C<C> code go here. Also
269include any changes in L<perldiag> that reconcile it to the C<C> code.
64b9a139 270
e6a2e5ca 271=head2 New Diagnostics
64b9a139 272
e6a2e5ca
SH
273XXX Newly added diagnostic messages go under here, separated into New Errors
274and New Warnings
64b9a139 275
e6a2e5ca 276=head3 New Errors
64b9a139 277
e6a2e5ca 278=over 4
64b9a139
SH
279
280=item *
281
e6a2e5ca 282XXX L<message|perldiag/"message">
64b9a139 283
e6a2e5ca
SH
284=back
285
286=head3 New Warnings
64b9a139 287
e6a2e5ca 288=over 4
64b9a139
SH
289
290=item *
291
e6a2e5ca 292XXX L<message|perldiag/"message">
64b9a139 293
e6a2e5ca
SH
294=back
295
296=head2 Changes to Existing Diagnostics
64b9a139 297
e6a2e5ca
SH
298XXX Changes (i.e. rewording) of diagnostic messages go here
299
300=over 4
64b9a139
SH
301
302=item *
303
f99042c8
Z
304The diagnostic C<Initialization of state variables in list context
305currently forbidden> has changed to C<Initialization of state variables
306in list currently forbidden>, because list-context initialization of
307single aggregate state variables is now permitted.
308
309=item *
310
e6a2e5ca
SH
311XXX Describe change here
312
313=back
314
315=head1 Utility Changes
316
317XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go here.
318Most of these are built within the directory F<utils>.
319
320[ List utility changes as a =head2 entry for each utility and =item
321entries for each change
322Use L<XXX> with program names to get proper documentation linking. ]
323
324=head2 L<XXX>
325
326=over 4
64b9a139
SH
327
328=item *
329
e6a2e5ca
SH
330XXX
331
332=back
333
334=head1 Configuration and Compilation
335
336XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
337go here. Any other changes to the Perl build process should be listed here.
338However, any platform-specific changes should be listed in the
339L</Platform Support> section, instead.
340
341[ List changes as an =item entry ].
342
343=over 4
64b9a139 344
dea26044 345=item New probes
64b9a139 346
dea26044
MB
347=over 2
348
349=item HAS_BUILTIN_ADD_OVERFLOW
350
351=item HAS_BUILTIN_MUL_OVERFLOW
352
353=item HAS_BUILTIN_SUB_OVERFLOW
354
355=item HAS_THREAD_SAFE_NL_LANGINFO_L
356
357=item HAS_LOCALECONV_L
358
359=item HAS_MBRLEN
360
361=item HAS_MBRTOWC
362
363=item HAS_MEMRCHR
364
365=item HAS_NANOSLEEP
366
367=item HAS_STRNLEN
368
369=item HAS_STRTOLD_L
370
371=item I_WCHAR
372
373=back
e6a2e5ca
SH
374
375=back
376
377=head1 Testing
378
379XXX Any significant changes to the testing of a freshly built perl should be
380listed here. Changes which create B<new> files in F<t/> go here as do any
381large changes to the testing harness (e.g. when parallel testing was added).
382Changes to existing files in F<t/> aren't worth summarizing, although the bugs
383that they represent may be covered elsewhere.
384
385XXX If there were no significant test changes, say this:
386
387Tests were added and changed to reflect the other additions and changes
388in this release.
389
390XXX If instead there were significant changes, say this:
391
392Tests were added and changed to reflect the other additions and
393changes in this release. Furthermore, these significant changes were
394made:
395
396[ List each test improvement as an =item entry ]
397
398=over 4
64b9a139
SH
399
400=item *
401
e6a2e5ca 402XXX
cf663f87 403
a8ba758d
JSA
404=back
405
a8ba758d 406=head1 Platform Support
cf663f87 407
e6a2e5ca
SH
408XXX Any changes to platform support should be listed in the sections below.
409
410[ Within the sections, list each platform as an =item entry with specific
411changes as paragraphs below it. ]
412
413=head2 New Platforms
414
415XXX List any platforms that this version of perl compiles on, that previous
416versions did not. These will either be enabled by new files in the F<hints/>
417directories, or new subdirectories and F<README> files at the top level of the
418source tree.
419
420=over 4
421
422=item XXX-some-platform
423
424XXX
425
426=back
427
428=head2 Discontinued Platforms
429
430XXX List any platforms that this version of perl no longer compiles on.
431
432=over 4
433
434=item XXX-some-platform
435
436XXX
437
438=back
439
a8ba758d
JSA
440=head2 Platform-Specific Notes
441
e6a2e5ca
SH
442XXX List any changes for specific platforms. This could include configuration
443and compilation changes or changes in portability/compatibility. However,
444changes within modules for platforms should generally be listed in the
445L</Modules and Pragmata> section.
446
a8ba758d 447=over 4
9ef07b78 448
e6a2e5ca 449=item XXX-some-platform
a8ba758d 450
e6a2e5ca 451XXX
a8ba758d
JSA
452
453=back
454
e6a2e5ca
SH
455=head1 Internal Changes
456
457XXX Changes which affect the interface available to C<XS> code go here. Other
458significant internal changes for future core maintainers should be noted as
459well.
460
461[ List each change as an =item entry ]
a8ba758d 462
a8ba758d 463=over 4
cf663f87 464
21741043 465=item *
c83a3d01 466
8ed1839e
DM
467A new optimisation phase has been added to the compiler,
468C<optimize_optree()>, which does a top-down scan of a complete optree
469just before the peephole optimiser is run. This phase is not currently
470hookable.
471
472=item *
473
474An C<OP_MULTICONCAT> op has been added. At C<optimize_optree()> time, a
475chain of C<OP_CONCAT> and C<OP_CONST> ops, together optionally with an
476C<OP_STRINGIFY> and/or C<OP_SASSIGN>, are combined into a single
477C<OP_MULTICONCAT> op. The op is of type C<UNOP_AUX>, and the aux array
478contains the argument count, plus a pointer to a constant string and a set
479of segment lengths. For example with
480
481 my $x = "foo=$foo, bar=$bar\n";
482
483the constant string would be C<"foo=, bar=\n"> and the segment lengths
484would be (4,6,1). If the string contains characters such as C<\x80>, whose
485representation changes under utf8, two sets of strings plus lengths are
486precomputed and stored.
a8ba758d 487
e6a2e5ca
SH
488=back
489
490=head1 Selected Bug Fixes
491
492XXX Important bug fixes in the core language are summarized here. Bug fixes in
493files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>.
834e1dc6 494
e6a2e5ca
SH
495[ List each fix as an =item entry ]
496
497=over 4
77baf8eb
SH
498
499=item *
500
a155eb05
TC
501C<stat()>, C<lstat()>, and file test operators now fail if given a
502filename containing a nul character, in the same way that C<open()>
503already fails.
504
505=item *
506
5bad3c4f
DIM
507The in-place reverse optimisation now correctly strengthens weak
508references using the L<C<sv_rvunweaken()>|perlapi/sv_rvunweaken>
509API function.
e6a2e5ca 510
4faa3060
TC
511=item *
512
513Fixed a read before buffer when parsing a range starting with C<\N{}>
514at the beginning of the character set for the transliteration
515operator. [perl #132245]
516
517=item *
518
519Fixed a leaked SV when parsing an empty C<\N{}> at compile-time.
520[perl #132245]
521
e6a2e5ca
SH
522=back
523
524=head1 Known Problems
525
526XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
527tests that had to be C<TODO>ed for the release would be noted here. Unfixed
528platform specific bugs also go here.
529
530[ List each fix as an =item entry ]
531
532=over 4
77baf8eb
SH
533
534=item *
535
e6a2e5ca 536XXX
834e1dc6 537
a8ba758d
JSA
538=back
539
e6a2e5ca
SH
540=head1 Errata From Previous Releases
541
542=over 4
8abafd33 543
e6a2e5ca
SH
544=item *
545
546XXX Add anything here that we forgot to add, or were mistaken about, in
547the perldelta of a previous release.
8abafd33 548
e6a2e5ca 549=back
b2e49ab9 550
e6a2e5ca 551=head1 Obituary
b2e49ab9 552
e6a2e5ca
SH
553XXX If any significant core contributor has died, we've added a short obituary
554here.
b2e49ab9 555
e6a2e5ca 556=head1 Acknowledgements
b2e49ab9 557
e6a2e5ca 558XXX Generate this with:
b2e49ab9 559
cab780cc 560 perl Porting/acknowledgements.pl v5.27.5..HEAD
f5b73711 561
44691e6f
AB
562=head1 Reporting Bugs
563
b5cbfe35
S
564If you find what you think is a bug, you might check the perl bug database
565at L<https://rt.perl.org/> . There may also be information at
566L<http://www.perl.org/> , the Perl Home Page.
44691e6f 567
e08634c5
SH
568If you believe you have an unreported bug, please run the L<perlbug> program
569included with your release. Be sure to trim your bug down to a tiny but
570sufficient test case. Your bug report, along with the output of C<perl -V>,
b5cbfe35 571will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
44691e6f 572
87c118b9
DM
573If the bug you are reporting has security implications which make it
574inappropriate to send to a publicly archived mailing list, then see
c0ea3294
SH
575L<perlsec/SECURITY VULNERABILITY CONTACT INFORMATION>
576for details of how to report the issue.
44691e6f 577
390ae6f9
S
578=head1 Give Thanks
579
580If you wish to thank the Perl 5 Porters for the work we had done in Perl 5,
581you can do so by running the C<perlthanks> program:
582
583 perlthanks
584
585This will send an email to the Perl 5 Porters list with your show of thanks.
586
44691e6f
AB
587=head1 SEE ALSO
588
e08634c5
SH
589The F<Changes> file for an explanation of how to view exhaustive details on
590what changed.
44691e6f
AB
591
592The F<INSTALL> file for how to build Perl.
593
594The F<README> file for general stuff.
595
596The F<Artistic> and F<Copying> files for copyright information.
597
598=cut