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