This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta for b4fa55d and 0ddd4a5
[perl5.git] / pod / perldelta.pod
CommitLineData
44691e6f
AB
1=encoding utf8
2
3=head1 NAME
4
39c4a6cf
PM
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.4
c68523cb 9
238894db 10=head1 DESCRIPTION
c68523cb 11
39c4a6cf 12This document describes differences between the 5.21.3 release and the 5.21.4
238894db 13release.
c68523cb 14
39c4a6cf
PM
15If you are upgrading from an earlier release such as 5.21.2, first read
16L<perl5213delta>, which describes differences between 5.21.2 and 5.21.3.
7065301c 17
39c4a6cf 18=head1 Notice
7e957246 19
39c4a6cf 20XXX Any important notices here
7e957246 21
39c4a6cf 22=head1 Core Enhancements
f88f10f5 23
39c4a6cf
PM
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.
21f3b41e 27
39c4a6cf 28[ List each enhancement as a =head2 entry ]
f88f10f5 29
5b319db8
JH
30=head2 Infinity and NaN (not-a-number) handling improved
31
32Floating point values are able to hold the special values infinity
33(also -infinity), and NaN (not-a-number). Now we more robustly recognize
34and propagate the value in computations, and on output normalize them
35to C<Inf> and C<NaN>.
36
019bf663 37See also the L<POSIX> enhancements.
5b319db8 38
0346c3a9 39=head1 Security
7e957246 40
39c4a6cf
PM
41XXX Any security-related notices go here. In particular, any security
42vulnerabilities closed should be noted here rather than in the
43L</Selected Bug Fixes> section.
13900f93 44
39c4a6cf 45[ List each security issue as a =head2 entry ]
8bdb3f93 46
13900f93 47=head1 Incompatible Changes
8bdb3f93 48
39c4a6cf 49XXX For a release on a stable branch, this section aspires to be:
1178d2cf 50
39c4a6cf
PM
51 There are no changes intentionally incompatible with 5.XXX.XXX
52 If any exist, they are bugs, and we request that you submit a
53 report. See L</Reporting Bugs> below.
1178d2cf 54
39c4a6cf 55[ List each incompatible change as a =head2 entry ]
f6f3144e 56
2b03450b
FC
57=head2 Changes to the C<*> prototype
58
59The C<*> character in a subroutine's prototype used to allow barewords
60to take precedence over most, but not all subroutines. It was never
61consistent and exhibited buggy behaviour.
62
63Now it has been changed, so subroutines always take precedence over
64barewords, which brings it into conformity with similarly prototyped
65built-in functions:
66
67 sub splat($) { ... }
68 sub foo { ... }
69 splat(foo); # now always splat(foo())
70 splat(bar); # still splat('bar') as before
71 close(foo); # close(foo())
72 close(bar); # close('bar')
73
39c4a6cf 74=head1 Deprecations
7065301c 75
39c4a6cf 76XXX Any deprecated features, syntax, modules etc. should be listed here.
7065301c 77
39c4a6cf 78=head2 Module removals
b3e82ed1 79
39c4a6cf 80XXX Remove this section if inapplicable.
ca58223b 81
39c4a6cf
PM
82The following modules will be removed from the core distribution in a
83future release, and will at that time need to be installed from CPAN.
84Distributions on CPAN which require these modules will need to list them as
85prerequisites.
ca58223b 86
39c4a6cf
PM
87The core versions of these modules will now issue C<"deprecated">-category
88warnings to alert you to this fact. To silence these deprecation warnings,
89install the modules in question from CPAN.
23b03637 90
39c4a6cf
PM
91Note that these are (with rare exceptions) fine modules that you are encouraged
92to continue to use. Their disinclusion from core primarily hinges on their
93necessity to bootstrapping a fully functional, CPAN-capable Perl installation,
94not usually on concerns over their design.
23b03637 95
39c4a6cf 96=over
85e8fb10 97
39c4a6cf 98=item XXX
85e8fb10 99
39c4a6cf
PM
100XXX Note that deprecated modules should be listed here even if they are listed
101as an updated module in the L</Modules and Pragmata> section.
134f90c2 102
39c4a6cf 103=back
134f90c2 104
39c4a6cf 105[ List each other deprecation as a =head2 entry ]
ff433f2d 106
39c4a6cf 107=head1 Performance Enhancements
ff433f2d 108
39c4a6cf
PM
109XXX Changes which enhance performance without changing behaviour go here.
110There may well be none in a stable release.
134f90c2 111
39c4a6cf 112[ List each enhancement as a =item entry ]
134f90c2 113
39c4a6cf 114=over 4
7d19f6a1 115
7d19f6a1
PM
116=item *
117
4f81ab9c
FC
118Subroutines with an empty prototype and bodies containing just C<undef> are
119now eligible for inlining. [perl #122728]
55e8b286 120
39c4a6cf 121=back
55e8b286 122
39c4a6cf 123=head1 Modules and Pragmata
d99849ae 124
39c4a6cf
PM
125XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
126go here. If Module::CoreList is updated, generate an initial draft of the
127following sections using F<Porting/corelist-perldelta.pl>. A paragraph summary
128for important changes should then be added by hand. In an ideal world,
129dual-life modules would have a F<Changes> file that could be cribbed.
d99849ae 130
39c4a6cf 131[ Within each section, list entries as a =item entry ]
ff433f2d 132
39c4a6cf 133=head2 New Modules and Pragmata
ff433f2d 134
39c4a6cf 135=over 4
ff433f2d
PM
136
137=item *
138
39c4a6cf 139XXX
0bb39c26 140
39c4a6cf 141=back
0bb39c26 142
39c4a6cf 143=head2 Updated Modules and Pragmata
9c97a342 144
39c4a6cf 145=over 4
d99849ae
PM
146
147=item *
148
39c4a6cf 149L<XXX> has been upgraded from version A.xx to B.yy.
6ab3666b 150
233a4069
JK
151=item *
152
d0ab07ee
JK
153L<B::Concise> has been upgraded from version 0.992 to 0.993.
154
608e531f
SH
155=item *
156
157L<CPAN::Meta::Requirements> has been upgraded from version 2.126 to 2.128.
74d5bfab
AS
158
159=item *
160
161L<ExtUtils::CBuilder> has been upgraded from version 0.280216 to 0.280219.
162[perl #122675].
163
d0ab07ee
JK
164=item *
165
39091b75
JK
166L<ExtUtils::Manifest> has been upgraded from version 1.65 to 1.66.
167[perl #122415].
168
169=item *
170
ecd53122
JK
171L<ExtUtils::ParseXS>: Documentation has been added to
172F<ExtUtils-ParseXS/lib/perlxs.pod> concerning handling of locales when writing
173XS code.
174
175=item *
176
9eace98c
JK
177L<File::Find> has been upgraded from version 1.27 to 1.28.
178
179C<find()> and C<finddepth()> will now warn if passed inappropriate or
180misspelled options.
181
182=item *
183
184L<Getopt::Std> has been upgraded from version 1.10 to 1.11.
185
186=item *
187
d0ab07ee
JK
188L<HTTP::Tiny> has been upgraded from version 0.047 to 0.048.
189
190=item *
191
192L<Module::CoreList> has been upgraded from version 5.021003 to 5.021004.
193
194=item *
195
196L<POSIX> has been upgraded from version 1.42 to 1.43.
197
5b319db8
JH
198The C99 math functions and constants (for example acosh, round,
199M_E, M_PI) have been added.
200
d0ab07ee
JK
201=item *
202
203L<Pod::Perldoc> has been upgraded from version 3.23 to 3.24.
204
205=item *
206
46274848
SH
207Scalar-List-Utils has been upgraded from version 1.40 to 1.41.
208
209=item *
210
d0ab07ee
JK
211L<constant> has been upgraded from version 1.31 to 1.32.
212
bfc60ea2
FC
213It now accepts fully-qualified constant names, allowing constants to be
214defined in packages other than the caller.
215
d0ab07ee
JK
216=item *
217
218L<threads> has been upgraded from version 1.95 to 1.96.
219
39c4a6cf 220=back
9c97a342 221
39c4a6cf 222=head2 Removed Modules and Pragmata
d99849ae 223
39c4a6cf 224=over 4
d99849ae 225
ff433f2d
PM
226=item *
227
39c4a6cf 228XXX
ff433f2d 229
13900f93 230=back
aac7f82f 231
13900f93 232=head1 Documentation
aac7f82f 233
39c4a6cf
PM
234XXX Changes to files in F<pod/> go here. Consider grouping entries by
235file and be sure to link to the appropriate page, e.g. L<perlfunc>.
6d9b7c7c 236
39c4a6cf 237=head2 New Documentation
2a395b86 238
39c4a6cf 239XXX Changes which create B<new> files in F<pod/> go here.
2a395b86 240
39c4a6cf 241=head3 L<XXX>
2a395b86 242
39c4a6cf 243XXX Description of the purpose of the new file here
2a395b86 244
39c4a6cf 245=head2 Changes to Existing Documentation
2a395b86 246
39c4a6cf
PM
247XXX Changes which significantly change existing files in F<pod/> go here.
248However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
249section.
250
251=head3 L<XXX>
2a395b86
PM
252
253=over 4
254
255=item *
256
39c4a6cf 257XXX Description of the change here
2a395b86 258
12d22d1f
JK
259=item *
260
261L<perlsyn>: An ambiguity in the documentation of the Ellipsis statement has
262been corrected. [perl #122661]
263
2a395b86
PM
264=back
265
39c4a6cf 266=head1 Diagnostics
2a395b86 267
39c4a6cf
PM
268The following additions or changes have been made to diagnostic output,
269including warnings and fatal error messages. For the complete list of
270diagnostic messages, see L<perldiag>.
2a395b86 271
39c4a6cf
PM
272XXX New or changed warnings emitted by the core's C<C> code go here. Also
273include any changes in L<perldiag> that reconcile it to the C<C> code.
2a395b86 274
39c4a6cf 275=head2 New Diagnostics
0f4a583b 276
39c4a6cf
PM
277XXX Newly added diagnostic messages go under here, separated into New Errors
278and New Warnings
2a395b86 279
39c4a6cf 280=head3 New Errors
2a395b86
PM
281
282=over 4
283
284=item *
285
39c4a6cf 286XXX L<message|perldiag/"message">
2a395b86
PM
287
288=back
289
39c4a6cf 290=head3 New Warnings
2a395b86
PM
291
292=over 4
293
294=item *
295
39c4a6cf 296XXX L<message|perldiag/"message">
2a395b86
PM
297
298=back
6d9b7c7c 299
39c4a6cf
PM
300=head2 Changes to Existing Diagnostics
301
302XXX Changes (i.e. rewording) of diagnostic messages go here
7f55cec0 303
13900f93 304=over 4
7f55cec0
SH
305
306=item *
307
39c4a6cf 308XXX Describe change here
aac7f82f 309
13900f93 310=back
aac7f82f 311
363d3025
FC
312=head2 Diagnostic Removals
313
314=over 4
315
316=item *
317
334464b3
FC
318"Constant is not a FOO reference"
319
320Compile-time checking of constant dereferencing (e.g.,
321C<< my_constant->() >>) has been removed, since it was not taking
322overloading into account. [perl #69456] [perl #122607]
323
324=item *
325
363d3025
FC
326The warning "Ambiguous use of -foo resolved as -&foo()" has been removed.
327There is actually no ambiguity here, and this impedes the use of negated
328constants; e.g., C<-Inf>.
329
ef5a9509
FC
330=item *
331
332The little-known C<my Class $var> syntax (see L<fields> and L<attributes>)
333could get confused in the scope of C<use utf8> if C<Class> were a constant
334whose value contained Latin-1 characters.
335
363d3025
FC
336=back
337
39c4a6cf 338=head1 Utility Changes
091fed7c 339
39c4a6cf
PM
340XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go here.
341Most of these are built within the directory F<utils>.
902c1f75 342
39c4a6cf
PM
343[ List utility changes as a =head2 entry for each utility and =item
344entries for each change
345Use L<XXX> with program names to get proper documentation linking. ]
2901561d 346
39c4a6cf 347=head2 L<XXX>
4594cf53 348
13900f93 349=over 4
96dcbc37
DD
350
351=item *
352
39c4a6cf 353XXX
a1d26ccd 354
39c4a6cf 355=back
a1d26ccd 356
39c4a6cf 357=head1 Configuration and Compilation
7065301c 358
39c4a6cf
PM
359XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
360go here. Any other changes to the Perl build process should be listed here.
361However, any platform-specific changes should be listed in the
362L</Platform Support> section, instead.
58f25ac1 363
39c4a6cf 364[ List changes as a =item entry ].
13900f93
A
365
366=over 4
58f25ac1
MH
367
368=item *
369
39c4a6cf 370XXX
a5873648 371
39c4a6cf 372=back
a5873648 373
39c4a6cf 374=head1 Testing
a5873648 375
39c4a6cf
PM
376XXX Any significant changes to the testing of a freshly built perl should be
377listed here. Changes which create B<new> files in F<t/> go here as do any
378large changes to the testing harness (e.g. when parallel testing was added).
379Changes to existing files in F<t/> aren't worth summarizing, although the bugs
380that they represent may be covered elsewhere.
a5873648 381
39c4a6cf 382[ List each test improvement as a =item entry ]
a5873648 383
39c4a6cf 384=over 4
a5873648
PM
385
386=item *
387
39c4a6cf 388XXX
a5873648 389
58f25ac1
MH
390=back
391
39c4a6cf 392=head1 Platform Support
b10906fb 393
39c4a6cf 394XXX Any changes to platform support should be listed in the sections below.
b10906fb 395
39c4a6cf
PM
396[ Within the sections, list each platform as a =item entry with specific
397changes as paragraphs below it. ]
b10906fb 398
39c4a6cf 399=head2 New Platforms
b10906fb 400
39c4a6cf
PM
401XXX List any platforms that this version of perl compiles on, that previous
402versions did not. These will either be enabled by new files in the F<hints/>
403directories, or new subdirectories and F<README> files at the top level of the
404source tree.
13900f93 405
7065301c 406=over 4
24a38d90 407
39c4a6cf 408=item XXX-some-platform
24a38d90 409
39c4a6cf 410XXX
bb076206 411
7065301c
RS
412=back
413
39c4a6cf 414=head2 Discontinued Platforms
097675bf 415
39c4a6cf 416XXX List any platforms that this version of perl no longer compiles on.
b3211734 417
6e97d65d 418=over 4
b3211734 419
39c4a6cf 420=item XXX-some-platform
7065301c 421
39c4a6cf 422XXX
13900f93 423
39c4a6cf 424=back
7d0ccdba 425
39c4a6cf 426=head2 Platform-Specific Notes
7d0ccdba 427
39c4a6cf
PM
428XXX List any changes for specific platforms. This could include configuration
429and compilation changes or changes in portability/compatibility. However,
430changes within modules for platforms should generally be listed in the
431L</Modules and Pragmata> section.
6e97d65d 432
39c4a6cf 433=over 4
6e97d65d 434
39c4a6cf 435=item XXX-some-platform
6e97d65d 436
39c4a6cf 437XXX
7d0ccdba 438
7065301c
RS
439=back
440
441=head1 Internal Changes
442
39c4a6cf
PM
443XXX Changes which affect the interface available to C<XS> code go here. Other
444significant internal changes for future core maintainers should be noted as
445well.
c9fcb674 446
39c4a6cf 447[ List each change as a =item entry ]
a835cd47 448
39c4a6cf 449=over 4
c1284011 450
cd949807
FC
451C<save_re_context> no longer does anything and has been moved to
452F<mathoms.c>.
1c43698b 453
6d9b7c7c 454=back
c1284011 455
6d9b7c7c 456=head1 Selected Bug Fixes
375f5f06 457
39c4a6cf
PM
458XXX Important bug fixes in the core language are summarized here. Bug fixes in
459files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>.
460
461[ List each fix as a =item entry ]
462
0346c3a9 463=over 4
375f5f06 464
2884baee
MH
465=item *
466
39c4a6cf 467XXX
2884baee 468
0aa1826c
FC
469=item *
470
6f1a844b
FC
471Constant dereferencing now works correctly for typeglob constants.
472Previously the glob was stringified and its name looked up. Now the glob
473itself is used. [perl #69456]
474
549ea8d4
FC
475=item *
476
477When parsing a funny character ($ @ % &) followed by braces, the parser no
478longer tries to guess whether it is a block or a hash constructor (causing
479a syntax error when it guesses the latter), since it can only be a block.
480
be0006e0
FC
481=item *
482
483C<undef $reference> now frees the referent immediately, instead of hanging
484on to it until the next statement. [perl #122556]
485
1699f5c2
FC
486=item *
487
488Various cases where the name of a sub is used (autoload, overloading, error
489messages) used to crash for lexical subs, but have been fixed.
490
7e8b2071
FC
491=item *
492
493Bareword lookup now tries to avoid vivifying packages if it turns out the
494bareword is not going to be a subroutine name.
495
f9acf899
FC
496=item *
497
498Compilation of anonymous constants (e.g., C<sub () { 3 }>) no longer
499deletes any subroutine named C<__ANON__> in the current package. Not only
500was C<*__ANON__{CODE}> cleared, but there was a memory leak, too. This bug
501goes back to perl 5.8.0.
502
fd26b6f0
FC
503=item *
504
505Stub declarations like C<sub f;> and C<sub f ();> no longer wipe out
506constants of the same name declared by C<use constant>. This bug was
507introduced in perl 5.10.0.
508
499333dc
KW
509=item *
510
511Under some conditions a warning raised in compilation of regular
512expression patterns could be displayed multiple times. This is now
513fixed.
514
8f0cd35a
KW
515=item *
516
517C<qr/[\N{named sequence}]/> now works properly in many instances. Some
518names known to C<\N{...}> refer to a sequence of multiple characters,
519instead of the usual single character. Bracketed character classes
520generally only match single characters, but now special handling has
521been added so that they can match named sequences, but not if the class
522is inverted or the sequence is specified as the beginning or end of a
523range. In these cases, the only behavior change from before is a slight
524rewording of the fatal error message given when this class is part of a
525C<?[...])> construct. When the C<[...]> stands alone, the same
526non-fatal warning as before is raised, and only the first character in
527the sequence is used, again just as before.
528
aa292ef2
FC
529=item *
530
531Tainted constants evaluated at compile time no longer cause unrelated
532statements to become tainted. [perl #122669]
533
739e9bee
FC
534=item *
535
536C<open $$fh, ...>, which vivifies a handle with a name like "main::_GEN_0",
537was not giving the handle the right reference count, so a double free could
538happen.
539
b23b2fdb
FC
540=item *
541
542When deciding that a bareword was a method name, the parser would get
543confused if an "our" sub with the same name existed, and look up the method
544in the package of the "our" sub, instead of the package of the invocant.
545
7d15b1a8
FC
546=item *
547
548The parser no longer gets confused by C<\U=> within a double-quoted string.
549It used to roduce a syntax error, but now compiles it correctly.
550[perl #80368]
551
bbca64cf
KW
552=item *
553
554It has always been the intention for the C<-B> and C<-T> file test
555operators to treat UTF-8 encoded files as text.
556(L<perlfunc|perlfunc/-X FILEHANDLE> has been updated to say this.)
557Previously, it was possible for some files to be considered UTF-8 that
558actually weren't valid UTF-8. This is now fixed. The operators now
559work on EBCDIC platforms as well.
560
0064f8cc
KW
561=item *
562
563Under some conditions warning messages raised during regular expression
564pattern compilation were being output more than once. This has now been
565fixed.
566
6ff8f256
KW
567=item *
568
569A regression has been fixed that was introduced in v5.20.0 (fixed in
570v5.20.1 as well as here) in which a UTF-8 encoded regular expression
571pattern that contains a single ASCII lowercase letter does not match its
572uppercase counterpart. [perl #122655]
573
80cc3290
FC
574=item *
575
576Constant folding could incorrectly suppress warnings if lexical warnings
577(C<use warnings> or C<no warnings>) were not in effect and C<$^W> were
578false at compile time and true at run time.
579
13dd5671
FC
580=item *
581
582Loading UTF8 tables during a regular expression match could cause assertion
583failures under debugging builds if the previous match used the very same
584regular expression. [perl #122747]
585
39c4a6cf 586=back
b756670b 587
39c4a6cf 588=head1 Known Problems
b756670b 589
39c4a6cf
PM
590XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
591tests that had to be C<TODO>ed for the release would be noted here. Unfixed
592platform specific bugs also go here.
e917e94e 593
39c4a6cf
PM
594[ List each fix as a =item entry ]
595
596=over 4
e917e94e 597
26dd5fd6
PM
598=item *
599
39c4a6cf 600XXX
26dd5fd6 601
13900f93
A
602=back
603
39c4a6cf 604=head1 Errata From Previous Releases
e831f11a 605
39c4a6cf
PM
606=over 4
607
608=item *
ff433f2d 609
39c4a6cf
PM
610XXX Add anything here that we forgot to add, or were mistaken about, in
611the perldelta of a previous release.
ff433f2d 612
39c4a6cf
PM
613=back
614
615=head1 Obituary
ff433f2d 616
39c4a6cf
PM
617XXX If any significant core contributor has died, we've added a short obituary
618here.
ff433f2d 619
39c4a6cf 620=head1 Acknowledgements
ff433f2d 621
39c4a6cf 622XXX Generate this with:
e831f11a 623
39c4a6cf 624 perl Porting/acknowledgements.pl v5.21.3..HEAD
f5b73711 625
44691e6f
AB
626=head1 Reporting Bugs
627
e08634c5
SH
628If you find what you think is a bug, you might check the articles recently
629posted to the comp.lang.perl.misc newsgroup and the perl bug database at
238894db 630https://rt.perl.org/ . There may also be information at
7ef8b31d 631http://www.perl.org/ , the Perl Home Page.
44691e6f 632
e08634c5
SH
633If you believe you have an unreported bug, please run the L<perlbug> program
634included with your release. Be sure to trim your bug down to a tiny but
635sufficient test case. Your bug report, along with the output of C<perl -V>,
636will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
44691e6f
AB
637
638If the bug you are reporting has security implications, which make it
e08634c5
SH
639inappropriate to send to a publicly archived mailing list, then please send it
640to perl5-security-report@perl.org. This points to a closed subscription
641unarchived mailing list, which includes all the core committers, who will be
642able to help assess the impact of issues, figure out a resolution, and help
f9001595 643co-ordinate the release of patches to mitigate or fix the problem across all
e08634c5
SH
644platforms on which Perl is supported. Please only use this address for
645security issues in the Perl core, not for modules independently distributed on
646CPAN.
44691e6f
AB
647
648=head1 SEE ALSO
649
e08634c5
SH
650The F<Changes> file for an explanation of how to view exhaustive details on
651what changed.
44691e6f
AB
652
653The F<INSTALL> file for how to build Perl.
654
655The F<README> file for general stuff.
656
657The F<Artistic> and F<Copying> files for copyright information.
658
659=cut