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