This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add new warning about sleep's limitation on Windows
[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
b932b266
FC
55=head2 C<${^LAST_FH}>
56
57This new variable provides access to the filehandle that was last read.
58This is the handle used by C<$.> and by C<tell> and C<eof> without
59arguments.
60
4db91b87
FC
61=head2 Looser here-doc parsing
62
63Here-doc terminators no longer require a terminating newline character when
64they occur at the end of a file. This was already the case at the end of a
65string eval [perl #65838].
66
67=head2 New mechanism for experimental features
68
69Newly-added experimental features will now require this incantation:
70
71 no warnings "experimental:feature_name";
72 use feature "feature_name"; # would warn without the prev line
73
74There is a new warnings category, called "experimental", containing
75warnings that the L<feature> pragma emits when enabling experimental
76features.
77
78Newly-added experimental features will also be given special warning IDs,
79which consist of "experimental:" followed by the name of the feature. (The
80plan is to extend this mechanism eventually to all warnings, to allow them
81to be enabled or disabled individually, and not just by category.)
82
83By saying
84
85 no warnings "experimental:feature_name";
86
87you are taking responsibility for any breakage that future changes to, or
88removal of, the feature may cause.
89
90=head2 Lexical subroutines
91
92This new feature is still considered experimental. To enable it, use the
93mechanism described above:
94
95 use 5.018;
96 no warnings "experimental:lexical_subs";
97 use feature "lexical_subs";
98
99You can now declare subroutines with C<state sub foo>, C<my sub foo>, and
100C<our sub foo>. (C<state sub> requires that the "state" feature be
101enabled, unless you write it as C<CORE::state sub foo>.)
102
103C<state sub> creates a subroutine visible within the lexical scope in which
104it is declared. The subroutine is shared between calls to the outer sub.
105
106C<my sub> declares a lexical subroutine that is created each time the
107enclosing block is entered. C<state sub> is generally slightly faster than
108C<my sub>.
109
110C<our sub> declares a lexical alias to the package subroutine of the same
111name.
112
113See L<perlsub/Lexical Subroutines>.
114
916c45d9 115=head1 Security
9c5f5e7a 116
916c45d9
SH
117XXX Any security-related notices go here. In particular, any security
118vulnerabilities closed should be noted here rather than in the
119L</Selected Bug Fixes> section.
9c5f5e7a 120
916c45d9 121[ List each security issue as a =head2 entry ]
9c5f5e7a 122
916c45d9 123=head1 Incompatible Changes
9c5f5e7a 124
916c45d9 125XXX For a release on a stable branch, this section aspires to be:
9c5f5e7a 126
916c45d9
SH
127 There are no changes intentionally incompatible with 5.XXX.XXX
128 If any exist, they are bugs, and we request that you submit a
129 report. See L</Reporting Bugs> below.
9c5f5e7a 130
916c45d9 131[ List each incompatible change as a =head2 entry ]
9c5f5e7a 132
4db91b87
FC
133=head2 Here-doc parsing
134
135The body of a here-document inside a quote-like operator now always begins
136on the line after the "<<foo" marker. Previously, it was documented to
137begin on the line following the containing quote-like operator, but that
138was only sometimes the case [perl #114040].
139
140=head2 Stricter parsing of substitution replacement
141
142It is no longer possible to abuse the way the parser parses C<s///e> like
143this:
144
145 %_=(_,"Just another ");
146 $_="Perl hacker,\n";
147 s//_}->{_/e;print
148
149=head2 Interaction of lexical and default warnings
150
151Turning on any lexical warnings used first to disable all default warnings
152if lexical warnings were not already enabled:
153
154 $*; # deprecation warning
155 use warnings "void";
156 $#; # void warning; no deprecation warning
157
158Now, the debugging, deprecated, glob, inplace and malloc warnings
159categories are left on when turning on lexical warnings (unless they are
160turned off by C<no warnings>, of course).
161
162This may cause deprecation warnings to occur in code that used to be free
163of warnings.
164
165Those are the only categories consisting only of default warnings. Default
166warnings in other categories are still disabled by C<use warnings
167"category">, as we do not yet have the infrastructure for controlling
168individual warnings.
169
170=head2 C<state sub> and C<our sub>
171
172Due to an accident of history, C<state sub> and C<our sub> were equivalent
173to a plain C<sub>, so one could even create an anonymous sub with
174C<our sub { ... }>. These are now disallowed outside of the "lexical_subs"
175feature. Under the "lexical_subs" feature they have new meanings described
176in L<perlsub/Lexical Subroutines>.
177
45f11e9c
FC
178=head2 C<gv_fetchmeth_*> and SUPER
179
180The various C<gv_fetchmeth_*> XS functions used to treat a package whose
181named ended with ::SUPER specially. A method lookup on the Foo::SUPER
182package would be treated as a SUPER method lookup on the Foo package. This
183is no longer the case. To do a SUPER lookup, pass the Foo stash and the
184GV_SUPER flag.
185
916c45d9 186=head1 Deprecations
9c5f5e7a 187
916c45d9
SH
188XXX Any deprecated features, syntax, modules etc. should be listed here. In
189particular, deprecated modules should be listed here even if they are listed as
190an updated module in the L</Modules and Pragmata> section.
9c5f5e7a 191
916c45d9 192[ List each deprecation as a =head2 entry ]
9c5f5e7a 193
916c45d9 194=head1 Performance Enhancements
9c5f5e7a 195
916c45d9
SH
196XXX Changes which enhance performance without changing behaviour go here.
197There may well be none in a stable release.
ed2b0264 198
916c45d9 199[ List each enhancement as a =item entry ]
ed2b0264 200
916c45d9 201=over 4
338a1057
SH
202
203=item *
204
a3d51778
KW
205Speed up in regular expression matching against Unicode properties. The
206largest gain is for C<\X>, the Unicode "extended grapheme cluster". The
207gain for it is about 35% - 40%. Bracketed character classes, e.g.,
208C<[0-9\x{100}]> containing code points above 255 are also now faster.
0ace302a 209
5faa50e9
FR
210=item *
211
212On platforms supporting it, several former macros are now implemented as static
213inline functions. This should speed things up slightly on non-GCC platforms.
214
215=item *
216
217Apply the optimisation of hashes in boolean context, such as in C<if> or C<and>,
218to constructs in non-void context.
219
220=item *
221
222Extend the optimisation of hashes in boolean context to C<scalar(%hash)>,
4db91b87 223C<%hash ? ... : ...>, and C<sub { %hash || ... }>.
5faa50e9
FR
224
225=item *
226
227When making a copy of the string being matched against (so that $1, $& et al
228continue to show the correct value even if the original string is subsequently
229modified), only copy that substring of the original string needed for the
230capture variables, rather than copying the whole string.
231
232This is a big win for code like
233
234 $&;
235 $_ = 'x' x 1_000_000;
236 1 while /(.)/;
237
238Also, when pessimizing if the code contains C<$`>, C<$&> or C<$'>, record the
239presence of each variable separately, so that the determination of the substring
240range is based on each variable separately. So performance-wise,
241
242 $&; /x/
243
244is now roughly equivalent to
245
246 /(x)/
247
248whereas previously it was like
249
250 /^(.*)(x)(.*)$/
251
252and
253
254 $&; $'; /x/
255
256is now roughly equivalent to
257
258 /(x)(.*)$/
259
260etc.
261
916c45d9 262=back
0ace302a 263
916c45d9 264=head1 Modules and Pragmata
9c5f5e7a 265
916c45d9
SH
266XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
267go here. If Module::CoreList is updated, generate an initial draft of the
268following sections using F<Porting/corelist-perldelta.pl>, which prints stub
269entries to STDOUT. Results can be pasted in place of the '=head2' entries
270below. A paragraph summary for important changes should then be added by hand.
271In an ideal world, dual-life modules would have a F<Changes> file that could be
272cribbed.
9c5f5e7a 273
916c45d9 274[ Within each section, list entries as a =item entry ]
d4ada64a 275
916c45d9 276=head2 New Modules and Pragmata
d4ada64a 277
916c45d9 278=over 4
63870e6d 279
930a023a
SM
280=item *
281
916c45d9 282XXX
33f804f6 283
916c45d9 284=back
4cc02608 285
916c45d9 286=head2 Updated Modules and Pragmata
4cc02608 287
916c45d9 288=over 4
e7b92d54
SH
289
290=item *
291
5faa50e9
FR
292L<Archive::Tar> has been upgraded from version 1.88 to 1.90. This adds
293documentation fixes.
294
295=item *
296
297L<B> has been upgraded from version 1.37 to 1.38. This makes the module work
298with the new pad API.
299
300=item *
301
302L<B::Concise> has been upgraded from version 0.92 to 0.93. This adds support
303for the new C<OpMAYBE_TRUEBOOL> and C<OPpTRUEBOOL> flags.
304
305=item *
306
307L<B::Deparse> has been upgraded from version 1.16 to 1.17. This suppresses
308trailing semicolons in formats.
309
310=item *
311
2a527d37
SH
312L<DB_File> has been upgraded from version 1.826 to 1.827. The main Perl module
313no longer uses the C<"@_"> construct.
314
315=item *
316
5faa50e9
FR
317L<Devel::Peek> has been upgraded from version 1.09 to 1.10. This fixes
318compilation with C++ compilers and makes the module work with the new pad API.
319
320=item *
321
322L<DynaLoader> has been upgraded from version 1.15 to 1.16. This fixes warnings
323about using C<CODE> sections without an C<OUTPUT> section.
324
325=item *
326
327L<ExtUtils::ParseXS> has been upgraded from version 3.17 to 3.18. This avoids a
4db91b87 328bogus warning for initialised XSUB non-parameters [perl #112776].
5faa50e9
FR
329
330=item *
331
846de5c9
SH
332L<File::Copy> has been upgraded from version 2.23 to 2.24. C<copy()> no longer
333zeros files when copying into the same directory, and also now fails (as it has
334long been documented to do) when attempting to copy a file over itself.
335
336=item *
337
5faa50e9
FR
338L<File::Find> has been upgraded from version 1.21 to 1.22. This fixes
339inconsistent unixy path handling on VMS.
340
341=item *
342
5f877a7f
SH
343L<IPC::Open3> has been upgraded from version 1.12 to 1.13. The C<open3()>
344function no longer uses C<POSIX::close()> to close file descriptors since that
345breaks the ref-counting of file descriptors done by PerlIO in cases where the
346file descriptors are shared by PerlIO streams, leading to attempts to close the
347file descriptors a second time when any such PerlIO streams are closed later on.
348
349=item *
350
2a527d37
SH
351L<Locale::Codes> has been upgraded from version 3.22 to 3.23. It includes some
352new codes.
353
354=item *
355
5faa50e9
FR
356L<Module::CoreList> has been upgraded from version 2.71 to 2.73. This restores
357compatibility with older versions of perl and cleans up the corelist data for
358various modules.
359
360=item *
361
362L<Opcode> has been upgraded from version 1.23 to 1.24 to reflect the removal of
4db91b87
FC
363the boolkeys opcode and the addition of the clonecv, introcv and padcv
364opcodes.
5faa50e9
FR
365
366=item *
367
aff163d9
SH
368L<Socket> has been upgraded from version 2.004 to 2.006.
369C<unpack_sockaddr_in()> and C<unpack_sockaddr_in6()> now return just the IP
370address in scalar context, and C<inet_ntop()> now guards against incorrect
371length scalars being passed in.
9c5f5e7a 372
5faa50e9
FR
373=item *
374
eebee32b
FR
375L<Storable> has been upgraded from version 2.38 to 2.39. This contains Various
376bugfixes, including compatibility fixes for older versions of Perl and vstring
377handling.
378
379=item *
380
5faa50e9
FR
381L<threads::shared> has been upgraded from version 1.40 to 1.41. This adds the
382option to warn about or ignore attempts to clone structures that can't be
383cloned, as opposed to just unconditionally dying in that case.
384
385=item *
386
387L<XSLoader> has been upgraded from version 0.15 to 0.16.
388
916c45d9 389=back
9c5f5e7a 390
916c45d9 391=head2 Removed Modules and Pragmata
9c5f5e7a 392
916c45d9 393=over 4
44db8156
SH
394
395=item *
396
916c45d9 397XXX
4f85bc45 398
4eabcf70 399=back
72267260 400
4eabcf70 401=head1 Documentation
72267260 402
916c45d9
SH
403XXX Changes to files in F<pod/> go here. Consider grouping entries by
404file and be sure to link to the appropriate page, e.g. L<perlfunc>.
95c6c5c5 405
916c45d9 406=head2 New Documentation
95c6c5c5 407
916c45d9 408XXX Changes which create B<new> files in F<pod/> go here.
95c6c5c5 409
916c45d9 410=head3 L<XXX>
95c6c5c5 411
916c45d9 412XXX Description of the purpose of the new file here
95c6c5c5 413
916c45d9
SH
414=head2 Changes to Existing Documentation
415
416XXX Changes which significantly change existing files in F<pod/> go here.
417However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
418section.
95c6c5c5 419
916c45d9 420=head3 L<XXX>
e114da46
FC
421
422=over 4
423
424=item *
425
916c45d9 426XXX Description of the change here
e114da46
FC
427
428=back
429
4eabcf70 430=head1 Diagnostics
05c8f9ed 431
4eabcf70
TC
432The following additions or changes have been made to diagnostic output,
433including warnings and fatal error messages. For the complete list of
434diagnostic messages, see L<perldiag>.
ceb0881c 435
916c45d9
SH
436XXX New or changed warnings emitted by the core's C<C> code go here. Also
437include any changes in L<perldiag> that reconcile it to the C<C> code.
438
4eabcf70 439=head2 New Diagnostics
42d72fc5 440
916c45d9
SH
441XXX Newly added diagnostic messages go under here, separated into New Errors
442and New Warnings
443
4eabcf70 444=head3 New Errors
8e125188 445
e96e0834 446=over 4
e128ab2c 447
e2f0c3bb
FC
448=item *
449
916c45d9 450XXX L<message|perldiag/"message">
3c774534 451
4eabcf70 452=back
e2f0c3bb 453
4eabcf70 454=head3 New Warnings
90519d0f 455
4eabcf70 456=over 4
90519d0f
FC
457
458=item *
459
4db91b87
FC
460L<Experimental "%s" subs not enabled|perldiag/"Experimental "%s" subs not enabled">
461
462(F) To use lexical subs, you must first enable them:
463
464 no warnings 'experimental:lexical_subs';
465 use feature 'lexical_subs';
466 my sub foo { ... }
467
468=item *
469
470L<Subroutine "&%s" is not available|perldiag/"Subroutine "&%s" is not available">
471
472(W closure) During compilation, an inner named subroutine or eval is
473attempting to capture an outer lexical subroutine that is not currently
474available. This can happen for one of two reasons. First, the lexical
475subroutine may be declared in an outer anonymous subroutine that has not
476yet been created. (Remember that named subs are created at compile time,
477while anonymous subs are created at run-time.) For example,
478
479 sub { my sub a {...} sub f { \&a } }
480
481At the time that f is created, it can't capture the current the "a" sub,
482since the anonymous subroutine hasn't been created yet. Conversely, the
483following won't give a warning since the anonymous subroutine has by now
484been created and is live:
485
486 sub { my sub a {...} eval 'sub f { \&a }' }->();
487
488The second situation is caused by an eval accessing a variable that has
489gone out of scope, for example,
490
491 sub f {
492 my sub a {...}
493 sub { eval '\&a' }
494 }
495 f()->();
496
497Here, when the '\&a' in the eval is being compiled, f() is not currently
498being executed, so its &a is not available for capture.
499
500=item *
501
502L<"%s" subroutine &%s masks earlier declaration in same %s|perldiag/"%s" subroutine &%s masks earlier declaration in same %s>
503
504(W misc) A "my" or "state" subroutine has been redeclared in the
505current scope or statement, effectively eliminating all access to
506the previous instance. This is almost always a typographical error.
507Note that the earlier subroutine will still exist until the end of
508the scope or until all closure references to it are destroyed.
509
510=item *
511
512L<The %s feature is experimental|perldiag/"The %s feature is experimental">
513
514(S experimental) This warning is emitted if you enable an experimental
515feature via C<use feature>. Simply suppress the warning if you want
516to use the feature, but know that in doing so you are taking the risk
517of using an experimental feature which may change or be removed in a
518future Perl version:
519
520 no warnings "experimental:lexical_subs";
521 use feature "lexical_subs";
90519d0f 522
61174fb5 523=back
422287bf 524
916c45d9 525=head2 Changes to Existing Diagnostics
c95d4104 526
916c45d9 527XXX Changes (i.e. rewording) of diagnostic messages go here
7ab2ea42 528
4eabcf70 529=over 4
7ab2ea42 530
916c45d9 531=item *
7ab2ea42 532
4db91b87
FC
533L<vector argument not supported with alpha versions|perldiag/vector argument not supported with alpha versions>
534
535This warning was not suppressable, even with C<no warnings>. Now it is
536suppressible, and has been moved from the "internal" category to the
537"printf" category.
90519d0f 538
4eabcf70 539=back
90519d0f 540
916c45d9 541=head1 Utility Changes
90519d0f 542
916c45d9
SH
543XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go here.
544Most of these are built within the directories F<utils> and F<x2p>.
d91f1bc9 545
916c45d9
SH
546[ List utility changes as a =head3 entry for each utility and =item
547entries for each change
548Use L<XXX> with program names to get proper documentation linking. ]
d91f1bc9 549
916c45d9 550=head3 L<XXX>
90519d0f 551
4eabcf70 552=over 4
90519d0f
FC
553
554=item *
555
916c45d9 556XXX
e9f497c4 557
916c45d9 558=back
e9f497c4 559
916c45d9 560=head1 Configuration and Compilation
d7f7c515 561
916c45d9
SH
562XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
563go here. Any other changes to the Perl build process should be listed here.
564However, any platform-specific changes should be listed in the
565L</Platform Support> section, instead.
d7f7c515 566
916c45d9 567[ List changes as a =item entry ].
afc04f16 568
916c45d9 569=over 4
afc04f16 570
b4cf37f5
FC
571=item *
572
5faa50e9
FR
573F<Configure> will now correctly detect C<isblank()> when compiling with a C++
574compiler.
b4cf37f5 575
916c45d9 576=back
b4cf37f5 577
916c45d9 578=head1 Testing
b4cf37f5 579
916c45d9
SH
580XXX Any significant changes to the testing of a freshly built perl should be
581listed here. Changes which create B<new> files in F<t/> go here as do any
582large changes to the testing harness (e.g. when parallel testing was added).
583Changes to existing files in F<t/> aren't worth summarizing, although the bugs
584that they represent may be covered elsewhere.
ea9f761d 585
916c45d9 586[ List each test improvement as a =item entry ]
70306497 587
916c45d9 588=over 4
70306497 589
63164165
FC
590=item *
591
916c45d9 592XXX
63164165 593
916c45d9 594=back
9da700a7 595
916c45d9 596=head1 Platform Support
9da700a7 597
916c45d9 598XXX Any changes to platform support should be listed in the sections below.
9702222b 599
916c45d9
SH
600[ Within the sections, list each platform as a =item entry with specific
601changes as paragraphs below it. ]
e4963eb6 602
916c45d9 603=head2 New Platforms
e4963eb6 604
916c45d9
SH
605XXX List any platforms that this version of perl compiles on, that previous
606versions did not. These will either be enabled by new files in the F<hints/>
607directories, or new subdirectories and F<README> files at the top level of the
608source tree.
3771623e 609
916c45d9 610=over 4
3771623e 611
916c45d9 612=item XXX-some-platform
9702222b 613
916c45d9 614XXX
3e0c76ce 615
916c45d9 616=back
610c7be4 617
916c45d9 618=head2 Discontinued Platforms
610c7be4 619
916c45d9 620=over 4
c58f5a32 621
043fec90 622=item VM/ESA
c58f5a32 623
043fec90
NC
624Support for VM/ESA has been removed. The port was tested on 2.3.0, which
625IBM ended service on in March 2002. 2.4.0 ended service in June 2003, and
626was superseded by Z/VM. The current version of Z/VM is V6.2.0, and scheduled
627for end of service on 2015/04/30.
a21a3918 628
916c45d9 629=back
a21a3918 630
916c45d9 631=head2 Platform-Specific Notes
a21a3918 632
916c45d9
SH
633XXX List any changes for specific platforms. This could include configuration
634and compilation changes or changes in portability/compatibility. However,
635changes within modules for platforms should generally be listed in the
636L</Modules and Pragmata> section.
a21a3918 637
916c45d9 638=over 4
60ca243a 639
5faa50e9 640=item Win32
60ca243a 641
3eebda9a
SH
642Fixed a problem where perl could crash while cleaning up threads (including the
643main thread) in threaded debugging builds on Win32 and possibly other platforms
644[perl #114496].
5faa50e9 645
9afd6203
SH
646A rare race condition that would lead to L<sleep|perlfunc/sleep> taking more
647time than requested, and possibly even hanging, has been fixed [perl #33096].
001e9f89 648
5faa50e9
FR
649=item Solaris
650
651In Configure, avoid running sed commands with flags not supported on Solaris.
652
653=item Darwin
654
655Stop hardcoding an alignment on 8 byte boundaries to fix builds using
656-Dusemorebits.
3771623e 657
eebee32b
FR
658=item VMS
659
660Fix linking on builds configured with -Dusemymalloc=y.
661
916c45d9 662=back
d91f1bc9 663
916c45d9 664=head1 Internal Changes
d91f1bc9 665
916c45d9
SH
666XXX Changes which affect the interface available to C<XS> code go here. Other
667significant internal changes for future core maintainers should be noted as
668well.
3771623e 669
916c45d9 670[ List each change as a =item entry ]
b4d67305 671
916c45d9 672=over 4
b4d67305 673
3c774534
SH
674=item *
675
5faa50e9
FR
676The APIs for accessing lexical pads have changed considerably.
677
678C<PADLIST>s are now longer C<AV>s, but their own type instead. C<PADLIST>s now
679contain a C<PAD> and a C<PADNAMELIST> of C<PADNAME>s, rather than C<AV>s for the
680pad and the list of pad names. C<PAD>s, C<PADNAMELIST>s, and C<PADNAME>s are to
681be accessed as such though the newly added pad API instead of the plain C<AV>
682and C<SV> APIs. See L<perlapi> for details.
d91f1bc9 683
050862bb
DM
684=item *
685
686In the regex API, the numbered capture callbacks are passed an index
687indicating what match variable is being accessed. There are special
688index values for the C<$`, $&, $&> variables. Previously the same three
689values were used to retrieve C<${^PREMATCH}, ${^MATCH}, ${^POSTMATCH}>
690too, but these have now been assigned three separate values. See
691L<perlreapi/Numbered capture callbacks>.
692
693=item *
694
695C<PL_sawampersand> was previously a boolean indicating that any of
696C<$`, $&, $&> had been seen; it now contains three one-bit flags
697indicating the presence of each of the variables individually.
698
916c45d9 699=back
d91f1bc9 700
916c45d9 701=head1 Selected Bug Fixes
d91f1bc9 702
916c45d9
SH
703XXX Important bug fixes in the core language are summarized here. Bug fixes in
704files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>.
d91f1bc9 705
916c45d9 706=over 4
d91f1bc9
SH
707
708=item *
709
4db91b87
FC
710The error "Can't localize through a reference" had disappeared in 5.16.0
711when C<local %$ref> appeared on the last line of an lvalue subroutine.
712This error disappeared for C<\local %$ref> in perl 5.8.1. It has now
713been restored.
714
715=item *
716
717The parsing of here-docs has been improved significantly, fixing several
718parsing bugs and crashes and one memory leak, and correcting wrong
719subsequent line numbers under certain conditions.
720
721=item *
722
723Inside an eval, the error message for an unterminated here-doc no longer
724has a newline in the middle of it [perl #70836].
725
726=item *
727
728A substitution inside a substitution pattern (C<s/${s|||}//>) no longer
729confuses the parser.
730
731=item *
732
733It may be an odd place to allow comments, but C<s//"" # hello/e> has
734always worked, I<unless> there happens to be a null character before the
735first #. Now it works even in the presence of nulls.
736
737=item *
738
739An invalid range in C<tr///> or C<y///> no longer results in a memory leak.
740
741=item *
742
743String eval no longer treats a semicolon-delimited quote-like operator at
744the very end (C<eval 'q;;'>) as a syntax error.
745
746=item *
747
748C<< warn {$_ => 1} + 1 >> is no longer a syntax error. The parser used to
749get confused with certain list operators followed by an anonymous hash and
750then an infix operator that shares its form with a unary operator.
5faa50e9
FR
751
752=item *
753
4db91b87
FC
754C<(caller $n)[6]> (which gives the text of the eval) used to return the
755actual parser buffer. Modifying it could result in crashes. Now it always
756returns a copy. The string returned no longer has "\n;" tacked on to the
757end. The returned text also includes here-doc bodies, which used to be
758omitted.
5faa50e9
FR
759
760=item *
761
762Reset the utf8 position cache when accessing magical variables to avoid the
4db91b87
FC
763string buffer and the utf8 position cache to get out of sync
764[perl #114410].
5faa50e9
FR
765
766=item *
767
768Various cases of get magic being called twice for magical utf8 strings have been
769fixed.
770
771=item *
772
773This code (when not in the presence of C<$&> etc)
774
775 $_ = 'x' x 1_000_000;
776 1 while /(.)/;
777
778used to skip the buffer copy for performance reasons, but suffered from C<$1>
779etc changing if the original string changed. That's now been fixed.
780
781=item *
782
783Perl doesn't use PerlIO anymore to report out of memory messages, as PerlIO
784might attempt to allocate more memory.
d91f1bc9 785
31c15ce5
KW
786=item *
787
788In a regular expression, if something is quantified with C<{n,m}>
789where C<S<n E<gt> m>>, it can't possibly match. Previously this was a fatal error,
790but now is merely a warning (and that something won't match). [perl #82954].
791
4db91b87
FC
792=item *
793
794It used to be possible for formats defined in subroutines that have
795subquently been undefined and redefined to close over variables in the
796wrong pad (the newly-defined enclosing sub), resulting in crashes or
797"Bizarre copy" errors.
798
799=item *
800
801Redefinition of XSUBs at run time could produce warnings with the wrong
802line number.
803
804=item *
805
806The %vd sprintf format does not support version objects for alpha versions.
807It used to output the format itself (%vd) when passed an alpha version, and
808also emit an "Invalid conversion in printf" warning. It no longer does,
809but produces the empty string in the output. It also no longer leaks
810memory in this case.
811
812=item *
813
814A bug fix in an earlier 5.17.x release caused C<no a a 3> (a syntax error)
815to result in a bad read or assertion failure, because an op was being freed
816twice.
817
818=item *
819
820C<< $obj->SUPER::method >> calls in the main package could fail if the
821SUPER package had already been accessed by other means.
822
823=item *
824
825Stash aliasing (C<*foo:: = *bar::>) no longer causes SUPER calls to ignore
826changes to methods or @ISA or use the wrong package.
827
45f11e9c
FC
828=item *
829
830Method calls on packages whose names end in ::SUPER are no longer treated
831as SUPER method calls, resulting in failure to find the method.
832Furthermore, defining subroutines in such packages no longer causes them to
833be found by SUPER method calls on the containing package [perl #114924].
834
916c45d9 835=back
d91f1bc9 836
916c45d9 837=head1 Known Problems
d91f1bc9 838
916c45d9
SH
839XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
840tests that had to be C<TODO>ed for the release would be noted here. Unfixed
841platform specific bugs also go here.
d91f1bc9 842
916c45d9 843[ List each fix as a =item entry ]
216d99a6 844
916c45d9 845=over 4
216d99a6
FC
846
847=item *
848
5faa50e9
FR
849Changes in the lexical pad API break several CPAN modules.
850
851To avoid having to patch those modules again later if we change pads from AVs
852into their own types, APIs for accessing the contents of pads have been added.
216d99a6 853
4eabcf70 854=back
90519d0f 855
916c45d9 856=head1 Obituary
05bee12a 857
916c45d9
SH
858XXX If any significant core contributor has died, we've added a short obituary
859here.
05bee12a 860
916c45d9 861=head1 Acknowledgements
05bee12a 862
916c45d9 863XXX Generate this with:
05bee12a 864
916c45d9 865 perl Porting/acknowledgements.pl v5.17.3..HEAD
29cf780c 866
44691e6f
AB
867=head1 Reporting Bugs
868
e08634c5
SH
869If you find what you think is a bug, you might check the articles recently
870posted to the comp.lang.perl.misc newsgroup and the perl bug database at
871http://rt.perl.org/perlbug/ . There may also be information at
872http://www.perl.org/ , the Perl Home Page.
44691e6f 873
e08634c5
SH
874If you believe you have an unreported bug, please run the L<perlbug> program
875included with your release. Be sure to trim your bug down to a tiny but
876sufficient test case. Your bug report, along with the output of C<perl -V>,
877will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
44691e6f
AB
878
879If the bug you are reporting has security implications, which make it
e08634c5
SH
880inappropriate to send to a publicly archived mailing list, then please send it
881to perl5-security-report@perl.org. This points to a closed subscription
882unarchived mailing list, which includes all the core committers, who will be
883able to help assess the impact of issues, figure out a resolution, and help
f9001595 884co-ordinate the release of patches to mitigate or fix the problem across all
e08634c5
SH
885platforms on which Perl is supported. Please only use this address for
886security issues in the Perl core, not for modules independently distributed on
887CPAN.
44691e6f
AB
888
889=head1 SEE ALSO
890
e08634c5
SH
891The F<Changes> file for an explanation of how to view exhaustive details on
892what changed.
44691e6f
AB
893
894The F<INSTALL> file for how to build Perl.
895
896The F<README> file for general stuff.
897
898The F<Artistic> and F<Copying> files for copyright information.
899
900=cut