This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #123554] avoid a crash from SvGROW(MEM_SIZE_MAX)
[perl5.git] / pod / perldelta.pod
CommitLineData
44691e6f
AB
1=encoding utf8
2
3=head1 NAME
4
b5d4d3b9
MM
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.21.8
c68523cb 9
238894db 10=head1 DESCRIPTION
c68523cb 11
b5d4d3b9 12This document describes differences between the 5.21.7 release and the 5.21.8
238894db 13release.
c68523cb 14
b5d4d3b9
MM
15If you are upgrading from an earlier release such as 5.21.6, first read
16L<perl5217delta>, which describes differences between 5.21.6 and 5.21.7.
2ec11c70 17
b5d4d3b9 18=head1 Notice
2ec11c70 19
b5d4d3b9 20XXX Any important notices here
67f2cc75 21
b5d4d3b9 22=head1 Core Enhancements
67f2cc75 23
b5d4d3b9
MM
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.
67f2cc75 27
b5d4d3b9 28[ List each enhancement as a =head2 entry ]
295f7815 29
ea5519d6
AB
30=head2 The warnings pragma now supports warnings outside of "all"
31
32Ever since perl v5.6.0 we've had no way of adding new warnings without
33retroactively adding them to all existing programs that used C<-w>,
34C<-W> or C<use warnings>.
35
36This caused us to not add new useful warnings out of fear that they
37might unduly burden users who just wanted to upgrade perl and didn't
38want to deal with a bunch of warnings from their existing code.
39
40We now support a way to have our cake and eat it too, and can add new
41warnings to the core going forward through other top-level warning
42categories. See L<the warnings documentation|warnings/Top-level
43warning categories & associated confusion> for details.
44
25941dca
MH
45=head2 Non-Capturing Regular Expression Flag
46
47Regular expressions now support a C</n> flag that disables capturing
48and filling in C<$1>, C<$2>, etc... inside of groups:
49
50 "hello" =~ /(hi|hello)/n; # $1 is not set
51
52This is equivalent to putting C<?:> at the beginning of every capturing group.
53
54See L<perlre/"n"> for more information.
55
ea13b07e
FC
56=head2 C<prototype> with no arguments
57
58C<prototype()> with no arguments now infers C<$_>. [perl #123514]
59
67cdf558
KW
60=head2 C<use re 'strict'>
61
62This applies stricter syntax rules to regular expression patterns
63compiled within its scope, which hopefully will alert you to typos and
64other unintentional behavior that backwards-compatibility issues prevent
65us from doing in normal regular expression compilations. Because the
66behavior of this is subject to change in future Perl releases as we gain
67experience, using this pragma will raise a category
68C<experimental:re_strict> warning.
69See L<'strict' in re|re/'strict' mode>.
70
b5d4d3b9 71=head1 Security
3f22ed99 72
b5d4d3b9
MM
73XXX Any security-related notices go here. In particular, any security
74vulnerabilities closed should be noted here rather than in the
75L</Selected Bug Fixes> section.
3f22ed99 76
b5d4d3b9 77[ List each security issue as a =head2 entry ]
aafa61ee 78
b5d4d3b9 79=head1 Incompatible Changes
ef8784b7 80
b5d4d3b9 81XXX For a release on a stable branch, this section aspires to be:
ef8784b7 82
b5d4d3b9
MM
83 There are no changes intentionally incompatible with 5.XXX.XXX
84 If any exist, they are bugs, and we request that you submit a
85 report. See L</Reporting Bugs> below.
0a7766ab 86
b5d4d3b9 87[ List each incompatible change as a =head2 entry ]
0a7766ab 88
e46968af
PM
89=head2 sub signatures moved before attributes
90
91The experimental sub signatures feature, as introduced in 5.20, parsed
92signatures after attributes. In this release, the positioning has been
93moved such that signatures occur in exactly the same positioning a
94prototype would be found.
95
4dc623f0 96=head1 Deprecations
5b306eef 97
b5d4d3b9 98XXX Any deprecated features, syntax, modules etc. should be listed here.
c0659f73 99
b5d4d3b9 100=head2 Module removals
c0659f73 101
b5d4d3b9 102XXX Remove this section if inapplicable.
6ed80d55 103
b5d4d3b9
MM
104The following modules will be removed from the core distribution in a
105future release, and will at that time need to be installed from CPAN.
106Distributions on CPAN which require these modules will need to list them as
107prerequisites.
6ed80d55 108
b5d4d3b9
MM
109The core versions of these modules will now issue C<"deprecated">-category
110warnings to alert you to this fact. To silence these deprecation warnings,
111install the modules in question from CPAN.
6ed80d55 112
b5d4d3b9
MM
113Note that these are (with rare exceptions) fine modules that you are encouraged
114to continue to use. Their disinclusion from core primarily hinges on their
115necessity to bootstrapping a fully functional, CPAN-capable Perl installation,
116not usually on concerns over their design.
6ed80d55 117
b5d4d3b9 118=over
bb6a367a 119
b5d4d3b9 120=item XXX
6ed80d55 121
b5d4d3b9
MM
122XXX Note that deprecated modules should be listed here even if they are listed
123as an updated module in the L</Modules and Pragmata> section.
f348c3d8 124
b5d4d3b9 125=back
7635ad4d 126
b5d4d3b9 127[ List each other deprecation as a =head2 entry ]
7635ad4d 128
b5d4d3b9 129=head1 Performance Enhancements
7635ad4d 130
b5d4d3b9
MM
131XXX Changes which enhance performance without changing behaviour go here.
132There may well be none in a stable release.
60dde9d3 133
b5d4d3b9 134[ List each enhancement as a =item entry ]
60dde9d3 135
b5d4d3b9 136=over 4
f348c3d8 137
6ed80d55 138=item *
f348c3d8 139
b5d4d3b9 140XXX
cd3802ac 141
b5d4d3b9 142=back
cd3802ac 143
b5d4d3b9 144=head1 Modules and Pragmata
d6c13051 145
b5d4d3b9
MM
146XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
147go here. If Module::CoreList is updated, generate an initial draft of the
148following sections using F<Porting/corelist-perldelta.pl>. A paragraph summary
149for important changes should then be added by hand. In an ideal world,
150dual-life modules would have a F<Changes> file that could be cribbed.
02a0bddf 151
b5d4d3b9 152[ Within each section, list entries as a =item entry ]
128f4e12 153
b5d4d3b9 154=head2 New Modules and Pragmata
cd3802ac 155
b5d4d3b9 156=over 4
60dde9d3
MM
157
158=item *
159
b5d4d3b9 160XXX
3aba4f3d 161
b5d4d3b9 162=back
af292847 163
b5d4d3b9 164=head2 Updated Modules and Pragmata
190f5bb6 165
b5d4d3b9 166=over 4
b045b8b5
TC
167
168=item *
169
b5d4d3b9 170L<XXX> has been upgraded from version A.xx to B.yy.
190f5bb6 171
a462fa00
DD
172=item *
173
595f54ae
SH
174L<attributes> has been upgraded from version 0.24 to 0.25.
175
176Minor internal change only.
177
178=item *
179
a462fa00
DD
180L<B> has been upgraded from version 1.54 to 1.55.
181
182A bug where, after an ithread creation or psuedofork, special/immortal SVs in
183the child ithread/psuedoprocess did not have the correct class of
184C<B::SPECIAL>, has been fixed.
185
5d42e1d7
FC
186The C<id> and C<outid> PADLIST methods have been added.
187
d2fff9f6
FC
188=item *
189
3d37dc2e
FC
190L<B::Deparse> has been upgraded from version 1.31 to 1.32.
191
192Deparsing C<BEGIN { undef &foo }> with the B<-w> switch enabled started to
193emit 'uninitialized' warnings in Perl 5.14. This has been fixed.
194
bba618d2
FC
195Deparsing calls to subs with a C<(;+)> prototype resulted in an infinite
196loop. The C<(;$>) C<(_)> and C<(;_)> prototypes were given the wrong
197precedence, causing C<foo($a<$b)> to be deparsed without the parentheses.
198
3d37dc2e
FC
199=item *
200
c196824d
TC
201L<File::Glob> has been upgraded from version 1.23 to 1.24.
202
203Avoid SvIV() expanding to call get_sv() three times in a few
204places. [perl #123606]
205
206=item *
207
d676fe86
JK
208L<Module::Metadata> has been upgraded from version 1.000025 to 1.000026.
209
210=item *
211
d2fff9f6
FC
212L<Safe> has been upgraded from version 2.38 to 2.39.
213
214C<reval> was not propagating void context properly.
215
e329daf3
TC
216=item *
217
218L<SDBM_File> has been upgraded from version 1.12 to 1.13.
219
220Simplified the build process. [perl #123413]
221
b5d4d3b9 222=back
ba31029d 223
b5d4d3b9 224=head2 Removed Modules and Pragmata
b045b8b5 225
b5d4d3b9 226=over 4
aa67537d 227
4c7a0d98
DD
228=item *
229
b5d4d3b9 230XXX
4c7a0d98 231
b5d4d3b9 232=back
4c7a0d98 233
b5d4d3b9 234=head1 Documentation
f4eedc6b 235
b5d4d3b9
MM
236XXX Changes to files in F<pod/> go here. Consider grouping entries by
237file and be sure to link to the appropriate page, e.g. L<perlfunc>.
f4eedc6b 238
b5d4d3b9 239=head2 New Documentation
6ed80d55 240
b5d4d3b9 241XXX Changes which create B<new> files in F<pod/> go here.
f348c3d8 242
b5d4d3b9 243=head3 L<XXX>
f348c3d8 244
b5d4d3b9 245XXX Description of the purpose of the new file here
f348c3d8 246
b5d4d3b9 247=head2 Changes to Existing Documentation
f348c3d8 248
b5d4d3b9
MM
249XXX Changes which significantly change existing files in F<pod/> go here.
250However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
251section.
f348c3d8 252
b5d4d3b9 253=head3 L<XXX>
f348c3d8 254
b5d4d3b9 255=over 4
6ed80d55 256
60dde9d3 257=item *
f348c3d8 258
b5d4d3b9 259XXX Description of the change here
4dc623f0 260
b5d4d3b9 261=back
84d03adf 262
b5d4d3b9 263=head1 Diagnostics
ff433f2d 264
b5d4d3b9
MM
265The following additions or changes have been made to diagnostic output,
266including warnings and fatal error messages. For the complete list of
267diagnostic messages, see L<perldiag>.
4cd408ba 268
b5d4d3b9
MM
269XXX New or changed warnings emitted by the core's C<C> code go here. Also
270include any changes in L<perldiag> that reconcile it to the C<C> code.
6ed80d55 271
b5d4d3b9 272=head2 New Diagnostics
6ed80d55 273
b5d4d3b9
MM
274XXX Newly added diagnostic messages go under here, separated into New Errors
275and New Warnings
6ed80d55 276
b5d4d3b9 277=head3 New Errors
f348c3d8 278
b5d4d3b9 279=over 4
ab0b796c 280
60dde9d3 281=item *
8c6180a9 282
b5d4d3b9 283XXX L<message|perldiag/"message">
8c6180a9 284
b5d4d3b9 285=back
0561e60b 286
b5d4d3b9 287=head3 New Warnings
dd200dff 288
b5d4d3b9 289=over 4
dd200dff 290
73e793fc
FC
291=item *
292
b5d4d3b9 293XXX L<message|perldiag/"message">
73e793fc 294
613abc6d
KW
295=item *
296
297L<Wide character (U+%X) in %s|perldiag/"Wide character (U+%X) in %s">
298
b5d4d3b9 299=back
8c6180a9 300
b5d4d3b9 301=head2 Changes to Existing Diagnostics
0561e60b 302
b5d4d3b9 303XXX Changes (i.e. rewording) of diagnostic messages go here
4a328228 304
b5d4d3b9 305=over 4
4cd408ba 306
1861205d
FC
307=item *
308
b5d4d3b9 309XXX Describe change here
1861205d 310
780fcc9f
KW
311The message
312L<Locale '%s' may not work well.%s|perldiag/"Locale '%s' may not work well.%s">
313is no longer raised unless the problemtatic locale is actually used in
314the Perl program. Previously it was raised if it merely was the
315underlying locale. All Perl programs have an underlying locale at all
316times, but something like a C<S<use locale>> is needed for that locale
317to actually have some effect. This message will not be raised when
318the underlying locale is hidden.
319
b5d4d3b9 320=back
40a81b59 321
b5d4d3b9 322=head1 Utility Changes
2a395b86 323
b5d4d3b9
MM
324XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go here.
325Most of these are built within the directory F<utils>.
2a395b86 326
b5d4d3b9
MM
327[ List utility changes as a =head2 entry for each utility and =item
328entries for each change
329Use L<XXX> with program names to get proper documentation linking. ]
12d22d1f 330
b5d4d3b9 331=head2 L<XXX>
2a395b86 332
b5d4d3b9 333=over 4
2a395b86
PM
334
335=item *
336
b5d4d3b9 337XXX
bb8c7e27 338
b5d4d3b9 339=back
bb8c7e27 340
b5d4d3b9 341=head1 Configuration and Compilation
bb8c7e27 342
b5d4d3b9
MM
343XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
344go here. Any other changes to the Perl build process should be listed here.
345However, any platform-specific changes should be listed in the
346L</Platform Support> section, instead.
aa292ef2 347
b5d4d3b9 348[ List changes as a =item entry ].
83b69bfd 349
b5d4d3b9 350=over 4
83b69bfd
DD
351
352=item *
353
b5d4d3b9 354XXX
13adb056 355
b5d4d3b9 356=back
391823f2 357
b5d4d3b9 358=head1 Testing
6ff8f256 359
b5d4d3b9
MM
360XXX Any significant changes to the testing of a freshly built perl should be
361listed here. Changes which create B<new> files in F<t/> go here as do any
362large changes to the testing harness (e.g. when parallel testing was added).
363Changes to existing files in F<t/> aren't worth summarizing, although the bugs
364that they represent may be covered elsewhere.
80cc3290 365
b5d4d3b9 366[ List each test improvement as a =item entry ]
60dde9d3 367
b5d4d3b9 368=over 4
db98db4e 369
8818afe8
TC
370=item *
371
b5d4d3b9 372XXX
9d22ccf6 373
b5d4d3b9 374=back
480961b6 375
b5d4d3b9 376=head1 Platform Support
480961b6 377
b5d4d3b9 378XXX Any changes to platform support should be listed in the sections below.
94c9bf90 379
b5d4d3b9
MM
380[ Within the sections, list each platform as a =item entry with specific
381changes as paragraphs below it. ]
94c9bf90 382
b5d4d3b9 383=head2 New Platforms
8af808bf 384
b5d4d3b9
MM
385XXX List any platforms that this version of perl compiles on, that previous
386versions did not. These will either be enabled by new files in the F<hints/>
387directories, or new subdirectories and F<README> files at the top level of the
388source tree.
8af808bf 389
b5d4d3b9 390=over 4
fdcaecb7 391
b5d4d3b9 392=item XXX-some-platform
fdcaecb7 393
b5d4d3b9 394XXX
2af7c6b6 395
4dc623f0 396=back
2af7c6b6 397
b5d4d3b9 398=head2 Discontinued Platforms
60dde9d3 399
b5d4d3b9 400XXX List any platforms that this version of perl no longer compiles on.
c0b32823 401
4dc623f0 402=over 4
b1a4e8b3 403
b5d4d3b9 404=item XXX-some-platform
b1a4e8b3 405
b5d4d3b9 406XXX
9e26817d 407
4dc623f0 408=back
9e26817d 409
4dc623f0 410=head2 Platform-Specific Notes
70cee83f 411
b5d4d3b9
MM
412XXX List any changes for specific platforms. This could include configuration
413and compilation changes or changes in portability/compatibility. However,
414changes within modules for platforms should generally be listed in the
415L</Modules and Pragmata> section.
70cee83f 416
b5d4d3b9 417=over 4
e5fbfbc1 418
b4045391 419=item Win32
e5fbfbc1 420
b4045391
DD
421=over 4
422
423=item *
424
425Previously, on Visual C++ for Win64 built Perls only, when compiling every Perl
426XS module (including CPAN ones) and Perl aware .c file with a 64 bit Visual C++,
427would uncondtionally have around a dozen warnings from hv_func.h. These
428warnings have been silenced. GCC all bitness and Visual C++ for Win32 were
429not affected.
430
8c847e66
SH
431=item *
432
433Support for building without PerlIO has been removed from the Windows
434makefiles. Non-PerlIO builds were all but deprecated in Perl 5.18.0 and are
435already not supported by F<Configure> on POSIX systems.
436
d345f487
DD
437=item *
438
439Between 2 and 6 ms and 7 I/O calls have been saved per attempt to open a perl
440module for each path in C<@INC>.
441
b4045391 442=back
353075a0 443
4dc623f0 444=back
353075a0 445
4dc623f0 446=head1 Internal Changes
9f122eef 447
b5d4d3b9
MM
448XXX Changes which affect the interface available to C<XS> code go here. Other
449significant internal changes for future core maintainers should be noted as
450well.
bd2aa467 451
b5d4d3b9 452[ List each change as a =item entry ]
2ec11c70 453
b5d4d3b9 454=over 4
2ec11c70
DM
455
456=item *
457
2683609f
YO
458Added Perl_sv_get_backrefs() to determine if an SV is a weak-referent.
459
460Function either returns an SV * of type AV, which contains the set of
461weakreferences which reference the passed in SV, or a simple RV * which
462is the only weakref to this item.
463
464=item *
465
819b139d
DD
466C<gv_add_by_type> which was added to public API in 5.11.0 but undocumented and
467shows no CPAN usage has been removed from public API. Please use public API
468C<GvSVn> C<GvIOn> C<GvAVn> and C<GvHVn> for adding elements to a GV.
469
470=item *
471
472C<GvSVn> C<GvIOn> C<GvAVn> and C<GvHVn> have been made rvalues, previously they
473were lvalues. If you are assigning a SV to C<GvSVn> C<GvIOn> C<GvAVn> and
474C<GvHVn> you are leaking memory. If you want an lvalue, use C<GvSV> C<GvIO>
475C<GvAV> and C<GvHV>.
476
477=item *
478
b5d4d3b9 479XXX
2ec11c70 480
4dc623f0 481=back
c7f058f0 482
4dc623f0 483=head1 Selected Bug Fixes
0ef4323a 484
b5d4d3b9
MM
485XXX Important bug fixes in the core language are summarized here. Bug fixes in
486files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>.
279aef25 487
b5d4d3b9 488[ List each fix as a =item entry ]
00ba25b8 489
b5d4d3b9 490=over 4
00ba25b8 491
567291b6
FC
492=item *
493
1a4efbb7
KW
494A bug in regular expression patterns that could lead to segfaults and
495other crashes has been fixed. This occurred only in patterns compiled
496with C<"/i">, while taking into account the current POSIX locale (this usually
497means they have to be compiled within the scope of C<S<"use locale">>),
498and there must be a string of at least 128 consecutive bytes to match.
6471c6b0 499[perl #123539]
fcfb7b86 500
c7fdd20b
FC
501=item *
502
503C<s///> now works on very long strings instead of dying with 'Substitution
504loop'. [perl #103260] [perl #123071]
505
436f6503
FC
506=item *
507
508C<gmtime> no longer crashes with not-a-number values. [perl #123495]
509
f44e0270
FC
510=item *
511
8bfe3865
FC
512C<\()> (reference to an empty list) and C<y///> with lexical $_ in scope
513could do a bad write past the end of the stack. They have been fixed
f44e0270
FC
514to extend the stack first.
515
ea13b07e
FC
516=item *
517
518C<prototype()> with no arguments used to read the previous item on the
519stack, so C<print "foo", prototype()> would print foo's prototype. It has
520been fixed to infer $_ instead. [perl #123514]
521
b65adbec
FC
522=item *
523
524Some cases of lexical state subs inside predeclared subs could crash but no
525longer do.
526
370c71c5
FC
527=item *
528
b94c7836
FC
529Some cases of nested lexical state subs inside anonymous subs could cause
530'Bizarre copy' errors or possibly even crash.
531
532=item *
533
370c71c5
FC
534When trying to emit warnings, perl's default debugger (F<perl5db.pl>) was
535sometimes giving 'Undefined subroutine &DB::db_warn called' instead. This
536bug, which started to occur in Perl 5.18, has been fixed. [perl #123553]
537
439f6100
FC
538=item *
539
540Certain syntax errors in substitutions, such as C<< s/${<>{})// >>, would
541crash, and had done so since Perl 5.10. (In some cases the crash did not
542start happening till 5.16.) The crash has, of course, been fixed.
543[perl #123542]
544
b5d4d3b9 545=back
fcfb7b86 546
b5d4d3b9 547=head1 Known Problems
8bb83ec2 548
b5d4d3b9
MM
549XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
550tests that had to be C<TODO>ed for the release would be noted here. Unfixed
551platform specific bugs also go here.
8bb83ec2 552
b5d4d3b9 553[ List each fix as a =item entry ]
1318b6d7 554
b5d4d3b9 555=over 4
1318b6d7 556
6f67fbfe
FC
557=item *
558
b5d4d3b9 559XXX
070733df 560
b5d4d3b9 561=back
219f8441 562
b5d4d3b9 563=head1 Errata From Previous Releases
219f8441 564
b5d4d3b9 565=over 4
5747f88b 566
61a8c397
FC
567=item *
568
b5d4d3b9
MM
569XXX Add anything here that we forgot to add, or were mistaken about, in
570the perldelta of a previous release.
61a8c397 571
86372193 572=back
bb8c7e27 573
b5d4d3b9 574=head1 Obituary
3a085d00 575
b5d4d3b9
MM
576XXX If any significant core contributor has died, we've added a short obituary
577here.
01d42a22 578
b5d4d3b9 579=head1 Acknowledgements
01d42a22 580
b5d4d3b9 581XXX Generate this with:
01d42a22 582
b5d4d3b9 583 perl Porting/acknowledgements.pl v5.21.7..HEAD
f5b73711 584
44691e6f
AB
585=head1 Reporting Bugs
586
e08634c5
SH
587If you find what you think is a bug, you might check the articles recently
588posted to the comp.lang.perl.misc newsgroup and the perl bug database at
238894db 589https://rt.perl.org/ . There may also be information at
7ef8b31d 590http://www.perl.org/ , the Perl Home Page.
44691e6f 591
e08634c5
SH
592If you believe you have an unreported bug, please run the L<perlbug> program
593included with your release. Be sure to trim your bug down to a tiny but
594sufficient test case. Your bug report, along with the output of C<perl -V>,
595will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
44691e6f
AB
596
597If the bug you are reporting has security implications, which make it
e08634c5
SH
598inappropriate to send to a publicly archived mailing list, then please send it
599to perl5-security-report@perl.org. This points to a closed subscription
600unarchived mailing list, which includes all the core committers, who will be
601able to help assess the impact of issues, figure out a resolution, and help
f9001595 602co-ordinate the release of patches to mitigate or fix the problem across all
e08634c5
SH
603platforms on which Perl is supported. Please only use this address for
604security issues in the Perl core, not for modules independently distributed on
605CPAN.
44691e6f
AB
606
607=head1 SEE ALSO
608
e08634c5
SH
609The F<Changes> file for an explanation of how to view exhaustive details on
610what changed.
44691e6f
AB
611
612The F<INSTALL> file for how to build Perl.
613
614The F<README> file for general stuff.
615
616The F<Artistic> and F<Copying> files for copyright information.
617
618=cut