This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Upgrade to B::Debug 1.18
[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.17.3
9
10 =head1 DESCRIPTION
11
12 This document describes differences between the 5.17.2 release and the 5.17.3
13 release.
14
15 If you are upgrading from an earlier release such as 5.17.1, first read
16 L<perl5172delta>, which describes differences between 5.17.1 and 5.17.2.
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 =head2 Computed Labels
31
32 The loop controls C<next>, C<last> and C<redo>, and the special C<dump>
33 operator, now allow arbitrary expressions to be used to compute labels at run
34 time.  Previously, any argument that was not a constant was treated as the
35 empty string.
36
37 =head1 Security
38
39 XXX Any security-related notices go here.  In particular, any security
40 vulnerabilities closed should be noted here rather than in the
41 L</Selected Bug Fixes> section.
42
43 [ List each security issue as a =head2 entry ]
44
45 =head1 Incompatible Changes
46
47 [ List each incompatible change as a =head2 entry ]
48
49 =head2 C<$ENV{foo}=undef> deletes value from environ, like C<delete $ENV{foo}>
50
51 This facilitates use of C<local()> with C<%ENV> entries.  In previous versions
52 of Perl, C<undef> was converted to the empty string.
53
54 =head2 Defined values stored in environment are forced to byte strings
55
56 A value stored in an environment variable has always been stringified.  In this
57 release, it is converted to be only a byte string.  First, it is forced to be a
58 only a string.  Then if the string is utf8 and the equivalent of
59 C<utf8::downgrade()> works, that result is used; otherwise, the equivalent of
60 C<utf8::encode()> is used, and a warning is issued about wide characters
61 (L</Diagnostics>).
62
63 =head2 C<given> now aliases the global C<$_>
64
65 Instead of assigning to an implicit lexical C<$_>, C<given> now makes the
66 global C<$_> an alias for its argument, just like C<foreach>.  However, it
67 still uses lexical C<$_> if there is lexical C<$_> in scope (again, just like
68 C<foreach>) [perl #114020].
69
70 =head1 Deprecations
71
72 XXX Any deprecated features, syntax, modules etc. should be listed here.  In
73 particular, deprecated modules should be listed here even if they are listed as
74 an updated module in the L</Modules and Pragmata> section.
75
76 [ List each deprecation as a =head2 entry ]
77
78 =head1 Performance Enhancements
79
80 XXX Changes which enhance performance without changing behaviour go here.
81 There may well be none in a stable release.
82
83 [ List each enhancement as a =item entry ]
84
85 =over 4
86
87 =item *
88
89 XXX
90
91 =back
92
93 =head1 Modules and Pragmata
94
95 XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
96 go here.  If Module::CoreList is updated, generate an initial draft of the
97 following sections using F<Porting/corelist-perldelta.pl>, which prints stub
98 entries to STDOUT.  Results can be pasted in place of the '=head2' entries
99 below.  A paragraph summary for important changes should then be added by hand.
100 In an ideal world, dual-life modules would have a F<Changes> file that could be
101 cribbed.
102
103 [ Within each section, list entries as a =item entry ]
104
105 =head2 New Modules and Pragmata
106
107 =over 4
108
109 =item *
110
111 XXX
112
113 =back
114
115 =head2 Updated Modules and Pragmata
116
117 =over 4
118
119 =item *
120
121 L<B> has been upgraded from version 1.36 to 1.37.  All C<CVf_*> and C<GVf_*>
122 and more SV-related flag values are now provided as constants in the C<B::>
123 namespace and available for export.  The default export list has not changed.
124
125 =item *
126
127 L<B::Concise> has been upgraded from version 0.91 to 0.92.  The C<-nobanner>
128 option has been fixed, and C<format>s can now be dumped.  When passed a sub
129 name to dump, it will check also to see whether it is the name of a format.  If
130 a sub and a format share the same name, it will dump both.
131
132 =item *
133
134 L<B::Debug> has been upgraded from version 1.17 to 1.18.  This adds support
135 (experimentally) for the new C<B::PADLIST>.
136
137 =item *
138
139 L<B::Deparse> has been upgraded from version 1.15 to 1.16.  It now deparses
140 loop controls with the correct precedence, and multiple statements in a
141 C<format> line are also now deparsed correctly.
142
143 =item *
144
145 L<CGI> has been upgraded from version 3.59 to 3.60.  Unrecognized HTML escape
146 sequences are now handled better, problematic trailing newlines are no longer
147 inserted after E<lt>formE<gt> tags by C<startform()> or C<start_form()>, and
148 bogus "Insecure Dependency" warnings appearing with some versions of perl are
149 now worked around.
150
151 =item *
152
153 L<Compress::Raw::Bzip2> has been upgraded from version 2.05201 to 2.055.  The
154 misuse of Perl's "magic" API has been fixed.
155
156 =item *
157
158 L<Compress::Raw::Zlib> has been upgraded from version 2.05401 to 2.056.  The
159 misuse of Perl's "magic" API has been fixed.
160
161 =item *
162
163 L<Compress::Zlib> has been upgraded from version 2.052 to 2.055.
164 C<compress()>, C<uncompress()>, C<memGzip()> and C<memGunzip()> have been
165 speeded up by making parameter validation more efficient.
166
167 =item *
168
169 L<Data::Dumper> has been upgraded from version 2.135_06 to 2.135_07.  It has
170 been optimized to only build a seen-scalar hash as necessary, thereby speeding
171 up serialization drastically.
172
173 =item *
174
175 L<Devel::Peek> has been upgraded from version 1.08 to 1.09.  The only change
176 has been to the test script, to account for changes to some flags in perl's
177 internals.
178
179 =item *
180
181 L<Encode> has been upgraded from version 2.44 to 2.47.  The Mac alias x-mac-ce
182 has been added, and various bugs have been fixed in Encode::Unicode,
183 Encode::UTF7 and Encode::GSM0338.
184
185 =item *
186
187 L<Module::Build> has been upgraded from version 0.40 to 0.4002.  A minor bug
188 fix allows markup to be used around the leading "Name" in a POD "abstract"
189 line, and some documentation improvements have been made.
190
191 =item *
192
193 L<Module::CoreList> has been upgraded from version 2.69 to 2.70.  Version
194 information is now stored as a delta, which greatly reduces the size of the
195 F<CoreList.pm> file.
196
197 =item *
198
199 L<Module::Load::Conditional> has been upgraded from version 0.50 to 0.54.
200 Various enhancements include the new use of Module::Metadata.
201
202 =item *
203
204 L<Module::Metadata> has been upgraded from version 1.000009 to 1.000010.  The
205 creation of a Module::Metadata object for a typical module file has been sped
206 up by about 40%.
207
208 =item *
209
210 L<Module::Pluggable> has been upgraded from version 4.0 to 4.3.  Amongst other
211 changes, triggers are now allowed on events, which gives a powerful way to
212 modify behaviour.
213
214 =item *
215
216 L<perlfaq> has been upgraded from version 5.0150040 to 5.0150041.  This
217 contains a couple of minor corrections and lists one new editor.
218
219 =item *
220
221 L<Pod::Simple> has been upgraded from version 3.20 to 3.23.  Numerous
222 improvements have been made, mostly to Pod::Simple::XHTML, which also has a
223 compatibility change: the C<codes_in_verbatim> option is now disabled by
224 default.  See F<cpan/Pod-Simple/ChangeLog> for the full details.
225
226 =item *
227
228 L<re> has been upgraded from version 0.21 to 0.22.  Single character [class]es
229 like C</[s]/> or C</[s]/i> are now optimized as if they did not have the
230 brackets, i.e. C</s/> or C</s/i>.
231
232 =item *
233
234 L<Socket> has been upgraded from version 2.002 to 2.004.  Constants and
235 functions required for IP multicast source group membership have been added.
236
237 =item *
238
239 L<Storable> has been upgraded from version 2.37 to 2.38.  It can now freeze and
240 thaw vstrings correctly.  This causes a slight incompatible change in the
241 storage format, so the format version has increased to 2.9.
242
243 =item *
244
245 L<Sys::Syslog> has been upgraded from version 0.29 to 0.30.  An issue with
246 C<POSIX::strftime()> on Windows and a build problem on Haiku-OS have been
247 resolved, and <getservbyname()> is no longer called when the port is specified.
248
249 =item *
250
251 L<Time::Local> has been upgraded from version 1.2000 to 1.2300.  Seconds values
252 greater than 59 but less than 60 no longer cause C<timegm()> and C<timelocal()>
253 to croak.
254
255 =item *
256
257 L<Unicode::UCD> has been upgraded from version 0.44 to 0.45.  This has been
258 modified slightly for reasons of perl internal use only.
259
260 =item *
261
262 L<Win32> has been upgraded from version 0.44 to 0.45.  New APIs have been added
263 for getting and setting the current code page.
264
265 =item *
266
267 L<Win32CORE> has been upgraded from version 0.02 to 0.03.  The use of
268 PERL_NO_GET_CONTEXT here has resulted in smaller machine code.
269
270 =back
271
272 =head1 Documentation
273
274 XXX Changes to files in F<pod/> go here.  Consider grouping entries by file and
275 be sure to link to the appropriate page, e.g. L<perlfunc>.
276
277 =head2 New Documentation
278
279 XXX Changes which create B<new> files in F<pod/> go here.
280
281 =head3 L<XXX>
282
283 XXX Description of the purpose of the new file here
284
285 =head2 Changes to Existing Documentation
286
287 XXX Changes which significantly change existing files in F<pod/> go here.
288 However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
289 section.
290
291 =head3 L<perlfunc>, L<perlop>
292
293 =over 4
294
295 =item *
296
297 Loop control verbs (C<dump>, C<goto>, C<next>, C<last> and C<redo>) have always
298 had the same precedence as assignment operators, but this was not documented
299 until now.
300
301 =back
302
303 =head3 L<perlvar>
304
305 =over 4
306
307 =item *
308
309 A caveat has been added to the documentation for C<$_> warning against the use
310 of lexical C<$_> [perl #114020].
311
312 =back
313
314 =head1 Diagnostics
315
316 The following additions or changes have been made to diagnostic output,
317 including warnings and fatal error messages.  For the complete list of
318 diagnostic messages, see L<perldiag>.
319
320 XXX New or changed warnings emitted by the core's C<C> code go here.  Also
321 include any changes in L<perldiag> that reconcile it to the C<C> code.
322
323 =head2 New Diagnostics
324
325 XXX Newly added diagnostic messages go under here, separated into New Errors
326 and New Warnings
327
328 =head3 New Errors
329
330 =over 4
331
332 =item *
333
334 L<Unterminated delimiter for here document|perldiag/"Unterminated delimiter for here document">
335
336 This message now occurs when a here document label has an initial quotation
337 mark but the final quotation mark is missing.
338
339 This replaces a bogus and misleading error message about not finding the label
340 itself [perl #114104].
341
342 =item *
343
344 L<panic: child pseudo-process was never scheduled|perldiag/"panic: child pseudo-process was never scheduled">
345
346 This error is thrown when a child pseudo-process in the ithreads implementation
347 on Windows was not scheduled within the time period allowed and therefore was
348 not able to initialize properly [perl #88840].
349
350 =back
351
352 =head3 New Warnings
353
354 =over 4
355
356 =item *
357
358 L<Wide character in setenv|perldiag/"Wide character in %s">
359
360 Attempts to put wide characters into environment variables via C<%ENV> now
361 provoke this warning.
362
363 =back
364
365 =head2 Changes to Existing Diagnostics
366
367 XXX Changes (i.e. rewording) of diagnostic messages go here
368
369 =over 4
370
371 =item *
372
373 XXX Describe change here
374
375 =back
376
377 =head1 Utility Changes
378
379 XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go here.
380 Most of these are built within the directories F<utils> and F<x2p>.
381
382 [ List utility changes as a =head3 entry for each utility and =item
383 entries for each change
384 Use L<XXX> with program names to get proper documentation linking. ]
385
386 =head3 L<XXX>
387
388 =over 4
389
390 =item *
391
392 XXX
393
394 =back
395
396 =head1 Configuration and Compilation
397
398 XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
399 go here.  Any other changes to the Perl build process should be listed here.
400 However, any platform-specific changes should be listed in the
401 L</Platform Support> section, instead.
402
403 [ List changes as a =item entry ].
404
405 =over 4
406
407 =item *
408
409 The pager detection in F<Configure> has been improved to allow responses which
410 specify options after the program name, e.g. B</usr/bin/less -R>, if the user
411 accepts the default value.  This helps B<perldoc> when handling ANSI escapes
412 [perl #72156].
413
414 =back
415
416 =head1 Testing
417
418 XXX Any significant changes to the testing of a freshly built perl should be
419 listed here.  Changes which create B<new> files in F<t/> go here as do any
420 large changes to the testing harness (e.g. when parallel testing was added).
421 Changes to existing files in F<t/> aren't worth summarizing, although the bugs
422 that they represent may be covered elsewhere.
423
424 [ List each test improvement as a =item entry ]
425
426 =over 4
427
428 =item *
429
430 XXX
431
432 =back
433
434 =head1 Platform Support
435
436 XXX Any changes to platform support should be listed in the sections below.
437
438 [ Within the sections, list each platform as a =item entry with specific
439 changes as paragraphs below it. ]
440
441 =head2 New Platforms
442
443 XXX List any platforms that this version of perl compiles on, that previous
444 versions did not.  These will either be enabled by new files in the F<hints/>
445 directories, or new subdirectories and F<README> files at the top level of the
446 source tree.
447
448 =over 4
449
450 =item XXX-some-platform
451
452 XXX
453
454 =back
455
456 =head2 Discontinued Platforms
457
458 =over 4
459
460 =item UTS Global
461
462 Support code relating to UTS global has been removed.  UTS was a mainframe
463 version of System V created by Amdahl, subsequently sold to UTS Global.  The
464 port has not been touched since before 5.8.0, and UTS Global is now defunct.
465
466 =back
467
468 =head2 Platform-Specific Notes
469
470 XXX List any changes for specific platforms.  This could include configuration
471 and compilation changes or changes in portability/compatibility.  However,
472 changes within modules for platforms should generally be listed in the
473 L</Modules and Pragmata> section.
474
475 =over 4
476
477 =item Windows
478
479 A new makefile option, USE_64_BIT_INT, has been added to the Windows makefiles.
480 Set this to "define" when building a 32-bit perl if you want it to use 64-bit
481 integers.
482
483 Machine code size reductions, already made to the DLLs of XS modules in Perl
484 5.17.2, have now been extended to the perl DLL itself.
485
486 Building with VC++ 6.0 was inadvertently broken in Perl 5.17.2 but has now been
487 fixed again.  XXX Actually, it's now been broken again, so ensure that it gets
488 fixed once more before release, or remove this comment!
489
490 =item VMS
491
492 The B<a2p> build has been fixed for the HP C++ compiler on OpenVMS.
493
494 =back
495
496 =head1 Internal Changes
497
498 XXX Changes which affect the interface available to C<XS> code go here.  Other
499 significant internal changes for future core maintainers should be noted as
500 well.
501
502 [ List each change as a =item entry ]
503
504 =over 4
505
506 =item *
507
508 XXX
509
510 =back
511
512 =head1 Selected Bug Fixes
513
514 XXX Important bug fixes in the core language are summarized here.  Bug fixes in
515 files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>.
516
517 [ List each fix as a =item entry ]
518
519 =over 4
520
521 =item *
522
523 C<\w> now matches the code points U+200C (ZERO WIDTH NON-JOINER) and U+200D
524 (ZERO WIDTH JOINER).  C<\W> no longer matches these.  This change is because
525 Unicode corrected their definition of what C<\w> should match.
526
527 =item *
528
529 C<dump LABEL> no longer leaks its label.
530
531 =item *
532
533 Constant folding no longer changes the behaviour of functions like C<stat()>
534 and C<truncate()> that can take either filenames or handles.
535 C<stat 1 ? foo : bar> nows treats its argument as a file name (since it is an
536 arbitrary expression), rather than the handle "foo".
537
538 =item *
539
540 C<truncate FOO, $len> no longer falls back to treating "FOO" as a file name if
541 the filehandle has been deleted.  This was broken in Perl 5.16.0.
542
543 =item *
544
545 Subroutine redefinitions after sub-to-glob and glob-to-glob assignments no
546 longer cause double frees or panic messages.
547
548 =item *
549
550 C<s///> now turns vstrings into plain strings when performing a substitution,
551 even if the resulting string is the same (C<s/a/a/>).
552
553 =item *
554
555 Prototype mismatch warnings no longer erroneously treat constant subs as having
556 no prototype when they actually have "".
557
558 =item *
559
560 Constant subroutines and forward declarations no longer prevent prototype
561 mismatch warnings from omitting the sub name.
562
563 =item *
564
565 C<undef> on a subroutine now clears call checkers.
566
567 =item *
568
569 The C<ref> operator started leaking memory on blessed objects in Perl 5.16.0.
570 This has been fixed [perl #114340].
571
572 =item *
573
574 C<use> no longer tries to parse its arguments as a statement, making
575 C<use constant { () };> a syntax error [perl #114222].
576
577 =item *
578
579 On debugging builds, "uninitialized" warnings inside formats no longer cause
580 assertion failures.
581
582 =item *
583
584 On debugging builds, subroutines nested inside formats no longer cause
585 assertion failures [perl #78550].
586
587 =item *
588
589 Formats and C<use> statements are now permitted inside formats.
590
591 =item *
592
593 C<print $x> and C<sub { print $x }->()> now always produce the same output.  It
594 was possible for the latter to refuse to close over $x if the variable was not
595 active; e.g., if it was defined outside a currently-running named subroutine.
596
597 =item *
598
599 Similarly, C<print $x> and C<print eval '$x'> now produce the same output.
600 This also allows "my $x if 0" variables to be seen in the debugger [perl
601 #114018].
602
603 =item *
604
605 Formats called recursively no longer stomp on their own lexical variables, but
606 each recursive call has its own set of lexicals.
607
608 =item *
609
610 Attempting to free an active format or the handle associated with it no longer
611 results in a crash.
612
613 =item *
614
615 Format parsing no longer gets confused by braces, semicolons and low-precedence
616 operators.  It used to be possible to use braces as format delimiters (instead
617 of C<=> and C<.>), but only sometimes.  Semicolons and low-precedence operators
618 in format argument lines no longer confuse the parser into ignoring the line's
619 return value.  In format argument lines, braces can now be used for anonymous
620 hashes, instead of being treated always as C<do> blocks.
621
622 =item *
623
624 Formats can now be nested inside code blocks in regular expressions and other
625 quoted constructs (C</(?{...})/> and C<qq/${...}/>) [perl #114040].
626
627 =item *
628
629 Formats are no longer created after compilation errors.
630
631 =item *
632
633 Some format syntax errors started causing crashes in Perl 5.17.2, but have now
634 been fixed.
635
636 =item *
637
638 Under debugging builds, the B<-DA> command line option started crashing in Perl
639 5.16.0.  It has been fixed [perl #114368].
640
641 =item *
642
643 Scope::Escape compatibility, which was broken in Perl 5.17.2, has been restored
644 [perl #113872].
645
646 =item *
647
648 A potential deadlock scenario involving the premature termination of a
649 pseudo-forked child in a Windows build with ithreads enabled has been fixed.
650 This resolves the common problem of the F<t/op/fork.t> test hanging on Windows
651 [perl #88840].
652
653 =item *
654
655 The microperl build, broken since Perl 5.15.7, has now been restored.
656
657 =item *
658
659 The code which generates errors from C<require()> could potentially read one or
660 two bytes before the start of the filename for filenames less than three bytes
661 long and ending C</\.p?\z/>.  This has now been fixed.  Note that it could
662 never have happened with module names given to C<use()> or C<require()> anyway.
663
664 =item *
665
666 The handling of pathnames of modules given to C<require()> has been made
667 thread-safe on VMS.
668
669 =item *
670
671 The C<re_compile()> API function, the entry point for perl's regex compiler,
672 was accidentally changed in Perl 5.17.1 to operate on the current engine.  This
673 has now been restored to its former core-engine-specific state [perl #114302].
674
675 =item *
676
677 Perl 5.17.1 introduced a memory leak into the re-use of run-time regexes where
678 the pattern hasn't changed (i.e. C</$unchanging/>).  This has now been fixed.
679
680 =item *
681
682 A bug in the compilation of a C</(?{})/> expression which affected the TryCatch
683 test suite has been fixed [perl #114242].
684
685 =back
686
687 =head1 Known Problems
688
689 XXX Descriptions of platform agnostic bugs we know we can't fix go here.  Any
690 tests that had to be C<TODO>ed for the release would be noted here.  Unfixed
691 platform specific bugs also go here.
692
693 [ List each fix as a =item entry ]
694
695 =over 4
696
697 =item *
698
699 XXX
700
701 =back
702
703 =head1 Obituary
704
705 XXX If any significant core contributor has died, we've added a short obituary
706 here.
707
708 =head1 Acknowledgements
709
710 XXX Generate this with:
711
712   perl Porting/acknowledgements.pl v5.17.2..HEAD
713
714 =head1 Reporting Bugs
715
716 If you find what you think is a bug, you might check the articles recently
717 posted to the comp.lang.perl.misc newsgroup and the perl bug database at
718 http://rt.perl.org/perlbug/ .  There may also be information at
719 http://www.perl.org/ , the Perl Home Page.
720
721 If you believe you have an unreported bug, please run the L<perlbug> program
722 included with your release.  Be sure to trim your bug down to a tiny but
723 sufficient test case.  Your bug report, along with the output of C<perl -V>,
724 will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
725
726 If the bug you are reporting has security implications, which make it
727 inappropriate to send to a publicly archived mailing list, then please send it
728 to perl5-security-report@perl.org.  This points to a closed subscription
729 unarchived mailing list, which includes all the core committers, who will be
730 able to help assess the impact of issues, figure out a resolution, and help
731 co-ordinate the release of patches to mitigate or fix the problem across all
732 platforms on which Perl is supported.  Please only use this address for
733 security issues in the Perl core, not for modules independently distributed on
734 CPAN.
735
736 =head1 SEE ALSO
737
738 The F<Changes> file for an explanation of how to view exhaustive details on
739 what changed.
740
741 The F<INSTALL> file for how to build Perl.
742
743 The F<README> file for general stuff.
744
745 The F<Artistic> and F<Copying> files for copyright information.
746
747 =cut