Commit | Line | Data |
---|---|---|
30682cc3 RS |
1 | =encoding utf8 |
2 | ||
3 | =head1 NAME | |
4 | ||
92221470 | 5 | perl5160delta - what is new for perl v5.16.0 |
30682cc3 RS |
6 | |
7 | =head1 DESCRIPTION | |
8 | ||
9 | This document describes differences between the 5.14.0 release and | |
10 | the 5.16.0 release. | |
11 | ||
12 | If you are upgrading from an earlier release such as 5.12.0, first read | |
13 | L<perl5140delta>, which describes differences between 5.12.0 and | |
14 | 5.14.0. | |
15 | ||
16 | =head1 Notice | |
17 | ||
18 | XXX Any important notices here | |
19 | ||
20 | =head1 Core Enhancements | |
21 | ||
a14d7d4a RS |
22 | =head2 C<CORE::> works on all keywords |
23 | ||
24 | The C<CORE::> prefix can now be used on keywords enabled by | |
25 | L<feature.pm|feature>, even outside the scope of C<use feature>. Relevant | |
26 | documentation files L<CORE>, L<feature>, L<perlfunc>, L<perlsub>, and | |
27 | L<perlsyn> have been updated. | |
28 | ||
29 | =head2 C<continue> no longer requires the "switch" feature | |
30 | ||
31 | The C<continue> keyword has two meanings. It can introduce a C<continue> | |
32 | block after a loop, or it can exit the current C<when> block. Up till now, | |
33 | the latter meaning was only valid with the "switch" feature enabled, and | |
34 | was a syntax error otherwise. Since the main purpose of feature.pm is to | |
35 | avoid conflicts with user-defined subroutines, there is no reason for | |
36 | C<continue> to depend on it. | |
37 | ||
38 | =head2 C<$$> can be assigned to | |
39 | ||
40 | C<$$> was made read-only in Perl 5.8.0. But only sometimes: C<local $$> | |
41 | would make it writable again. Some CPAN modules were using C<local $$> or | |
42 | XS code to bypass the read-only check, so there is no reason to keep C<$$> | |
43 | read-only. (This change also allowed a bug to be fixed while maintaining | |
44 | backward compatibility.) | |
45 | ||
46 | =head2 Features inside the debugger | |
47 | ||
48 | The current Perl's feature bundle is now enabled for commands entered in | |
49 | the interactive debugger. | |
50 | ||
51 | =head2 C<\N{...}> can now have Unicode loose name matching | |
52 | ||
53 | This is described in the C<charnames> item in | |
54 | L</Updated Modules and Pragmata> below. | |
55 | ||
56 | =head2 Breakpoints with file names | |
57 | ||
58 | The debugger's "b" command for setting breakpoints now allows a line number | |
59 | to be prefixed with a file name. See | |
60 | L<perldebug/"b [file]:[line] [condition]">. | |
30682cc3 | 61 | |
30682cc3 RS |
62 | |
63 | =head1 Security | |
64 | ||
65 | XXX Any security-related notices go here. In particular, any security | |
66 | vulnerabilities closed should be noted here rather than in the | |
67 | L</Selected Bug Fixes> section. | |
68 | ||
69 | [ List each security issue as a =head2 entry ] | |
70 | ||
71 | =head1 Incompatible Changes | |
72 | ||
a14d7d4a RS |
73 | =head2 Tying scalars that hold typeglobs |
74 | ||
75 | Attempting to tie a scalar after a typeglob was assigned to it would | |
76 | instead tie the handle in the typeglob's IO slot. This meant that it was | |
77 | impossible to tie the scalar itself. Similar problems affected C<tied> and | |
78 | C<untie>: C<tied $scalar> would return false on a tied scalar if the last | |
79 | thing returned was a typeglob, and C<untie $scalar> on such a tied scalar | |
80 | would do nothing. | |
30682cc3 | 81 | |
a14d7d4a RS |
82 | We fixed this problem before Perl 5.14.0, but it caused problems with some |
83 | CPAN modules, so we put in a deprecation cycle instead. | |
30682cc3 | 84 | |
a14d7d4a RS |
85 | Now the deprecation has been removed and this bug has been fixed. So |
86 | C<tie $scalar> will always tie the scalar, not the handle it holds. To tie | |
87 | the handle, use C<tie *$scalar> (with an explicit asterisk). The same | |
88 | applies to C<tied *$scalar> and C<untie *$scalar>. | |
89 | ||
90 | =head2 IPC::Open3 no longer provides C<xfork()>, C<xclose_on_exec()> | |
91 | and C<xpipe_anon()> | |
92 | ||
93 | All three functions were private, undocumented and unexported. They do | |
94 | not appear to be used by any code on CPAN. Two have been inlined and one | |
95 | deleted entirely. | |
96 | ||
97 | =head2 C<$$> no longer caches PID | |
98 | ||
99 | Previously, if one embeds Perl or uses XS and calls fork(3) from C, Perls | |
100 | notion of C<$$> could go out of sync with what getpid() returns. By always | |
101 | fetching the value of C<$$> via getpid(), this potential bug is eliminated. | |
102 | Code that depends on the caching behavior will break. As described in | |
103 | L</Core Enhancements>, C<$$> is now writable, but it will be reset during a | |
104 | fork. | |
30682cc3 RS |
105 | |
106 | =head1 Deprecations | |
107 | ||
108 | XXX Any deprecated features, syntax, modules etc. should be listed here. | |
109 | In particular, deprecated modules should be listed here even if they are | |
110 | listed as an updated module in the L</Modules and Pragmata> section. | |
111 | ||
112 | [ List each deprecation as a =head2 entry ] | |
113 | ||
114 | =head1 Future Deprecations | |
115 | ||
116 | This section serves as a notice of feature that are I<likely> to be | |
117 | L<deprecated|perlpolicy/deprecated> in the next release of perl (5.18.0). If | |
118 | your code depends on these features, you should contact the Perl 5 Porters via | |
119 | the L<mailing list|http://lists.perl.org/list/perl5-porters.html> or L<perlbug> | |
120 | to explain your use case and inform the deprecation process. | |
121 | ||
122 | =head1 Performance Enhancements | |
123 | ||
124 | XXX Changes which enhance performance without changing behaviour go here. There | |
125 | may well be none in a stable release. | |
126 | ||
127 | [ List each enhancement as a =item entry ] | |
128 | ||
129 | =over 4 | |
130 | ||
131 | =item * | |
132 | ||
133 | XXX | |
134 | ||
135 | =back | |
136 | ||
137 | =head1 Modules and Pragmata | |
138 | ||
139 | XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/> | |
140 | go here. If Module::CoreList is updated, generate an initial draft of the | |
141 | following sections using F<Porting/corelist-perldelta.pl>, which prints stub | |
142 | entries to STDOUT. Results can be pasted in place of the '=head2' entries | |
143 | below. A paragraph summary for important changes should then be added by hand. | |
144 | In an ideal world, dual-life modules would have a F<Changes> file that could be | |
145 | cribbed. | |
146 | ||
147 | [ Within each section, list entries as a =item entry ] | |
148 | ||
149 | =head2 New Modules and Pragmata | |
150 | ||
151 | =over 4 | |
152 | ||
153 | =item * | |
154 | ||
155 | XXX | |
156 | ||
157 | =back | |
158 | ||
159 | =head2 Updated Modules and Pragmata | |
160 | ||
161 | =over 4 | |
162 | ||
163 | =item * | |
164 | ||
165 | L<XXX> has been upgraded from version 0.69 to version 0.70. | |
166 | ||
167 | =back | |
168 | ||
169 | =head2 Removed Modules and Pragmata | |
170 | ||
a14d7d4a RS |
171 | As promised in Perl 5.14.0's release notes, the following modules have |
172 | been removed from the core distribution, and if needed should be installed | |
173 | from CPAN instead. | |
174 | ||
175 | =over | |
30682cc3 RS |
176 | |
177 | =item * | |
178 | ||
a14d7d4a RS |
179 | C<Devel::DProf> has been removed from the Perl core. Prior version was 20110228.00. |
180 | ||
181 | =item * | |
182 | ||
183 | C<Shell> has been removed from the Perl core. Prior version was 0.72_01. | |
30682cc3 RS |
184 | |
185 | =back | |
186 | ||
187 | =head1 Documentation | |
188 | ||
189 | XXX Changes to files in F<pod/> go here. Consider grouping entries by | |
190 | file and be sure to link to the appropriate page, e.g. L<perlfunc>. | |
191 | ||
192 | =head2 New Documentation | |
193 | ||
194 | XXX Changes which create B<new> files in F<pod/> go here. | |
195 | ||
196 | =head3 L<XXX> | |
197 | ||
198 | XXX Description of the purpose of the new file here | |
199 | ||
200 | =head2 Changes to Existing Documentation | |
201 | ||
202 | XXX Changes which significantly change existing files in F<pod/> go here. | |
203 | However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics> | |
204 | section. | |
205 | ||
206 | =head3 L<XXX> | |
207 | ||
208 | =over 4 | |
209 | ||
210 | =item * | |
211 | ||
212 | XXX Description of the change here | |
213 | ||
214 | =back | |
215 | ||
216 | =head1 Diagnostics | |
217 | ||
218 | The following additions or changes have been made to diagnostic output, | |
219 | including warnings and fatal error messages. For the complete list of | |
220 | diagnostic messages, see L<perldiag>. | |
221 | ||
222 | XXX New or changed warnings emitted by the core's C<C> code go here. Also | |
223 | include any changes in L<perldiag> that reconcile it to the C<C> code. | |
224 | ||
225 | [ Within each section, list entries as a =item entry that links to perldiag, | |
226 | e.g. | |
227 | ||
228 | =item * | |
229 | ||
230 | L<Invalid version object|perldiag/"Invalid version object"> | |
231 | ] | |
232 | ||
233 | =head2 New Diagnostics | |
234 | ||
235 | XXX Newly added diagnostic messages go here | |
236 | ||
237 | =head3 New Errors | |
238 | ||
239 | =over 4 | |
240 | ||
241 | =item * | |
242 | ||
243 | XXX L<message|perldiag/"message"> | |
244 | ||
245 | =back | |
246 | ||
247 | =head3 New Warnings | |
248 | ||
249 | =over 4 | |
250 | ||
a14d7d4a | 251 | =item L<Useless assignment to a temporary|perldiag/"Useless assignment to a temporary"> |
30682cc3 | 252 | |
a14d7d4a RS |
253 | Assigning to a temporary returned from an XS lvalue subroutine now produces a |
254 | warning [perl #31946]. | |
255 | ||
256 | =back | |
30682cc3 RS |
257 | |
258 | =back | |
259 | ||
260 | =head2 Changes to Existing Diagnostics | |
261 | ||
262 | XXX Changes (i.e. rewording) of diagnostic messages go here | |
263 | ||
264 | =over 4 | |
265 | ||
266 | =item * | |
267 | ||
268 | XXX Describe change here | |
269 | ||
270 | =back | |
271 | ||
272 | =head1 Utility Changes | |
273 | ||
274 | XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go | |
275 | here. Most of these are built within the directories F<utils> and F<x2p>. | |
276 | ||
277 | [ List utility changes as a =head3 entry for each utility and =item | |
278 | entries for each change | |
279 | Use L<XXX> with program names to get proper documentation linking. ] | |
280 | ||
281 | =head3 L<XXX> | |
282 | ||
283 | =over 4 | |
284 | ||
285 | =item * | |
286 | ||
287 | XXX | |
288 | ||
289 | =back | |
290 | ||
291 | =head1 Configuration and Compilation | |
292 | ||
a14d7d4a | 293 | =over 4 |
30682cc3 | 294 | |
a14d7d4a | 295 | =item * |
30682cc3 | 296 | |
a14d7d4a RS |
297 | F<regexp.h> has been modified for compatibility with GCC's B<-Werror> |
298 | option, as used by some projects that include perl's header files (5.14.1). | |
30682cc3 RS |
299 | |
300 | =item * | |
301 | ||
a14d7d4a RS |
302 | C<USE_LOCALE{,_COLLATE,_CTYPE,_NUMERIC}> have been added the output of perl -V |
303 | as they have affect the behaviour of the interpreter binary (albeit only | |
304 | in a small area). | |
305 | ||
306 | =item * | |
307 | ||
308 | The code and tests for L<IPC::Open2> have been moved from F<ext/IPC-Open2> | |
309 | into F<ext/IPC-Open3>, as C<IPC::Open2::open2()> is implemented as a thin | |
310 | wrapper around C<IPC::Open3::_open3()>, and hence is very tightly coupled to | |
311 | it. | |
312 | ||
313 | =item * | |
314 | ||
315 | The magic types and magic vtables are now generated from data in a new script | |
316 | F<regen/mg_vtable.pl>, instead of being maintained by hand. As different EBCDIC | |
317 | variants can't agree on the code point for '~', the character to code point | |
318 | conversion is done at build time by F<generate_uudmap> to a new generated header | |
319 | F<mg_data.h>. C<PL_vtbl_bm> and C<PL_vtbl_fm> are now defined by the | |
320 | pre-processor as C<PL_vtbl_regexp>, instead of being distinct C variables. | |
321 | C<PL_vtbl_sig> has been removed. | |
322 | ||
323 | =item * | |
324 | ||
325 | Building with C<-DPERL_GLOBAL_STRUCT> works again. This configuration is not | |
326 | generally used. | |
327 | ||
328 | =item * | |
329 | ||
330 | Perl configured with I<MAD> now correctly frees C<MADPROP> structures when | |
331 | OPs are freed. C<MADPROP>s are now allocated with C<PerlMemShared_malloc()> | |
332 | ||
333 | =back | |
30682cc3 RS |
334 | |
335 | =back | |
336 | ||
337 | =head1 Testing | |
338 | ||
339 | XXX Any significant changes to the testing of a freshly built perl should be | |
340 | listed here. Changes which create B<new> files in F<t/> go here as do any | |
341 | large changes to the testing harness (e.g. when parallel testing was added). | |
342 | Changes to existing files in F<t/> aren't worth summarising, although the bugs | |
343 | that they represent may be covered elsewhere. | |
344 | ||
345 | [ List each test improvement as a =item entry ] | |
346 | ||
347 | =over 4 | |
348 | ||
349 | =item * | |
350 | ||
351 | XXX | |
352 | ||
353 | =back | |
354 | ||
355 | =head1 Platform Support | |
356 | ||
357 | XXX Any changes to platform support should be listed in the sections below. | |
358 | ||
359 | [ Within the sections, list each platform as a =item entry with specific | |
360 | changes as paragraphs below it. ] | |
361 | ||
362 | =head2 New Platforms | |
363 | ||
364 | XXX List any platforms that this version of perl compiles on, that previous | |
365 | versions did not. These will either be enabled by new files in the F<hints/> | |
366 | directories, or new subdirectories and F<README> files at the top level of the | |
367 | source tree. | |
368 | ||
369 | =over 4 | |
370 | ||
371 | =item XXX-some-platform | |
372 | ||
373 | XXX | |
374 | ||
375 | =back | |
376 | ||
377 | =head2 Discontinued Platforms | |
378 | ||
379 | XXX List any platforms that this version of perl no longer compiles on. | |
380 | ||
381 | =over 4 | |
382 | ||
383 | =item XXX-some-platform | |
384 | ||
385 | XXX | |
386 | ||
387 | =back | |
388 | ||
389 | =head2 Platform-Specific Notes | |
390 | ||
391 | XXX List any changes for specific platforms. This could include configuration | |
392 | and compilation changes or changes in portability/compatibility. However, | |
393 | changes within modules for platforms should generally be listed in the | |
394 | L</Modules and Pragmata> section. | |
395 | ||
396 | =over 4 | |
397 | ||
398 | =item XXX-some-platform | |
399 | ||
400 | XXX | |
401 | ||
402 | =back | |
403 | ||
404 | =head1 Internal Changes | |
405 | ||
406 | XXX Changes which affect the interface available to C<XS> code go here. | |
407 | Other significant internal changes for future core maintainers should | |
408 | be noted as well. | |
409 | ||
410 | [ List each change as a =item entry ] | |
411 | ||
412 | =over 4 | |
413 | ||
414 | =item * | |
415 | ||
416 | XXX | |
417 | ||
418 | =back | |
419 | ||
420 | =head1 Selected Bug Fixes | |
421 | ||
a14d7d4a | 422 | =head2 Regular expressions and character classes |
30682cc3 RS |
423 | |
424 | =over 4 | |
425 | ||
426 | =item * | |
427 | ||
a14d7d4a RS |
428 | The new (in 5.14.0) regular expression modifier C</a> when repeated like |
429 | C</aa> forbids the characters outside the ASCII range that match | |
430 | characters inside that range from matching under C</i>. This did not | |
431 | work under some circumstances, all involving alternation, such as: | |
432 | ||
433 | "\N{KELVIN SIGN}" =~ /k|foo/iaa; | |
434 | ||
435 | succeeded inappropriately. This is now fixed. | |
436 | ||
437 | =item * | |
438 | ||
439 | 5.14.0 introduced some memory leaks in regular expression character | |
440 | classes such as C<[\w\s]>, which have now been fixed (5.14.1) | |
441 | ||
442 | =item * | |
443 | ||
444 | An edge case in regular expression matching could potentially loop. | |
445 | This happened only under C</i> in bracketed character classes that have | |
446 | characters with multi-character folds, and the target string to match | |
447 | against includes the first portion of the fold, followed by another | |
448 | character that has a multi-character fold that begins with the remaining | |
449 | portion of the fold, plus some more. | |
450 | ||
451 | "s\N{U+DF}" =~ /[\x{DF}foo]/i | |
452 | ||
453 | is one such case. C<\xDF> folds to C<"ss">. (5.14.1) | |
454 | ||
455 | =item * | |
456 | ||
457 | A few characters in regular expression pattern matches did not | |
458 | match correctly in some circumstances, all involving C</i>. The | |
459 | affected characters are: | |
460 | COMBINING GREEK YPOGEGRAMMENI, | |
461 | GREEK CAPITAL LETTER IOTA, | |
462 | GREEK CAPITAL LETTER UPSILON, | |
463 | GREEK PROSGEGRAMMENI, | |
464 | GREEK SMALL LETTER IOTA WITH DIALYTIKA AND OXIA, | |
465 | GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS, | |
466 | GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND OXIA, | |
467 | GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS, | |
468 | LATIN SMALL LETTER LONG S, | |
469 | LATIN SMALL LIGATURE LONG S T, | |
470 | and | |
471 | LATIN SMALL LIGATURE ST. | |
472 | ||
473 | =item * | |
474 | ||
475 | Fixed memory leak regression in regular expression compilation | |
476 | under threading | |
477 | ||
478 | =back | |
479 | ||
480 | =head2 Formats | |
481 | ||
482 | =over | |
483 | ||
484 | =item * | |
485 | ||
486 | A number of edge cases have been fixed with formats and C<formline>; | |
487 | in particular, where the format itself is potentially variable (such as | |
488 | with ties and overloading), and where the format and data differ in their | |
489 | encoding. In both these cases, it used to possible for the output to be | |
490 | corrupted [perl #91032]. | |
491 | ||
492 | =item * | |
493 | ||
494 | C<formline> no longer converts its argument into a string in-place. So | |
495 | passing a reference to C<formline> no longer destroys the reference | |
496 | [perl #79532]. | |
497 | ||
498 | =back | |
499 | ||
500 | =head2 Copy-on-write scalars | |
501 | ||
502 | Copy-on-write scalars were introduced in 5.8.0, but most Perl code | |
503 | did not encounter them (they were used mostly internally). Perl | |
504 | 5.10.0 extended them, such that assigning C<__PACKAGE__> or a | |
505 | hash key to a scalar would make it copy-on-write. Several parts | |
506 | of Perl were not updated to account for them, but have now been fixed. | |
507 | ||
508 | =over | |
509 | ||
510 | =item * | |
511 | ||
512 | C<utf8::decode> had a nasty bug that would modify copy-on-write scalars' | |
513 | string buffers in place (i.e., skipping the copy). This could result in | |
514 | hashes having two elements with the same key [perl #91834]. | |
515 | ||
516 | =item * | |
517 | ||
518 | Lvalue subroutines were not allowing COW scalars to be returned. This was | |
519 | fixed for lvalue scalar context in Perl 5.12.3 and 5.14.0, but list context | |
520 | was not fixed until this release. | |
521 | ||
522 | =item * | |
523 | ||
524 | Elements of restricted hashes (see the L<fields> pragma) containing | |
525 | copy-on-write values couldn't be deleted, nor could such hashes be cleared | |
526 | (C<%hash = ()>). | |
527 | ||
528 | =item * | |
529 | ||
530 | Localising a tied variable used to make it read-only if it contained a | |
531 | copy-on-write string. | |
532 | ||
533 | =item * | |
534 | ||
535 | L<Storable>, L<Devel::Peek> and L<PerlIO::scalar> had similar problems. | |
536 | See L</Updated Modules and Pragmata>, above. | |
537 | ||
538 | =back | |
539 | ||
540 | =head2 lvalue subroutines | |
541 | ||
542 | There have been various fixes to lvalue subroutines. | |
543 | ||
544 | =over | |
545 | ||
546 | =item * | |
547 | ||
548 | Explicit return now returns the actual argument passed to return, instead | |
549 | of copying it [perl #72724] [perl #72706]. | |
550 | ||
551 | B<Note:> There are still some discrepancies between explicit and implicit | |
552 | return, which will hopefully be resolved soon. So the exact behaviour is | |
553 | not set in stone yet. | |
554 | ||
555 | =item * | |
556 | ||
557 | Lvalue subroutines used to enforce lvalue syntax (i.e., whatever can go on | |
558 | the left-hand side of C<=>) for the last statement and the arguments to | |
559 | return. Since lvalue subroutines are not always called in lvalue context, | |
560 | this restriction has been lifted. | |
561 | ||
562 | =item * | |
563 | ||
564 | Lvalue subroutines are less restrictive as to what values can be returned. | |
565 | It used to croak on values returned by C<shift> and C<delete> and from | |
566 | other subroutines, but no longer does so [perl #71172]. | |
567 | ||
568 | =item * | |
569 | ||
570 | Empty lvalue subroutines (C<sub :lvalue {}>) used to return C<@_> in list | |
571 | context. In fact, all subroutines used to, but regular subs were fixed in | |
572 | Perl 5.8.2. Now lvalue subroutines have been likewise fixed. | |
573 | ||
574 | =item * | |
575 | ||
576 | Lvalue subroutines used to copy their return values in rvalue context. Not | |
577 | only was this a waste of CPU cycles, but it also caused bugs. A C<($)> | |
578 | prototype would cause an lvalue sub to copy its return value [perl #51408], | |
579 | and C<while(lvalue_sub() =~ m/.../g) { ... }> would loop endlessly | |
580 | [perl #78680]. | |
581 | ||
582 | =item * | |
583 | ||
584 | Autovivification now works on values returned from lvalue subroutines | |
585 | [perl #7946]. | |
586 | ||
587 | =item * | |
588 | ||
589 | When called in pass-by-reference context (e.g., subroutine arguments or a list | |
590 | passed to C<for>), an lvalue subroutine returning arrays or hashes used to bind | |
591 | the arrays (or hashes) to scalar variables--something that is not supposed to | |
592 | happen. This could result in "Bizarre copy of ARRAY" errors or C<print> | |
593 | ignoring its arguments. It also made nonsensical code like C<@{\$_}> "work". | |
594 | This was fixed in 5.14.0 if an array were the first thing returned from the | |
595 | subroutine (but not for C<$scalar, @array> or hashes being returned). Now a | |
596 | more general fix has been applied [perl #23790]. | |
597 | ||
598 | =item * | |
599 | ||
600 | When called in pass-by-reference context, lvalue subroutines used to copy | |
601 | any read-only value that was returned. E.g., C< sub :lvalue { $] } > | |
602 | would not return C<$]>, but a copy of it. | |
603 | ||
604 | =item * | |
605 | ||
606 | Assignment to C<keys> returned from an lvalue sub used not to work, but now | |
607 | it does. | |
608 | ||
609 | =item * | |
610 | ||
611 | Applying the C<:lvalue> attribute to an XSUB or to an aliased subroutine | |
612 | stub with C<< sub foo :lvalue; >> syntax stopped working in Perl 5.12. | |
613 | This has been fixed. | |
614 | ||
615 | =back | |
616 | ||
617 | =head2 Fixes related to hashes | |
618 | ||
619 | =over | |
620 | ||
621 | =item * | |
622 | ||
623 | A bug has been fixed that would cause a "Use of freed value in iteration" | |
624 | error if the next two hash elements that would be iterated over are | |
625 | deleted [perl #85026]. (5.14.1) | |
626 | ||
627 | =item * | |
628 | ||
629 | Freeing deeply nested hashes no longer crashes [perl #44225]. | |
630 | ||
631 | =item * | |
632 | ||
633 | Deleting the current hash iterator (the hash element that would be returend | |
634 | by the next call to C<each>) in void context used not to free it. The hash | |
635 | would continue to reference it until the next iteration. This has been | |
636 | fixed [perl #85026]. | |
637 | ||
638 | =back | |
639 | ||
640 | =head2 Other notable fixes | |
641 | ||
642 | =over | |
643 | ||
644 | =item * | |
645 | ||
646 | Passing the same constant subroutine to both C<index> and C<formline> no | |
647 | longer causes one or the other to fail [perl #89218]. (5.14.1) | |
648 | ||
649 | =item * | |
650 | ||
651 | List assignment to lexical variables declared with attributes in the same | |
652 | statement (C<my ($x,@y) : blimp = (72,94)>) stopped working in Perl 5.8.0. | |
653 | It has now been fixed. | |
654 | ||
655 | =item * | |
656 | ||
657 | Perl 5.10.0 introduced some faulty logic that made "U*" in the middle of | |
658 | a pack template equivalent to "U0" if the input string was empty. This has | |
659 | been fixed [perl #90160]. | |
660 | ||
661 | =item * | |
662 | ||
663 | Destructors on objects were not called during global destruction on objects | |
664 | that were not referenced by any scalars. This could happen if an array | |
665 | element were blessed (e.g., C<bless \$a[0]>) or if a closure referenced a | |
666 | blessed variable (C<bless \my @a; sub foo { @a }>). | |
667 | ||
668 | Now there is an extra pass during global destruction to fire destructors on | |
669 | any objects that might be left after the usual passes that check for | |
670 | objects referenced by scalars [perl #36347]. | |
671 | ||
672 | This bug fix was added in Perl 5.13.9, but caused problems with some CPAN | |
673 | modules that were relying on the bug. Since it was so close to Perl | |
674 | 5.14.0, the fix was reverted in 5.13.10, to allow more time for the modules | |
675 | to adapt. Hopefully they will be fixed soon (see L</Known Problems>, | |
676 | below). | |
677 | ||
678 | =item * | |
679 | ||
680 | C<given> was not calling set-magic on the implicit lexical C<$_> that it | |
681 | uses. This meant, for example, that C<pos> would be remembered from one | |
682 | execution of the same C<given> block to the next, even if the input were a | |
683 | different variable [perl #84526]. | |
684 | ||
685 | =item * | |
686 | ||
687 | The "R" command for restarting a debugger session has been fixed to work on | |
688 | Windows, or any other system lacking a C<POSIX::_SC_OPEN_MAX> constant | |
689 | [perl #87740]. | |
690 | ||
691 | =item * | |
692 | ||
693 | Fixed a case where it was possible that a freed buffer may have been read | |
694 | from when parsing a here document [perl #90128]. (5.14.1) | |
695 | ||
696 | =item * | |
697 | ||
698 | The C<study> function could become confused if fed a string longer than | |
699 | 2**31 characters. Now it simply skips such strings. | |
700 | ||
701 | =item * | |
702 | ||
703 | C<each(I<ARRAY>)> is now wrapped in C<defined(...)>, like C<each(I<HASH>)>, | |
704 | inside a C<while> condition [perl #90888]. | |
705 | ||
706 | =item * | |
707 | ||
708 | In @INC filters (subroutines returned by subroutines in @INC), $_ used to | |
709 | misbehave: If returned from a subroutine, it would not be copied, but the | |
710 | variable itself would be returned; and freeing $_ (e.g., with C<undef *_>) | |
711 | would cause perl to crash. This has been fixed [perl #91880]. | |
712 | ||
713 | =item * | |
714 | ||
715 | An ASCII single quote (') in a symbol name is meant to be equivalent to a | |
716 | double colon (::) except at the end of the name. It was not equivalent if | |
717 | followed by a null character, but now it is [perl #88138]. | |
718 | ||
719 | =item * | |
720 | ||
721 | The abbreviations for four C1 control characters | |
722 | C<MW> | |
723 | C<PM>, | |
724 | C<RI>, | |
725 | and | |
726 | C<ST> | |
727 | were previously unrecognized by C<\N{}>, | |
728 | vianame(), and string_vianame(). | |
729 | ||
730 | =item * | |
731 | ||
732 | Some cases of threads crashing due to memory allocation during cloning have | |
733 | been fixed [perl #90006]. | |
734 | ||
735 | =item * | |
736 | ||
737 | Attempting to C<goto> out of a tied handle method used to cause memory | |
738 | corruption or crashes. Now it produces an error message instead | |
739 | [perl #8611]. | |
740 | ||
741 | =item * | |
742 | ||
743 | Perl skips copying values returned from a subroutine if it thinks the value | |
744 | is not in use elsewhere. Due to faulty logic, this would happen with the | |
745 | result of C<delete>, C<shift> or C<splice>, even if the result was | |
746 | referenced elsewhere. So C<< \sub { delete $_[0] }->($x) >> would return a | |
747 | reference to C<$x>. This has been fixed [perl #91844]. | |
30682cc3 RS |
748 | |
749 | =back | |
750 | ||
751 | =head1 Known Problems | |
752 | ||
753 | XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any | |
754 | tests that had to be C<TODO>ed for the release would be noted here, unless | |
755 | they were specific to a particular platform (see below). | |
756 | ||
757 | This is a list of some significant unfixed bugs, which are regressions | |
758 | from either 5.XXX.XXX or 5.XXX.XXX. | |
759 | ||
760 | [ List each fix as a =item entry ] | |
761 | ||
762 | =over 4 | |
763 | ||
764 | =item * | |
765 | ||
766 | XXX | |
767 | ||
768 | =back | |
769 | ||
770 | =head1 Obituary | |
771 | ||
772 | XXX If any significant core contributor has died, we've added a short obituary | |
773 | here. | |
774 | ||
775 | =head1 Acknowledgements | |
776 | ||
777 | XXX Generate this with: | |
778 | ||
fbea3025 | 779 | perl Porting/acknowledgements.pl v5.15.7..HEAD |
30682cc3 RS |
780 | |
781 | =head1 Reporting Bugs | |
782 | ||
783 | If you find what you think is a bug, you might check the articles | |
784 | recently posted to the comp.lang.perl.misc newsgroup and the perl | |
785 | bug database at http://rt.perl.org/perlbug/ . There may also be | |
786 | information at http://www.perl.org/ , the Perl Home Page. | |
787 | ||
788 | If you believe you have an unreported bug, please run the L<perlbug> | |
789 | program included with your release. Be sure to trim your bug down | |
790 | to a tiny but sufficient test case. Your bug report, along with the | |
791 | output of C<perl -V>, will be sent off to perlbug@perl.org to be | |
792 | analysed by the Perl porting team. | |
793 | ||
794 | If the bug you are reporting has security implications, which make it | |
795 | inappropriate to send to a publicly archived mailing list, then please send | |
796 | it to perl5-security-report@perl.org. This points to a closed subscription | |
797 | unarchived mailing list, which includes | |
798 | all the core committers, who will be able | |
799 | to help assess the impact of issues, figure out a resolution, and help | |
800 | co-ordinate the release of patches to mitigate or fix the problem across all | |
801 | platforms on which Perl is supported. Please only use this address for | |
802 | security issues in the Perl core, not for modules independently | |
803 | distributed on CPAN. | |
804 | ||
805 | =head1 SEE ALSO | |
806 | ||
807 | The F<Changes> file for an explanation of how to view exhaustive details | |
808 | on what changed. | |
809 | ||
810 | The F<INSTALL> file for how to build Perl. | |
811 | ||
812 | The F<README> file for general stuff. | |
813 | ||
814 | The F<Artistic> and F<Copying> files for copyright information. | |
815 | ||
816 | =cut |