This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Version bump and perldelta for IPC::Open3 and [perl #76474]
[perl5.git] / pod / perldelta.pod
CommitLineData
4c793fe3
FR
1=encoding utf8
2
3=head1 NAME
4
ee0887a9
SH
5[ this is a template for a new perldelta file. Any text flagged as
6XXX needs to be processed before release. ]
4c793fe3 7
ee0887a9 8perldelta - what is new for perl v5.13.6
4c793fe3 9
ee0887a9 10=head1 DESCRIPTION
0c692eed 11
ee0887a9
SH
12This document describes differences between the 5.13.5 release and
13the 5.13.6 release.
0c692eed 14
ee0887a9
SH
15If you are upgrading from an earlier release such as 5.13.4, first read
16L<perl5135delta>, which describes differences between 5.13.4 and
175.13.5.
0c692eed 18
ee0887a9 19=head1 Notice
0c692eed 20
ee0887a9 21XXX Any important notices here
4c793fe3 22
ee0887a9 23=head1 Core Enhancements
85318b69 24
ee0887a9
SH
25XXX New core language features go here. Summarise user-visible core language
26enhancements. Particularly prominent performance optimisations could go
27here, but most should go in the L</Performance Enhancements> section.
85318b69 28
ee0887a9 29[ List each enhancement as a =head2 entry ]
85318b69 30
fb85c044
KW
31=head2 C<(?^...)> regex construct added to signify default modifiers
32
33A caret (also called a "cirumflex accent") C<"^"> immediately following
34a C<"(?"> in a regular expression now means that the subexpression is to
35not inherit the surrounding modifiers such as C</i>, but to revert to the
36Perl defaults. Any modifiers following the caret override the defaults.
37
38The stringification of regular expressions now uses this notation. The
39main purpose of this is to allow tests that rely on the stringification
40to not have to change when new modifiers are added. See
41L<perlre/Extended Patterns>.
42
9de15fec
KW
43=head2 C<"d">, C<"l">, and C<"u"> regex modifiers added
44
45These modifiers are currently only available within a C<(?...)> construct.
46
47The C<"l"> modifier says to compile the regular expression as if it were
48in the scope of C<use locale>, even if it is not.
49
50The C<"u"> modifier currently does nothing.
51
52The C<"d"> modifier is used in the scope of C<use locale> to compile the
53regular expression as if it were not in that scope.
54See L<perlre/(?dlupimsx-imsx)>.
55
fb121860
KW
56=head2 C<\N{...}> now handles Unicode named character sequences
57
58Unicode has a number of named character sequences, in which particular sequences
59of code points are given names. C<\N{...}> now recognizes these.
60See L<charnames>.
61
62=head2 New function C<charnames::string_vianame()>
63
64This function is a run-time version of C<\N{...}>, returning the string
65of characters whose Unicode name is its parameter. It can handle
66Unicode named character sequences, whereas the pre-existing
67C<charnames::vianame()> cannot, as the latter returns a single code
68point.
69See L<charnames>.
70
ee0887a9 71=head1 Security
85318b69 72
ee0887a9
SH
73XXX Any security-related notices go here. In particular, any security
74vulnerabilities closed should be noted here rather than in the
75L</Selected Bug Fixes> section.
85318b69 76
ee0887a9 77[ List each security issue as a =head2 entry ]
4c793fe3
FR
78
79=head1 Incompatible Changes
80
fb85c044
KW
81=head2 Stringification of regexes has changed
82
83Default regular expression modifiers are now notated by using
84C<(?^...)>. Code relying on the old stringification will fail. The
85purpose of this is so that when new modifiers are added, such code will
8477b9ba
KW
86not have to change (after this one time), as the stringification will
87automatically incorporate the new modifiers.
fb85c044
KW
88
89Code that needs to work properly with both old- and new-style regexes
e23837fb 90can avoid the whole issue by using (for Perls since 5.9.5):
8477b9ba
KW
91
92 use re qw(regexp_pattern);
93 my ($pat, $mods) = regexp_pattern($re_ref);
94
95where C<$re_ref> is a reference to a compiled regular expression. Upon
96return, C<$mods> will be a string containing all the non-default
97modifiers used when the regular expression was compiled, and C<$pattern>
98the actual pattern.
99
e23837fb
KW
100If the actual stringification is important, or older Perls need to be
101supported, you can use something like the following:
fb85c044
KW
102
103 # Accept both old and new-style stringification
104 my $modifiers = (qr/foobar/ =~ /\Q(?^/) ? '^' : '-xism';
44428a46 105
fb85c044 106And then use C<$modifiers> instead of C<-xism>.
44428a46 107
9de15fec
KW
108=head2 Regular expressions retain their localeness when interpolated
109
110Regular expressions compiled under C<"use locale"> now retain this when
111interpolated into a new regular expression compiled outside a
112C<"use locale">, and vice-versa.
113
114Previously, a regular expression interpolated into another one inherited
115the localeness of the surrounding one, losing whatever state it
116originally had. This is considered a bug fix, but may trip up code that
117has come to rely on the incorrect behavior.
118
ee0887a9 119[ List each incompatible change as a =head2 entry ]
4c793fe3
FR
120
121=head1 Deprecations
122
ee0887a9
SH
123XXX Any deprecated features, syntax, modules etc. should be listed here.
124In particular, deprecated modules should be listed here even if they are
125listed as an updated module in the L</Modules and Pragmata> section.
85318b69 126
ee0887a9 127[ List each deprecation as a =head2 entry ]
4c793fe3
FR
128
129=head1 Performance Enhancements
130
ee0887a9
SH
131XXX Changes which enhance performance without changing behaviour go here. There
132may well be none in a stable release.
4c793fe3 133
ee0887a9 134[ List each enhancement as a =item entry ]
4c793fe3 135
ee0887a9 136=over 4
4c793fe3 137
e2babdfb
FR
138=item *
139
ee0887a9 140XXX
e2babdfb 141
4c793fe3
FR
142=back
143
144=head1 Modules and Pragmata
145
ee0887a9
SH
146XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
147go here. If Module::CoreList is updated, generate an initial draft of the
148following sections using F<Porting/corelist-perldelta.pl>, which prints stub
149entries to STDOUT. Results can be pasted in place of the '=head2' entries
150below. A paragraph summary for important changes should then be added by hand.
151In an ideal world, dual-life modules would have a F<Changes> file that could be
152cribbed.
fc1418b7 153
ee0887a9 154[ Within each section, list entries as a =item entry ]
df91fef1 155
ee0887a9 156=head2 New Modules and Pragmata
ccb45ef4 157
ee0887a9 158=over 4
df91fef1 159
ee0887a9 160=item *
df91fef1 161
ee0887a9 162XXX
e2babdfb 163
ee0887a9 164=back
e2babdfb 165
ee0887a9 166=head2 Updated Modules and Pragmata
fc1418b7 167
ee0887a9 168=over 4
fc1418b7 169
ee0887a9 170=item *
e2babdfb 171
62d37bf0
FR
172C<Digest::MD5> has been upgraded from version 2.40 to 2.50.
173
174It is now safe to use this module in combination with threads.
175
176=item *
177
f5b89942
FC
178C<File::DosGlob> has been upgraded from version 1.02 to 1.03.
179
180It allows patterns containing literal parentheses (they no longer need to
181be escaped). On Windows, it no longer adds an extra F<./> to the file names
182returned when the pattern is a relative glob with a drive specification,
6481ebaf
FC
183like F<c:*.pl>
184L<[perl #71712]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=71712>.
f5b89942
FC
185
186=item *
187
4d1599c3
FC
188C<File::Find> has been upgraded from version 1.17 to 1.18.
189
190It improves handling of backslashes on Windows, so that paths such as
6481ebaf
FC
191F<c:\dir\/file> are no longer generated
192L<[perl #71710]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=71710>.
4d1599c3
FC
193
194=item *
195
f1c82292
CBW
196C<if> has been upgraded from version 0.05 to 0.06
197
198=item *
199
25e68b8b
FC
200C<IPC::Open3> has been upgraded from version 1.06 to 1.07.
201
202The internal C<xclose> routine now knows how to handle file descriptors, as
203documented, so duplicating STDIN in a child process using its file
204descriptor now works
205L<[perl #76474]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=71710>.
206
207=item *
208
9607a449
FC
209C<Locale::Maketext> has been upgraded from version 1.15 to 1.16.
210
211It fixes an infinite loop in C<Locale::Maketext::Guts::_compile()> when
212working with tainted values
213(L<CPAN RT #40727|https://rt.cpan.org/Public/Bug/Display.html?id=40727>).
214
215=item *
216
de0e3ce7
FR
217C<NEXT> has been upgraded from version 0.64 to 0.65.
218
219=item *
220
1c2dcb3e
CBW
221C<PathTools> has been upgraded from version 3.31_01 to 3.33.
222
223=item *
224
6481ebaf
FC
225C<sigtrap> has been upgraded from version 1.04 to 1.05.
226
227It no longer tries to modify read-only arguments when generating a
228backtrace
229L<[perl #72340]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=72340>.
230
231=item *
232
1393fe00
CBW
233C<Unicode::Collate> has been upgraded from version 0.59 to 0.60
234
235=item *
236
1c2dcb3e 237C<Unicode::Normalize> has been upgraded from version 1.06 to 1.07
c9a84c8b 238
ee0887a9 239=back
c9a84c8b 240
ee0887a9 241=head2 Removed Modules and Pragmata
c9a84c8b 242
ee0887a9 243=over 4
4c793fe3 244
ee0887a9 245=item *
48c1efd2 246
ee0887a9 247XXX
4c793fe3
FR
248
249=back
250
251=head1 Documentation
252
ee0887a9
SH
253XXX Changes to files in F<pod/> go here. Consider grouping entries by
254file and be sure to link to the appropriate page, e.g. L<perlfunc>.
4c793fe3 255
ee0887a9 256=head2 New Documentation
4c793fe3 257
ee0887a9 258XXX Changes which create B<new> files in F<pod/> go here.
4c793fe3 259
ee0887a9 260=head3 L<XXX>
4c793fe3 261
ee0887a9 262XXX Description of the purpose of the new file here
4c793fe3 263
ee0887a9 264=head2 Changes to Existing Documentation
fc1418b7 265
ee0887a9
SH
266XXX Changes which significantly change existing files in F<pod/> go here.
267However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
268section.
fc1418b7 269
ee0887a9 270=head3 L<XXX>
e2babdfb 271
7bc3efda
SH
272=over 4
273
274=item *
275
a7e93501
FC
276The documentation for the C<SvTRUE> macro was simply wrong in stating that
277get-magic is not processed. It has been corrected.
7bc3efda
SH
278
279=back
e2babdfb 280
4c793fe3
FR
281=head1 Diagnostics
282
283The following additions or changes have been made to diagnostic output,
284including warnings and fatal error messages. For the complete list of
285diagnostic messages, see L<perldiag>.
286
ee0887a9
SH
287XXX New or changed warnings emitted by the core's C<C> code go here. Also
288include any changes in L<perldiag> that reconcile it to the C<C> code.
4c793fe3 289
ee0887a9 290[ Within each section, list entries as a =item entry ]
4c793fe3 291
ee0887a9 292=head2 New Diagnostics
4c793fe3 293
ee0887a9 294XXX Newly added diagnostic messages go here
fc1418b7 295
ee0887a9 296=over 4
fc1418b7
SH
297
298=item *
299
ee0887a9 300XXX
ebce6c40 301
4c793fe3
FR
302=back
303
ee0887a9 304=head2 Changes to Existing Diagnostics
4c793fe3 305
ee0887a9 306XXX Changes (i.e. rewording) of diagnostic messages go here
4c793fe3
FR
307
308=over 4
309
310=item *
311
ee0887a9 312XXX
4c793fe3
FR
313
314=back
315
ee0887a9 316=head1 Utility Changes
4c793fe3 317
ee0887a9
SH
318XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go
319here. Most of these are built within the directories F<utils> and F<x2p>.
4c793fe3 320
ee0887a9
SH
321[ List utility changes as a =head3 entry for each utility and =item
322entries for each change
323Use L<XXX> with program names to get proper documentation linking. ]
fc1418b7 324
ee0887a9 325=head3 L<XXX>
fc1418b7 326
ee0887a9 327=over 4
4c793fe3 328
44428a46
FC
329=item *
330
ee0887a9 331XXX
44428a46 332
4c793fe3
FR
333=back
334
ee0887a9 335=head1 Configuration and Compilation
4c793fe3 336
ee0887a9
SH
337XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
338go here. Any other changes to the Perl build process should be listed here.
339However, any platform-specific changes should be listed in the
340L</Platform Support> section, instead.
4c793fe3 341
ee0887a9 342[ List changes as a =item entry ].
4c793fe3 343
0c692eed
FR
344=over 4
345
346=item *
347
ee0887a9 348XXX
0c692eed
FR
349
350=back
4c793fe3 351
ee0887a9 352=head1 Testing
0c692eed 353
ee0887a9
SH
354XXX Any significant changes to the testing of a freshly built perl should be
355listed here. Changes which create B<new> files in F<t/> go here as do any
356large changes to the testing harness (e.g. when parallel testing was added).
357Changes to existing files in F<t/> aren't worth summarising, although the bugs
358that they represent may be covered elsewhere.
0c692eed 359
ee0887a9 360[ List each test improvement as a =item entry ]
0c692eed 361
ee0887a9 362=over 4
0c692eed
FR
363
364=item *
365
ee0887a9 366XXX
4c793fe3
FR
367
368=back
369
ee0887a9 370=head1 Platform Support
4c793fe3 371
ee0887a9 372XXX Any changes to platform support should be listed in the sections below.
4c793fe3 373
ee0887a9
SH
374[ Within the sections, list each platform as a =item entry with specific
375changes as paragraphs below it. ]
4c793fe3 376
ee0887a9 377=head2 New Platforms
0c692eed 378
ee0887a9
SH
379XXX List any platforms that this version of perl compiles on, that previous
380versions did not. These will either be enabled by new files in the F<hints/>
381directories, or new subdirectories and F<README> files at the top level of the
382source tree.
0c692eed 383
ee0887a9 384=over 4
0c692eed 385
ee0887a9 386=item XXX-some-platform
0c692eed 387
ee0887a9 388XXX
0c692eed 389
ee0887a9 390=back
0c692eed 391
ee0887a9 392=head2 Discontinued Platforms
4c793fe3 393
ee0887a9 394XXX List any platforms that this version of perl no longer compiles on.
8ebb9810 395
ee0887a9 396=over 4
8ebb9810 397
ee0887a9 398=item XXX-some-platform
48c1efd2 399
ee0887a9 400XXX
48c1efd2 401
ee0887a9 402=back
44428a46 403
ee0887a9 404=head2 Platform-Specific Notes
44428a46 405
ee0887a9
SH
406XXX List any changes for specific platforms. This could include configuration
407and compilation changes or changes in portability/compatibility. However,
408changes within modules for platforms should generally be listed in the
409L</Modules and Pragmata> section.
f4beb78f 410
ee0887a9 411=over 4
f4beb78f 412
ee0887a9 413=item XXX-some-platform
ccb45ef4 414
ee0887a9 415XXX
ccb45ef4 416
ee0887a9 417=back
85318b69 418
ee0887a9 419=head1 Internal Changes
85318b69 420
ee0887a9
SH
421XXX Changes which affect the interface available to C<XS> code go here.
422Other significant internal changes for future core maintainers should
423be noted as well.
85318b69 424
ee0887a9 425[ List each test improvement as a =item entry ]
80b6a949 426
ee0887a9 427=over 4
80b6a949 428
e2babdfb
FR
429=item *
430
a5763045
FC
431See L</Regular expressions retain their localeness when interpolated>,
432above.
e2babdfb 433
a7e93501
FC
434=item *
435
436The C<sv_cmp_flags>, C<sv_cmp_locale_flags>, C<sv_eq_flags> and
437C<sv_collxfrm_flags> functions have been added. These are like their
438non-_flags counterparts, but allow one to specify whether get-magic is
439processed.
440
441The C<sv_cmp>, C<sv_cmp_locale>, C<sv_eq> and C<sv_collxfrm> functions have
442been replaced with wrappers around the new functions.
443
444=item *
445
446A new C<sv_2bool_flags> function has been added.
447
448This is like C<sv_2bool>, but it lets the calling code decide whether
449get-magic is handled. C<sv_2bool> is now a macro that calls the new
450function.
451
452=item *
453
454A new macro, C<SvTRUE_nomg>, has been added.
455
456This is like C<SvTRUE>, except that it does not process magic. It uses the
457new C<sv_2bool_flags> function.
458
459=item *
460
461C<sv_catsv_flags> no longer calls C<mg_get> on its second argument (the
462source string) if the flags passed to it do not include SV_GMAGIC. So it
463now matches what the documentation says it does.
464
ee0887a9 465=back
e2babdfb 466
ee0887a9 467=head1 Selected Bug Fixes
e2babdfb 468
ee0887a9
SH
469XXX Important bug fixes in the core language are summarised here.
470Bug fixes in files in F<ext/> and F<lib/> are best summarised in
471L</Modules and Pragmata>.
e2babdfb 472
ee0887a9 473[ List each fix as a =item entry ]
346e4e56 474
ee0887a9 475=over 4
346e4e56 476
78846812
FR
477=item *
478
4e9f151b
FC
479A regular expression match in the right-hand side of a global substitution
480(C<s///g>) that is in the same scope will no longer cause match variables
481to have the wrong values on subsequent iterations. This can happen when an
e54f3f30
FC
482array or hash subscript is interpolated in the right-hand side, as in
483C<s|(.)|@a{ print($1), /./ }|g>
484L<[perl #19078]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=19078>.
485
486=item *
487
488Constant-folding used to cause
489
490 $text =~ ( 1 ? /phoo/ : /bear/)
491
492to turn into
493
494 $text =~ /phoo/
495
496at compile time. Now it correctly matches against C<$_>
497L<[perl #20444]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=20444>.
78846812 498
a5763045
FC
499=item *
500
501Parsing Perl code (either with string C<eval> or by loading modules) from
502within a C<UNITCHECK> block no longer causes the interpreter to crash
503L<[perl #70614]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=70614>.
504
5a9a79a4
FC
505=item *
506
507When C<-d> is used on the shebang (C<#!>) line, the debugger now has access
508to the lines of the main program. In the past, this sometimes worked and
509sometimes did not, depending on what order things happened to be arranged
b45e2413
FC
510in memory
511L<[perl #71806]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=71806>.
5a9a79a4 512
a7e93501
FC
513=item *
514
515The C<y///> or C<tr///> operator now calls get-magic (e.g., the C<FETCH>
516method of a tie) on its left-hand side just once, not twice
517L<[perl #76814]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=76814>.
518
519=item *
520
521String comparison (C<eq>, C<ne>, C<lt>, C<gt>, C<le>, C<ge> and
522C<cmp>) and logical not (C<not> and C<!>) operators no longer call magic
523(e.g., tie methods) twice on their operands
524L<[perl #76814]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=76814>.
525
526This bug was introduced in an earlier 5.13 release, and does not affect
527perl 5.12.
528
529=item *
530
531When a tied (or other magic) variable is used as, or in, a regular
532expression, it no longer has its C<FETCH> method called twice
533L<[perl #76814]|http://rt.perl.org/rt3//Public/Bug/Display.html?id=76814>.
534
535This bug was introduced in an earlier 5.13 release, and does not affect
536perl 5.12.
537
4c793fe3
FR
538=back
539
962fbe1d
SH
540=head1 Known Problems
541
ee0887a9
SH
542XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
543tests that had to be C<TODO>ed for the release would be noted here, unless
544they were specific to a particular platform (see below).
962fbe1d 545
ee0887a9
SH
546This is a list of some significant unfixed bugs, which are regressions
547from either 5.XXX.XXX or 5.XXX.XXX.
962fbe1d 548
ee0887a9
SH
549[ List each fix as a =item entry ]
550
551=over 4
08d032c0
SH
552
553=item *
554
ee0887a9 555XXX
962fbe1d
SH
556
557=back
558
ee0887a9 559=head1 Obituary
4c793fe3 560
ee0887a9
SH
561XXX If any significant core contributor has died, we've added a short obituary
562here.
0195fb5f 563
405fd67e
DG
564=head1 Errata
565
566=over 4
567
568=item *
569
570Fixed a typo in L<perl5135delta> regarding array slices and smart matching
571
572=back
573
ee0887a9 574=head1 Acknowledgements
0195fb5f 575
ee0887a9 576XXX The list of people to thank goes here.
4c793fe3
FR
577
578=head1 Reporting Bugs
579
580If you find what you think is a bug, you might check the articles
581recently posted to the comp.lang.perl.misc newsgroup and the perl
582bug database at http://rt.perl.org/perlbug/ . There may also be
583information at http://www.perl.org/ , the Perl Home Page.
584
585If you believe you have an unreported bug, please run the B<perlbug>
586program included with your release. Be sure to trim your bug down
587to a tiny but sufficient test case. Your bug report, along with the
588output of C<perl -V>, will be sent off to perlbug@perl.org to be
589analysed by the Perl porting team.
590
591If the bug you are reporting has security implications, which make it
592inappropriate to send to a publicly archived mailing list, then please send
ee0887a9 593it to perl5-security-report@perl.org. This points to a closed subscription
4c793fe3
FR
594unarchived mailing list, which includes all the core committers, who be able
595to help assess the impact of issues, figure out a resolution, and help
596co-ordinate the release of patches to mitigate or fix the problem across all
ee0887a9 597platforms on which Perl is supported. Please only use this address for
4c793fe3
FR
598security issues in the Perl core, not for modules independently
599distributed on CPAN.
600
601=head1 SEE ALSO
602
603The F<Changes> file for an explanation of how to view exhaustive details
604on what changed.
605
606The F<INSTALL> file for how to build Perl.
607
608The F<README> file for general stuff.
609
610The F<Artistic> and F<Copying> files for copyright information.
611
612=cut