This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Note CPAN upgrade in perldelta.
[perl5.git] / pod / perldelta.pod
1 =encoding utf8
2
3 =for comment
4 A Windows-specific commit that may need mention (does this have any
5 user-visible effects?):
6 0c38a57 Remove exports of dummy set[ug]id functions on Windows
7
8 =head1 NAME
9
10 [ this is a template for a new perldelta file.  Any text flagged as XXX needs
11 to be processed before release. ]
12
13 perldelta - what is new for perl v5.17.5
14
15 =head1 DESCRIPTION
16
17 This document describes differences between the 5.17.4 release and the 5.17.5
18 release.
19
20 If you are upgrading from an earlier release such as 5.17.3, first read
21 L<perl5174delta>, which describes differences between 5.17.3 and 5.17.4.
22
23 =head1 Notice
24
25 XXX Any important notices here
26
27 =head1 Core Enhancements
28
29 XXX New core language features go here.  Summarize user-visible core language
30 enhancements.  Particularly prominent performance optimisations could go
31 here, but most should go in the L</Performance Enhancements> section.
32
33 [ List each enhancement as a =head2 entry ]
34
35 =head2 Upgrade to Unicode 6.2
36
37 Perl now supports the final version of Unicode 6.2.  Earlier releases in
38 the 5.17 series supported Unicode 6.2 beta versions.  There were no
39 substantive changes in the final Unicode 6.2 version from the most
40 recent beta, included in Perl 5.17.4.  A list of changes from Unicode
41 6.1 is at L<http://www.unicode.org/versions/Unicode6.2.0>.
42
43 =head1 Security
44
45 XXX Any security-related notices go here.  In particular, any security
46 vulnerabilities closed should be noted here rather than in the
47 L</Selected Bug Fixes> section.
48
49 [ List each security issue as a =head2 entry ]
50
51 =head2 Avoid calling memset with a negative count
52
53 Poorly written perl code that allows an attacker to specify the count to perl's
54 C<x> string repeat operator can already cause a memory exhaustion
55 denial-of-service attack. A flaw in versions of perl before 5.15.5 can escalate
56 that into a heap buffer overrun; coupled with versions of glibc before 2.16, it
57 possibly allows the execution of arbitrary code.
58
59 The flaw addressed to this commit has been assigned identifier CVE-2012-5195.
60
61 =head1 Incompatible Changes
62
63 XXX For a release on a stable branch, this section aspires to be:
64
65     There are no changes intentionally incompatible with 5.XXX.XXX
66     If any exist, they are bugs, and we request that you submit a
67     report.  See L</Reporting Bugs> below.
68
69 [ List each incompatible change as a =head2 entry ]
70
71 =head2 New Restrictions in Multi-Character Case-Insensitive Matching in Regular Expression Bracketed Character Classes
72
73 Unicode has now withdrawn their previous recommendation for regular
74 expressions to automatically handle cases where a single character can
75 match multiple characters case-insensitively; for example, the letter
76 LATIN SMALL LETTER SHARP S and the sequence C<ss>.  This is because
77 it turns out to be impracticable to do this correctly in all
78 circumstances.  Because Perl has tried to do this as best it can, it
79 will continue to do so.  (We are considering an option to turn it off.)
80 However, a new restriction is being added on such matches when they
81 occur in [bracketed] character classes.  People were specifying
82 things such as C</[\0-\xff]/i>, and being surprised that it matches the
83 two character sequence C<ss> (since LATIN SMALL LETTER SHARP S occurs in
84 this range).  This behavior is also inconsistent with the using a
85 property instead of a range:  C<\p{Block=Latin1}> also includes LATIN
86 SMALL LETTER SHARP S, but C</[\p{Block=Latin1}]/i> does not match C<ss>.
87 The new rule is that for there to be a multi-character case-insensitive
88 match within a bracketed character class, the character must be
89 explicitly listed, and not as an end point of a range.  This more
90 closely obeys the Principle of Least Astonishment.  See
91 L<perlrecharclass/Bracketed Character Classes>.  Note that a bug [perl
92 #89774], now fixed as part of this change, prevented the previous
93 behavior from working fully.
94
95 =head2 Change to Warnings About Lexical Subroutines
96
97 The warnings category for lexical subroutines is now
98 "experimental::lexical_subs", with two colons, not
99 "experimental:lexical_subs";
100
101 =head1 Deprecations
102
103 XXX Any deprecated features, syntax, modules etc. should be listed here.  In
104 particular, deprecated modules should be listed here even if they are listed as
105 an updated module in the L</Modules and Pragmata> section.
106
107 [ List each deprecation as a =head2 entry ]
108
109 =head1 Performance Enhancements
110
111 XXX Changes which enhance performance without changing behaviour go here.
112 There may well be none in a stable release.
113
114 [ List each enhancement as a =item entry ]
115
116 =over 4
117
118 =item *
119
120 XXX
121
122 =back
123
124 =head1 Modules and Pragmata
125
126 XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
127 go here.  If Module::CoreList is updated, generate an initial draft of the
128 following sections using F<Porting/corelist-perldelta.pl>, which prints stub
129 entries to STDOUT.  Results can be pasted in place of the '=head2' entries
130 below.  A paragraph summary for important changes should then be added by hand.
131 In an ideal world, dual-life modules would have a F<Changes> file that could be
132 cribbed.
133
134 [ Within each section, list entries as a =item entry ]
135
136 =head2 New Modules and Pragmata
137
138 =over 4
139
140 =item *
141
142 XXX
143
144 =back
145
146 =head2 Updated Modules and Pragmata
147
148 =over 4
149
150 =item *
151
152 L<AutoLoader> has been upgraded from version 5.72 to 5.73.
153
154 =item *
155
156 L<B::Deparse> has been upgraded from version 1.17 to 1.18.  It no longer
157 dies when deparsing C<sort> without arguments.  It now correctly omits the
158 comma for C<system $prog @args> and C<exec $prog @args>.
159
160 =item *
161
162 L<bignum>, L<bigint> and L<bigrat> have been upgraded from version 0.30 to
163 0.31.  The overrides for C<hex> and C<oct> have been rewritten, eliminating
164 several problems, and making one incompatible change:
165
166 =over
167
168 =item *
169
170 Formerly, whichever of C<use bigint> or C<use bigrat> was compiled later
171 would take precedence over the other, causing C<hex> and C<oct> not to
172 respect the other pragma when in scope.
173
174 =item *
175
176 Using any of these three pragmata would cause C<hex> and C<oct> anywhere
177 else in the program to evalute their arguments in list context and prevent
178 them from inferring $_ when called without arguments.
179
180 =item *
181
182 Using any of these three pragmata would make C<oct("1234")> return 1234
183 (for any number not beginning with 0) anywhere in the program.  Now "1234"
184 is translated from octal to decimal, whether within the pragma's scope or
185 not.
186
187 =item *
188
189 The global overrides that facilitate lexical use of C<hex> and C<oct> now
190 respect any existing overrides that were in place before the new overrides
191 were installed, falling back to them outside of the scope of C<use bignum>.
192
193 =item *
194
195 C<use bignum "hex">, C<use bignum "oct"> and similar invocations for bigint
196 and bigrat now export a C<hex> or C<oct> function, instead of providing a
197 global override.
198
199 =back
200
201 =item *
202
203 L<Carp> has been upgraded from version 1.26 to 1.27.  The C<longmess()> and
204 C<shortmess()> functions are now documented.
205
206 =item *
207
208 L<CPAN> has been upgraded from version 1.98 to 1.99_51.
209
210 =item *
211
212 L<CPANPLUS> has been upgraded from version 0.9131 to 0.9133.
213
214 =item *
215
216 L<Data::Dumper> has been upgraded from version 2.135_07 to 2.136.  This promotes
217 the previous development release to a stable release.
218
219 =item *
220
221 L<Digest::SHA> has been upgraded from version 5.71 to 5.72.
222
223 =item *
224
225 L<ExtUtils::CBuilder> has been upgraded from version 0.280208 to 0.280209.  A
226 list of symbols to export can now be passed to C<link()> when on Windows, as on
227 other OSes [perl #115100].
228
229 =item *
230
231 L<feature> has been upgraded from version 1.30 to 1.31.
232
233 =item *
234
235 L<File::Glob> has been upgraded from version 1.17 to 1.18.  A
236 space-separated list of patterns return long lists of results no longer
237 results in memory corruption or crashes.  This bug was introduced in Perl
238 5.16.0.  [perl #114984]
239
240 =item *
241
242 L<HTTP::Tiny> has been upgraded from version 0.022 to 0.024.  This improves
243 SSL support.
244
245 =item *
246
247 L<Module::CoreList> has been upgraded from version 2.73 to 2.74.
248
249 =item *
250
251 L<PerlIO::encoding> has been upgraded from version 0.15 to 0.16.  This is
252 the module implementing the ":encoding(...)" I/O layer.  It no longer
253 corrupts memory or crashes when the encoding back-end reallocates the
254 buffer or gives it a typeglob or shared hash key scalar.
255
256 =item *
257
258 L<threads::shared> has been upgraded from version 1.41 to 1.42.  This adds
259 support for dual-valued values as created by
260 L<Scalar::Util::dualvar|Scalar::Util/"dualvar NUM, STRING">.
261
262 =item *
263
264 L<Unicode::Collate> hsa been upgraded from version 0.89 to 0.90.
265
266 =item *
267
268 L<Unicode::Normalize> has been upgraded from version 1.14 to 1.15.
269
270 =item *
271
272 L<warnings> has been upgraded from version 1.14 to 1.15.
273
274 =item *
275
276 L<Win32CORE> has been upgraded from version 0.03 to 0.04.
277
278 =back
279
280 =head2 Removed Modules and Pragmata
281
282 =over 4
283
284 =item *
285
286 XXX
287
288 =back
289
290 =head1 Documentation
291
292 XXX Changes to files in F<pod/> go here.  Consider grouping entries by
293 file and be sure to link to the appropriate page, e.g. L<perlfunc>.
294
295 =head2 New Documentation
296
297 XXX Changes which create B<new> files in F<pod/> go here.
298
299 =head3 L<XXX>
300
301 XXX Description of the purpose of the new file here
302
303 =head2 Changes to Existing Documentation
304
305 XXX Changes which significantly change existing files in F<pod/> go here.
306 However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
307 section.
308
309 =head3 L<XXX>
310
311 =over 4
312
313 =item *
314
315 XXX Description of the change here
316
317 =back
318
319 =head1 Diagnostics
320
321 The following additions or changes have been made to diagnostic output,
322 including warnings and fatal error messages.  For the complete list of
323 diagnostic messages, see L<perldiag>.
324
325 XXX New or changed warnings emitted by the core's C<C> code go here.  Also
326 include any changes in L<perldiag> that reconcile it to the C<C> code.
327
328 =head2 New Diagnostics
329
330 XXX Newly added diagnostic messages go under here, separated into New Errors
331 and New Warnings
332
333 =head3 New Errors
334
335 =over 4
336
337 =item *
338
339 XXX L<message|perldiag/"message">
340
341 =back
342
343 =head3 New Warnings
344
345 =over 4
346
347 =item *
348
349 XXX L<message|perldiag/"message">
350
351 =back
352
353 =head2 Changes to Existing Diagnostics
354
355 XXX Changes (i.e. rewording) of diagnostic messages go here
356
357 =over 4
358
359 =item *
360
361 The error produced when a module cannot be loaded now includes a hint that
362 the module may need to be installed: "Can't locate hopping.pm in @INC (you
363 may need to install the hopping module) (@INC contains: ...)"
364
365 =back
366
367 =head1 Utility Changes
368
369 XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go here.
370 Most of these are built within the directories F<utils> and F<x2p>.
371
372 [ List utility changes as a =head3 entry for each utility and =item
373 entries for each change
374 Use L<XXX> with program names to get proper documentation linking. ]
375
376 =head3 L<h2xs>
377
378 =over 4
379
380 =item *
381
382 F<h2xs> no longer produces invalid code for empty defines.  [perl #20636]
383
384 =back
385
386 =head1 Configuration and Compilation
387
388 XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
389 go here.  Any other changes to the Perl build process should be listed here.
390 However, any platform-specific changes should be listed in the
391 L</Platform Support> section, instead.
392
393 [ List changes as a =item entry ].
394
395 =over 4
396
397 =item *
398
399 XXX
400
401 =back
402
403 =head1 Testing
404
405 XXX Any significant changes to the testing of a freshly built perl should be
406 listed here.  Changes which create B<new> files in F<t/> go here as do any
407 large changes to the testing harness (e.g. when parallel testing was added).
408 Changes to existing files in F<t/> aren't worth summarizing, although the bugs
409 that they represent may be covered elsewhere.
410
411 [ List each test improvement as a =item entry ]
412
413 =over 4
414
415 =item *
416
417 XXX
418
419 =back
420
421 =head1 Platform Support
422
423 XXX Any changes to platform support should be listed in the sections below.
424
425 [ Within the sections, list each platform as a =item entry with specific
426 changes as paragraphs below it. ]
427
428 =head2 New Platforms
429
430 XXX List any platforms that this version of perl compiles on, that previous
431 versions did not.  These will either be enabled by new files in the F<hints/>
432 directories, or new subdirectories and F<README> files at the top level of the
433 source tree.
434
435 =over 4
436
437 =item XXX-some-platform
438
439 XXX
440
441 =back
442
443 =head2 Discontinued Platforms
444
445 XXX List any platforms that this version of perl no longer compiles on.
446
447 =over 4
448
449 =item MPE/IX
450
451 Support for MPE/IX has been removed.
452
453 =back
454
455 =head2 Platform-Specific Notes
456
457 XXX List any changes for specific platforms.  This could include configuration
458 and compilation changes or changes in portability/compatibility.  However,
459 changes within modules for platforms should generally be listed in the
460 L</Modules and Pragmata> section.
461
462 =over 4
463
464 =item Win32
465
466 The option to build without USE_SOCKETS_AS_HANDLES has been removed.
467
468 =back
469
470 =head1 Internal Changes
471
472 XXX Changes which affect the interface available to C<XS> code go here.  Other
473 significant internal changes for future core maintainers should be noted as
474 well.
475
476 [ List each change as a =item entry ]
477
478 =over 4
479
480 =item *
481
482 Case-insensitive matching inside a [bracketed] character class with a
483 multi-character fold, no longer excludes one of the possibilities in the
484 circumstances that it used to. [perl #89774].
485
486 =item *
487
488 C<PL_formfeed> has been removed.
489
490 =item *
491
492 The regular expression engine no longer reads one byte past the end of the
493 target string.  While for all internally well-formed scalars this should
494 never have been a problem, this change facilitates clever tricks with
495 string buffers in CPAN modules.  [perl #73542]
496
497 =item *
498
499 Inside a BEGIN block, C<PL_compcv> now points to the currently-compiling
500 subroutine, rather than the BEGIN block itself.
501
502 =item *
503
504 C<mg_length> has been deprecated.
505
506 =item *
507
508 C<sv_len> now always returns a byte count and C<sv_len_utf8> a character
509 count.  Previously, C<sv_len> and C<sv_len_utf8> were both buggy and would
510 sometimes returns bytes and sometimes characters.  C<sv_len_utf8> no longer
511 assumes that its argument is in UTF8.  Neither of these creates UTF8 caches
512 for tied or overloaded values or for non-PVs any more.
513
514 =item *
515
516 C<sv_mortalcopy> now copies string buffers of shared hash key scalars when
517 called from XS modules [perl #79824].
518
519 =item *
520
521 C<RXf_SPLIT> and C<RXf_SKIPWHITE> are no longer used.  They are now
522 #defined as 0.
523
524 =item *
525
526 The new C<RXf_MODIFIES_VARS> flag can be set by custom regular expression
527 engines to indicate that the execution of the regular expression may cause
528 variables to be modified.  This lets C<s///> know to skip certain
529 optimisations.  Perl's own regular expression engine sets this flag for the
530 special backtracking verbs that set $REGMARK and $REGERROR.
531
532 =back
533
534 =head1 Selected Bug Fixes
535
536 XXX Important bug fixes in the core language are summarized here.  Bug fixes in
537 files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>.
538
539 [ List each fix as a =item entry ]
540
541 =over 4
542
543 =item *
544
545 A bug, case-insensitive regex with UTF8-flagged strings, introduced
546 earlier in the 5.17 series has been fixed.  [perl #114982]
547
548 =item *
549
550 Attributes applied to lexical variables no longer leak memory.
551 [perl #114764]
552
553 =item *
554
555 C<dump>, C<goto>, C<last>, C<next>, C<redo> or C<require> followed by a
556 bareword (or version) and then an infix operator is no longer a syntax
557 error.  It used to be for those infix operators (like C<+>) that have a
558 different meaning where a term is expected.  [perl #105924]
559
560 =item *
561
562 C<require a::b . 1> and C<require a::b + 1> no longer produce erroneous
563 ambiguity warnings.  [perl #107002]
564
565 =item *
566
567 Class method calls are now allowed on any string, and not just strings
568 beginning with an alphanumeric character.  [perl #105922]
569
570 =item *
571
572 An empty pattern created with C<qr//> used in C<m///> no longer triggers
573 the "empty pattern reuses last pattern" behaviour.  [perl #96230]
574
575 =item *
576
577 Tying a hash during iteration no longer results in a memory leak.
578
579 =item *
580
581 Freeing a tied hash during iteration no longer results in a memory leak.
582
583 =item *
584
585 List assignment to a tied array or hash that dies on STORE no longer
586 results in a memory leak.
587
588 =item *
589
590 If the hint hash (C<%^H>) is tied, compile-time scope entry (which copies
591 the hint hash) no longer leaks memory if FETCH dies.  [perl #107000]
592
593 =item *
594
595 Constant folding no longer inappropriately triggers the special
596 C<split " "> behaviour.  [perl #94490]
597
598 =item *
599
600 C<defined scalar(@array)>, C<defined do { &foo }>, and similar constructs
601 now treat the argument to C<defined> as a simple scalar.  [perl #97466]
602
603 =item *
604
605 Running a custom debugging that defines no C<*DB::DB> glob or provides a
606 subroutine stub for C<&DB::DB> no longer results in a crash, but an error
607 instead.  [perl #114990]
608
609 =item *
610
611 C<reset ""> now matches its documentation.  C<reset> only resets C<m?...?>
612 patterns when called with no argument.  An empty string for an argument now
613 does nothing.  (It used to be treated as no argument.)  [perl #97958]
614
615 =item *
616
617 C<printf> with an argument returning an empty list no longer reads past the
618 end of the stack, resulting in erratic behaviour.  [perl #77094]
619
620 =item *
621
622 C<--subname> no longer produces erroneous ambiguity warnings.
623 [perl #77240]
624
625 =item *
626
627 C<v10> is now allowed as a label or package name.  This was inadvertently
628 broken when v-strings were added in Perl 5.6.  [perl #56880]
629
630 =item *
631
632 A regression introduced in 5.17.2 has been fixed, which made C</[\@\\]||/>
633 result in a "panic" error.  [perl #115050]
634
635 =item *
636
637 C<length>, C<pos>, C<substr> and C<sprintf> could be confused by ties,
638 overloading, references and typeglobs if the stringification of such
639 changed the internal representation to or from UTF8.  [perl #114410]
640
641 =item *
642
643 utf8::encode now calls FETCH and STORE on tied variables.  utf8::decode now
644 calls STORE (it was already calling FETCH).
645
646 =item *
647
648 C<$tied =~ s/$non_utf8/$utf8/> no longer loops infinitely if the tied
649 variable returns a Latin-1 string, shared hash key scalar, or reference or
650 typeglob that stringifies as ASCII or Latin-1.  This is a regression from
651 5.12.x.
652
653 =item *
654
655 C<s///> without /e is now better at detecting when it needs to forego
656 certain optimisations, fixing some buggy cases:
657
658 =over
659
660 =item *
661
662 Match variables in certain constructs (C<&&>, C<||>, C<..> and others) in
663 the replacement part; e.g., C<s/(.)/$l{$a||$1}/g>.  [perl #26986]
664
665 =item *
666
667 Aliases to match variables in the replacement.
668
669 =item *
670
671 $REGERROR or $REGMARK in the replacement.  [perl #49190]
672
673 =item *
674
675 An empty pattern (C<s//$foo/>) that causes the last-successful pattern to
676 be used, when that pattern contains code blocks that modify the variables
677 in the replacement.
678
679 =back
680
681 =item *
682
683 The taintedness of the replacement string no longer affects the taintedness
684 of the return value of C<s///e>.
685
686 =item *
687
688 The C<$|> autoflush variable is created on-the-fly when needed.  If this
689 happened (e.g., if it was mentioned in a module or eval) when the
690 currently-selected filehandle was a typeglob with an empty IO slot, it used
691 to crash.  [perl #115206]
692
693 =item *
694
695 Line numbers at the end of a string eval are no longer off by one.
696 [perl #114658]
697
698 =item *
699
700 @INC filters (subroutines returned by subroutines in @INC) that set $_ to a
701 copy-on-write scalar no longer cause the parser to modify that string
702 buffer in place.
703
704 =item *
705
706 C<length($object)> no longer returns the undefined value if the object has
707 string overloading that returns undef.  [perl #115260]
708
709 =item *
710
711 The use of C<PL_stashcache>, the stash name lookup cache for method calls, has
712 been restored,
713
714 Commit da6b625f78f5f133 in August 2011 inadvertently broke the code that looks
715 up values in C<PL_stashcache>. As it's a only cache, quite correctly everything
716 carried on working without it.
717
718 =back
719
720 =head1 Known Problems
721
722 XXX Descriptions of platform agnostic bugs we know we can't fix go here.  Any
723 tests that had to be C<TODO>ed for the release would be noted here.  Unfixed
724 platform specific bugs also go here.
725
726 [ List each fix as a =item entry ]
727
728 =over 4
729
730 =item *
731
732 XXX
733
734 =back
735
736 =head1 Obituary
737
738 XXX If any significant core contributor has died, we've added a short obituary
739 here.
740
741 =head1 Acknowledgements
742
743 XXX Generate this with:
744
745   perl Porting/acknowledgements.pl v5.17.4..HEAD
746
747 =head1 Reporting Bugs
748
749 If you find what you think is a bug, you might check the articles recently
750 posted to the comp.lang.perl.misc newsgroup and the perl bug database at
751 http://rt.perl.org/perlbug/ .  There may also be information at
752 http://www.perl.org/ , the Perl Home Page.
753
754 If you believe you have an unreported bug, please run the L<perlbug> program
755 included with your release.  Be sure to trim your bug down to a tiny but
756 sufficient test case.  Your bug report, along with the output of C<perl -V>,
757 will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
758
759 If the bug you are reporting has security implications, which make it
760 inappropriate to send to a publicly archived mailing list, then please send it
761 to perl5-security-report@perl.org.  This points to a closed subscription
762 unarchived mailing list, which includes all the core committers, who will be
763 able to help assess the impact of issues, figure out a resolution, and help
764 co-ordinate the release of patches to mitigate or fix the problem across all
765 platforms on which Perl is supported.  Please only use this address for
766 security issues in the Perl core, not for modules independently distributed on
767 CPAN.
768
769 =head1 SEE ALSO
770
771 The F<Changes> file for an explanation of how to view exhaustive details on
772 what changed.
773
774 The F<INSTALL> file for how to build Perl.
775
776 The F<README> file for general stuff.
777
778 The F<Artistic> and F<Copying> files for copyright information.
779
780 =cut