This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta for c4c61c6
[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<CPAN::Meta::Requirements> has been upgraded from version 2.126 to 2.128.
158
159 =item *
160
161 L<ExtUtils::CBuilder> has been upgraded from version 0.280216 to 0.280219.
162 [perl #122675].
163
164 =item *
165
166 L<ExtUtils::Manifest> has been upgraded from version 1.65 to 1.66.
167 [perl #122415].
168
169 =item *
170
171 L<ExtUtils::ParseXS>:  Documentation has been added to
172 F<ExtUtils-ParseXS/lib/perlxs.pod> concerning handling of locales when writing
173 XS code.
174
175 =item *
176
177 L<File::Find> has been upgraded from version 1.27 to 1.28.
178
179 C<find()> and C<finddepth()> will now warn if passed inappropriate or
180 misspelled options.
181
182 =item *
183
184 L<Getopt::Std> has been upgraded from version 1.10 to 1.11.
185
186 =item *
187
188 L<HTTP::Tiny> has been upgraded from version 0.047 to 0.048.
189
190 =item *
191
192 L<Module::CoreList> has been upgraded from version 5.021003 to 5.021004.
193
194 =item *
195
196 L<POSIX> has been upgraded from version 1.42 to 1.43.
197
198 The C99 math functions and constants (for example acosh, round,
199 M_E, M_PI) have been added.
200
201 =item *
202
203 L<Pod::Perldoc> has been upgraded from version 3.23 to 3.24.
204
205 =item *
206
207 Scalar-List-Utils has been upgraded from version 1.40 to 1.41.
208
209 =item *
210
211 L<constant> has been upgraded from version 1.31 to 1.32.
212
213 It now accepts fully-qualified constant names, allowing constants to be
214 defined in packages other than the caller.
215
216 =item *
217
218 L<threads> has been upgraded from version 1.95 to 1.96.
219
220 =back
221
222 =head2 Removed Modules and Pragmata
223
224 =over 4
225
226 =item *
227
228 XXX
229
230 =back
231
232 =head1 Documentation
233
234 XXX Changes to files in F<pod/> go here.  Consider grouping entries by
235 file and be sure to link to the appropriate page, e.g. L<perlfunc>.
236
237 =head2 New Documentation
238
239 XXX Changes which create B<new> files in F<pod/> go here.
240
241 =head3 L<XXX>
242
243 XXX Description of the purpose of the new file here
244
245 =head2 Changes to Existing Documentation
246
247 XXX Changes which significantly change existing files in F<pod/> go here.
248 However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
249 section.
250
251 =head3 L<XXX>
252
253 =over 4
254
255 =item *
256
257 XXX Description of the change here
258
259 =item *
260
261 L<perlsyn>: An ambiguity in the documentation of the Ellipsis statement has
262 been corrected. [perl #122661]
263
264 =back
265
266 =head1 Diagnostics
267
268 The following additions or changes have been made to diagnostic output,
269 including warnings and fatal error messages.  For the complete list of
270 diagnostic messages, see L<perldiag>.
271
272 XXX New or changed warnings emitted by the core's C<C> code go here.  Also
273 include any changes in L<perldiag> that reconcile it to the C<C> code.
274
275 =head2 New Diagnostics
276
277 XXX Newly added diagnostic messages go under here, separated into New Errors
278 and New Warnings
279
280 =head3 New Errors
281
282 =over 4
283
284 =item *
285
286 XXX L<message|perldiag/"message">
287
288 =back
289
290 =head3 New Warnings
291
292 =over 4
293
294 =item *
295
296 XXX L<message|perldiag/"message">
297
298 =back
299
300 =head2 Changes to Existing Diagnostics
301
302 XXX Changes (i.e. rewording) of diagnostic messages go here
303
304 =over 4
305
306 =item *
307
308 XXX Describe change here
309
310 =back
311
312 =head2 Diagnostic Removals
313
314 =over 4
315
316 =item *
317
318 "Constant is not a FOO reference"
319
320 Compile-time checking of constant dereferencing (e.g.,
321 C<< my_constant->() >>) has been removed, since it was not taking
322 overloading into account.  [perl #69456] [perl #122607]
323
324 =item *
325
326 The warning "Ambiguous use of -foo resolved as -&foo()" has been removed.
327 There is actually no ambiguity here, and this impedes the use of negated
328 constants; e.g., C<-Inf>.
329
330 =item *
331
332 The little-known C<my Class $var> syntax (see L<fields> and L<attributes>)
333 could get confused in the scope of C<use utf8> if C<Class> were a constant
334 whose value contained Latin-1 characters.
335
336 =back
337
338 =head1 Utility Changes
339
340 XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go here.
341 Most of these are built within the directory F<utils>.
342
343 [ List utility changes as a =head2 entry for each utility and =item
344 entries for each change
345 Use L<XXX> with program names to get proper documentation linking. ]
346
347 =head2 L<XXX>
348
349 =over 4
350
351 =item *
352
353 XXX
354
355 =back
356
357 =head1 Configuration and Compilation
358
359 XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
360 go here.  Any other changes to the Perl build process should be listed here.
361 However, any platform-specific changes should be listed in the
362 L</Platform Support> section, instead.
363
364 [ List changes as a =item entry ].
365
366 =over 4
367
368 =item *
369
370 XXX
371
372 =back
373
374 =head1 Testing
375
376 XXX Any significant changes to the testing of a freshly built perl should be
377 listed here.  Changes which create B<new> files in F<t/> go here as do any
378 large changes to the testing harness (e.g. when parallel testing was added).
379 Changes to existing files in F<t/> aren't worth summarizing, although the bugs
380 that they represent may be covered elsewhere.
381
382 [ List each test improvement as a =item entry ]
383
384 =over 4
385
386 =item *
387
388 XXX
389
390 =back
391
392 =head1 Platform Support
393
394 XXX Any changes to platform support should be listed in the sections below.
395
396 [ Within the sections, list each platform as a =item entry with specific
397 changes as paragraphs below it. ]
398
399 =head2 New Platforms
400
401 XXX List any platforms that this version of perl compiles on, that previous
402 versions did not.  These will either be enabled by new files in the F<hints/>
403 directories, or new subdirectories and F<README> files at the top level of the
404 source tree.
405
406 =over 4
407
408 =item XXX-some-platform
409
410 XXX
411
412 =back
413
414 =head2 Discontinued Platforms
415
416 XXX List any platforms that this version of perl no longer compiles on.
417
418 =over 4
419
420 =item XXX-some-platform
421
422 XXX
423
424 =back
425
426 =head2 Platform-Specific Notes
427
428 XXX List any changes for specific platforms.  This could include configuration
429 and compilation changes or changes in portability/compatibility.  However,
430 changes within modules for platforms should generally be listed in the
431 L</Modules and Pragmata> section.
432
433 =over 4
434
435 =item XXX-some-platform
436
437 XXX
438
439 =back
440
441 =head1 Internal Changes
442
443 XXX Changes which affect the interface available to C<XS> code go here.  Other
444 significant internal changes for future core maintainers should be noted as
445 well.
446
447 [ List each change as a =item entry ]
448
449 =over 4
450
451 XXX
452
453 =back
454
455 =head1 Selected Bug Fixes
456
457 XXX Important bug fixes in the core language are summarized here.  Bug fixes in
458 files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>.
459
460 [ List each fix as a =item entry ]
461
462 =over 4
463
464 =item *
465
466 XXX
467
468 =item *
469
470 Constant dereferencing now works correctly for typeglob constants.
471 Previously the glob was stringified and its name looked up.  Now the glob
472 itself is used.  [perl #69456]
473
474 =item *
475
476 When parsing a funny character ($ @ % &) followed by braces, the parser no
477 longer tries to guess whether it is a block or a hash constructor (causing
478 a syntax error when it guesses the latter), since it can only be a block.
479
480 =item *
481
482 C<undef $reference> now frees the referent immediately, instead of hanging
483 on to it until the next statement.  [perl #122556]
484
485 =item *
486
487 Various cases where the name of a sub is used (autoload, overloading, error
488 messages) used to crash for lexical subs, but have been fixed.
489
490 =item *
491
492 Bareword lookup now tries to avoid vivifying packages if it turns out the
493 bareword is not going to be a subroutine name.
494
495 =item *
496
497 Compilation of anonymous constants (e.g., C<sub () { 3 }>) no longer
498 deletes any subroutine named C<__ANON__> in the current package.  Not only
499 was C<*__ANON__{CODE}> cleared, but there was a memory leak, too.  This bug
500 goes back to perl 5.8.0. 
501
502 =item *
503
504 Stub declarations like C<sub f;> and C<sub f ();> no longer wipe out
505 constants of the same name declared by C<use constant>.  This bug was
506 introduced in perl 5.10.0.
507
508 =item *
509
510 Under some conditions a warning raised in compilation of regular
511 expression patterns could be displayed multiple times.  This is now
512 fixed.
513
514 =item *
515
516 C<qr/[\N{named sequence}]/> now works properly in many instances.  Some
517 names known to C<\N{...}> refer to a sequence of multiple characters,
518 instead of the usual single character.  Bracketed character classes
519 generally only match single characters, but now special handling has
520 been added so that they can match named sequences, but not if the class
521 is inverted or the sequence is specified as the beginning or end of a
522 range.  In these cases, the only behavior change from before is a slight
523 rewording of the fatal error message given when this class is part of a
524 C<?[...])> construct.  When the C<[...]> stands alone, the same
525 non-fatal warning as before is raised, and only the first character in
526 the sequence is used, again just as before.
527
528 =item *
529
530 Tainted constants evaluated at compile time no longer cause unrelated
531 statements to become tainted.  [perl #122669]
532
533 =item *
534
535 C<open $$fh, ...>, which vivifies a handle with a name like "main::_GEN_0",
536 was not giving the handle the right reference count, so a double free could
537 happen.
538
539 =item *
540
541 When deciding that a bareword was a method name, the parser would get
542 confused if an "our" sub with the same name existed, and look up the method
543 in the package of the "our" sub, instead of the package of the invocant.
544
545 =item *
546
547 The parser no longer gets confused by C<\U=> within a double-quoted string.
548 It used to roduce a syntax error, but now compiles it correctly.
549 [perl #80368]
550
551 =item *
552
553 It has always been the intention for the C<-B> and C<-T> file test
554 operators to treat UTF-8 encoded files as text.
555 (L<perlfunc|perlfunc/-X FILEHANDLE> has been updated to say this.)
556 Previously, it was possible for some files to be considered UTF-8 that
557 actually weren't valid UTF-8.  This is now fixed.  The operators now
558 work on EBCDIC platforms as well.
559
560 =item *
561
562 Under some conditions warning messages raised during regular expression
563 pattern compilation were being output more than once.  This has now been
564 fixed.
565
566 =item *
567
568 A regression has been fixed that was introduced in v5.20.0 (fixed in
569 v5.20.1 as well as here) in which a UTF-8 encoded regular expression
570 pattern that contains a single ASCII lowercase letter does not match its
571 uppercase counterpart. [perl #122655]
572
573 =item *
574
575 Constant folding could incorrectly suppress warnings if lexical warnings
576 (C<use warnings> or C<no warnings>) were not in effect and C<$^W> were
577 false at compile time and true at run time.
578
579 =back
580
581 =head1 Known Problems
582
583 XXX Descriptions of platform agnostic bugs we know we can't fix go here.  Any
584 tests that had to be C<TODO>ed for the release would be noted here.  Unfixed
585 platform specific bugs also go here.
586
587 [ List each fix as a =item entry ]
588
589 =over 4
590
591 =item *
592
593 XXX
594
595 =back
596
597 =head1 Errata From Previous Releases
598
599 =over 4
600
601 =item *
602
603 XXX Add anything here that we forgot to add, or were mistaken about, in
604 the perldelta of a previous release.
605
606 =back
607
608 =head1 Obituary
609
610 XXX If any significant core contributor has died, we've added a short obituary
611 here.
612
613 =head1 Acknowledgements
614
615 XXX Generate this with:
616
617   perl Porting/acknowledgements.pl v5.21.3..HEAD
618
619 =head1 Reporting Bugs
620
621 If you find what you think is a bug, you might check the articles recently
622 posted to the comp.lang.perl.misc newsgroup and the perl bug database at
623 https://rt.perl.org/ .  There may also be information at
624 http://www.perl.org/ , the Perl Home Page.
625
626 If you believe you have an unreported bug, please run the L<perlbug> program
627 included with your release.  Be sure to trim your bug down to a tiny but
628 sufficient test case.  Your bug report, along with the output of C<perl -V>,
629 will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
630
631 If the bug you are reporting has security implications, which make it
632 inappropriate to send to a publicly archived mailing list, then please send it
633 to perl5-security-report@perl.org.  This points to a closed subscription
634 unarchived mailing list, which includes all the core committers, who will be
635 able to help assess the impact of issues, figure out a resolution, and help
636 co-ordinate the release of patches to mitigate or fix the problem across all
637 platforms on which Perl is supported.  Please only use this address for
638 security issues in the Perl core, not for modules independently distributed on
639 CPAN.
640
641 =head1 SEE ALSO
642
643 The F<Changes> file for an explanation of how to view exhaustive details on
644 what changed.
645
646 The F<INSTALL> file for how to build Perl.
647
648 The F<README> file for general stuff.
649
650 The F<Artistic> and F<Copying> files for copyright information.
651
652 =cut