This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
import perl5170delta content to perl5180delta
[perl5.git] / Porting / perl5180delta.pod
CommitLineData
e5ba1bf1
FC
1=encoding utf8
2
3=head1 NAME
4
0bba4573 5perl5180delta - what is new for perl v5.18.0
e5ba1bf1
FC
6
7=head1 DESCRIPTION
8
0bba4573 9This document describes differences between the 5.16.0 release and the 5.18.0
e5ba1bf1
FC
10release.
11
0bba4573
RS
12If you are upgrading from an earlier release such as 5.14.0, first read
13L<perl5140delta>, which describes differences between 5.12.0 and 5.14.0.
e5ba1bf1
FC
14
15=head1 Notice
16
17XXX Any important notices here
18
19=head1 Core Enhancements
20
21XXX New core language features go here. Summarize user-visible core language
22enhancements. Particularly prominent performance optimisations could go
23here, but most should go in the L</Performance Enhancements> section.
24
25[ List each enhancement as a =head2 entry ]
26
27=head1 Security
28
29XXX Any security-related notices go here. In particular, any security
30vulnerabilities closed should be noted here rather than in the
31L</Selected Bug Fixes> section.
32
33[ List each security issue as a =head2 entry ]
34
35=head1 Incompatible Changes
36
0bba4573
RS
37=head2 qw(...) can no longer be used as parentheses
38
39C<qw> lists used to fool the parser into thinking they were always
40surrounded by parentheses. This permitted some surprising constructions
41such as C<foreach $x qw(a b c) {...}>, which should really be written
42C<foreach $x (qw(a b c)) {...}>. These would sometimes get the lexer into
43the wrong state, so they didn't fully work, and the similar C<foreach qw(a
44b c) {...}> that one might expect to be permitted never worked at all.
45
46This side effect of C<qw> has now been abolished. It has been deprecated
47since Perl 5.13.11. It is now necessary to use real parentheses
48everywhere that the grammar calls for them.
e5ba1bf1 49
0bba4573 50=head2 C<\s> in regular expressions now matches a Vertical Tab
e5ba1bf1 51
0bba4573 52[ XXX ]
e5ba1bf1
FC
53
54=head1 Deprecations
55
56XXX Any deprecated features, syntax, modules etc. should be listed here. In
57particular, deprecated modules should be listed here even if they are listed as
58an updated module in the L</Modules and Pragmata> section.
59
60[ List each deprecation as a =head2 entry ]
61
62=head1 Performance Enhancements
63
64XXX Changes which enhance performance without changing behaviour go here.
65There may well be none in a stable release.
66
67[ List each enhancement as a =item entry ]
68
69=over 4
70
71=item *
72
0bba4573
RS
73Filetest ops manage the stack in a fractionally more efficient manner.
74
75=item *
76
77Globs used in a numeric context are now numerified directly in most cases,
78rather than being numerified via stringification.
e5ba1bf1
FC
79
80=back
81
82=head1 Modules and Pragmata
83
84XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
85go here. If Module::CoreList is updated, generate an initial draft of the
86following sections using F<Porting/corelist-perldelta.pl>, which prints stub
87entries to STDOUT. Results can be pasted in place of the '=head2' entries
88below. A paragraph summary for important changes should then be added by hand.
89In an ideal world, dual-life modules would have a F<Changes> file that could be
90cribbed.
91
92[ Within each section, list entries as a =item entry ]
93
94=head2 New Modules and Pragmata
95
96=over 4
97
98=item *
99
100XXX
101
102=back
103
104=head2 Updated Modules and Pragmata
105
106=over 4
107
108=item *
109
110L<XXX> has been upgraded from version A.xx to B.yy.
111
112=back
113
114=head2 Removed Modules and Pragmata
115
0bba4573 116=over
e5ba1bf1
FC
117
118=item *
119
0bba4573
RS
120L<Version::Requirements> has been removed from the core distribution. It is
121available under a different name: L<CPAN::Meta::Requirements>.
e5ba1bf1
FC
122
123=back
124
125=head1 Documentation
126
127XXX Changes to files in F<pod/> go here. Consider grouping entries by
128file and be sure to link to the appropriate page, e.g. L<perlfunc>.
129
130=head2 New Documentation
131
132XXX Changes which create B<new> files in F<pod/> go here.
133
134=head3 L<XXX>
135
136XXX Description of the purpose of the new file here
137
138=head2 Changes to Existing Documentation
139
0bba4573 140=head3 L<perldata>
e5ba1bf1 141
0bba4573
RS
142=over 4
143
144=item *
145
146Now explicitly documents the behaviour of hash initializer lists that
147contain duplicate keys.
148
149=back
150
151=head3 L<perldiag>
152
153=over 4
154
155=item *
156
157The explanation of symbolic references being prevented by "strict refs"
158now doesn't assume that the reader knows what symbolic references are.
159
160=back
161
162=head3 L<perlfunc>
e5ba1bf1
FC
163
164=over 4
165
166=item *
167
0bba4573 168The return value of C<pipe> is now documented.
e5ba1bf1
FC
169
170=back
171
0bba4573 172=head3 Diagnostics
e5ba1bf1
FC
173
174The following additions or changes have been made to diagnostic output,
175including warnings and fatal error messages. For the complete list of
176diagnostic messages, see L<perldiag>.
177
178XXX New or changed warnings emitted by the core's C<C> code go here. Also
179include any changes in L<perldiag> that reconcile it to the C<C> code.
180
181=head2 New Diagnostics
182
183XXX Newly added diagnostic messages go under here, separated into New Errors
184and New Warnings
185
186=head3 New Errors
187
188=over 4
189
190=item *
191
192XXX L<message|perldiag/"message">
193
194=back
195
196=head3 New Warnings
197
198=over 4
199
200=item *
201
202XXX L<message|perldiag/"message">
203
204=back
205
206=head2 Changes to Existing Diagnostics
207
208XXX Changes (i.e. rewording) of diagnostic messages go here
209
210=over 4
211
212=item *
213
214XXX Describe change here
215
216=back
217
218=head1 Utility Changes
219
220XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go here.
221Most of these are built within the directories F<utils> and F<x2p>.
222
223[ List utility changes as a =head3 entry for each utility and =item
224entries for each change
225Use L<XXX> with program names to get proper documentation linking. ]
226
227=head3 L<XXX>
228
229=over 4
230
231=item *
232
233XXX
234
235=back
236
237=head1 Configuration and Compilation
238
239XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
240go here. Any other changes to the Perl build process should be listed here.
241However, any platform-specific changes should be listed in the
242L</Platform Support> section, instead.
243
244[ List changes as a =item entry ].
245
246=over 4
247
248=item *
249
250XXX
251
252=back
253
254=head1 Testing
255
256XXX Any significant changes to the testing of a freshly built perl should be
257listed here. Changes which create B<new> files in F<t/> go here as do any
258large changes to the testing harness (e.g. when parallel testing was added).
259Changes to existing files in F<t/> aren't worth summarizing, although the bugs
260that they represent may be covered elsewhere.
261
262[ List each test improvement as a =item entry ]
263
264=over 4
265
266=item *
267
0bba4573
RS
268The test suite now has a section for tests that require very large amounts
269of memory. These tests won't run by default; they can be enabled by
270setting the C<PERL_TEST_MEMORY> environment variable to the number of
271gibibytes of memory that may be safely used.
e5ba1bf1
FC
272
273=back
274
275=head1 Platform Support
276
277XXX Any changes to platform support should be listed in the sections below.
278
279[ Within the sections, list each platform as a =item entry with specific
280changes as paragraphs below it. ]
281
282=head2 New Platforms
283
284XXX List any platforms that this version of perl compiles on, that previous
285versions did not. These will either be enabled by new files in the F<hints/>
286directories, or new subdirectories and F<README> files at the top level of the
287source tree.
288
289=over 4
290
291=item XXX-some-platform
292
293XXX
294
295=back
296
297=head2 Discontinued Platforms
298
299XXX List any platforms that this version of perl no longer compiles on.
300
301=over 4
302
303=item XXX-some-platform
304
305XXX
306
307=back
308
309=head2 Platform-Specific Notes
310
311XXX List any changes for specific platforms. This could include configuration
312and compilation changes or changes in portability/compatibility. However,
313changes within modules for platforms should generally be listed in the
314L</Modules and Pragmata> section.
315
316=over 4
317
0bba4573 318=item clang++
e5ba1bf1 319
0bba4573
RS
320There is now a workaround for a compiler bug that prevented compiling
321with clang++ since Perl 5.15.7 [perl #112786].
322
323=item C++
324
325When compiling the Perl core as C++ (which is only semi-supported), the
326mathom functions are now compiled as C<extern "C">, to ensure proper
327binary compatibility. (However, binary compatibility isn't generally
328guaranteed anyway in the situations where this would matter.)
329
330=item VMS
331
332It should now be possible to compile Perl as C++ on VMS.
e5ba1bf1
FC
333
334=back
335
336=head1 Internal Changes
337
0bba4573 338=over
e5ba1bf1 339
0bba4573 340=item *
e5ba1bf1 341
0bba4573
RS
342The C<CV *> typemap entry now supports C<&{}> overloading and typeglobs,
343just like C<&{...}> [perl #96872].
e5ba1bf1
FC
344
345=item *
346
0bba4573
RS
347The C<SVf_AMAGIC> flag to indicate overloading is now on the stash, not the
348object. It is now set automatically whenever a method or @ISA changes, so
349its meaning has changed, too. It now means "potentially overloaded". When
350the overload table is calculated, the flag is automatically turned off if
351there is no overloading, so there should be no noticeable slowdown.
352
353The staleness of the overload tables is now checked when overload methods
354are invoked, rather than during C<bless>.
355
356"A" magic is gone. The changes to the handling of the C<SVf_AMAGIC> flag
357eliminate the need for it.
358
359C<PL_amagic_generation> has been removed as no longer necessary. For XS
360modules, it is now a macro alias to C<PL_na>.
361
362The fallback overload setting is now stored in a stash entry separate from
363overloadedness itself.
364
365=item *
366
367The character-processing code has been cleaned up in places. The changes
368should be operationally invisible.
e5ba1bf1
FC
369
370=back
371
372=head1 Selected Bug Fixes
373
374XXX Important bug fixes in the core language are summarized here. Bug fixes in
375files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>.
376
377[ List each fix as a =item entry ]
378
379=over 4
380
381=item *
382
0bba4573
RS
383C<goto ''> now looks for an empty label, producing the "goto must have
384label" error message, instead of exiting the program [perl #111794].
e5ba1bf1 385
0bba4573 386=item *
e5ba1bf1 387
0bba4573
RS
388C<goto "\0"> now dies with "Can't find label" instead of "goto must have
389label".
e5ba1bf1 390
0bba4573 391=item *
e5ba1bf1 392
0bba4573
RS
393The C function C<hv_store> used to result in crashes when used on C<%^H>
394[perl #111000].
e5ba1bf1 395
0bba4573
RS
396=item *
397
398A call checker attached to a closure prototype via C<cv_set_call_checker>
399is now copied to closures cloned from it. So C<cv_set_call_checker> now
400works inside an attribute handler for a closure.
e5ba1bf1
FC
401
402=item *
403
0bba4573
RS
404Writing to C<$^N> used to have no effect. Now it croaks with "Modification
405of a read-only value" by default, but that can be overridden by a custom
406regular expression engine, as with C<$1> [perl #112184].
407
23dd6e2e
FC
408=item *
409
0bba4573
RS
410C<undef> on a control character glob (C<undef *^H>) no longer emits an
411erroneous warning about ambiguity [perl #112456].
23dd6e2e 412
0bba4573
RS
413=item *
414
415For efficiency's sake, many operators and built-in functions return the
416same scalar each time. Lvalue subroutines and subroutines in the CORE::
417namespace were allowing this implementation detail to leak through.
418C<print &CORE::uc("a"), &CORE::uc("b")> used to print "BB". The same thing
419would happen with an lvalue subroutine returning the return value of C<uc>.
420Now the value is copied in such cases.
23dd6e2e
FC
421
422=item *
423
0bba4573
RS
424C<method {}> syntax with an empty block or a block returning an empty list
425used to crash or use some random value left on the stack as its invocant.
426Now it produces an error.
b92848b5 427
0f023b5a
FC
428=item *
429
0bba4573 430C<vec> now works with extremely large offsets (E<gt>2 GB) [perl #111730].
0f023b5a
FC
431
432=item *
433
0bba4573
RS
434Changes to overload settings now take effect immediately, as do changes to
435inheritance that affect overloading. They used to take effect only after
436C<bless>.
437
438Objects that were created before a class had any overloading used to remain
439non-overloaded even if the class gained overloading through C<use overload>
440or @ISA changes, and even after C<bless>. This has been fixed
441[perl #112708].
c53e3a75
FC
442
443=item *
444
0bba4573 445Classes with overloading can now inherit fallback values.
c53e3a75
FC
446
447=item *
448
0bba4573
RS
449Overloading was not respecting a fallback value of 0 if there were
450overloaded objects on both sides of an assignment operator like C<+=>
451[perl #111856].
0f023b5a
FC
452
453=item *
454
0bba4573
RS
455C<pos> now croaks with hash and array arguments, instead of producing
456erroneous warnings.
0f023b5a
FC
457
458=item *
459
0bba4573
RS
460C<while(each %h)> now implies C<while(defined($_ = each %h))>, like
461C<readline> and C<readdir>.
0f023b5a 462
0bba4573
RS
463=item *
464
465Subs in the CORE:: namespace no longer crash after C<undef *_> when called
466with no argument list (C<&CORE::time> with no parentheses).
467
468=item *
469
470Unicode 6.1 published an incorrect alias for one of the
471Canonical_Combining_Class property's values (which range between 0 and
472254). The alias C<CCC133> should have been C<CCC132>. Perl now
473overrides the data file furnished by Unicode to give the correct value.
474
475=item *
476
477C<unpack> no longer produces the "'/' must follow a numeric type in unpack"
478error when it is the data that are at fault [perl #60204].
479
480=item *
481
482C<join> and C<"@array"> now call FETCH only once on a tied C<$">
483[perl #8931].
484
485=item *
486
487Some subroutine calls generated by compiling core ops affected by a
488C<CORE::GLOBAL> override had op checking performed twice. The checking
489is always idempotent for pure Perl code, but the double checking can
490matter when custom call checkers are involved.
491
492=item *
493
494A race condition used to exist around fork that could cause a signal sent to
495the parent to be handled by both parent and child. Signals are now blocked
496briefly around fork to prevent this from happening [perl #82580].
e5ba1bf1
FC
497
498=back
499
0bba4573 500=head1 Known Problems
e5ba1bf1 501
0bba4573
RS
502XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
503tests that had to be C<TODO>ed for the release would be noted here. Unfixed
504platform specific bugs also go here.
505
506[ List each fix as a =item entry ]
507
508=over 4
509
510=item *
511
512XXX
513
514=back
e5ba1bf1
FC
515
516=head1 Acknowledgements
517
518XXX Generate this with:
519
de3d8d88 520 perl Porting/acknowledgements.pl v5.17.12..HEAD
e5ba1bf1
FC
521
522=head1 Reporting Bugs
523
524If you find what you think is a bug, you might check the articles recently
525posted to the comp.lang.perl.misc newsgroup and the perl bug database at
526http://rt.perl.org/perlbug/ . There may also be information at
527http://www.perl.org/ , the Perl Home Page.
528
529If you believe you have an unreported bug, please run the L<perlbug> program
530included with your release. Be sure to trim your bug down to a tiny but
531sufficient test case. Your bug report, along with the output of C<perl -V>,
532will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
533
534If the bug you are reporting has security implications, which make it
535inappropriate to send to a publicly archived mailing list, then please send it
536to perl5-security-report@perl.org. This points to a closed subscription
537unarchived mailing list, which includes all the core committers, who will be
538able to help assess the impact of issues, figure out a resolution, and help
539co-ordinate the release of patches to mitigate or fix the problem across all
540platforms on which Perl is supported. Please only use this address for
541security issues in the Perl core, not for modules independently distributed on
542CPAN.
543
544=head1 SEE ALSO
545
546The F<Changes> file for an explanation of how to view exhaustive details on
547what changed.
548
549The F<INSTALL> file for how to build Perl.
550
551The F<README> file for general stuff.
552
553The F<Artistic> and F<Copying> files for copyright information.
554
555=cut