This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta: add recent regex API changes
[perl5.git] / pod / perldelta.pod
CommitLineData
44691e6f
AB
1=encoding utf8
2
3=head1 NAME
4
916c45d9
SH
5[ this is a template for a new perldelta file. Any text flagged as XXX needs
6to be processed before release. ]
7
8perldelta - what is new for perl v5.17.4
e128ab2c 9
4eabcf70 10=head1 DESCRIPTION
6db9054f 11
916c45d9 12This document describes differences between the 5.17.3 release and the 5.17.4
e08634c5 13release.
6db9054f 14
916c45d9
SH
15If you are upgrading from an earlier release such as 5.17.2, first read
16L<perl5173delta>, which describes differences between 5.17.2 and 5.17.3.
9c5f5e7a 17
916c45d9 18=head1 Notice
afae8808 19
916c45d9 20XXX Any important notices here
afae8808 21
916c45d9 22=head1 Core Enhancements
9c5f5e7a 23
916c45d9
SH
24XXX New core language features go here. Summarize user-visible core language
25enhancements. Particularly prominent performance optimisations could go
26here, but most should go in the L</Performance Enhancements> section.
9c5f5e7a 27
916c45d9 28[ List each enhancement as a =head2 entry ]
9c5f5e7a 29
83d881f0
KW
30=head2 Latest Unicode 6.2 beta is included
31
32This is supposed to be the final data for 6.2, unless glitches are
33found. The earlier experimental 6.2 beta data has been reverted, and
34this used instead. Not all the changes that were proposed for 6.2 and
35that were in the earlier beta versions are actually going into 6.2. In
36particular, there are no changes from 6.1 in the General_Category of any
37characters. 6.2 does revise the C<\X> handling for the REGIONAL
38INDICATOR characters that were added in Unicode 6.0. Perl now for the
39first time fully handles this revision.
40
5faa50e9
FR
41=head2 New DTrace probes
42
43The following new DTrace probes have been added:
44
45=over 4
46
47=item C<op-entry>
48
49=item C<loading-file>
50
51=item C<loaded-file>
52
53=back
54
916c45d9 55=head1 Security
9c5f5e7a 56
916c45d9
SH
57XXX Any security-related notices go here. In particular, any security
58vulnerabilities closed should be noted here rather than in the
59L</Selected Bug Fixes> section.
9c5f5e7a 60
916c45d9 61[ List each security issue as a =head2 entry ]
9c5f5e7a 62
916c45d9 63=head1 Incompatible Changes
9c5f5e7a 64
916c45d9 65XXX For a release on a stable branch, this section aspires to be:
9c5f5e7a 66
916c45d9
SH
67 There are no changes intentionally incompatible with 5.XXX.XXX
68 If any exist, they are bugs, and we request that you submit a
69 report. See L</Reporting Bugs> below.
9c5f5e7a 70
916c45d9 71[ List each incompatible change as a =head2 entry ]
9c5f5e7a 72
916c45d9 73=head1 Deprecations
9c5f5e7a 74
916c45d9
SH
75XXX Any deprecated features, syntax, modules etc. should be listed here. In
76particular, deprecated modules should be listed here even if they are listed as
77an updated module in the L</Modules and Pragmata> section.
9c5f5e7a 78
916c45d9 79[ List each deprecation as a =head2 entry ]
9c5f5e7a 80
916c45d9 81=head1 Performance Enhancements
9c5f5e7a 82
916c45d9
SH
83XXX Changes which enhance performance without changing behaviour go here.
84There may well be none in a stable release.
ed2b0264 85
916c45d9 86[ List each enhancement as a =item entry ]
ed2b0264 87
916c45d9 88=over 4
338a1057
SH
89
90=item *
91
a3d51778
KW
92Speed up in regular expression matching against Unicode properties. The
93largest gain is for C<\X>, the Unicode "extended grapheme cluster". The
94gain for it is about 35% - 40%. Bracketed character classes, e.g.,
95C<[0-9\x{100}]> containing code points above 255 are also now faster.
0ace302a 96
5faa50e9
FR
97=item *
98
99On platforms supporting it, several former macros are now implemented as static
100inline functions. This should speed things up slightly on non-GCC platforms.
101
102=item *
103
104Apply the optimisation of hashes in boolean context, such as in C<if> or C<and>,
105to constructs in non-void context.
106
107=item *
108
109Extend the optimisation of hashes in boolean context to C<scalar(%hash)>,
110C<%hash ? ... : ...>, and C<sub { %hash || ... | }>.
111
112=item *
113
114When making a copy of the string being matched against (so that $1, $& et al
115continue to show the correct value even if the original string is subsequently
116modified), only copy that substring of the original string needed for the
117capture variables, rather than copying the whole string.
118
119This is a big win for code like
120
121 $&;
122 $_ = 'x' x 1_000_000;
123 1 while /(.)/;
124
125Also, when pessimizing if the code contains C<$`>, C<$&> or C<$'>, record the
126presence of each variable separately, so that the determination of the substring
127range is based on each variable separately. So performance-wise,
128
129 $&; /x/
130
131is now roughly equivalent to
132
133 /(x)/
134
135whereas previously it was like
136
137 /^(.*)(x)(.*)$/
138
139and
140
141 $&; $'; /x/
142
143is now roughly equivalent to
144
145 /(x)(.*)$/
146
147etc.
148
916c45d9 149=back
0ace302a 150
916c45d9 151=head1 Modules and Pragmata
9c5f5e7a 152
916c45d9
SH
153XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
154go here. If Module::CoreList is updated, generate an initial draft of the
155following sections using F<Porting/corelist-perldelta.pl>, which prints stub
156entries to STDOUT. Results can be pasted in place of the '=head2' entries
157below. A paragraph summary for important changes should then be added by hand.
158In an ideal world, dual-life modules would have a F<Changes> file that could be
159cribbed.
9c5f5e7a 160
916c45d9 161[ Within each section, list entries as a =item entry ]
d4ada64a 162
916c45d9 163=head2 New Modules and Pragmata
d4ada64a 164
916c45d9 165=over 4
63870e6d 166
930a023a
SM
167=item *
168
916c45d9 169XXX
33f804f6 170
916c45d9 171=back
4cc02608 172
916c45d9 173=head2 Updated Modules and Pragmata
4cc02608 174
916c45d9 175=over 4
e7b92d54
SH
176
177=item *
178
5faa50e9
FR
179L<Archive::Tar> has been upgraded from version 1.88 to 1.90. This adds
180documentation fixes.
181
182=item *
183
184L<B> has been upgraded from version 1.37 to 1.38. This makes the module work
185with the new pad API.
186
187=item *
188
189L<B::Concise> has been upgraded from version 0.92 to 0.93. This adds support
190for the new C<OpMAYBE_TRUEBOOL> and C<OPpTRUEBOOL> flags.
191
192=item *
193
194L<B::Deparse> has been upgraded from version 1.16 to 1.17. This suppresses
195trailing semicolons in formats.
196
197=item *
198
2a527d37
SH
199L<DB_File> has been upgraded from version 1.826 to 1.827. The main Perl module
200no longer uses the C<"@_"> construct.
201
202=item *
203
5faa50e9
FR
204L<Devel::Peek> has been upgraded from version 1.09 to 1.10. This fixes
205compilation with C++ compilers and makes the module work with the new pad API.
206
207=item *
208
209L<DynaLoader> has been upgraded from version 1.15 to 1.16. This fixes warnings
210about using C<CODE> sections without an C<OUTPUT> section.
211
212=item *
213
214L<ExtUtils::ParseXS> has been upgraded from version 3.17 to 3.18. This avoids a
215bogus warning for initialised XSUB non-parameters.
216
217=item *
218
846de5c9
SH
219L<File::Copy> has been upgraded from version 2.23 to 2.24. C<copy()> no longer
220zeros files when copying into the same directory, and also now fails (as it has
221long been documented to do) when attempting to copy a file over itself.
222
223=item *
224
5faa50e9
FR
225L<File::Find> has been upgraded from version 1.21 to 1.22. This fixes
226inconsistent unixy path handling on VMS.
227
228=item *
229
2a527d37
SH
230L<Locale::Codes> has been upgraded from version 3.22 to 3.23. It includes some
231new codes.
232
233=item *
234
5faa50e9
FR
235L<Module::CoreList> has been upgraded from version 2.71 to 2.73. This restores
236compatibility with older versions of perl and cleans up the corelist data for
237various modules.
238
239=item *
240
241L<Opcode> has been upgraded from version 1.23 to 1.24 to reflect the removal of
242the boolkeys opcode.
243
244=item *
245
aff163d9
SH
246L<Socket> has been upgraded from version 2.004 to 2.006.
247C<unpack_sockaddr_in()> and C<unpack_sockaddr_in6()> now return just the IP
248address in scalar context, and C<inet_ntop()> now guards against incorrect
249length scalars being passed in.
9c5f5e7a 250
5faa50e9
FR
251=item *
252
eebee32b
FR
253L<Storable> has been upgraded from version 2.38 to 2.39. This contains Various
254bugfixes, including compatibility fixes for older versions of Perl and vstring
255handling.
256
257=item *
258
5faa50e9
FR
259L<threads::shared> has been upgraded from version 1.40 to 1.41. This adds the
260option to warn about or ignore attempts to clone structures that can't be
261cloned, as opposed to just unconditionally dying in that case.
262
263=item *
264
265L<XSLoader> has been upgraded from version 0.15 to 0.16.
266
916c45d9 267=back
9c5f5e7a 268
916c45d9 269=head2 Removed Modules and Pragmata
9c5f5e7a 270
916c45d9 271=over 4
44db8156
SH
272
273=item *
274
916c45d9 275XXX
4f85bc45 276
4eabcf70 277=back
72267260 278
4eabcf70 279=head1 Documentation
72267260 280
916c45d9
SH
281XXX Changes to files in F<pod/> go here. Consider grouping entries by
282file and be sure to link to the appropriate page, e.g. L<perlfunc>.
95c6c5c5 283
916c45d9 284=head2 New Documentation
95c6c5c5 285
916c45d9 286XXX Changes which create B<new> files in F<pod/> go here.
95c6c5c5 287
916c45d9 288=head3 L<XXX>
95c6c5c5 289
916c45d9 290XXX Description of the purpose of the new file here
95c6c5c5 291
916c45d9
SH
292=head2 Changes to Existing Documentation
293
294XXX Changes which significantly change existing files in F<pod/> go here.
295However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
296section.
95c6c5c5 297
916c45d9 298=head3 L<XXX>
e114da46
FC
299
300=over 4
301
302=item *
303
916c45d9 304XXX Description of the change here
e114da46
FC
305
306=back
307
4eabcf70 308=head1 Diagnostics
05c8f9ed 309
4eabcf70
TC
310The following additions or changes have been made to diagnostic output,
311including warnings and fatal error messages. For the complete list of
312diagnostic messages, see L<perldiag>.
ceb0881c 313
916c45d9
SH
314XXX New or changed warnings emitted by the core's C<C> code go here. Also
315include any changes in L<perldiag> that reconcile it to the C<C> code.
316
4eabcf70 317=head2 New Diagnostics
42d72fc5 318
916c45d9
SH
319XXX Newly added diagnostic messages go under here, separated into New Errors
320and New Warnings
321
4eabcf70 322=head3 New Errors
8e125188 323
e96e0834 324=over 4
e128ab2c 325
e2f0c3bb
FC
326=item *
327
916c45d9 328XXX L<message|perldiag/"message">
3c774534 329
4eabcf70 330=back
e2f0c3bb 331
4eabcf70 332=head3 New Warnings
90519d0f 333
4eabcf70 334=over 4
90519d0f
FC
335
336=item *
337
916c45d9 338XXX L<message|perldiag/"message">
90519d0f 339
61174fb5 340=back
422287bf 341
916c45d9 342=head2 Changes to Existing Diagnostics
c95d4104 343
916c45d9 344XXX Changes (i.e. rewording) of diagnostic messages go here
7ab2ea42 345
4eabcf70 346=over 4
7ab2ea42 347
916c45d9 348=item *
7ab2ea42 349
916c45d9 350XXX Describe change here
90519d0f 351
4eabcf70 352=back
90519d0f 353
916c45d9 354=head1 Utility Changes
90519d0f 355
916c45d9
SH
356XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go here.
357Most of these are built within the directories F<utils> and F<x2p>.
d91f1bc9 358
916c45d9
SH
359[ List utility changes as a =head3 entry for each utility and =item
360entries for each change
361Use L<XXX> with program names to get proper documentation linking. ]
d91f1bc9 362
916c45d9 363=head3 L<XXX>
90519d0f 364
4eabcf70 365=over 4
90519d0f
FC
366
367=item *
368
916c45d9 369XXX
e9f497c4 370
916c45d9 371=back
e9f497c4 372
916c45d9 373=head1 Configuration and Compilation
d7f7c515 374
916c45d9
SH
375XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
376go here. Any other changes to the Perl build process should be listed here.
377However, any platform-specific changes should be listed in the
378L</Platform Support> section, instead.
d7f7c515 379
916c45d9 380[ List changes as a =item entry ].
afc04f16 381
916c45d9 382=over 4
afc04f16 383
b4cf37f5
FC
384=item *
385
5faa50e9
FR
386F<Configure> will now correctly detect C<isblank()> when compiling with a C++
387compiler.
b4cf37f5 388
916c45d9 389=back
b4cf37f5 390
916c45d9 391=head1 Testing
b4cf37f5 392
916c45d9
SH
393XXX Any significant changes to the testing of a freshly built perl should be
394listed here. Changes which create B<new> files in F<t/> go here as do any
395large changes to the testing harness (e.g. when parallel testing was added).
396Changes to existing files in F<t/> aren't worth summarizing, although the bugs
397that they represent may be covered elsewhere.
ea9f761d 398
916c45d9 399[ List each test improvement as a =item entry ]
70306497 400
916c45d9 401=over 4
70306497 402
63164165
FC
403=item *
404
916c45d9 405XXX
63164165 406
916c45d9 407=back
9da700a7 408
916c45d9 409=head1 Platform Support
9da700a7 410
916c45d9 411XXX Any changes to platform support should be listed in the sections below.
9702222b 412
916c45d9
SH
413[ Within the sections, list each platform as a =item entry with specific
414changes as paragraphs below it. ]
e4963eb6 415
916c45d9 416=head2 New Platforms
e4963eb6 417
916c45d9
SH
418XXX List any platforms that this version of perl compiles on, that previous
419versions did not. These will either be enabled by new files in the F<hints/>
420directories, or new subdirectories and F<README> files at the top level of the
421source tree.
3771623e 422
916c45d9 423=over 4
3771623e 424
916c45d9 425=item XXX-some-platform
9702222b 426
916c45d9 427XXX
3e0c76ce 428
916c45d9 429=back
610c7be4 430
916c45d9 431=head2 Discontinued Platforms
610c7be4 432
916c45d9 433=over 4
c58f5a32 434
043fec90 435=item VM/ESA
c58f5a32 436
043fec90
NC
437Support for VM/ESA has been removed. The port was tested on 2.3.0, which
438IBM ended service on in March 2002. 2.4.0 ended service in June 2003, and
439was superseded by Z/VM. The current version of Z/VM is V6.2.0, and scheduled
440for end of service on 2015/04/30.
a21a3918 441
916c45d9 442=back
a21a3918 443
916c45d9 444=head2 Platform-Specific Notes
a21a3918 445
916c45d9
SH
446XXX List any changes for specific platforms. This could include configuration
447and compilation changes or changes in portability/compatibility. However,
448changes within modules for platforms should generally be listed in the
449L</Modules and Pragmata> section.
a21a3918 450
916c45d9 451=over 4
60ca243a 452
5faa50e9 453=item Win32
60ca243a 454
3eebda9a
SH
455Fixed a problem where perl could crash while cleaning up threads (including the
456main thread) in threaded debugging builds on Win32 and possibly other platforms
457[perl #114496].
5faa50e9
FR
458
459=item Solaris
460
461In Configure, avoid running sed commands with flags not supported on Solaris.
462
463=item Darwin
464
465Stop hardcoding an alignment on 8 byte boundaries to fix builds using
466-Dusemorebits.
3771623e 467
eebee32b
FR
468=item VMS
469
470Fix linking on builds configured with -Dusemymalloc=y.
471
916c45d9 472=back
d91f1bc9 473
916c45d9 474=head1 Internal Changes
d91f1bc9 475
916c45d9
SH
476XXX Changes which affect the interface available to C<XS> code go here. Other
477significant internal changes for future core maintainers should be noted as
478well.
3771623e 479
916c45d9 480[ List each change as a =item entry ]
b4d67305 481
916c45d9 482=over 4
b4d67305 483
3c774534
SH
484=item *
485
5faa50e9
FR
486The APIs for accessing lexical pads have changed considerably.
487
488C<PADLIST>s are now longer C<AV>s, but their own type instead. C<PADLIST>s now
489contain a C<PAD> and a C<PADNAMELIST> of C<PADNAME>s, rather than C<AV>s for the
490pad and the list of pad names. C<PAD>s, C<PADNAMELIST>s, and C<PADNAME>s are to
491be accessed as such though the newly added pad API instead of the plain C<AV>
492and C<SV> APIs. See L<perlapi> for details.
d91f1bc9 493
050862bb
DM
494=item *
495
496In the regex API, the numbered capture callbacks are passed an index
497indicating what match variable is being accessed. There are special
498index values for the C<$`, $&, $&> variables. Previously the same three
499values were used to retrieve C<${^PREMATCH}, ${^MATCH}, ${^POSTMATCH}>
500too, but these have now been assigned three separate values. See
501L<perlreapi/Numbered capture callbacks>.
502
503=item *
504
505C<PL_sawampersand> was previously a boolean indicating that any of
506C<$`, $&, $&> had been seen; it now contains three one-bit flags
507indicating the presence of each of the variables individually.
508
916c45d9 509=back
d91f1bc9 510
916c45d9 511=head1 Selected Bug Fixes
d91f1bc9 512
916c45d9
SH
513XXX Important bug fixes in the core language are summarized here. Bug fixes in
514files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>.
d91f1bc9 515
916c45d9 516=over 4
d91f1bc9
SH
517
518=item *
519
5faa50e9
FR
520Restore ‘Can’t localize through ref’ to lvalue subs. This error had disappeared
521under certain conditions in version 5.16.0 and has now been restored.
522
523=item *
524
525The parsing of heredocs has been improved significantly, fixing several parsing
526bugs and correcting wrong subsequent line numbers under certain conditions.
527
528=item *
529
530Reset the utf8 position cache when accessing magical variables to avoid the
531string buffer and the utf8 position cache to get out of sync.
532
533=item *
534
535Various cases of get magic being called twice for magical utf8 strings have been
536fixed.
537
538=item *
539
540This code (when not in the presence of C<$&> etc)
541
542 $_ = 'x' x 1_000_000;
543 1 while /(.)/;
544
545used to skip the buffer copy for performance reasons, but suffered from C<$1>
546etc changing if the original string changed. That's now been fixed.
547
548=item *
549
550Perl doesn't use PerlIO anymore to report out of memory messages, as PerlIO
551might attempt to allocate more memory.
d91f1bc9 552
916c45d9 553=back
d91f1bc9 554
916c45d9 555=head1 Known Problems
d91f1bc9 556
916c45d9
SH
557XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
558tests that had to be C<TODO>ed for the release would be noted here. Unfixed
559platform specific bugs also go here.
d91f1bc9 560
916c45d9 561[ List each fix as a =item entry ]
216d99a6 562
916c45d9 563=over 4
216d99a6
FC
564
565=item *
566
5faa50e9
FR
567Changes in the lexical pad API break several CPAN modules.
568
569To avoid having to patch those modules again later if we change pads from AVs
570into their own types, APIs for accessing the contents of pads have been added.
216d99a6 571
4eabcf70 572=back
90519d0f 573
916c45d9 574=head1 Obituary
05bee12a 575
916c45d9
SH
576XXX If any significant core contributor has died, we've added a short obituary
577here.
05bee12a 578
916c45d9 579=head1 Acknowledgements
05bee12a 580
916c45d9 581XXX Generate this with:
05bee12a 582
916c45d9 583 perl Porting/acknowledgements.pl v5.17.3..HEAD
29cf780c 584
44691e6f
AB
585=head1 Reporting Bugs
586
e08634c5
SH
587If you find what you think is a bug, you might check the articles recently
588posted to the comp.lang.perl.misc newsgroup and the perl bug database at
589http://rt.perl.org/perlbug/ . There may also be information at
590http://www.perl.org/ , the Perl Home Page.
44691e6f 591
e08634c5
SH
592If you believe you have an unreported bug, please run the L<perlbug> program
593included with your release. Be sure to trim your bug down to a tiny but
594sufficient test case. Your bug report, along with the output of C<perl -V>,
595will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
44691e6f
AB
596
597If the bug you are reporting has security implications, which make it
e08634c5
SH
598inappropriate to send to a publicly archived mailing list, then please send it
599to perl5-security-report@perl.org. This points to a closed subscription
600unarchived mailing list, which includes all the core committers, who will be
601able to help assess the impact of issues, figure out a resolution, and help
f9001595 602co-ordinate the release of patches to mitigate or fix the problem across all
e08634c5
SH
603platforms on which Perl is supported. Please only use this address for
604security issues in the Perl core, not for modules independently distributed on
605CPAN.
44691e6f
AB
606
607=head1 SEE ALSO
608
e08634c5
SH
609The F<Changes> file for an explanation of how to view exhaustive details on
610what changed.
44691e6f
AB
611
612The F<INSTALL> file for how to build Perl.
613
614The F<README> file for general stuff.
615
616The F<Artistic> and F<Copying> files for copyright information.
617
618=cut