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