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