This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta for c74d82e0fe
[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
9f122eef
FC
116=head2 Inlining of C<sub () { $var }> with observable side-effects
117
118In many cases Perl makes sub () { $var } into an inlinable constant
119subroutine, capturing the value of $var at the time the C<sub> expression
120is evaluated. This can break the closure behaviour in those cases where
121$var is subsequently modified. The subroutine won't return the new value.
122
123This usage is now deprecated in those cases where the variable could be
124modified elsewhere. Perl detects those cases and emits a deprecation
125warning. Such code will likely change in the future and stop producing a
126constant.
127
128If your variable is only modified in the place where it is declared, then
129Perl will continue to make the sub inlinable with no warnings.
130
131 sub make_constant {
132 my $var = shift;
133 return sub () { $var }; # fine
134 }
135
136 sub make_constant_deprecated {
137 my $var;
138 $var = shift;
139 return sub () { $bar }; # deprecated
140 }
141
142 sub make_constant_deprecated2 {
143 my $var = shift;
144 log_that_value($var); # could modify $var
145 return sub () { $bar }; # deprecated
146 }
147
148In the second example above, detecting that $var is assigned to only once
149is too hard to detect. That it happens in a spot other than the C<my>
150declaration is enough for Perl to find it suspicious.
151
152This deprecation warning happens only for a simple variable for the body of
153the sub. (A C<BEGIN> block or C<use> statement inside the sub is ignored,
154because it does not become part of the sub's body.) For more complex
155cases, such as C<sub () { do_something() if 0; $var }> the behaviour has
156changed such that inlining does not happen if the variable is modifiable
157elsewhere. Such cases should be rare.
158
8c8d6154 159=head1 Performance Enhancements
5cfa0642 160
86372193
A
161XXX Changes which enhance performance without changing behaviour go here.
162There may well be none in a stable release.
5cfa0642 163
86372193 164[ List each enhancement as a =item entry ]
8435afd1 165
86372193 166=over 4
5cfa0642 167
5b306eef
DD
168=item *
169
25a8e2be
FC
170C<(...)x1>, C<("constant")x0> and C<($scalar)x0> are now optimised in list
171context. If the right-hand argument is a constant 1, the repetition
172operator disappears. If the right-hand argument is a constant 0, the whole
173expressions is optimised to the empty list, so long as the left-hand
174argument is a simple scalar or constant. C<(foo())x0> is not optimised.
5b306eef 175
ef7051ba
FC
176=item *
177
178C<substr> assignment is now optimised into 4-argument C<substr> at the end
179of a subroutine (or as the argument to C<return>). Previously, this
180optimisation only happened in void context.
181
b450ee68
FC
182=item *
183
184Assignment to lexical variables is often optimised away. For instance, in
185C<$lexical = chr $foo>, the C<chr> operator writes directly to the lexical
186variable instead of returning a value that gets copied. This optimisation
187has been extended to C<split>, C<x> and C<vec> on the right-hand side. It
188has also been made to work with state variable initialization.
189
1e461e16
FC
190=item *
191
192In "\L...", "\Q...", etc., the extra "stringify" op is now optimised away,
193making these just as fast as C<lcfirst>, C<quotemeta>, etc.
194
aa95859b
FC
195=item *
196
197Assignment to an empty list is now sometimes faster. In particular, it
198never calls C<FETCH> on tied arguments on the right-hand side, whereas it
199used to sometimes.
200
86372193 201=back
357205d5 202
86372193 203=head1 Modules and Pragmata
357205d5 204
86372193
A
205XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
206go here. If Module::CoreList is updated, generate an initial draft of the
207following sections using F<Porting/corelist-perldelta.pl>. A paragraph summary
208for important changes should then be added by hand. In an ideal world,
209dual-life modules would have a F<Changes> file that could be cribbed.
f704f251 210
86372193 211[ Within each section, list entries as a =item entry ]
f704f251 212
86372193 213=head2 New Modules and Pragmata
0cb3abac 214
86372193 215=over 4
0cb3abac 216
deec1830
FC
217=item *
218
86372193 219XXX
deec1830 220
8c8d6154 221=back
d0ab07ee 222
8c8d6154 223=head2 Updated Modules and Pragmata
d99849ae 224
39c4a6cf 225=over 4
d99849ae 226
ff433f2d
PM
227=item *
228
15d464c4
FC
229L<B::Deparse> has been upgraded from version 1.29 to 1.30.
230
231It now deparses C<+sub : attr { ... }> correctly at the start of a
232statement. Without the initial C<+>, C<sub> would be a statement label.
233
16752205
FC
234C<BEGIN> blocks are now emitted in the right place most of the time, but
235the change unfortunately introduced a regression, in that C<BEGIN> blocks
236occurring just before the end of the enclosing block may appear below it
237instead. So this change may need to be reverted if it cannot be fixed
238before Perl 5.22. [perl #77452]
239
80b0bb91
FC
240B::Deparse no longer puts erroneous C<local> here and there, such as for
241C<LIST = tr/a//d>. [perl #119815]
242
15d464c4
FC
243=item *
244
d8fc3586
FC
245L<B::Op_private> has been upgraded from version 5.021005 to 5.021006.
246
247It now includes a hash named C<%ops_using>, list all op types that use a
248particular private flag.
249
250=item *
251
f4e81f96 252L<DynaLoader> has been upgraded from version 1.27 to 1.28.
cbfcbc14 253
bb6a367a
DD
254=item *
255
f4e81f96
FC
256L<IO::Socket> has been upgraded from version 1.37 to 1.38.
257
258Document the limitations of the isconnected() method. [perl #123096]
bb6a367a 259
86372193 260=back
f348c3d8 261
86372193 262=head2 Removed Modules and Pragmata
f348c3d8 263
86372193 264=over 4
f348c3d8
A
265
266=item *
267
86372193 268XXX
f348c3d8 269
86372193 270=back
7635ad4d 271
86372193 272=head1 Documentation
7635ad4d 273
86372193
A
274XXX Changes to files in F<pod/> go here. Consider grouping entries by
275file and be sure to link to the appropriate page, e.g. L<perlfunc>.
7635ad4d 276
86372193 277=head2 New Documentation
f348c3d8 278
86372193 279XXX Changes which create B<new> files in F<pod/> go here.
f348c3d8 280
86372193 281=head3 L<XXX>
f4eedc6b 282
86372193 283XXX Description of the purpose of the new file here
f4eedc6b 284
86372193 285=head2 Changes to Existing Documentation
f4eedc6b 286
86372193
A
287XXX Changes which significantly change existing files in F<pod/> go here.
288However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
289section.
f348c3d8 290
42327f06 291=head3 L<perldata/Identifier parsing>
f348c3d8 292
86372193 293=over 4
f348c3d8
A
294
295=item *
296
42327f06
KW
297The syntax of single-character variable names has been brought
298up-to-date and more fully explained.
f348c3d8 299
86372193 300=back
f348c3d8 301
86372193 302=head1 Diagnostics
f348c3d8 303
86372193
A
304The following additions or changes have been made to diagnostic output,
305including warnings and fatal error messages. For the complete list of
306diagnostic messages, see L<perldiag>.
f348c3d8 307
86372193
A
308XXX New or changed warnings emitted by the core's C<C> code go here. Also
309include any changes in L<perldiag> that reconcile it to the C<C> code.
f348c3d8 310
86372193 311=head2 New Diagnostics
f348c3d8 312
86372193
A
313XXX Newly added diagnostic messages go under here, separated into New Errors
314and New Warnings
f348c3d8 315
86372193 316=head3 New Errors
84d03adf 317
86372193 318=over 4
ff433f2d 319
4cd408ba
TC
320=item *
321
86372193 322XXX L<message|perldiag/"message">
f348c3d8 323
86372193 324=back
f348c3d8 325
86372193 326=head3 New Warnings
f4eedc6b 327
86372193 328=over 4
f4eedc6b
DD
329
330=item *
331
4475d0d2 332L<Use of literal non-graphic characters in variable names is deprecated|perldiag/"Use of literal non-graphic characters in variable names is deprecated">
f348c3d8 333
ab0b796c
KW
334=item *
335
8c6180a9
KW
336A new C<locale> warning category has been created, with the following warning
337messages currently in it:
338
339=over 4
340
341=item *
342
343L<Locale '%s' may not work well.%s|perldiag/Locale '%s' may not work well.%s>
344
345=item *
346
ab0b796c
KW
347L<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".>
348
86372193 349=back
0561e60b 350
dd200dff
FC
351=item *
352
353L<Warning: unable to close filehandle %s properly: %s|perldiag/"Warning: unable to close filehandle %s properly: %s">
354
73e793fc
FC
355=item *
356
357The following two warnings for C<tr///> used to be skipped if the
358transliteration contained wide characters, but now they occur regardless of
359whether there are wide characters or not:
360
361L<Useless use of E<sol>d modifier in transliteration operator|perldiag/"Useless use of /d modifier in transliteration operator">
362
363L<Replacement list is longer than search list|perldiag/Replacement list is longer than search list>
364
8c6180a9
KW
365=back
366
86372193 367=head2 Changes to Existing Diagnostics
0561e60b 368
86372193 369XXX Changes (i.e. rewording) of diagnostic messages go here
0561e60b 370
86372193 371=over 4
4cd408ba 372
f348c3d8
A
373=item *
374
cb3bb329 375L<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
376
377This message has had the S<"<-- HERE"> marker removed, as it was always
378placed at the end of the regular expression, regardless of where the
379problem actually occurred. [perl #122680]
4cd408ba 380
86372193 381=back
40a81b59 382
86372193 383=head1 Utility Changes
f348c3d8 384
86372193
A
385XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go here.
386Most of these are built within the directory F<utils>.
f348c3d8 387
86372193
A
388[ List utility changes as a =head2 entry for each utility and =item
389entries for each change
390Use L<XXX> with program names to get proper documentation linking. ]
f348c3d8 391
86372193 392=head2 L<XXX>
f348c3d8 393
86372193 394=over 4
f348c3d8
A
395
396=item *
397
86372193 398XXX
40a81b59 399
13900f93 400=back
aac7f82f 401
86372193 402=head1 Configuration and Compilation
2a395b86 403
86372193
A
404XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
405go here. Any other changes to the Perl build process should be listed here.
406However, any platform-specific changes should be listed in the
407L</Platform Support> section, instead.
8435afd1 408
86372193 409[ List changes as a =item entry ].
8435afd1
SH
410
411=over 4
2a395b86 412
12d22d1f
JK
413=item *
414
c517e197 415F<Configure> with C<-Dmksymlinks> should now be faster. [perl #122002]
12d22d1f 416
2a395b86
PM
417=back
418
86372193 419=head1 Testing
2a395b86 420
86372193
A
421XXX Any significant changes to the testing of a freshly built perl should be
422listed here. Changes which create B<new> files in F<t/> go here as do any
423large changes to the testing harness (e.g. when parallel testing was added).
424Changes to existing files in F<t/> aren't worth summarizing, although the bugs
425that they represent may be covered elsewhere.
2a395b86 426
86372193 427[ List each test improvement as a =item entry ]
5cfa0642 428
8c8d6154 429=over 4
2a395b86
PM
430
431=item *
432
86372193 433XXX
bb8c7e27 434
86372193 435=back
bb8c7e27 436
86372193 437=head1 Platform Support
bb8c7e27 438
86372193 439XXX Any changes to platform support should be listed in the sections below.
bb8c7e27 440
86372193
A
441[ Within the sections, list each platform as a =item entry with specific
442changes as paragraphs below it. ]
2a395b86 443
86372193 444=head2 New Platforms
6d9b7c7c 445
86372193
A
446XXX List any platforms that this version of perl compiles on, that previous
447versions did not. These will either be enabled by new files in the F<hints/>
448directories, or new subdirectories and F<README> files at the top level of the
449source tree.
363d3025 450
8c8d6154 451=over 4
334464b3 452
86372193 453=item XXX-some-platform
334464b3 454
86372193 455XXX
ef5a9509 456
363d3025
FC
457=back
458
86372193
A
459=head2 Discontinued Platforms
460
461XXX List any platforms that this version of perl no longer compiles on.
d72cd2eb 462
0346c3a9 463=over 4
375f5f06 464
86372193 465=item XXX-some-platform
2884baee 466
86372193 467XXX
6f1a844b 468
8c8d6154 469=back
549ea8d4 470
8c8d6154 471=head2 Platform-Specific Notes
aa292ef2 472
86372193
A
473XXX List any changes for specific platforms. This could include configuration
474and compilation changes or changes in portability/compatibility. However,
475changes within modules for platforms should generally be listed in the
476L</Modules and Pragmata> section.
477
8c8d6154 478=over 4
739e9bee 479
86372193 480=item XXX-some-platform
739e9bee 481
86372193 482XXX
b23b2fdb 483
8c8d6154 484=back
b23b2fdb 485
83b69bfd
DD
486=head3 Win32
487
488=over 4
489
490=item *
491
492In the experimental C<:win32> layer, a crash in C<open> was fixed. Also
493opening C</dev/null>, which works the Win32 Perl's normal C<:unix> layer, was
494implemented for C<:win32>.
495L<[perl #122224]|https://rt.perl.org/Ticket/Display.html?id=122224>
496
13adb056
SH
497=item *
498
499A new makefile option, C<USE_LONG_DOUBLE>, has been added to the Windows
500dmake makefile for gcc builds only. Set this to "define" if you want perl to
501use long doubles to give more accuracy and range for floating point numbers.
502
83b69bfd
DD
503=back
504
8c8d6154 505=head1 Internal Changes
7d15b1a8 506
86372193
A
507XXX Changes which affect the interface available to C<XS> code go here. Other
508significant internal changes for future core maintainers should be noted as
509well.
bbca64cf 510
86372193 511[ List each change as a =item entry ]
6ff8f256 512
86372193 513=over 4
28482d6c 514
28a42920
A
515=item *
516
f8d5a522
DD
517C<screaminstr> has been removed. Although marked as public API, it is
518undocumented and has no usage in modern perl versions on CPAN Grep. Calling it
519has been fatal since 5.17.0.
28a42920 520
d109137e
FC
521=item *
522
76acbf4f
FC
523C<newDEFSVOP>, C<block_start>, C<block_end> and C<intro_my> have been added
524to the API.
d109137e 525
cff8e04e
FC
526=item *
527
528The internal C<convert> function in F<op.c> has been renamed
529C<op_convert_list> and added to the API.
530
391823f2
FC
531=item *
532
533C<sv_magic> no longer forbids "ext" magic on read-only values. After all,
534perl can't know whether the custom magic will modify the SV or not.
535[perl #123103]
536
8c8d6154 537=back
6ff8f256 538
8c8d6154 539=head1 Selected Bug Fixes
80cc3290 540
86372193
A
541XXX Important bug fixes in the core language are summarized here. Bug fixes in
542files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>.
13dd5671 543
86372193 544[ List each fix as a =item entry ]
bdab7676 545
86372193 546=over 4
db98db4e 547
8818afe8
TC
548=item *
549
2ad9844a
TC
550fchmod() and futimes() now set C<$!> when they fail due to being
551passed a closed file handle. [perl #122703]
bb8c7e27 552
9ee757be
KW
553=item *
554
555Perl now comes with a corrected Unicode 7.0 for the erratum issued on
556October 21, 2014 (see L<http://www.unicode.org/errata/#current_errata>),
557dealing with glyph shaping in Arabic.
558
c93d2ba1
TC
559=item *
560
561op_free() no longer crashes due to a stack overflow when freeing a
562deeply recursive op tree. [perl #108276]
563
53795ef8
FC
564=item *
565
9d22ccf6
TC
566scalarvoid() would crash due to a stack overflow when processing a
567deeply recursive op tree. [perl #108276]
568
569=item *
570
53795ef8
FC
571In Perl 5.20.0, C<$^N> accidentally had the internal UTF8 flag turned off
572if accessed from a code block within a regular expression, effectively
573UTF8-encoding the value. This has been fixed. [perl #123135]
574
b7cd8332
FC
575=item *
576
577A failed C<semctl> call no longer overwrites existing items on the stack,
578causing C<(semctl(-1,0,0,0))[0]> to give an "uninitialized" warning.
579
480961b6
FC
580=item *
581
582C<else{foo()}> with no space before C<foo> is now better at assigning the
583right line number to that statement. [perl #122695]
584
94c9bf90
FC
585=item *
586
587Sometimes the assignment in C<@array = split> gets optimised and C<split>
588itself writes directly to the array. This caused a bug, preventing this
589assignment from being used in lvalue context. So
590C<(@a=split//,"foo")=bar()> was an error. (This bug probably goes back to
591Perl 3, when the optimisation was added.) This optimisation, and the bug,
592started to happen in more cases in 5.21.5. It has now been fixed.
593[perl #123057]
594
8af808bf
FC
595=item *
596
597When argument lists that fail the checks installed by subroutine
598signatures, the resulting error messages now give the file and line number
599of the caller, not of the called subroutine. [perl #121374]
600
fdcaecb7
FC
601=item *
602
603Flip-flop operators (C<..> and C<...> in scalar context) used to maintain
604a separate state for each recursion level (the number of times the
605enclosing sub was called recursively), contrary to the documentation. Now
606each closure has one internal state for each flip-flop. [perl #122829]
607
2af7c6b6
FC
608=item *
609
610C<use>, C<no>, statement labels, special blocks (C<BEGIN>) and pod are now
611permitted as the first thing in a C<map> or C<grep> block, the block after
612C<print> or C<say> (or other functions) returning a handle, and within
613C<${...}>, C<@{...}>, etc. [perl #122782]
614
c0b32823
FC
615=item *
616
617The repetition operator C<x> now propagates lvalue context to its left-hand
618argument when used in contexts like C<foreach>. That allows
619C<for(($#that_array)x2) { ... }> to work as expected if the loop modifies
620$_.
621
b1a4e8b3
FC
622=item *
623
624C<(...) x ...> in scalar context used to corrupt the stack if one operand
625were an object with "x" overloading, causing erratic behaviour.
626[perl #121827]
627
9e26817d
FC
628=item *
629
630Assignment to a lexical scalar is often optimised away (as mentioned under
179c70e5 631L</Performance Enhancements>). Various bugs related to this optimisation
9e26817d
FC
632have been fixed. Certain operators on the right-hand side would sometimes
633fail to assign the value at all or assign the wrong value, or would call
634STORE twice or not at all on tied variables. The operators affected were
635C<$foo++>, C<$foo-->, and C<-$foo> under C<use integer>, C<chomp>, C<chr>
636and C<setpgrp>.
637
70cee83f
FC
638=item *
639
640List assignments were sometimes buggy if the same scalar ended up on both
641sides of the assignment due to used of C<tied>, C<values> or C<each>. The
642result would be the wrong value getting assigned.
643
e5fbfbc1
FC
644=item *
645
646C<setpgrp($nonzero)> (with one argument) was accidentally changed in 5.16
647to mean C<setpgrp(0)>. This has been fixed.
648
353075a0
FC
649=item *
650
651C<__SUB__> could return the wrong value or even corrupt memory under the
652debugger (the B<-d> switch) and in subs containing C<eval $string>.
653
9f122eef
FC
654=item *
655
656When C<sub () { $var }> becomes inlinable, it now returns a different
657scalar each time, just as a non-inlinable sub would, though Perl still
658optimises the copy away in cases where it would make no observable
659difference.
660
661=item *
662
663C<my sub f () { $var }> and C<sub () : attr { $var }> are no longer
664eligible for inlining. The former would crash; the latter would just
665throw the attributes away. An exception is made for the little-known
666":method" attribute, which does nothing much.
667
668=item *
669
670Inlining of subs with an empty prototype is now more consistent than
671before. Previously, a sub with multiple statements, all but the last
672optimised away, would be inlinable only if it were an anonymous sub
673containing a string C<eval> or C<state> declaration or closing over an
674outer lexical variable (or any anonymous sub under the debugger). Now any
675sub that gets folded to a single constant after statements have been
676optimised away is eligible for inlining. This applies to things like C<sub
677() { jabber() if DEBUG; 42 }>.
678
679Some subroutines with an explicit C<return> were being made inlinable,
680contrary to the documentation, Now C<return> always prevents inlining.
681
86372193 682=back
bb8c7e27 683
86372193 684=head1 Known Problems
bb8c7e27 685
86372193
A
686XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
687tests that had to be C<TODO>ed for the release would be noted here. Unfixed
688platform specific bugs also go here.
bb8c7e27 689
86372193 690[ List each fix as a =item entry ]
bb8c7e27 691
86372193 692=over 4
bb8c7e27 693
74f9f9ed
A
694=item *
695
eacbb379
DD
696Starting in 5.21.6, accessing L<perlapi/CvPADLIST> in an XSUB is forbidden.
697CvPADLIST has be reused for a different internal purpose for XSUBs. Guard all
698CvPADLIST expressions with C<CvISXSUB()> if your code doesn't already block
699XSUB CV*s from going through optree CV* expecting code.
28a42920 700
86372193 701=back
28a42920 702
86372193 703=head1 Errata From Previous Releases
28a42920 704
86372193 705=over 4
28a42920
A
706
707=item *
708
857f4fb1
FC
709Due to a mistake in the string-copying logic, copying the value of a state
710variable could instead steal the value and undefine the variable. This
711bug, introduced in 5.20, would happen mostly for long strings (1250 chars
712or more), but could happen for any strings under builds with copy-on-write
713disabled. [perl #123029]
714
715This bug was actually fixed in 5.21.5, but it was not until after that
716release that this bug, and the fact that it had been fixed, were
717discovered.
28a42920 718
f5630681
FC
719=item *
720
721If a named sub tries to access a scalar declared in an outer anonymous sub,
722the variable is not available, so the named sub gets its own undefined
723scalar. In 5.10, attempts to take a reference to the variable
724(C<\$that_variable>) began returning a reference to a I<copy> of it
725instead. This was accidentally fixed in 5.21.4, but the bug and its fix
726were not noticed till now.
727
8c8d6154 728=back
3a085d00 729
86372193 730=head1 Obituary
01d42a22 731
86372193
A
732XXX If any significant core contributor has died, we've added a short obituary
733here.
01d42a22 734
86372193 735=head1 Acknowledgements
01d42a22 736
86372193 737XXX Generate this with:
01d42a22 738
86372193 739 perl Porting/acknowledgements.pl v5.21.5..HEAD
f5b73711 740
44691e6f
AB
741=head1 Reporting Bugs
742
e08634c5
SH
743If you find what you think is a bug, you might check the articles recently
744posted to the comp.lang.perl.misc newsgroup and the perl bug database at
238894db 745https://rt.perl.org/ . There may also be information at
7ef8b31d 746http://www.perl.org/ , the Perl Home Page.
44691e6f 747
e08634c5
SH
748If you believe you have an unreported bug, please run the L<perlbug> program
749included with your release. Be sure to trim your bug down to a tiny but
750sufficient test case. Your bug report, along with the output of C<perl -V>,
751will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
44691e6f
AB
752
753If the bug you are reporting has security implications, which make it
e08634c5
SH
754inappropriate to send to a publicly archived mailing list, then please send it
755to perl5-security-report@perl.org. This points to a closed subscription
756unarchived mailing list, which includes all the core committers, who will be
757able to help assess the impact of issues, figure out a resolution, and help
f9001595 758co-ordinate the release of patches to mitigate or fix the problem across all
e08634c5
SH
759platforms on which Perl is supported. Please only use this address for
760security issues in the Perl core, not for modules independently distributed on
761CPAN.
44691e6f
AB
762
763=head1 SEE ALSO
764
e08634c5
SH
765The F<Changes> file for an explanation of how to view exhaustive details on
766what changed.
44691e6f
AB
767
768The F<INSTALL> file for how to build Perl.
769
770The F<README> file for general stuff.
771
772The F<Artistic> and F<Copying> files for copyright information.
773
774=cut