This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta up to 611272bb8
[perl5.git] / pod / perldelta.pod
CommitLineData
44691e6f
AB
1=encoding utf8
2
541cb22c 3=for comment
d1fb015b 4This has been completed up to 611272bb8, except for
61f966e7 5e032854 khw [perl #32080] is_utf8_string() reads too far
541cb22c 6
44691e6f
AB
7=head1 NAME
8
0aaeb177
SH
9[ this is a template for a new perldelta file. Any text flagged as
10XXX needs to be processed before release. ]
760696b8 11
0aaeb177 12perldelta - what is new for perl v5.15.6
062678b2 13
0aaeb177 14=head1 DESCRIPTION
ad32999b 15
0aaeb177
SH
16This document describes differences between the 5.15.5 release and
17the 5.15.6 release.
ad32999b 18
0aaeb177
SH
19If you are upgrading from an earlier release such as 5.15.4, first read
20L<perl5155delta>, which describes differences between 5.15.4 and
215.15.5.
ad32999b 22
0aaeb177 23=head1 Notice
ad32999b 24
0aaeb177 25XXX Any important notices here
ad32999b 26
0aaeb177 27=head1 Core Enhancements
a3f52e2e 28
0aaeb177
SH
29XXX New core language features go here. Summarise user-visible core language
30enhancements. Particularly prominent performance optimisations could go
31here, but most should go in the L</Performance Enhancements> section.
a3f52e2e 32
0aaeb177 33[ List each enhancement as a =head2 entry ]
6d110ad0 34
61f966e7
FC
35=head2 C<__SUB__>
36
37The new C<__SUB__> token, available under the "current_sub" feature (see
38L<feature>) or C<use v5.15>, returns a reference to the current subroutine,
39making it easier to write recursive closures.
40
d1fb015b
FC
41=head2 New option for the debugger's B<t> command
42
43The B<t> command in the debugger, which toggles tracing mode, now accepts a
44numerical argument that determines how many levels of subroutine calls to
45trace.
46
e3c71926 47=head1 Security
6d110ad0 48
0aaeb177
SH
49XXX Any security-related notices go here. In particular, any security
50vulnerabilities closed should be noted here rather than in the
51L</Selected Bug Fixes> section.
6d110ad0 52
0aaeb177 53[ List each security issue as a =head2 entry ]
6d110ad0 54
e3c71926 55=head1 Incompatible Changes
6d110ad0 56
0aaeb177 57XXX For a release on a stable branch, this section aspires to be:
ad32999b 58
0aaeb177
SH
59 There are no changes intentionally incompatible with 5.XXX.XXX
60 If any exist, they are bugs and reports are welcome.
ad32999b 61
0aaeb177 62[ List each incompatible change as a =head2 entry ]
ad32999b 63
541cb22c
FC
64=head2 XS API tweak
65
66The C<newCONSTSUB_flags> C-level function, added in 5.15.4, now has a
67C<len> parameter.
68
e3c71926 69=head1 Deprecations
6d110ad0 70
0aaeb177
SH
71XXX Any deprecated features, syntax, modules etc. should be listed here.
72In particular, deprecated modules should be listed here even if they are
73listed as an updated module in the L</Modules and Pragmata> section.
ae92a9ae 74
0aaeb177 75[ List each deprecation as a =head2 entry ]
ae92a9ae 76
e3c71926 77=head1 Performance Enhancements
6d110ad0 78
0aaeb177
SH
79XXX Changes which enhance performance without changing behaviour go here. There
80may well be none in a stable release.
81
82[ List each enhancement as a =item entry ]
83
e3c71926 84=over 4
6d110ad0
FC
85
86=item *
87
679b54e7
FC
88Perl 5.12.0 sped up the destruction of objects whose classes define empty
89C<DESTROY> methods (to prevent autoloading), simply by not calling such
90empty methods. This release takes this optimisation a step further, by not
91calling any C<DESTROY> method that begins with an C<return> statement.
92This can be useful for destructors that are only used for debugging:
93
94 use constant DEBUG => 1;
95 sub DESTROY { return unless DEBUG; ... }
96
97Constant-folding will reduce the first statement to C<return;> if DEBUG is
98set to 0, triggering this optimisation.
6d110ad0 99
d1fb015b
FC
100=item *
101
102Assign to a variable that holds a typeglob or copy-on-write scalar is now
103much faster. Previously the typeglob would be stringified or the
104copy-on-write scalar would be copied before being clobbered.
105
e3c71926 106=back
6d110ad0 107
e3c71926 108=head1 Modules and Pragmata
6d110ad0 109
0aaeb177
SH
110XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
111go here. If Module::CoreList is updated, generate an initial draft of the
112following sections using F<Porting/corelist-perldelta.pl>, which prints stub
113entries to STDOUT. Results can be pasted in place of the '=head2' entries
114below. A paragraph summary for important changes should then be added by hand.
115In an ideal world, dual-life modules would have a F<Changes> file that could be
116cribbed.
117
118[ Within each section, list entries as a =item entry ]
119
e3c71926 120=head2 New Modules and Pragmata
6d110ad0 121
e3c71926 122=over 4
6d110ad0
FC
123
124=item *
125
0aaeb177 126XXX
6d110ad0
FC
127
128=back
129
e3c71926 130=head2 Updated Modules and Pragmata
6d110ad0 131
e3c71926 132=over 4
6d110ad0
FC
133
134=item *
135
f8c9502f
CBW
136L<Archive::Tar> has been upgraded from version 1.80 to version 1.82.
137
138Adjustments to handle files >8gb (>0777777777777 octal) and a feature to
139return the MD5SUM of files in the archive.
a3f52e2e 140
87b9431e
CBW
141=item *
142
74c26f06
CBW
143L<AutoLoader> has been upgraded from version 5.71 to version 5.72.
144
145=item *
146
8cea0f87
CBW
147L<B::Debug> has been upgraded from version 1.16 to version 1.17.
148
149=item *
150
679b54e7
FC
151L<B::Deparse> has been upgraded from version 1.09 to 1.10.
152
153C<sort(foo(bar))> is now deparsed correctly. (C<sort foo(bar)>, how it used
154to deparse, makes foo the sort routine, rather than a regular function
155call.)
156
157=item *
158
9505dd85 159L<Compress::Raw::Zlib> has been upgraded from version 2.042 to version 2.045.
87b9431e 160
7e700369
CBW
161=item *
162
6475ddc2 163L<Compress::Raw::Bzip2> has been upgraded from version 2.042 to version 2.045.
7e700369 164
dc7edc5c
CBW
165=item *
166
61f966e7
FC
167L<Data::Dumper> has been upgraded from version 2.134 to 2.135.
168
169The XS implementation has been updated to account for the Unicode symbol
170changes in Perl 5.15.4. It also knows how to output typeglobs with nulls
171in their names.
172
173=item *
174
ac616993
CBW
175L<ExtUtils::ParseXS> has been upgraded from version 3.05 to version 3.07.
176
177=item *
178
090349ce 179L<IO::Compress::Base> has been upgraded from version 2.042 to version 2.045.
08ad9465
CBW
180
181Added zipdetails utility.
dc7edc5c 182
7788a270
CBW
183=item *
184
4345d05b
CBW
185L<Locale::Codes> has been upgraded from version 3.18 to version 3.20.
186
187The code2XXX, XXX2code, all_XXX_codes, and all_XXX_names functions now support retired codes.
188All codesets may be specified by a constant or by their name now. Previously,
189they were specified only by a constant.
190The alias_code function exists for backward compatibility. It has been replaced by rename_country_code.
191The alias_code function will be removed sometime after September, 2013.
192All work is now done in the central module (Locale::Codes). Previously, some was still done in the
193wrapper modules (Locale::Codes::*) but that is gone now.
194Added Language Family codes (langfam) as defined in ISO 639-5.
195
196=item *
197
b42ff875
CBW
198L<Module::Loaded> has been uprgaded from version 0.06 to version 0.08.
199
200=item *
201
a71d67b1
CBW
202L<Pod::LaTeX> has been upgraded from version 0.59 to version 0.60.
203
204Added another LaTeX escape: --- => -{}-{}-
205
206Pod::LaTeX doesn't handle -- in PODs specially, passing it directly to
207LaTeX, which then proceeds to replace it with a single -. This patch
208replaces ----- with -{}-{}-{}-{}-
209
210=item *
211
65ae8d99 212L<Unicode::Collate> has been upgraded from version 0.85 to version 0.87.
7788a270
CBW
213
214Tailored compatibility ideographs as well as unified ideographs for
215the locales: ja, ko, zh__big5han, zh__gb2312han, zh__pinyin, zh__stroke.
216
65ae8d99
CBW
217Now Locale/*.pl files are searched in @INC.
218
0aaeb177 219=back
6138a722 220
0aaeb177 221=head2 Removed Modules and Pragmata
6138a722 222
0aaeb177 223=over 4
be539103 224
a47fb3fe
CBW
225=item *
226
0aaeb177 227XXX
a3f52e2e 228
0aaeb177 229=back
a3f52e2e 230
0aaeb177 231=head1 Documentation
a3f52e2e 232
0aaeb177
SH
233XXX Changes to files in F<pod/> go here. Consider grouping entries by
234file and be sure to link to the appropriate page, e.g. L<perlfunc>.
a3f52e2e 235
0aaeb177 236=head2 New Documentation
ad32999b 237
0aaeb177 238XXX Changes which create B<new> files in F<pod/> go here.
ad32999b 239
0aaeb177 240=head3 L<XXX>
ad32999b 241
0aaeb177 242XXX Description of the purpose of the new file here
6138a722 243
0aaeb177 244=head2 Changes to Existing Documentation
6138a722 245
0aaeb177
SH
246XXX Changes which significantly change existing files in F<pod/> go here.
247However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
248section.
a47fb3fe 249
0aaeb177 250=head3 L<XXX>
a47fb3fe 251
0aaeb177 252=over 4
7ef25837 253
6d110ad0
FC
254=item *
255
0aaeb177 256XXX Description of the change here
6d110ad0
FC
257
258=back
259
e3c71926
FR
260=head1 Diagnostics
261
262The following additions or changes have been made to diagnostic output,
263including warnings and fatal error messages. For the complete list of
264diagnostic messages, see L<perldiag>.
6d110ad0 265
0aaeb177
SH
266XXX New or changed warnings emitted by the core's C<C> code go here. Also
267include any changes in L<perldiag> that reconcile it to the C<C> code.
6138a722 268
0aaeb177
SH
269[ Within each section, list entries as a =item entry that links to perldiag,
270 e.g.
6138a722 271
0aaeb177 272 =item *
6138a722 273
0aaeb177
SH
274 L<Invalid version object|perldiag/"Invalid version object">
275]
6138a722 276
0aaeb177 277=head2 New Diagnostics
828d6195 278
0aaeb177 279XXX Newly added diagnostic messages go here
83307084 280
0aaeb177 281=head3 New Errors
d39de893 282
3432e5a1 283=over 4
39afdc5a
CBW
284
285=item *
286
0aaeb177 287XXX L<message|perldiag/"message">
6138a722 288
e3c71926 289=back
7b8e5ef0 290
0aaeb177 291=head3 New Warnings
91710846 292
e3c71926 293=over 4
91710846
DG
294
295=item *
296
0aaeb177 297XXX L<message|perldiag/"message">
f81e39ef 298
e3c71926 299=back
a2fa999d 300
0aaeb177
SH
301=head2 Changes to Existing Diagnostics
302
303XXX Changes (i.e. rewording) of diagnostic messages go here
bd65daab 304
e3c71926 305=over 4
bd65daab 306
3f2cb5bf
SM
307=item *
308
18fbfe8d
FC
309Redefinition warnings for constant subroutines used to be mandatory, even
310occurring under C<no warnings>. Now they respect the L<warnings> pragma.
b420b12a 311
61f966e7
FC
312=item *
313
314The "Attempt to free non-existent shared string" has had the spelling of
315"non-existent" corrected to "nonexistent". It was already listed with the
316correct spelling in L<perldiag>.
317
3432e5a1 318=back
b420b12a 319
0aaeb177 320=head1 Utility Changes
9cfd094e 321
0aaeb177
SH
322XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go
323here. Most of these are built within the directories F<utils> and F<x2p>.
95f7e41f 324
0aaeb177
SH
325[ List utility changes as a =head3 entry for each utility and =item
326entries for each change
327Use L<XXX> with program names to get proper documentation linking. ]
95f7e41f 328
08ad9465 329=head3 L<zipdetails>
d6cf2367 330
e3c71926 331=over 4
b53e16ae
FC
332
333=item *
334
08ad9465
CBW
335L<zipdetails> displays information about the internal record structure of the zip file.
336It is not concerned with displaying any details of the compressed data stored in the zip file.
b53e16ae 337
3432e5a1 338=back
60092ce4 339
0aaeb177
SH
340=head1 Configuration and Compilation
341
342XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
343go here. Any other changes to the Perl build process should be listed here.
344However, any platform-specific changes should be listed in the
345L</Platform Support> section, instead.
346
347[ List changes as a =item entry ].
309aab3a 348
e3c71926 349=over 4
b53e16ae
FC
350
351=item *
352
60f0ee9d
NC
353F<pod/roffitall> is now build by F<pod/buildtoc>, instead of being shipped
354with the distribution. Its list of manpages is now generated (and therefore
355current). See also RT #103202 for an unresolved related issue.
a3f52e2e 356
61f966e7
FC
357=item *
358
359Perl 5.15.5 had a bug in its installation script, which did not install
360F<unicore/Name.pm>. This has been corrected [perl #104226].
361
362XXX Is that Perl version correct? Is the file path correct?
363
0aaeb177 364=back
a3f52e2e 365
0aaeb177 366=head1 Testing
a3f52e2e 367
0aaeb177
SH
368XXX Any significant changes to the testing of a freshly built perl should be
369listed here. Changes which create B<new> files in F<t/> go here as do any
370large changes to the testing harness (e.g. when parallel testing was added).
371Changes to existing files in F<t/> aren't worth summarising, although the bugs
372that they represent may be covered elsewhere.
a3f52e2e 373
0aaeb177 374[ List each test improvement as a =item entry ]
a3f52e2e 375
0aaeb177 376=over 4
a3f52e2e
FC
377
378=item *
379
d1fb015b
FC
380The F<substr.t> and F<substr_thr.t> scripts for testing C<substr> have been
381moved under F<t/op/>, where they were originally. They had been moved
382under F<t/re/> along with the substitution tests when that directory was
383created.
a3f52e2e 384
0aaeb177 385=back
a3f52e2e 386
0aaeb177 387=head1 Platform Support
a3f52e2e 388
0aaeb177 389XXX Any changes to platform support should be listed in the sections below.
a3f52e2e 390
0aaeb177
SH
391[ Within the sections, list each platform as a =item entry with specific
392changes as paragraphs below it. ]
a3f52e2e 393
0aaeb177 394=head2 New Platforms
a3f52e2e 395
0aaeb177
SH
396XXX List any platforms that this version of perl compiles on, that previous
397versions did not. These will either be enabled by new files in the F<hints/>
398directories, or new subdirectories and F<README> files at the top level of the
399source tree.
a3f52e2e 400
0aaeb177 401=over 4
a3f52e2e 402
0aaeb177 403=item XXX-some-platform
a3f52e2e 404
0aaeb177 405XXX
a3f52e2e 406
0aaeb177 407=back
a3f52e2e 408
0aaeb177 409=head2 Discontinued Platforms
ca955add 410
0aaeb177 411XXX List any platforms that this version of perl no longer compiles on.
bbdd8bad 412
0aaeb177 413=over 4
bbdd8bad 414
0aaeb177 415=item XXX-some-platform
ad32999b 416
0aaeb177 417XXX
ad32999b 418
0aaeb177 419=back
ad32999b 420
0aaeb177 421=head2 Platform-Specific Notes
ad32999b 422
0aaeb177
SH
423XXX List any changes for specific platforms. This could include configuration
424and compilation changes or changes in portability/compatibility. However,
425changes within modules for platforms should generally be listed in the
426L</Modules and Pragmata> section.
ad32999b 427
0aaeb177 428=over 4
ad32999b 429
0aaeb177 430=item XXX-some-platform
ad32999b 431
0aaeb177 432XXX
ad32999b 433
0aaeb177 434=back
ad32999b 435
0aaeb177 436=head1 Internal Changes
ad32999b 437
0aaeb177
SH
438XXX Changes which affect the interface available to C<XS> code go here.
439Other significant internal changes for future core maintainers should
440be noted as well.
ad32999b 441
0aaeb177 442[ List each change as a =item entry ]
ad32999b 443
0aaeb177 444=over 4
ad32999b 445
3973654e
FC
446=item *
447
0aaeb177 448XXX
3973654e 449
0aaeb177 450=back
cca38fda 451
0aaeb177 452=head1 Selected Bug Fixes
9c7c1651 453
0aaeb177
SH
454XXX Important bug fixes in the core language are summarised here.
455Bug fixes in files in F<ext/> and F<lib/> are best summarised in
456L</Modules and Pragmata>.
9c7c1651 457
0aaeb177 458[ List each fix as a =item entry ]
fce59cd4 459
0aaeb177 460=over 4
fce59cd4 461
b9e83cd1
FC
462=item *
463
541cb22c
FC
464A constant subroutine assigned to a glob whose name contains a null will no
465longer cause extra globs to pop into existence when the constant is
466referenced under its new name.
b9e83cd1 467
679b54e7
FC
468=item *
469
470C<sort> was not treating C<sub {}> and C<sub {()}> as equivalent when such
471a sub was provided as the comparison routine. It used to croak on
472C<sub {()}>.
473
474=item *
475
476Subroutines from the C<autouse> namespace are once more exempt from
477redefinition warnings. This used to work in 5.005, but was broken in 5.6
478for most subroutines. For subs created via XS that redefine subroutines
479from the C<autouse> package, this stopped working in 5.10.
480
481=item *
482
483New XSUBs now produce redefinition warnings if they overwrite existing
484subs, as they did in 5.8.x. (The C<autouse> logic was reversed in 5.10-14.
485Only subroutines from the C<autouse> namespace would warn when clobbered.)
486
487=item *
488
489Redefinition warnings triggered by the creation of XSUBs now respect
490Unicode glob names, instead of using the internal representation. This was
491missed in 5.15.4, partly because this warning was so hard to trigger. (See
492the previous item.)
493
494=item *
495
496C<newCONSTSUB> used to use compile-time warning hints, instead of run-time
497hints. The following code should never produce a redefinition warning, but
498it used to, if C<newCONSTSUB> redefine and existing subroutine:
499
500 use warnings;
501 BEGIN {
502 no warnings;
503 some_XS_function_that_calls_new_CONSTSUB();
504 }
505
61f966e7
FC
506=item *
507
508Redefinition warnings for constant subroutines are on by default (what are
509known as severe warnings in L<perldiag>). This was only the case when it
510was a glob assignment or declaration of a Perl subroutine that caused the
511warning. If the creation of XSUBs triggered the warning, it was not a
512default warning. This has been corrected.
513
514=item *
515
516The internal check to see whether a redefinition warning should occur used
517to emit "uninitialized" warnings in cases like this:
518
519 use warnings "uninitialized";
520 use constant {u=>undef,v=>undef};
521 sub foo(){u} sub foo(){v}
522
523=item *
524
525A bug fix in Perl 5.14 introduced a new bug, causing "uninitialized"
526warnings to report the wrong variable if the operator in question has
527two operands and one is C<%{...}> or C<@{...}>. This has been fixed
528[perl #103766].
529
530=item *
531
532C<< version->new("version") >> and C<printf "%vd", "version"> no longer
533crash [perl #102586].
534
d1fb015b
FC
535=item *
536
537C<$tied =~ y/a/b/>, C<chop $tied> and C<chomp $tied> now call FETCH just
538once when $tied holds a reference.
539
540=item *
541
542Four-argument C<select> now always calls FETCH on tied arguments. It used
543to skip the call if the tied argument happened to hold C<undef> or a
544typeglob.
545
546=item *
547
548Four-argument C<select> no longer produces its "Non-string passed as
549bitmask" warning on tied or tainted variables that are strings.
550
551=item *
552
553C<sysread> now always calls FETCH on the buffer passed to it if it is tied.
554It used to skip the call if the tied variable happened to hold a typeglob.
555
556=item *
557
558C<< $tied .= <> >> now calls FETCH once on C<$tied>. It used to call it
559multiple times if the last value assigned to or returned from the tied
560variable was anything other than a string or typeglob.
561
0aaeb177 562=back
bf19b80e 563
0aaeb177 564=head1 Known Problems
bf19b80e 565
0aaeb177
SH
566XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
567tests that had to be C<TODO>ed for the release would be noted here, unless
568they were specific to a particular platform (see below).
65b66aa9 569
0aaeb177
SH
570This is a list of some significant unfixed bugs, which are regressions
571from either 5.XXX.XXX or 5.XXX.XXX.
65b66aa9 572
0aaeb177 573[ List each fix as a =item entry ]
b53e16ae 574
0aaeb177 575=over 4
b53e16ae 576
7c864bb3
VP
577=item *
578
0aaeb177 579XXX
7c864bb3 580
63ac71b9 581=back
bbc28bfc 582
0aaeb177 583=head1 Obituary
8fe05716 584
0aaeb177
SH
585XXX If any significant core contributor has died, we've added a short obituary
586here.
8fe05716 587
0aaeb177 588=head1 Acknowledgements
8fe05716 589
0aaeb177 590XXX Generate this with:
8fe05716 591
0aaeb177 592 perl Porting/acknowledgements.pl v5.15.5..HEAD
29cf780c 593
44691e6f
AB
594=head1 Reporting Bugs
595
596If you find what you think is a bug, you might check the articles
34dc2ec0 597recently posted to the comp.lang.perl.misc newsgroup and the perl
44691e6f
AB
598bug database at http://rt.perl.org/perlbug/ . There may also be
599information at http://www.perl.org/ , the Perl Home Page.
600
601If you believe you have an unreported bug, please run the L<perlbug>
602program included with your release. Be sure to trim your bug down
603to a tiny but sufficient test case. Your bug report, along with the
604output of C<perl -V>, will be sent off to perlbug@perl.org to be
605analysed by the Perl porting team.
606
607If the bug you are reporting has security implications, which make it
608inappropriate to send to a publicly archived mailing list, then please send
34dc2ec0 609it to perl5-security-report@perl.org. This points to a closed subscription
b4707b2a
FC
610unarchived mailing list, which includes
611all the core committers, who will be able
44691e6f
AB
612to help assess the impact of issues, figure out a resolution, and help
613co-ordinate the release of patches to mitigate or fix the problem across all
34dc2ec0
DM
614platforms on which Perl is supported. Please only use this address for
615security issues in the Perl core, not for modules independently
44691e6f
AB
616distributed on CPAN.
617
618=head1 SEE ALSO
619
620The F<Changes> file for an explanation of how to view exhaustive details
621on what changed.
622
623The F<INSTALL> file for how to build Perl.
624
625The F<README> file for general stuff.
626
627The F<Artistic> and F<Copying> files for copyright information.
628
629=cut