This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta for c65b7c4d
[perl5.git] / pod / perldelta.pod
CommitLineData
44691e6f
AB
1=encoding utf8
2
3=head1 NAME
4
4dc623f0
CBW
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.7
c68523cb 9
238894db 10=head1 DESCRIPTION
c68523cb 11
4dc623f0 12This document describes differences between the 5.21.6 release and the 5.21.7
238894db 13release.
c68523cb 14
4dc623f0
CBW
15If you are upgrading from an earlier release such as 5.21.5, first read
16L<perl5216delta>, which describes differences between 5.21.5 and 5.21.6.
8435afd1 17
4dc623f0 18=head1 Notice
4cad5dc8 19
4dc623f0 20XXX Any important notices here
518159a1 21
4dc623f0 22=head1 Core Enhancements
518159a1 23
4dc623f0
CBW
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.
518159a1 27
4dc623f0 28[ List each enhancement as a =head2 entry ]
518159a1 29
67f2cc75
AC
30=head2 C<fileno> now works on directory handles
31
32When the relevant support is available in the operating system, the
33C<fileno> builtin now works on directory handles, yielding the
34underlying file descriptor in the same way as for filehandles. On
35operating systems without such support, C<fileno> on a directory handle
36continues to return the undefined value, as before, but also sets C<$!> to
37indicate that the operation is not supported.
38
39Currently, this uses either a C<dd_fd> member in the OS C<DIR>
40structure, or a dirfd(3) function as specified by POSIX.1-2008.
41
4dc623f0 42=head1 Security
fe609065 43
4dc623f0
CBW
44XXX Any security-related notices go here. In particular, any security
45vulnerabilities closed should be noted here rather than in the
46L</Selected Bug Fixes> section.
fe609065 47
4dc623f0 48[ List each security issue as a =head2 entry ]
295f7815 49
4dc623f0 50=head1 Incompatible Changes
295f7815 51
4dc623f0 52XXX For a release on a stable branch, this section aspires to be:
bb8c7e27 53
4dc623f0
CBW
54 There are no changes intentionally incompatible with 5.XXX.XXX
55 If any exist, they are bugs, and we request that you submit a
56 report. See L</Reporting Bugs> below.
9f122eef 57
4dc623f0 58[ List each incompatible change as a =head2 entry ]
5cfa0642 59
aafa61ee 60=head2 C<&> and C<\&> prototypes accepts only subs
3f22ed99
FC
61
62The C<&> prototype character now accepts only anonymous subs (C<sub {...}>)
63and things beginning with C<\&>. Formerly it erroneously also allowed
64C<undef> and references to array, hashes, and lists. [perl #4539]
65[perl #123062]
66
aafa61ee
FC
67The C<\&> prototype was allowing subroutine calls, whereas now it only
68allows subroutines. C<&foo> is permitted. C<&foo()> and C<foo()> are not.
69[perl #77860]
70
ef8784b7
FC
71=head2 C<use encoding> is now lexical
72
73The L<encoding> pragma's effect is now limited to lexical scope. This
74pragma is deprecated, but in the meantime, it could adversely affect
75unrelated modules that are included in the same program.
76
0a7766ab
FC
77=head2 List slices returning empty lists
78
79List slices return an empty list now only if the original list was empty
80(or if there are no indices). Formerly, a list slice would return an empty
81list if all indices fell outside the original list. [perl #114498]
82
4dc623f0 83=head1 Deprecations
5b306eef 84
4dc623f0 85XXX Any deprecated features, syntax, modules etc. should be listed here.
5b306eef 86
4dc623f0 87=head2 Module removals
ef7051ba 88
4dc623f0 89XXX Remove this section if inapplicable.
ef7051ba 90
4dc623f0
CBW
91The following modules will be removed from the core distribution in a
92future release, and will at that time need to be installed from CPAN.
93Distributions on CPAN which require these modules will need to list them as
94prerequisites.
b450ee68 95
4dc623f0
CBW
96The core versions of these modules will now issue C<"deprecated">-category
97warnings to alert you to this fact. To silence these deprecation warnings,
98install the modules in question from CPAN.
b450ee68 99
4dc623f0
CBW
100Note that these are (with rare exceptions) fine modules that you are encouraged
101to continue to use. Their disinclusion from core primarily hinges on their
102necessity to bootstrapping a fully functional, CPAN-capable Perl installation,
103not usually on concerns over their design.
1e461e16 104
4dc623f0 105=over
1e461e16 106
4dc623f0 107=item XXX
aa95859b 108
4dc623f0
CBW
109XXX Note that deprecated modules should be listed here even if they are listed
110as an updated module in the L</Modules and Pragmata> section.
aa95859b 111
86372193 112=back
357205d5 113
4dc623f0 114[ List each other deprecation as a =head2 entry ]
6ed80d55 115
c0659f73
KW
116=head2 Setting C<${^ENCODING}> to anything but C<undef>
117
118This variable allows Perl scripts to be written in a non-ASCII,
119non-UTF-8 encoding. However, it affects all modules globally, leading
120to wrong answers and segmentation faults. New scripts should be written
121in UTF-8; old scripts should be converted to UTF-8, which is easily done
122with the L<encoding> pragma.
123
4dc623f0 124=head1 Performance Enhancements
6ed80d55 125
4dc623f0
CBW
126XXX Changes which enhance performance without changing behaviour go here.
127There may well be none in a stable release.
6ed80d55 128
4dc623f0 129[ List each enhancement as a =item entry ]
6ed80d55 130
4dc623f0 131=over 4
6ed80d55
CBW
132
133=item *
134
2adef77e
DD
135Win32 Perl uses 8 KB less of per-process memory than before for every perl
136process of this version. This data is now memory mapped from disk and shared
137between perl processes from the same perl binary.
6ed80d55 138
4dc623f0 139=back
f4e81f96 140
4dc623f0 141=head1 Modules and Pragmata
bb6a367a 142
4dc623f0
CBW
143XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
144go here. If Module::CoreList is updated, generate an initial draft of the
145following sections using F<Porting/corelist-perldelta.pl>. A paragraph summary
146for important changes should then be added by hand. In an ideal world,
147dual-life modules would have a F<Changes> file that could be cribbed.
f348c3d8 148
4dc623f0 149[ Within each section, list entries as a =item entry ]
f348c3d8 150
4dc623f0 151=head2 New Modules and Pragmata
6ed80d55 152
4dc623f0 153=over 4
f348c3d8
A
154
155=item *
156
4dc623f0 157XXX
7635ad4d 158
4dc623f0 159=back
7635ad4d 160
4dc623f0 161=head2 Updated Modules and Pragmata
7635ad4d 162
4dc623f0 163=over 4
f348c3d8 164
6ed80d55 165=item *
f348c3d8 166
cd3802ac
FC
167L<B> has been upgraded from version 1.53 to 1.54.
168
169Nulled COPs are now of class C<B::COP>, rather than C<B::OP>.
170
d6c13051
FC
171B::REGEXP objects now provide a C<qr_anoncv> method for accessing the
172implicit CV associated with C<qr//> things containing code blocks.
173
02a0bddf
FC
174B::PMOP now provides a C<pmregexp> method returning a B::REGEXP object.
175
128f4e12
FC
176Two new classes, B::PADNAME and B::PADNAMELIST, have been introduced.
177
cd3802ac
FC
178=item *
179
7cf50cd1
FC
180L<B::Deparse> has been upgraded from version 1.30 to 1.31.
181
182BEGIN blocks at the end of the enclosing scope are now deparsed in the
183right place. [perl #77452]
184
73fc9720
FC
185Lexical subroutines are now fully deparsed. [perl #116553]
186
9d67d695
FC
187Deparsing of C<$lexical =~ //> was accidentally broken in 1.30 (perl
1885.21.6), omitting the C<$lexical =~>, but has now been fixed.
189
92e6b96d
FC
190C<Anything =~ y///r> with C</r> no longer omits the left-hand operand.
191
aa9bed36
FC
192The op trees that make up regexp code blocks are now deparsed for real.
193Formerly, the original string that made up the regular expression was used.
194That caused problems with C<qr/(?{<<heredoc})/> and multiline code blocks,
195which were deparsed incorrectly. [perl #123217] [perl #115256]
196
9d6cb1a5
FC
197C<$;> at the end of a statement no longer loses its semicolon.
198[perl #123357]
199
d5ced743
FC
200Some cases of subroutine declarations stored in the stash in shorthand form
201were being omitted.
202
3b7745ab
FC
203Non-ASCII characters are now consistently escaped in strings, instead of
204some of the time. (There are still outstanding problems with regular
205expressions and identifiers that have not been fixed.)
206
a2fb0b75
FC
207When prototype sub calls are deparsed with C<&> (e.g., under the B<-P>
208option), C<scalar> is now added where appropriate, to force the scalar
209context implied by the prototype.
210
7cf50cd1
FC
211=item *
212
7de6b801
TC
213L<ExtUtils::ParseXS> has been upgraded from version 3.26 to 3.27.
214
215Only declare C<file> unused if we actually define it.
216
217Improve generated C<RETVAL> code generation to avoid repeated
218references to C<ST(0)>. [perl #123278]
f4eedc6b 219
190f5bb6
TC
220=item *
221
222The PathTools module collection has been upgraded from 3.52 to 3.53.
223
224Don't turn leading C<//> into C</> on Cygwin. [perl #122635]
225
ba31029d
TR
226=item *
227
228L<Locale::Maketext> has been upgraded from version 1.25 to 1.26.
229
4c7a0d98
DD
230=item *
231
232L<XSLoader> has been upgraded from version 0.19 to 0.20
233
234Don't test twice for bootstrap file.
235
4dc623f0 236=back
f4eedc6b 237
4dc623f0 238=head2 Removed Modules and Pragmata
f4eedc6b 239
4dc623f0 240=over 4
f348c3d8 241
6ed80d55
CBW
242=item *
243
4dc623f0 244XXX
f348c3d8 245
4dc623f0 246=back
f348c3d8 247
4dc623f0 248=head1 Documentation
f348c3d8 249
4dc623f0
CBW
250XXX Changes to files in F<pod/> go here. Consider grouping entries by
251file and be sure to link to the appropriate page, e.g. L<perlfunc>.
f348c3d8 252
4dc623f0 253=head2 New Documentation
f348c3d8 254
4dc623f0 255XXX Changes which create B<new> files in F<pod/> go here.
f348c3d8 256
4dc623f0 257=head3 L<XXX>
6ed80d55 258
4dc623f0 259XXX Description of the purpose of the new file here
f348c3d8 260
6ed80d55 261=head2 Changes to Existing Documentation
f348c3d8 262
4dc623f0
CBW
263XXX Changes which significantly change existing files in F<pod/> go here.
264However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
265section.
266
267=head3 L<XXX>
84d03adf 268
86372193 269=over 4
ff433f2d 270
4cd408ba
TC
271=item *
272
4dc623f0 273XXX Description of the change here
f348c3d8 274
86372193 275=back
f348c3d8 276
6ed80d55
CBW
277=head1 Diagnostics
278
279The following additions or changes have been made to diagnostic output,
280including warnings and fatal error messages. For the complete list of
281diagnostic messages, see L<perldiag>.
282
4dc623f0
CBW
283XXX New or changed warnings emitted by the core's C<C> code go here. Also
284include any changes in L<perldiag> that reconcile it to the C<C> code.
6ed80d55 285
4dc623f0 286=head2 New Diagnostics
f348c3d8 287
4dc623f0
CBW
288XXX Newly added diagnostic messages go under here, separated into New Errors
289and New Warnings
ab0b796c 290
4dc623f0 291=head3 New Errors
8c6180a9
KW
292
293=over 4
294
295=item *
296
4dc623f0 297XXX L<message|perldiag/"message">
ab0b796c 298
86372193 299=back
0561e60b 300
4dc623f0 301=head3 New Warnings
dd200dff 302
4dc623f0 303=over 4
dd200dff 304
73e793fc
FC
305=item *
306
4dc623f0 307XXX L<message|perldiag/"message">
73e793fc 308
8c6180a9
KW
309=back
310
86372193 311=head2 Changes to Existing Diagnostics
0561e60b 312
4dc623f0 313XXX Changes (i.e. rewording) of diagnostic messages go here
4a328228 314
4dc623f0 315=over 4
4cd408ba 316
1861205d
FC
317=item *
318
fe20bd24
FC
319"Variable %s will not stay shared" has been changed to say "Subroutine"
320when it is actually a lexical sub that will not stay shared.
1861205d 321
86372193 322=back
40a81b59 323
4dc623f0 324=head1 Utility Changes
2a395b86 325
4dc623f0
CBW
326XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go here.
327Most of these are built within the directory F<utils>.
2a395b86 328
4dc623f0
CBW
329[ List utility changes as a =head2 entry for each utility and =item
330entries for each change
331Use L<XXX> with program names to get proper documentation linking. ]
12d22d1f 332
4dc623f0 333=head2 L<XXX>
2a395b86 334
8c8d6154 335=over 4
2a395b86
PM
336
337=item *
338
4dc623f0 339XXX
bb8c7e27 340
86372193 341=back
bb8c7e27 342
4dc623f0 343=head1 Configuration and Compilation
bb8c7e27 344
4dc623f0
CBW
345XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
346go here. Any other changes to the Perl build process should be listed here.
347However, any platform-specific changes should be listed in the
348L</Platform Support> section, instead.
aa292ef2 349
4dc623f0 350[ List changes as a =item entry ].
83b69bfd
DD
351
352=over 4
353
354=item *
355
4dc623f0 356XXX
13adb056 357
83b69bfd
DD
358=back
359
4dc623f0 360=head1 Testing
391823f2 361
4dc623f0
CBW
362XXX Any significant changes to the testing of a freshly built perl should be
363listed here. Changes which create B<new> files in F<t/> go here as do any
364large changes to the testing harness (e.g. when parallel testing was added).
365Changes to existing files in F<t/> aren't worth summarizing, although the bugs
366that they represent may be covered elsewhere.
6ff8f256 367
4dc623f0 368[ List each test improvement as a =item entry ]
80cc3290 369
86372193 370=over 4
db98db4e 371
8818afe8
TC
372=item *
373
4dc623f0 374XXX
9d22ccf6 375
4dc623f0 376=back
480961b6 377
4dc623f0 378=head1 Platform Support
480961b6 379
4dc623f0 380XXX Any changes to platform support should be listed in the sections below.
94c9bf90 381
4dc623f0
CBW
382[ Within the sections, list each platform as a =item entry with specific
383changes as paragraphs below it. ]
94c9bf90 384
4dc623f0 385=head2 New Platforms
8af808bf 386
4dc623f0
CBW
387XXX List any platforms that this version of perl compiles on, that previous
388versions did not. These will either be enabled by new files in the F<hints/>
389directories, or new subdirectories and F<README> files at the top level of the
390source tree.
8af808bf 391
4dc623f0 392=over 4
fdcaecb7 393
4dc623f0 394=item XXX-some-platform
fdcaecb7 395
4dc623f0 396XXX
2af7c6b6 397
4dc623f0 398=back
2af7c6b6 399
4dc623f0 400=head2 Discontinued Platforms
c0b32823 401
4dc623f0 402XXX List any platforms that this version of perl no longer compiles on.
c0b32823 403
4dc623f0 404=over 4
b1a4e8b3 405
4dc623f0 406=item XXX-some-platform
b1a4e8b3 407
4dc623f0 408XXX
9e26817d 409
4dc623f0 410=back
9e26817d 411
4dc623f0 412=head2 Platform-Specific Notes
70cee83f 413
312159d9 414=head3 Win32
70cee83f 415
312159d9 416=over
e5fbfbc1 417
312159d9 418=item *
e5fbfbc1 419
312159d9 420Intel C builds are now always built with C99 mode on.
353075a0 421
4dc623f0 422=back
353075a0 423
4dc623f0 424=head1 Internal Changes
9f122eef 425
4dc623f0
CBW
426XXX Changes which affect the interface available to C<XS> code go here. Other
427significant internal changes for future core maintainers should be noted as
428well.
9f122eef 429
4dc623f0 430[ List each change as a =item entry ]
9f122eef 431
4dc623f0 432=over 4
9f122eef
FC
433
434=item *
435
14f5a3e3
FC
436The PADNAME and PADNAMELIST types are now separate types, and no longer
437simply aliases for SV and AV. [perl #123223]
c7f058f0 438
cd96a1b6
FC
439=item *
440
441Pad names are now always UTF8. The C<PadnameUTF8> macro always returns
442true. Previously, this was effectively the case already, but any support
443for two different internal representations of pad names has now been
444removed.
445
4dc623f0 446=back
c7f058f0 447
4dc623f0 448=head1 Selected Bug Fixes
0ef4323a 449
4dc623f0
CBW
450XXX Important bug fixes in the core language are summarized here. Bug fixes in
451files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>.
0ef4323a 452
4dc623f0 453[ List each fix as a =item entry ]
c263379c 454
4dc623f0 455=over 4
c263379c 456
ff90be78
TC
457=item *
458
452466a5
FC
459On Win32, restoring in a child pseudo-process a variable that was
460C<local()>ed in a parent pseudo-process before the C<fork> happened caused
461memory corruption and a crash in the child pseudo-process (and therefore OS
64eb3958 462process). [perl #40565]
ff90be78 463
3e669301
KW
464=item *
465
279aef25
TC
466Calling C<write> on a format with a C<^**> field could produce a panic
467in sv_chop() if there were insufficient arguments or if the variable
468used to fill the field was empty. [perl #123245]
469
00ba25b8
FC
470=item *
471
472Non-ASCII lexical sub names (use in error messages) on longer have extra
473junk on the end.
474
567291b6
FC
475=item *
476
477The C<\@> subroutine prototype no longer flattens parenthesized arrays
478(taking a reference to each element), but takes a reference to the array
479itself. [perl #47363]
480
fcfb7b86
FC
481=item *
482
483A block containing nothing except a C-style C<for> loop could corrupt the
484stack, causing lists outside the block to lose elements or have elements
485overwritten. This could happen with C<map { for(...){...} } ...> and with
486lists containing C<do { for(...){...} }>. [perl #123286]
487
8bb83ec2
FC
488=item *
489
490C<scalar()> now propagates lvalue context, so that
491C<for(scalar($#foo)) { ... }> can modify C<$#foo> through C<$_>.
492
1318b6d7
FC
493=item *
494
495C<qr/@array(?{block})/> no longer dies with "Bizarre copy of ARRAY".
496[#123344]
497
86372193 498=back
bb8c7e27 499
86372193 500=head1 Known Problems
bb8c7e27 501
4dc623f0
CBW
502XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
503tests that had to be C<TODO>ed for the release would be noted here. Unfixed
504platform specific bugs also go here.
28a42920 505
4dc623f0 506[ List each fix as a =item entry ]
28a42920 507
6ed80d55
CBW
508=over 4
509
510=item *
511
4dc623f0 512XXX
6ed80d55
CBW
513
514=back
515
86372193 516=head1 Errata From Previous Releases
28a42920 517
86372193 518=over 4
28a42920
A
519
520=item *
521
4dc623f0
CBW
522XXX Add anything here that we forgot to add, or were mistaken about, in
523the perldelta of a previous release.
f5630681 524
8c8d6154 525=back
3a085d00 526
4dc623f0 527=head1 Obituary
01d42a22 528
4dc623f0
CBW
529XXX If any significant core contributor has died, we've added a short obituary
530here.
6ed80d55 531
4dc623f0 532=head1 Acknowledgements
01d42a22 533
4dc623f0 534XXX Generate this with:
01d42a22 535
4dc623f0 536 perl Porting/acknowledgements.pl v5.21.6..HEAD
f5b73711 537
44691e6f
AB
538=head1 Reporting Bugs
539
e08634c5
SH
540If you find what you think is a bug, you might check the articles recently
541posted to the comp.lang.perl.misc newsgroup and the perl bug database at
238894db 542https://rt.perl.org/ . There may also be information at
7ef8b31d 543http://www.perl.org/ , the Perl Home Page.
44691e6f 544
e08634c5
SH
545If you believe you have an unreported bug, please run the L<perlbug> program
546included with your release. Be sure to trim your bug down to a tiny but
547sufficient test case. Your bug report, along with the output of C<perl -V>,
548will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
44691e6f
AB
549
550If the bug you are reporting has security implications, which make it
e08634c5
SH
551inappropriate to send to a publicly archived mailing list, then please send it
552to perl5-security-report@perl.org. This points to a closed subscription
553unarchived mailing list, which includes all the core committers, who will be
554able to help assess the impact of issues, figure out a resolution, and help
f9001595 555co-ordinate the release of patches to mitigate or fix the problem across all
e08634c5
SH
556platforms on which Perl is supported. Please only use this address for
557security issues in the Perl core, not for modules independently distributed on
558CPAN.
44691e6f
AB
559
560=head1 SEE ALSO
561
e08634c5
SH
562The F<Changes> file for an explanation of how to view exhaustive details on
563what changed.
44691e6f
AB
564
565The F<INSTALL> file for how to build Perl.
566
567The F<README> file for general stuff.
568
569The F<Artistic> and F<Copying> files for copyright information.
570
571=cut