This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta update
[perl5.git] / pod / perldelta.pod
1 =encoding utf8
2
3 =for comment
4 This has been completed up to 8367b6810 except for:
5 747627ec455e0765e07733ece1545aa3f728a00a (Steffen Müller)
6 dd35fa16610ef2fa0d46f5129e626b99cf350d77 (H. Merijn Brand)
7 e64345f82d66a32f6da47acf482e7e6c9282b433 (Steffen Müller)
8 f1d35e3443aa8451bf47be80983076fe28626113 (Karthik Rajagopalan)
9
10 =head1 NAME
11
12 [ this is a template for a new perldelta file. Any text flagged as
13 XXX needs to be processed before release. ]
14
15 perldelta - what is new for perl v5.15.2
16
17 =head1 DESCRIPTION
18
19 This document describes differences between the 5.15.1 release and
20 the 5.15.2 release.
21
22 If you are upgrading from an earlier release such as 5.15.0, first read
23 L<perl5151delta>, which describes differences between 5.15.0 and
24 5.15.1.
25
26 =head1 Notice
27
28 XXX Any important notices here
29
30 =head1 Core Enhancements
31
32 XXX New core language features go here. Summarise user-visible core language
33 enhancements. Particularly prominent performance optimisations could go
34 here, but most should go in the L</Performance Enhancements> section.
35
36 [ List each enhancement as a =head2 entry ]
37
38 =head2 Subroutines in the CORE namespace
39
40 Many Perl keywords are now available as subroutines in the CORE namespace.
41 These cannot be called through references or via C<&foo> syntax yet, but
42 must be called as barewords.  In other words, you can now do this:
43
44     BEGIN { *entangle = \&CORE::tie }
45     entangle $variable, $package, @args;
46
47 This currently works for overridable keywords other than C<dump> and the
48 infix operators.
49
50 Work is under way to allow these subroutines to be called through
51 references.
52
53 =head2 C<__FILE__()> Syntax
54
55 The C<__FILE__>, C<__LINE__> and C<__PACKAGE__> tokens can now be written
56 with an empty pair of parentheses after them.  This makes them parse the
57 same way as C<time>, C<fork> and other built-in functions.
58
59 =head1 Security
60
61 XXX Any security-related notices go here.  In particular, any security
62 vulnerabilities closed should be noted here rather than in the
63 L</Selected Bug Fixes> section.
64
65 [ List each security issue as a =head2 entry ]
66
67 =head1 Incompatible Changes
68
69 XXX For a release on a stable branch, this section aspires to be:
70
71     There are no changes intentionally incompatible with 5.XXX.XXX
72     If any exist, they are bugs and reports are welcome.
73
74 [ List each incompatible change as a =head2 entry ]
75
76 =head2 C<UNIVERSAL::VERSION> now returns $VERSION
77
78 C<UNIVERSAL::VERSION> now return whatever is in $VERSION, instead of
79 returning $VERSION converted to a version object and then to a string.
80 As a result, it no longer parses the version when called without arguments,
81 so it no longer dies in that case for malformed versions.  This allows
82 custom version number parsers to use C<< ->VERSION >> to retrieve the
83 version number, as was the case in Perl 5.8 [perl #95544].
84
85 =head1 Deprecations
86
87 XXX Any deprecated features, syntax, modules etc. should be listed here.
88 In particular, deprecated modules should be listed here even if they are
89 listed as an updated module in the L</Modules and Pragmata> section.
90
91 [ List each deprecation as a =head2 entry ]
92
93 =head1 Performance Enhancements
94
95 XXX Changes which enhance performance without changing behaviour go here. There
96 may well be none in a stable release.
97
98 [ List each enhancement as a =item entry ]
99
100 =over 4
101
102 =item *
103
104 XXX
105
106 =back
107
108 =head1 Modules and Pragmata
109
110 XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
111 go here.  If Module::CoreList is updated, generate an initial draft of the
112 following sections using F<Porting/corelist-perldelta.pl>, which prints stub
113 entries to STDOUT.  Results can be pasted in place of the '=head2' entries
114 below.  A paragraph summary for important changes should then be added by hand.
115 In an ideal world, dual-life modules would have a F<Changes> file that could be
116 cribbed.
117
118 [ Within each section, list entries as a =item entry ]
119
120 =head2 New Modules and Pragmata
121
122 =over 4
123
124 =item *
125
126 XXX
127
128 =back
129
130 =head2 Updated Modules and Pragmata
131
132 =over 4
133
134 =item *
135
136 L<B> has been upgraded from version 1.30 to version 1.31
137
138 The XS code has changed slightly, as it was too tightly coupled to
139 the contents of the header F<embedvar.h>. Documentation in L<B::Terse>
140 and L<B::Xref> has been improved, hence their versions have been increased.
141
142 =item *
143
144 L<CPAN> has been upgraded from version 1.9600 to version 1.9800
145
146 =item *
147
148 L<CPANPLUS> has been upgraded from version 0.9108 to version 0.9109
149
150 Fixed support for v-strings and x.y.z versions with v5.8.4
151
152 =item *
153
154 L<CPAN::Meta> has been upgraded from version 2.110930_001 to version 2.112150
155
156 Stringify any objects encountered during conversion.
157
158 Clarified that file paths in the 'provides' section must be in
159 Unix-style (i.e. forward slashes)
160
161 =item *
162
163 L<DB_File> has been upgraded from version 1.822 to version 1.824
164
165 Will now croak if attempt to freeze/thaw DB_File object [RT #69985]
166
167 =item *
168
169 L<diagnostics> has been upgraded from version 1.23 to 1.24.
170
171 It now supports the %u formatting code.  Previously it was unable to find
172 descriptions for messages whose entries in L<perldiag> included that code
173 [perl #94988].
174
175 =item *
176
177 L<Encode> has been upgraded from version 2.43 to version 2.44
178
179 Addressed 'decode_xs n-byte heap-overflow' security bug in Unicode.xs
180
181 =item *
182
183 L<ExtUtils::Install> has been upgraded from version 1.56 to version 1.57.
184
185 There is no change to ExtUtils::Install other than the version number
186 increase, but L<ExtUtils::Installed> has been upgraded from version 1.999_001
187 to version 1.999002 and a new C<skip_cwd> attribute has been added.
188
189 =item *
190
191 L<ExtUtils::MakeMaker> has been upgraded from version 6.58 to version 6.59
192
193 =item *
194
195 L<IPC::Open3> has been upgraded from version 1.11 to 1.12.
196
197 C<open3> with "-" for the program name works once more.  This was broken in
198 version 1.06 (and hence in Perl 5.14.0) [perl #95748].
199
200 =item *
201
202 L<Module::Build> has been upgraded from version 0.3800 to version 0.39_01.
203
204 Pod to HTML internals changed to support revisions to Pod::Html in core.
205 Also fixes some minor bugs. [rt.cpan.org #68585] [rt.cpan.org #67893]
206 [rt.cpan.org #67008]
207
208 =item *
209
210 L<Module::Load> has been upgraded from version 0.18 to version 0.20
211
212 =item *
213
214 L<Module::Metadata> has been upgraded from version 1.000004 to version 1.000005
215
216 Added C<new_from_handle()> method.
217
218 =item *
219
220 L<Params::Check> has been upgraded from version 0.28 to version 0.32
221
222 =item *
223
224 L<PerlIO::via> has been upgraded from version 0.11 to version 0.12.
225
226 The only change is a correction in the documentation.
227
228 =item *
229
230 L<Term::ANSIColor> has been upgraded from version 3.00 to version 3.01
231
232 Only interpret an initial array reference as a list of colors, not any initial
233 reference, allowing the colored function to work properly on objects with
234 stringification defined.
235
236 =item *
237
238 L<Unicode::Collate> has been upgraded from version 0.77 to version 0.78
239
240 =item *
241
242 L<Unicode::Normalize> has been upgraded from version 1.12 to version 1.13
243
244 =back
245
246 =head2 Removed Modules and Pragmata
247
248 =over 4
249
250 =item *
251
252 XXX
253
254 =back
255
256 =head1 Documentation
257
258 XXX Changes to files in F<pod/> go here.  Consider grouping entries by
259 file and be sure to link to the appropriate page, e.g. L<perlfunc>.
260
261 =head2 New Documentation
262
263 XXX Changes which create B<new> files in F<pod/> go here.
264
265 =head3 L<perlexperiment>
266
267 This document is intended to provide a list of experimental features in
268 Perl.  It is still a work in progress.
269
270 =head2 Changes to Existing Documentation
271
272 XXX Changes which significantly change existing files in F<pod/> go here.
273 However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
274 section.
275
276 =head3 L<perlsub>
277
278 =over 4
279
280 =item *
281
282 The ($;) prototype syntax, which has existed for rather a long time, is now
283 documented in L<perlsub>.  It allows a unary function to have the same
284 precedence as a list operator.
285
286 =back
287
288 =head1 Diagnostics
289
290 The following additions or changes have been made to diagnostic output,
291 including warnings and fatal error messages.  For the complete list of
292 diagnostic messages, see L<perldiag>.
293
294 XXX New or changed warnings emitted by the core's C<C> code go here. Also
295 include any changes in L<perldiag> that reconcile it to the C<C> code.
296
297 [ Within each section, list entries as a =item entry that links to perldiag,
298   e.g.
299
300   =item *
301
302   L<Invalid version object|perldiag/"Invalid version object">
303 ]
304
305 =head2 New Diagnostics
306
307 XXX Newly added diagnostic messages go here
308
309 =head3 New Errors
310
311 =over 4
312
313 =item *
314
315 L<&CORE::%s cannot be called directly|perldiag/"&CORE::%s cannot be called directly">
316
317 (F) You tried to call a subroutine in the C<CORE::> namespace
318 with C<&foo> syntax or through a reference.  The subroutines
319 in this package cannot yet be called that way, but must be
320 called as barewords.  Something like this will work:
321
322     BEGIN { *shove = \&CORE::push; }
323     shove @array, 1,2,3; # pushes on to @array
324
325 =back
326
327 =head3 New Warnings
328
329 =over 4
330
331 =item *
332
333 XXX L<message|perldiag/"message">
334
335 =back
336
337 =head2 Changes to Existing Diagnostics
338
339 XXX Changes (i.e. rewording) of diagnostic messages go here
340
341 =over 4
342
343 =item *
344
345 XXX Describe change here
346
347 =back
348
349 =head1 Utility Changes
350
351 XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go
352 here. Most of these are built within the directories F<utils> and F<x2p>.
353
354 [ List utility changes as a =head3 entry for each utility and =item
355 entries for each change
356 Use L<XXX> with program names to get proper documentation linking. ]
357
358 =head3 L<perlivp>
359
360 =over 4
361
362 =item *
363
364 Fixed a bug whereby other perls under the current directory could cause
365 false positive failures.
366
367 =item *
368
369 Tests for .ph files have been removed, as these test have been optional since
370 2005 and .ph files are no longer generated during installation.
371
372 =back
373
374 =head3 L<splain>
375
376 See the entry for C<< diagnostics >> in L</Updated Modules and Pragmata>,
377 above.
378
379 =head1 Configuration and Compilation
380
381 XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
382 go here.  Any other changes to the Perl build process should be listed here.
383 However, any platform-specific changes should be listed in the
384 L</Platform Support> section, instead.
385
386 [ List changes as a =item entry ].
387
388 =over 4
389
390 =item *
391
392 F<makedef.pl> has been refactored. This should have no noticeable affect on
393 any of the platforms that use it as part of their build (AIX, VMS, Win32).
394
395 =back
396
397 =head1 Testing
398
399 XXX Any significant changes to the testing of a freshly built perl should be
400 listed here.  Changes which create B<new> files in F<t/> go here as do any
401 large changes to the testing harness (e.g. when parallel testing was added).
402 Changes to existing files in F<t/> aren't worth summarising, although the bugs
403 that they represent may be covered elsewhere.
404
405 [ List each test improvement as a =item entry ]
406
407 =over 4
408
409 =item *
410
411 XXX
412
413 =back
414
415 =head1 Platform Support
416
417 XXX Any changes to platform support should be listed in the sections below.
418
419 [ Within the sections, list each platform as a =item entry with specific
420 changes as paragraphs below it. ]
421
422 =over 4
423
424 =item HP-UX PA-RISC/64 now supports gcc-4.x
425
426 A fix to correct the socketsize now makes the test suite pass on HP-UX
427 PA-RISC for 64bitall builds.
428
429 =back
430
431 =head2 New Platforms
432
433 XXX List any platforms that this version of perl compiles on, that previous
434 versions did not. These will either be enabled by new files in the F<hints/>
435 directories, or new subdirectories and F<README> files at the top level of the
436 source tree.
437
438 =over 4
439
440 =item XXX-some-platform
441
442 XXX
443
444 =back
445
446 =head2 Discontinued Platforms
447
448 XXX List any platforms that this version of perl no longer compiles on.
449
450 =over 4
451
452 =item XXX-some-platform
453
454 XXX
455
456 =back
457
458 =head2 Platform-Specific Notes
459
460 XXX List any changes for specific platforms. This could include configuration
461 and compilation changes or changes in portability/compatibility.  However,
462 changes within modules for platforms should generally be listed in the
463 L</Modules and Pragmata> section.
464
465 =over 4
466
467 =item XXX-some-platform
468
469 XXX
470
471 =back
472
473 =head1 Internal Changes
474
475 XXX Changes which affect the interface available to C<XS> code go here.
476 Other significant internal changes for future core maintainers should
477 be noted as well.
478
479 [ List each change as a =item entry ]
480
481 =over 4
482
483 =item *
484
485 F<embedvar.h> has been simplified, and one level of macro indirection for
486 PL_* variables has been removed for the default (non-multiplicity)
487 configuration. PERLVAR*() macros now directly expand their arguments to
488 tokens such as C<PL_defgv>, instead of expanding to C<PL_Idefgv>, with
489 F<embedvar.h> defining a macro to map C<PL_Idefgv> to C<PL_defgv>. XS code
490 which has unwarranted chumminess with the implementation may need updating.
491
492 =back
493
494 =head1 Selected Bug Fixes
495
496 XXX Important bug fixes in the core language are summarised here.
497 Bug fixes in files in F<ext/> and F<lib/> are best summarised in
498 L</Modules and Pragmata>.
499
500 [ List each fix as a =item entry ]
501
502 =over 4
503
504 =item *
505
506 Locking a subroutine (via C<lock &sub>) is no longer a compile-time error
507 for regular subs.  For lvalue subroutines, it no longer tries to return the
508 sub as a scalar, resulting in strange side effects like C<ref \$_>
509 returning "CODE" in some instances.
510
511 C<lock &sub> is now a run-time error if L<threads::shared> is loaded (a
512 no-op otherwise), but that may be rectified in a future version.
513
514 =item *
515
516 The prototypes of several built-in functions--C<getprotobynumber>, C<lock>,
517 C<not> and C<select>--have been corrected, or at least are now closer to
518 reality than before.
519
520 =item *
521
522 Most dereferencing operators (C<${}>, etc.) used to call C<FETCH> twice on
523 a tied operand when doing a symbolic dereference (looking up a variable by
524 name, which is not permitted under C<use strict 'refs'>).  Only C<&{}> did
525 not have this problem.  This has been fixed.
526
527 =item *
528
529 A minor regression introduced in 5.15.0 has been fixed.  Dereferencing a
530 magical mortal (e.g., the return value of C<delete> on a tied hash element)
531 explicitly returned from a subroutine called recursively was not calling
532 C<FETCH>.  This would affect code like C<@{ foo() }> where the C<foo> sub
533 contains C<return delete $hash{elem}> and is calling itself.
534
535 =item *
536
537 A panic involving the combination of the regular expression modifiers
538 C</aa> and the C<\b> escape sequence introduced in 5.14.0 has been
539 fixed [perl #95964].
540
541 =item *
542
543 stat() would always return the inode number as an IV, even when the
544 original was unsigned, or too large to fit in an IV.  stat() now
545 returns the inode number as the type that would best preserve the
546 original value. [perl #84590]
547
548 =item *
549
550 The combination of the regular expression modifiers C</aa> and the C<\b>
551 and C<\B> escape sequences did not work properly on UTF-8 encoded
552 strings.  All non-ASCII characters under C</aa> should be treated as
553 non-word characters, but what was happening was that Unicode rules were
554 used to determine wordness/non-wordness for non-ASCII characters.  This
555 is now fixed [perl #95968].
556
557 =item *
558
559 Infinite loops like C<1 while 1> used to stop C<strict 'subs'> mode from
560 working for the rest of the block.t
561
562 =item *
563
564 The C<\h>, C<\H>, C<\v> and C<\V> regular expression metacharacters used to
565 cause a panic error message when attempting to match at the end of the
566 string [perl #96354].
567
568 =item *
569
570 For list assignments like C<($a,$b) = ($b,$a)>, Perl has to make a copy of
571 the items on the right-hand side before assignment them to the left.  For
572 efficiency's sake, it assigns the values on the right straight to the items
573 on the left no variable is mentioned on both sides, as in
574 C<($a,$b) = ($c,$d)>.  The logic for determining when it can cheat was
575 faulty, in that C<&&> and C<||> on the right-hand side could fool it.  So
576 C<($a,$b) = $some_true_value && ($b,$a)> would end up assigning the value
577 of C<$b> to both scalars.
578
579 =item *
580
581 Perl no longer tries to apply lvalue context to the string in
582 C<("string", $variable) ||= 1> (which used to be an error).  Since the
583 left-hand side of C<||=> is evaluated in scalar context, that's a scalar
584 comma operator, which gives all but the last item void context.  There is
585 no such thing as void lvalue context, so it was a mistake for Perl to try
586 to force it [perl #96942].
587
588 =back
589
590 =head1 Known Problems
591
592 XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
593 tests that had to be C<TODO>ed for the release would be noted here, unless
594 they were specific to a particular platform (see below).
595
596 This is a list of some significant unfixed bugs, which are regressions
597 from either 5.XXX.XXX or 5.XXX.XXX.
598
599 [ List each fix as a =item entry ]
600
601 =over 4
602
603 =item *
604
605 XXX
606
607 =back
608
609 =head1 Obituary
610
611 XXX If any significant core contributor has died, we've added a short obituary
612 here.
613
614 =head1 Acknowledgements
615
616 XXX Generate this with:
617
618   perl Porting/acknowledgements.pl v5.15.1..HEAD
619
620 =head1 Reporting Bugs
621
622 If you find what you think is a bug, you might check the articles
623 recently posted to the comp.lang.perl.misc newsgroup and the perl
624 bug database at http://rt.perl.org/perlbug/ .  There may also be
625 information at http://www.perl.org/ , the Perl Home Page.
626
627 If you believe you have an unreported bug, please run the L<perlbug>
628 program included with your release.  Be sure to trim your bug down
629 to a tiny but sufficient test case.  Your bug report, along with the
630 output of C<perl -V>, will be sent off to perlbug@perl.org to be
631 analysed by the Perl porting team.
632
633 If the bug you are reporting has security implications, which make it
634 inappropriate to send to a publicly archived mailing list, then please send
635 it to perl5-security-report@perl.org. This points to a closed subscription
636 unarchived mailing list, which includes
637 all the core committers, who will be able
638 to help assess the impact of issues, figure out a resolution, and help
639 co-ordinate the release of patches to mitigate or fix the problem across all
640 platforms on which Perl is supported. Please only use this address for
641 security issues in the Perl core, not for modules independently
642 distributed on CPAN.
643
644 =head1 SEE ALSO
645
646 The F<Changes> file for an explanation of how to view exhaustive details
647 on what changed.
648
649 The F<INSTALL> file for how to build Perl.
650
651 The F<README> file for general stuff.
652
653 The F<Artistic> and F<Copying> files for copyright information.
654
655 =cut