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