This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta for #122829 / 00e40766a
[perl5.git] / pod / perldelta.pod
CommitLineData
44691e6f
AB
1=encoding utf8
2
3=head1 NAME
4
86372193
A
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.6
c68523cb 9
238894db 10=head1 DESCRIPTION
c68523cb 11
86372193 12This document describes differences between the 5.21.5 release and the 5.21.6
238894db 13release.
c68523cb 14
86372193
A
15If you are upgrading from an earlier release such as 5.21.4, first read
16L<perl5215delta>, which describes differences between 5.21.4 and 5.21.5.
8435afd1 17
86372193 18=head1 Notice
5cfa0642 19
86372193 20XXX Any important notices here
4cad5dc8 21
86372193 22=head1 Core Enhancements
4cad5dc8 23
86372193
A
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.
a5591204 27
86372193 28[ List each enhancement as a =head2 entry ]
a5591204 29
518159a1
TC
30=head2 List form of pipe open implemented for Win32
31
32The list form of pipe:
33
34 open my $fh, "-|", "program", @arguments;
35
36is now implemented on Win32. It has the same limitations as C<system
37LIST> on Win32, since the Win32 API doesn't accept program arguments
38as a list.
39
fe609065
FC
40=head2 Assignment to list repetition
41
42C<(...) x ...> can now be used within a list that is assigned to, as long
43as the left-hand side is a valid lvalue. This allows C<(undef,undef,$foo)
44= that_function()> to be written as C<((undef)x2, $foo) = that_function()>.
45
86372193 46=head1 Security
a5591204 47
86372193
A
48XXX Any security-related notices go here. In particular, any security
49vulnerabilities closed should be noted here rather than in the
50L</Selected Bug Fixes> section.
a5591204 51
86372193 52[ List each security issue as a =head2 entry ]
a5591204 53
86372193 54=head1 Incompatible Changes
a5591204 55
86372193 56XXX For a release on a stable branch, this section aspires to be:
a5591204 57
86372193
A
58 There are no changes intentionally incompatible with 5.XXX.XXX
59 If any exist, they are bugs, and we request that you submit a
60 report. See L</Reporting Bugs> below.
b15c1b56 61
86372193 62[ List each incompatible change as a =head2 entry ]
b15c1b56 63
86372193 64=head1 Deprecations
bb8c7e27 65
86372193 66XXX Any deprecated features, syntax, modules etc. should be listed here.
bb8c7e27 67
86372193 68=head2 Module removals
bb8c7e27 69
86372193 70XXX Remove this section if inapplicable.
9a88d663 71
86372193
A
72The following modules will be removed from the core distribution in a
73future release, and will at that time need to be installed from CPAN.
74Distributions on CPAN which require these modules will need to list them as
75prerequisites.
9a88d663 76
86372193
A
77The core versions of these modules will now issue C<"deprecated">-category
78warnings to alert you to this fact. To silence these deprecation warnings,
79install the modules in question from CPAN.
5cfa0642 80
86372193
A
81Note that these are (with rare exceptions) fine modules that you are encouraged
82to continue to use. Their disinclusion from core primarily hinges on their
83necessity to bootstrapping a fully functional, CPAN-capable Perl installation,
84not usually on concerns over their design.
ba474e87 85
86372193 86=over
8435afd1 87
86372193 88=item XXX
d0ab07ee 89
86372193
A
90XXX Note that deprecated modules should be listed here even if they are listed
91as an updated module in the L</Modules and Pragmata> section.
cc4d09e1 92
86372193 93=back
cc4d09e1 94
86372193 95[ List each other deprecation as a =head2 entry ]
8435afd1 96
4475d0d2
KW
97=head2 Use of non-graphic characters in single-character variable names
98
99The syntax for single-character variable names is more lenient than
100for longer variable names, allowing the one-character name to be a
101punctuation character or even invisible (a non-graphic). Perl v5.20
102deprecated the ASCII-range controls as such a name. Now, all
103non-graphic characters that formerly were allowed are deprecated.
104The practical effect of this occurs only when not under C<S<"use
105utf8">>, and affects just the C1 controls (code points 0x80 through
1060xFF), NO-BREAK SPACE, and SOFT HYPHEN.
107
8c8d6154 108=head1 Performance Enhancements
5cfa0642 109
86372193
A
110XXX Changes which enhance performance without changing behaviour go here.
111There may well be none in a stable release.
5cfa0642 112
86372193 113[ List each enhancement as a =item entry ]
8435afd1 114
86372193 115=over 4
5cfa0642 116
5b306eef
DD
117=item *
118
25a8e2be
FC
119C<(...)x1>, C<("constant")x0> and C<($scalar)x0> are now optimised in list
120context. If the right-hand argument is a constant 1, the repetition
121operator disappears. If the right-hand argument is a constant 0, the whole
122expressions is optimised to the empty list, so long as the left-hand
123argument is a simple scalar or constant. C<(foo())x0> is not optimised.
5b306eef 124
86372193 125=back
357205d5 126
86372193 127=head1 Modules and Pragmata
357205d5 128
86372193
A
129XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
130go here. If Module::CoreList is updated, generate an initial draft of the
131following sections using F<Porting/corelist-perldelta.pl>. A paragraph summary
132for important changes should then be added by hand. In an ideal world,
133dual-life modules would have a F<Changes> file that could be cribbed.
f704f251 134
86372193 135[ Within each section, list entries as a =item entry ]
f704f251 136
86372193 137=head2 New Modules and Pragmata
0cb3abac 138
86372193 139=over 4
0cb3abac 140
deec1830
FC
141=item *
142
86372193 143XXX
deec1830 144
8c8d6154 145=back
d0ab07ee 146
8c8d6154 147=head2 Updated Modules and Pragmata
d99849ae 148
39c4a6cf 149=over 4
d99849ae 150
ff433f2d
PM
151=item *
152
bab69578
TC
153L<IO::Socket> has been upgraded from version 1.37 to 1.38.
154
155Document the limitations of the isconnected() method. [perl #123096]
cbfcbc14 156
bb6a367a
DD
157=item *
158
159L<DynaLoader> has been upgraded from version 1.27 to 1.28.
160
86372193 161=back
f348c3d8 162
86372193 163=head2 Removed Modules and Pragmata
f348c3d8 164
86372193 165=over 4
f348c3d8
A
166
167=item *
168
86372193 169XXX
f348c3d8 170
86372193 171=back
7635ad4d 172
86372193 173=head1 Documentation
7635ad4d 174
86372193
A
175XXX Changes to files in F<pod/> go here. Consider grouping entries by
176file and be sure to link to the appropriate page, e.g. L<perlfunc>.
7635ad4d 177
86372193 178=head2 New Documentation
f348c3d8 179
86372193 180XXX Changes which create B<new> files in F<pod/> go here.
f348c3d8 181
86372193 182=head3 L<XXX>
f4eedc6b 183
86372193 184XXX Description of the purpose of the new file here
f4eedc6b 185
86372193 186=head2 Changes to Existing Documentation
f4eedc6b 187
86372193
A
188XXX Changes which significantly change existing files in F<pod/> go here.
189However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
190section.
f348c3d8 191
42327f06 192=head3 L<perldata/Identifier parsing>
f348c3d8 193
86372193 194=over 4
f348c3d8
A
195
196=item *
197
42327f06
KW
198The syntax of single-character variable names has been brought
199up-to-date and more fully explained.
f348c3d8 200
86372193 201=back
f348c3d8 202
86372193 203=head1 Diagnostics
f348c3d8 204
86372193
A
205The following additions or changes have been made to diagnostic output,
206including warnings and fatal error messages. For the complete list of
207diagnostic messages, see L<perldiag>.
f348c3d8 208
86372193
A
209XXX New or changed warnings emitted by the core's C<C> code go here. Also
210include any changes in L<perldiag> that reconcile it to the C<C> code.
f348c3d8 211
86372193 212=head2 New Diagnostics
f348c3d8 213
86372193
A
214XXX Newly added diagnostic messages go under here, separated into New Errors
215and New Warnings
f348c3d8 216
86372193 217=head3 New Errors
84d03adf 218
86372193 219=over 4
ff433f2d 220
4cd408ba
TC
221=item *
222
86372193 223XXX L<message|perldiag/"message">
f348c3d8 224
86372193 225=back
f348c3d8 226
86372193 227=head3 New Warnings
f4eedc6b 228
86372193 229=over 4
f4eedc6b
DD
230
231=item *
232
4475d0d2 233L<Use of literal non-graphic characters in variable names is deprecated|perldiag/"Use of literal non-graphic characters in variable names is deprecated">
f348c3d8 234
ab0b796c
KW
235=item *
236
8c6180a9
KW
237A new C<locale> warning category has been created, with the following warning
238messages currently in it:
239
240=over 4
241
242=item *
243
244L<Locale '%s' may not work well.%s|perldiag/Locale '%s' may not work well.%s>
245
246=item *
247
ab0b796c
KW
248L<Can't do %s("%s") on non-UTF-8 locale; resolved to "%s".|perldiag/Can't do %s("%s") on non-UTF-8 locale; resolved to "%s".>
249
86372193 250=back
0561e60b 251
8c6180a9
KW
252=back
253
86372193 254=head2 Changes to Existing Diagnostics
0561e60b 255
86372193 256XXX Changes (i.e. rewording) of diagnostic messages go here
0561e60b 257
86372193 258=over 4
4cd408ba 259
f348c3d8
A
260=item *
261
4a328228
FC
262L<Quantifier unexpected on zero-length expression in regex m/%s/|perldiag/"Quantifier unexpected on zero-length expression in regex m/%s/">.
263
264This message has had the S<"<-- HERE"> marker removed, as it was always
265placed at the end of the regular expression, regardless of where the
266problem actually occurred. [perl #122680]
4cd408ba 267
86372193 268=back
40a81b59 269
86372193 270=head1 Utility Changes
f348c3d8 271
86372193
A
272XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go here.
273Most of these are built within the directory F<utils>.
f348c3d8 274
86372193
A
275[ List utility changes as a =head2 entry for each utility and =item
276entries for each change
277Use L<XXX> with program names to get proper documentation linking. ]
f348c3d8 278
86372193 279=head2 L<XXX>
f348c3d8 280
86372193 281=over 4
f348c3d8
A
282
283=item *
284
86372193 285XXX
40a81b59 286
13900f93 287=back
aac7f82f 288
86372193 289=head1 Configuration and Compilation
2a395b86 290
86372193
A
291XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
292go here. Any other changes to the Perl build process should be listed here.
293However, any platform-specific changes should be listed in the
294L</Platform Support> section, instead.
8435afd1 295
86372193 296[ List changes as a =item entry ].
8435afd1
SH
297
298=over 4
2a395b86 299
12d22d1f
JK
300=item *
301
c517e197 302F<Configure> with C<-Dmksymlinks> should now be faster. [perl #122002]
12d22d1f 303
2a395b86
PM
304=back
305
86372193 306=head1 Testing
2a395b86 307
86372193
A
308XXX Any significant changes to the testing of a freshly built perl should be
309listed here. Changes which create B<new> files in F<t/> go here as do any
310large changes to the testing harness (e.g. when parallel testing was added).
311Changes to existing files in F<t/> aren't worth summarizing, although the bugs
312that they represent may be covered elsewhere.
2a395b86 313
86372193 314[ List each test improvement as a =item entry ]
5cfa0642 315
8c8d6154 316=over 4
2a395b86
PM
317
318=item *
319
86372193 320XXX
bb8c7e27 321
86372193 322=back
bb8c7e27 323
86372193 324=head1 Platform Support
bb8c7e27 325
86372193 326XXX Any changes to platform support should be listed in the sections below.
bb8c7e27 327
86372193
A
328[ Within the sections, list each platform as a =item entry with specific
329changes as paragraphs below it. ]
2a395b86 330
86372193 331=head2 New Platforms
6d9b7c7c 332
86372193
A
333XXX List any platforms that this version of perl compiles on, that previous
334versions did not. These will either be enabled by new files in the F<hints/>
335directories, or new subdirectories and F<README> files at the top level of the
336source tree.
363d3025 337
8c8d6154 338=over 4
334464b3 339
86372193 340=item XXX-some-platform
334464b3 341
86372193 342XXX
ef5a9509 343
363d3025
FC
344=back
345
86372193
A
346=head2 Discontinued Platforms
347
348XXX List any platforms that this version of perl no longer compiles on.
d72cd2eb 349
0346c3a9 350=over 4
375f5f06 351
86372193 352=item XXX-some-platform
2884baee 353
86372193 354XXX
6f1a844b 355
8c8d6154 356=back
549ea8d4 357
8c8d6154 358=head2 Platform-Specific Notes
aa292ef2 359
86372193
A
360XXX List any changes for specific platforms. This could include configuration
361and compilation changes or changes in portability/compatibility. However,
362changes within modules for platforms should generally be listed in the
363L</Modules and Pragmata> section.
364
8c8d6154 365=over 4
739e9bee 366
86372193 367=item XXX-some-platform
739e9bee 368
86372193 369XXX
b23b2fdb 370
8c8d6154 371=back
b23b2fdb 372
83b69bfd
DD
373=head3 Win32
374
375=over 4
376
377=item *
378
379In the experimental C<:win32> layer, a crash in C<open> was fixed. Also
380opening C</dev/null>, which works the Win32 Perl's normal C<:unix> layer, was
381implemented for C<:win32>.
382L<[perl #122224]|https://rt.perl.org/Ticket/Display.html?id=122224>
383
13adb056
SH
384=item *
385
386A new makefile option, C<USE_LONG_DOUBLE>, has been added to the Windows
387dmake makefile for gcc builds only. Set this to "define" if you want perl to
388use long doubles to give more accuracy and range for floating point numbers.
389
83b69bfd
DD
390=back
391
8c8d6154 392=head1 Internal Changes
7d15b1a8 393
86372193
A
394XXX Changes which affect the interface available to C<XS> code go here. Other
395significant internal changes for future core maintainers should be noted as
396well.
bbca64cf 397
86372193 398[ List each change as a =item entry ]
6ff8f256 399
86372193 400=over 4
28482d6c 401
28a42920
A
402=item *
403
f8d5a522
DD
404C<screaminstr> has been removed. Although marked as public API, it is
405undocumented and has no usage in modern perl versions on CPAN Grep. Calling it
406has been fatal since 5.17.0.
28a42920 407
d109137e
FC
408=item *
409
76acbf4f
FC
410C<newDEFSVOP>, C<block_start>, C<block_end> and C<intro_my> have been added
411to the API.
d109137e 412
cff8e04e
FC
413=item *
414
415The internal C<convert> function in F<op.c> has been renamed
416C<op_convert_list> and added to the API.
417
8c8d6154 418=back
6ff8f256 419
8c8d6154 420=head1 Selected Bug Fixes
80cc3290 421
86372193
A
422XXX Important bug fixes in the core language are summarized here. Bug fixes in
423files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>.
13dd5671 424
86372193 425[ List each fix as a =item entry ]
bdab7676 426
86372193 427=over 4
db98db4e 428
8818afe8
TC
429=item *
430
2ad9844a
TC
431fchmod() and futimes() now set C<$!> when they fail due to being
432passed a closed file handle. [perl #122703]
bb8c7e27 433
9ee757be
KW
434=item *
435
436Perl now comes with a corrected Unicode 7.0 for the erratum issued on
437October 21, 2014 (see L<http://www.unicode.org/errata/#current_errata>),
438dealing with glyph shaping in Arabic.
439
c93d2ba1
TC
440=item *
441
442op_free() no longer crashes due to a stack overflow when freeing a
443deeply recursive op tree. [perl #108276]
444
53795ef8
FC
445=item *
446
9d22ccf6
TC
447scalarvoid() would crash due to a stack overflow when processing a
448deeply recursive op tree. [perl #108276]
449
450=item *
451
53795ef8
FC
452In Perl 5.20.0, C<$^N> accidentally had the internal UTF8 flag turned off
453if accessed from a code block within a regular expression, effectively
454UTF8-encoding the value. This has been fixed. [perl #123135]
455
b7cd8332
FC
456=item *
457
458A failed C<semctl> call no longer overwrites existing items on the stack,
459causing C<(semctl(-1,0,0,0))[0]> to give an "uninitialized" warning.
460
480961b6
FC
461=item *
462
463C<else{foo()}> with no space before C<foo> is now better at assigning the
464right line number to that statement. [perl #122695]
465
94c9bf90
FC
466=item *
467
468Sometimes the assignment in C<@array = split> gets optimised and C<split>
469itself writes directly to the array. This caused a bug, preventing this
470assignment from being used in lvalue context. So
471C<(@a=split//,"foo")=bar()> was an error. (This bug probably goes back to
472Perl 3, when the optimisation was added.) This optimisation, and the bug,
473started to happen in more cases in 5.21.5. It has now been fixed.
474[perl #123057]
475
8af808bf
FC
476=item *
477
478When argument lists that fail the checks installed by subroutine
479signatures, the resulting error messages now give the file and line number
480of the caller, not of the called subroutine. [perl #121374]
481
fdcaecb7
FC
482=item *
483
484Flip-flop operators (C<..> and C<...> in scalar context) used to maintain
485a separate state for each recursion level (the number of times the
486enclosing sub was called recursively), contrary to the documentation. Now
487each closure has one internal state for each flip-flop. [perl #122829]
488
86372193 489=back
bb8c7e27 490
86372193 491=head1 Known Problems
bb8c7e27 492
86372193
A
493XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
494tests that had to be C<TODO>ed for the release would be noted here. Unfixed
495platform specific bugs also go here.
bb8c7e27 496
86372193 497[ List each fix as a =item entry ]
bb8c7e27 498
86372193 499=over 4
bb8c7e27 500
74f9f9ed
A
501=item *
502
eacbb379
DD
503Starting in 5.21.6, accessing L<perlapi/CvPADLIST> in an XSUB is forbidden.
504CvPADLIST has be reused for a different internal purpose for XSUBs. Guard all
505CvPADLIST expressions with C<CvISXSUB()> if your code doesn't already block
506XSUB CV*s from going through optree CV* expecting code.
28a42920 507
86372193 508=back
28a42920 509
86372193 510=head1 Errata From Previous Releases
28a42920 511
86372193 512=over 4
28a42920
A
513
514=item *
515
857f4fb1
FC
516Due to a mistake in the string-copying logic, copying the value of a state
517variable could instead steal the value and undefine the variable. This
518bug, introduced in 5.20, would happen mostly for long strings (1250 chars
519or more), but could happen for any strings under builds with copy-on-write
520disabled. [perl #123029]
521
522This bug was actually fixed in 5.21.5, but it was not until after that
523release that this bug, and the fact that it had been fixed, were
524discovered.
28a42920 525
8c8d6154 526=back
3a085d00 527
86372193 528=head1 Obituary
01d42a22 529
86372193
A
530XXX If any significant core contributor has died, we've added a short obituary
531here.
01d42a22 532
86372193 533=head1 Acknowledgements
01d42a22 534
86372193 535XXX Generate this with:
01d42a22 536
86372193 537 perl Porting/acknowledgements.pl v5.21.5..HEAD
f5b73711 538
44691e6f
AB
539=head1 Reporting Bugs
540
e08634c5
SH
541If you find what you think is a bug, you might check the articles recently
542posted to the comp.lang.perl.misc newsgroup and the perl bug database at
238894db 543https://rt.perl.org/ . There may also be information at
7ef8b31d 544http://www.perl.org/ , the Perl Home Page.
44691e6f 545
e08634c5
SH
546If you believe you have an unreported bug, please run the L<perlbug> program
547included with your release. Be sure to trim your bug down to a tiny but
548sufficient test case. Your bug report, along with the output of C<perl -V>,
549will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
44691e6f
AB
550
551If the bug you are reporting has security implications, which make it
e08634c5
SH
552inappropriate to send to a publicly archived mailing list, then please send it
553to perl5-security-report@perl.org. This points to a closed subscription
554unarchived mailing list, which includes all the core committers, who will be
555able to help assess the impact of issues, figure out a resolution, and help
f9001595 556co-ordinate the release of patches to mitigate or fix the problem across all
e08634c5
SH
557platforms on which Perl is supported. Please only use this address for
558security issues in the Perl core, not for modules independently distributed on
559CPAN.
44691e6f
AB
560
561=head1 SEE ALSO
562
e08634c5
SH
563The F<Changes> file for an explanation of how to view exhaustive details on
564what changed.
44691e6f
AB
565
566The F<INSTALL> file for how to build Perl.
567
568The F<README> file for general stuff.
569
570The F<Artistic> and F<Copying> files for copyright information.
571
572=cut