This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fill in perldelta
[perl5.git] / pod / perldelta.pod
1 =encoding utf8
2
3 =head1 NAME
4
5 [ this is a template for a new perldelta file.  Any text flagged as XXX needs
6 to be processed before release. ]
7
8 perldelta - what is new for perl v5.23.4
9
10 =head1 DESCRIPTION
11
12 This document describes differences between the 5.23.3 release and the 5.23.4
13 release.
14
15 If you are upgrading from an earlier release such as 5.23.2, first read
16 L<perl5233delta>, which describes differences between 5.23.2 and 5.23.3.
17
18 =head1 Notice
19
20 XXX Any important notices here
21
22 =head1 Core Enhancements
23
24 XXX New core language features go here.  Summarize user-visible core language
25 enhancements.  Particularly prominent performance optimisations could go
26 here, but most should go in the L</Performance Enhancements> section.
27
28 [ List each enhancement as a =head2 entry ]
29
30 =head1 Security
31
32 XXX Any security-related notices go here.  In particular, any security
33 vulnerabilities closed should be noted here rather than in the
34 L</Selected Bug Fixes> section.
35
36 [ List each security issue as a =head2 entry ]
37
38 =head1 Incompatible Changes
39
40 =head2 Lexical $_ has been removed
41
42 C<my $_> was introduced in Perl 5.10, and subsequently caused much confusion
43 with no obvious solution.  In Perl 5.18.0, it was made experimental on the
44 theory that it would either be removed or redesigned in a less confusing (but
45 backward-incompatible) way.  Over the following years, no alternatives were
46 proposed.  The feature has now been removed and will fail to compile.
47
48 =head2 Only blanks and tabs are now allowed within C<[...]> within C<(?[...])>.
49
50 The experimental Extended Bracketed Character Classes can contain regular
51 bracketed character classes within them.  These differ from regular ones in
52 that white space is generally ignored, unless escaped by preceding it with a
53 backslash.  The white space that is ignored is now limited to just tab C<\t>
54 and SPACE characters.  Previously, it was any white space.  See
55 L<perlrecharclass/Extended Bracketed Character Classes>.
56
57 =head1 Deprecations
58
59 XXX Any deprecated features, syntax, modules etc. should be listed here.
60
61 =head2 Module removals
62
63 XXX Remove this section if inapplicable.
64
65 The following modules will be removed from the core distribution in a
66 future release, and will at that time need to be installed from CPAN.
67 Distributions on CPAN which require these modules will need to list them as
68 prerequisites.
69
70 The core versions of these modules will now issue C<"deprecated">-category
71 warnings to alert you to this fact.  To silence these deprecation warnings,
72 install the modules in question from CPAN.
73
74 Note that these are (with rare exceptions) fine modules that you are encouraged
75 to continue to use.  Their disinclusion from core primarily hinges on their
76 necessity to bootstrapping a fully functional, CPAN-capable Perl installation,
77 not usually on concerns over their design.
78
79 =over
80
81 =item XXX
82
83 XXX Note that deprecated modules should be listed here even if they are listed
84 as an updated module in the L</Modules and Pragmata> section.
85
86 =back
87
88 [ List each other deprecation as a =head2 entry ]
89
90 =head1 Performance Enhancements
91
92 XXX Changes which enhance performance without changing behaviour go here.
93 There may well be none in a stable release.
94
95 [ List each enhancement as a =item entry ]
96
97 =over 4
98
99 =item *
100
101 C</fixed-substr/> has been made much faster.
102
103 On platforms with a libc memchr() implementation which makes good use of
104 underlying hardware support, patterns which include fixed substrings will now
105 often be much faster; for example with glibc on on a recent x86_64 CPU, this:
106
107     $s = "a" x 1000 . "wxyz";
108     $s =~ /wxyz/ for 1..30000
109
110 is now about 7 times faster.  On systems with slow memchr(), e.g. 32-bit ARM
111 Raspberry Pi, there will be a small or little speedup.  Conversely, some
112 pathological cases, such as C<"ab" x 1000 =~ /aa/> will be slower now; up to 3
113 times slower on the rPi, 1.5x slower on x86_64.
114
115 =back
116
117 =head1 Modules and Pragmata
118
119 XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
120 go here.  If Module::CoreList is updated, generate an initial draft of the
121 following sections using F<Porting/corelist-perldelta.pl>.  A paragraph summary
122 for important changes should then be added by hand.  In an ideal world,
123 dual-life modules would have a F<Changes> file that could be cribbed.
124
125 [ Within each section, list entries as a =item entry ]
126
127 =head2 New Modules and Pragmata
128
129 =over 4
130
131 =item *
132
133 XXX
134
135 =back
136
137 =head2 Updated Modules and Pragmata
138
139 =over 4
140
141 =item *
142
143 L<B> has been upgraded from version 1.59 to 1.60.
144
145 =item *
146
147 L<bignum> has been upgraded from version 0.40 to 0.41.
148
149 =item *
150
151 L<Compress::Raw::Bzip2> has been upgraded from version 2.068 to 2.069.
152
153 =item *
154
155 L<Compress::Raw::Zlib> has been upgraded from version 2.068_01 to 2.069.
156
157 =item *
158
159 L<Devel::PPPort> has been upgraded from version 3.31 to 3.32.
160
161 =item *
162
163 L<DynaLoader> has been upgraded from version 1.34 to 1.35.
164
165 =item *
166
167 L<Encode> has been upgraded from version 2.77 to 2.78.
168
169 =item *
170
171 L<experimental> has been upgraded from version 0.014 to 0.016.
172
173 =item *
174
175 L<ExtUtils::CBuilder> has been upgraded from version 0.280223 to 0.280224.
176
177 =item *
178
179 L<File::Path> has been upgraded from version 2.11 to 2.12.
180
181 =item *
182
183 L<if> has been upgraded from version 0.0605 to 0.0606.
184
185 =item *
186
187 L<IO> has been upgraded from version 1.35 to 1.36.
188
189 For an IO::Poll object C<$poll> with no file handles yet in it,
190 C<$poll->poll(10)> now sleeps for up to 10 seconds anyway instead of returning
191 0 immediately.
192 L<[cpan #25049]|https://rt.cpan.org/Ticket/Display.html?id=25049>
193
194 =item *
195
196 L<IO-Compress> has been upgraded from version 2.068 to 2.069.
197
198 =item *
199
200 L<Math::BigInt> has been upgraded from version 1.999701 to 1.999704.
201
202 =item *
203
204 L<Math::BigInt::FastCalc> has been upgraded from version 0.31 to 0.34.
205
206 =item *
207
208 L<Module::CoreList> has been upgraded from version 5.20150920 to 5.20151020.
209
210 =item *
211
212 L<Module::Metadata> has been upgraded from version 1.000027 to 1.000029.
213
214 =item *
215
216 L<Perl::OSType> has been upgraded from version 1.008 to 1.009.
217
218 =item *
219
220 L<PerlIO::encoding> has been upgraded from version 0.21 to 0.22.
221
222 PerlIO::encoding objects are now properly duplicated.
223 L<[perl #31923]|https://rt.perl.org/Ticket/Display.html?id=31923>
224
225 =item *
226
227 L<POSIX> has been upgraded from version 1.57 to 1.58.
228
229 If C<POSIX::strerror> was passed C<$!> as its argument then it accidentally
230 cleared C<$!>.  This has been fixed.
231 L<[perl #126229]|https://rt.perl.org/Ticket/Display.html?id=126229>
232
233 =item *
234
235 L<Socket> has been upgraded from version 2.020_01 to 2.020_02.
236
237 Various fixes have been applied to inet_pton for the benefit of MS VC++ builds
238 on Windows.  In particular, this restores the build with MS VC++ 6.0.
239
240 =item *
241
242 L<Unicode::Normalize> has been upgraded from version 1.19 to 1.21.
243
244 =item *
245
246 L<warnings> has been upgraded from version 1.33 to 1.35.
247
248 The C<warnings::enabled> example now actually uses C<warnings::enabled>.
249 L<[perl #126051]|https://rt.perl.org/Ticket/Display.html?id=126051>
250
251 =back
252
253 =head2 Removed Modules and Pragmata
254
255 =over 4
256
257 =item *
258
259 XXX
260
261 =back
262
263 =head1 Documentation
264
265 XXX Changes to files in F<pod/> go here.  Consider grouping entries by
266 file and be sure to link to the appropriate page, e.g. L<perlfunc>.
267
268 =head2 New Documentation
269
270 XXX Changes which create B<new> files in F<pod/> go here.
271
272 =head3 L<XXX>
273
274 XXX Description of the purpose of the new file here
275
276 =head2 Changes to Existing Documentation
277
278 XXX Changes which significantly change existing files in F<pod/> go here.
279 However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
280 section.
281
282 =head3 L<perlapi>
283
284 =over 4
285
286 =item *
287
288 The process of using undocumented globals has been documented, namely, that one
289 should send email to L<perl5-porters@perl.org|mailto:perl5-porters@perl.org>
290 first to get the go-ahead for documenting and using an undocumented function or
291 global variable.
292
293 =back
294
295 =head3 L<perlsub>
296
297 =over 4
298
299 =item *
300
301 Updated to note that anonymous subroutines can have signatures.
302
303 =back
304
305 =head3 L<perltie>
306
307 =over 4
308
309 =item *
310
311 The usage of C<FIRSTKEY> and C<NEXTKEY> has been clarified.
312
313 =back
314
315 =head3 L<perlvar>
316
317 =over 4
318
319 =item *
320
321 The specific true value of C<$!{E...}> is now documented, noting that it is
322 subject to change and not guaranteed.
323
324 =back
325
326 =head1 Diagnostics
327
328 The following additions or changes have been made to diagnostic output,
329 including warnings and fatal error messages.  For the complete list of
330 diagnostic messages, see L<perldiag>.
331
332 XXX New or changed warnings emitted by the core's C<C> code go here.  Also
333 include any changes in L<perldiag> that reconcile it to the C<C> code.
334
335 =head2 New Diagnostics
336
337 XXX Newly added diagnostic messages go under here, separated into New Errors
338 and New Warnings
339
340 =head3 New Errors
341
342 =over 4
343
344 =item *
345
346 L<Character following \p must be '{' or a single-character Unicode property name in regex;|perldiag/"Character following \%c must be '{' or a single-character Unicode property name in regex; marked by <-- HERE in m/%s/">
347
348 =item *
349
350 L<perldiag/"Illegal user-defined property name">
351
352 =back
353
354 =head3 New Warnings
355
356 =over 4
357
358 =item *
359
360 XXX L<message|perldiag/"message">
361
362 =back
363
364 =head2 Changes to Existing Diagnostics
365
366 XXX Changes (i.e. rewording) of diagnostic messages go here
367
368 =over 4
369
370 =item *
371
372 L<"Can't modify non-lvalue subroutine call of &%s"|perldiag/"Can't modify non-lvalue subroutine call of &%s">
373
374 This error now reports the name of the non-lvalue subroutine you attempted to
375 use as an lvalue.
376
377 =back
378
379 =head1 Utility Changes
380
381 XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go here.
382 Most of these are built within the directory F<utils>.
383
384 [ List utility changes as a =head2 entry for each utility and =item
385 entries for each change
386 Use L<XXX> with program names to get proper documentation linking. ]
387
388 =head2 L<XXX>
389
390 =over 4
391
392 =item *
393
394 Using the C<NO_HASH_SEED> define in combination with the default hash algorithm
395 C<PERL_HASH_FUNC_ONE_AT_A_TIME_HARD> resulted in a fatal error while compiling
396 the interpreter, since Perl 5.17.10.  This has been fixed.
397
398 =back
399
400 =head1 Configuration and Compilation
401
402 XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
403 go here.  Any other changes to the Perl build process should be listed here.
404 However, any platform-specific changes should be listed in the
405 L</Platform Support> section, instead.
406
407 [ List changes as a =item entry ].
408
409 =over 4
410
411 =item *
412
413 If you had F<Configure> hints for C<d_procselfexe> or C<procselfexe>, they were
414 probably broken by the AmigaOS changes in Perl 5.23.3.  This has been now
415 fixed.
416 L<[perl #126152]|https://rt.perl.org/Ticket/Display.html?id=126152>
417
418 =back
419
420 =head1 Testing
421
422 XXX Any significant changes to the testing of a freshly built perl should be
423 listed here.  Changes which create B<new> files in F<t/> go here as do any
424 large changes to the testing harness (e.g. when parallel testing was added).
425 Changes to existing files in F<t/> aren't worth summarizing, although the bugs
426 that they represent may be covered elsewhere.
427
428 [ List each test improvement as a =item entry ]
429
430 =over 4
431
432 =item *
433
434 XXX
435
436 =back
437
438 =head1 Platform Support
439
440 XXX Any changes to platform support should be listed in the sections below.
441
442 [ Within the sections, list each platform as a =item entry with specific
443 changes as paragraphs below it. ]
444
445 =head2 New Platforms
446
447 XXX List any platforms that this version of perl compiles on, that previous
448 versions did not.  These will either be enabled by new files in the F<hints/>
449 directories, or new subdirectories and F<README> files at the top level of the
450 source tree.
451
452 =over 4
453
454 =item XXX-some-platform
455
456 XXX
457
458 =back
459
460 =head2 Discontinued Platforms
461
462 XXX List any platforms that this version of perl no longer compiles on.
463
464 =over 4
465
466 =item XXX-some-platform
467
468 XXX
469
470 =back
471
472 =head2 Platform-Specific Notes
473
474 XXX List any changes for specific platforms.  This could include configuration
475 and compilation changes or changes in portability/compatibility.  However,
476 changes within modules for platforms should generally be listed in the
477 L</Modules and Pragmata> section.
478
479 =over 4
480
481 =item IRIX
482
483 =over
484
485 =item *
486
487 Under some circumstances IRIX stdio fgetc() and fread() set the errno to
488 C<ENOENT>, which made no sense according to either IRIX or POSIX docs.  Errno
489 is now cleared in such cases.
490 L<[perl #123977]|https://rt.perl.org/Ticket/Display.html?id=123977>
491
492 =item *
493
494 Problems when multiplying long doubles by infinity have been fixed.
495 L<[perl #126396]|https://rt.perl.org/Ticket/Display.html?id=126396>
496
497 =back
498
499 =item MacOS X
500
501 =over
502
503 =item *
504
505 Until now OS X builds of perl have specified a link target of 10.3 (Panther,
506 2003) but have not specified a compiler target.  From now on, builds of perl on
507 OS X 10.6 or later (Snow Leopard, 2008) by default capture the current OS X
508 version and specify that as the explicit build target in both compiler and
509 linker flags, thus preserving binary compatibility for extensions built later
510 regardless of changes in OS X, SDK, or compiler and linker versions.  To
511 override the default value used in the build and preserved in the flags,
512 specify C<export MACOSX_DEPLOYMENT_TARGET=10.N> before configuring and building
513 perl, where 10.N is the version of OS X you wish to target.  In OS X 10.5 or
514 earlier there is no change to the behavior present when those systems were
515 current; the link target is still OS X 10.3 and there is no explicit compiler
516 target.
517
518 =back
519
520 =item VMS
521
522 =over
523
524 =item *
525
526 Perl now implements its own C<killpg> by scanning for processes in the
527 specified process group, which may not mean exactly the same thing as a Unix
528 process group, but allows us to send a signal to a parent (or master) process
529 and all of its sub-processes.  At the perl level, this means we can now send a
530 negative pid like so:
531
532     kill SIGKILL, -$pid;
533
534 to signal all processes in the same group as C<$pid>.
535
536 =back
537
538 =item Win32
539
540 =over
541
542 =item *
543
544 A new build option C<USE_NO_REGISTRY> has been added to the makefiles.  This
545 option is off by default, meaning the default is to do Windows registry
546 lookups.  This option stops Perl from looking inside the registry for anything.
547 For what values are looked up in the registry see L<perlwin32>.  Internally, in
548 C, the name of this option is C<WIN32_NO_REGISTRY>.
549
550 =item *
551
552 The behavior of Perl using C<HKEY_CURRENT_USER\Software\Perl> and
553 C<HKEY_LOCAL_MACHINE\Software\Perl> to lookup certain values, including C<%ENV>
554 vars starting with C<PERL> has changed.  Previously, the 2 keys were checked
555 for entries at all times through Perl processes life time even if they did not
556 exist.  For performance reasons, now, if the root key (i.e.
557 C<HKEY_CURRENT_USER\Software\Perl> or C<HKEY_LOCAL_MACHINE\Software\Perl>) does
558 not exist at process start time, it will not be checked again for C<%ENV>
559 override entries for the remainder of the Perl processes life.  This more
560 closely matches Unix behaviour in that the environment is copied or inherited
561 on startup and changing the variable in the parent process or another process
562 or editing <.bashrc> will not change the environmental variable in other
563 existing, running, processes.
564
565 =item *
566
567 One glob fetch was removed for each C<-X> or C<stat> call whether done from
568 Perl code or internally from Perl's C code.  The glob being looked up was
569 C<${^WIN32_SLOPPY_STAT}> which is a special variable.  This makes C<-X> and
570 C<stat> slightly faster.
571
572 =item *
573
574 During miniperl's process startup, during the build process, 4 to 8 IO calls
575 related to the process starting F<.pl> and the F<buildcustomize.pl> file were
576 removed from the code opening and executing the first 1 or 2 F<.pl> files.
577
578 =back
579
580 =back
581
582 =head1 Internal Changes
583
584 XXX Changes which affect the interface available to C<XS> code go here.  Other
585 significant internal changes for future core maintainers should be noted as
586 well.
587
588 [ List each change as a =item entry ]
589
590 =over 4
591
592 =item *
593
594 L<perlapi/sv_backoff> had its return type changed from C<int> to C<void>.  It
595 previously has always returned C<0> since Perl 5.000 stable but that was
596 undocumented.  Although C<sv_backoff> is marked as public API, XS code is not
597 expected to be impacted since the proper API call would be through public API
598 C<sv_setsv(sv, &PL_sv_undef)>, or quasi-public C<SvOOK_off>, or non-public
599 C<SvOK_off> calls, and the return value of C<sv_backoff> was previously a
600 meaningless constant that can be rewritten as C<(sv_backoff(sv),0)>.
601
602 =item *
603
604 The C<EXTEND> and C<MEXTEND> macros have been improved to avoid various issues
605 with integer truncation and wrapping.  In particular, some casts formerly used
606 within the macros have been removed.  This means for example that passing an
607 unsigned nitems arg is likely to raise a compiler warning now (it's always been
608 documented to require a signed value; formerly int, lately SSize_t).
609
610 =back
611
612 =head1 Selected Bug Fixes
613
614 XXX Important bug fixes in the core language are summarized here.  Bug fixes in
615 files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>.
616
617 [ List each fix as a =item entry ]
618
619 =over 4
620
621 =item *
622
623 There were places in regular expression patterns where comments (C<(?#...)>)
624 weren't allowed, but should have been.  This is now fixed.
625 L<[perl #116639]|https://rt.perl.org/Ticket/Display.html?id=116639>
626
627 =item *
628
629 A regression from perl Perl 5.20 has been fixed, in which some syntax errors in
630 L<C<(?[...])>|perlrecharclass/Extended Bracketed Character Classes> constructs
631 within regular expression patterns could cause a segfault instead of a proper
632 error message.
633 L<[perl #126180]|https://rt.perl.org/Ticket/Display.html?id=126180>
634
635 =item *
636
637 Some problems with attempting to extend the perl stack to around 2G or 4G
638 entries have been fixed.  This was particularly an issue on 32-bit perls built
639 to use 64-bit integers, and was easily noticeable with the list repetition
640 operator, e.g.
641
642     @a = (1) x $big_number
643
644 Formerly perl may have crashed, depending on the exact value of C<$big_number>;
645 now it will typically raise an exception.
646 L<[perl #125937]|https://rt.perl.org/Ticket/Display.html?id=125937>
647
648 =item *
649
650 In a regex conditional expression C<(?(condition)yes-pattern|no-pattern)>, if
651 the condition is C<(?!)> then perl failed the match outright instead of
652 matching the no-pattern.  This has been fixed.
653 L<[perl #126222]|https://rt.perl.org/Ticket/Display.html?id=126222>
654
655 =item *
656
657 The special backtracking control verbs C<(*VERB:ARG)> now all allow an optional
658 argument and set C<REGERROR/REGMARK> appropriately as well.
659 L<[perl #126186]|https://rt.perl.org/Ticket/Display.html?id=126186>
660
661 =back
662
663 =head1 Known Problems
664
665 XXX Descriptions of platform agnostic bugs we know we can't fix go here.  Any
666 tests that had to be C<TODO>ed for the release would be noted here.  Unfixed
667 platform specific bugs also go here.
668
669 [ List each fix as a =item entry ]
670
671 =over 4
672
673 =item *
674
675 XXX
676
677 =back
678
679 =head1 Errata From Previous Releases
680
681 =over 4
682
683 =item *
684
685 (This was actually done in Perl 5.23.2, but the perldelta entry got missed.)
686 The way that C<OP_AASSIGN> handles assignment with potentially common values
687 (e.g. C<($a,$b) = ($b, $a)> has changed.  In particular the C<OPpASSIGN_COMMON>
688 flag has been replaced with three more specific flags:
689
690     OPpASSIGN_COMMON_AGG
691     OPpASSIGN_COMMON_RC1
692     OPpASSIGN_COMMON_SCALAR
693
694 and the runtime now sometimes does a mark and sweep using the C<SVf_BREAK> to
695 detect common elements.
696
697 =back
698
699 =head1 Obituary
700
701 XXX If any significant core contributor has died, we've added a short obituary
702 here.
703
704 =head1 Acknowledgements
705
706 XXX Generate this with:
707
708   perl Porting/acknowledgements.pl v5.23.3..HEAD
709
710 =head1 Reporting Bugs
711
712 If you find what you think is a bug, you might check the articles recently
713 posted to the comp.lang.perl.misc newsgroup and the perl bug database at
714 L<https://rt.perl.org/> .  There may also be information at
715 L<http://www.perl.org/> , the Perl Home Page.
716
717 If you believe you have an unreported bug, please run the L<perlbug> program
718 included with your release.  Be sure to trim your bug down to a tiny but
719 sufficient test case.  Your bug report, along with the output of C<perl -V>,
720 will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
721
722 If the bug you are reporting has security implications, which make it
723 inappropriate to send to a publicly archived mailing list, then please send it
724 to perl5-security-report@perl.org.  This points to a closed subscription
725 unarchived mailing list, which includes all the core committers, who will be
726 able to help assess the impact of issues, figure out a resolution, and help
727 co-ordinate the release of patches to mitigate or fix the problem across all
728 platforms on which Perl is supported.  Please only use this address for
729 security issues in the Perl core, not for modules independently distributed on
730 CPAN.
731
732 =head1 SEE ALSO
733
734 The F<Changes> file for an explanation of how to view exhaustive details on
735 what changed.
736
737 The F<INSTALL> file for how to build Perl.
738
739 The F<README> file for general stuff.
740
741 The F<Artistic> and F<Copying> files for copyright information.
742
743 =cut