5 [ this is a template for a new perldelta file. Any text flagged as XXX needs
6 to be processed before release. ]
8 perldelta - what is new for perl v5.21.7
12 This document describes differences between the 5.21.6 release and the 5.21.7
15 If you are upgrading from an earlier release such as 5.21.5, first read
16 L<perl5216delta>, which describes differences between 5.21.5 and 5.21.6.
20 XXX Any important notices here
22 =head1 Core Enhancements
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.
28 [ List each enhancement as a =head2 entry ]
30 =head2 C<fileno> now works on directory handles
32 When the relevant support is available in the operating system, the
33 C<fileno> builtin now works on directory handles, yielding the
34 underlying file descriptor in the same way as for filehandles. On
35 operating systems without such support, C<fileno> on a directory handle
36 continues to return the undefined value, as before, but also sets C<$!> to
37 indicate that the operation is not supported.
39 Currently, this uses either a C<dd_fd> member in the OS C<DIR>
40 structure, or a dirfd(3) function as specified by POSIX.1-2008.
44 XXX Any security-related notices go here. In particular, any security
45 vulnerabilities closed should be noted here rather than in the
46 L</Selected Bug Fixes> section.
48 [ List each security issue as a =head2 entry ]
50 =head1 Incompatible Changes
52 XXX For a release on a stable branch, this section aspires to be:
54 There are no changes intentionally incompatible with 5.XXX.XXX
55 If any exist, they are bugs, and we request that you submit a
56 report. See L</Reporting Bugs> below.
58 [ List each incompatible change as a =head2 entry ]
60 =head2 C<&> and C<\&> prototypes accepts only subs
62 The C<&> prototype character now accepts only anonymous subs (C<sub {...}>)
63 and things beginning with C<\&>. Formerly it erroneously also allowed
64 C<undef> and references to array, hashes, and lists. [perl #4539]
67 The C<\&> prototype was allowing subroutine calls, whereas now it only
68 allows subroutines. C<&foo> is permitted. C<&foo()> and C<foo()> are not.
71 =head2 C<use encoding> is now lexical
73 The L<encoding> pragma's effect is now limited to lexical scope. This
74 pragma is deprecated, but in the meantime, it could adversely affect
75 unrelated modules that are included in the same program.
79 XXX Any deprecated features, syntax, modules etc. should be listed here.
81 =head2 Module removals
83 XXX Remove this section if inapplicable.
85 The following modules will be removed from the core distribution in a
86 future release, and will at that time need to be installed from CPAN.
87 Distributions on CPAN which require these modules will need to list them as
90 The core versions of these modules will now issue C<"deprecated">-category
91 warnings to alert you to this fact. To silence these deprecation warnings,
92 install the modules in question from CPAN.
94 Note that these are (with rare exceptions) fine modules that you are encouraged
95 to continue to use. Their disinclusion from core primarily hinges on their
96 necessity to bootstrapping a fully functional, CPAN-capable Perl installation,
97 not usually on concerns over their design.
103 XXX Note that deprecated modules should be listed here even if they are listed
104 as an updated module in the L</Modules and Pragmata> section.
108 [ List each other deprecation as a =head2 entry ]
110 =head2 Setting C<${^ENCODING}> to anything but C<undef>
112 This variable allows Perl scripts to be written in a non-ASCII,
113 non-UTF-8 encoding. However, it affects all modules globally, leading
114 to wrong answers and segmentation faults. New scripts should be written
115 in UTF-8; old scripts should be converted to UTF-8, which is easily done
116 with the L<encoding> pragma.
118 =head1 Performance Enhancements
120 XXX Changes which enhance performance without changing behaviour go here.
121 There may well be none in a stable release.
123 [ List each enhancement as a =item entry ]
129 Win32 Perl uses 8 KB less of per-process memory than before for every perl
130 process of this version. This data is now memory mapped from disk and shared
131 between perl processes from the same perl binary.
135 =head1 Modules and Pragmata
137 XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
138 go here. If Module::CoreList is updated, generate an initial draft of the
139 following sections using F<Porting/corelist-perldelta.pl>. A paragraph summary
140 for important changes should then be added by hand. In an ideal world,
141 dual-life modules would have a F<Changes> file that could be cribbed.
143 [ Within each section, list entries as a =item entry ]
145 =head2 New Modules and Pragmata
155 =head2 Updated Modules and Pragmata
161 L<B> has been upgraded from version 1.53 to 1.54.
163 Nulled COPs are now of class C<B::COP>, rather than C<B::OP>.
165 B::REGEXP objects now provide a C<qr_anoncv> method for accessing the
166 implicit CV associated with C<qr//> things containing code blocks.
168 B::PMOP now provides a C<pmregexp> method returning a B::REGEXP object.
170 Two new classes, B::PADNAME and B::PADNAMELIST, have been introduced.
174 L<B::Deparse> has been upgraded from version 1.30 to 1.31.
176 BEGIN blocks at the end of the enclosing scope are now deparsed in the
177 right place. [perl #77452]
179 Lexical subroutines are now fully deparsed. [perl #116553]
183 L<ExtUtils::ParseXS> has been upgraded from version 3.26 to 3.27.
185 Only declare C<file> unused if we actually define it.
187 Improve generated C<RETVAL> code generation to avoid repeated
188 references to C<ST(0)>. [perl #123278]
192 The PathTools module collection has been upgraded from 3.52 to 3.53.
194 Don't turn leading C<//> into C</> on Cygwin. [perl #122635]
198 L<Locale::Maketext> has been upgraded from version 1.25 to 1.26.
202 L<XSLoader> has been upgraded from version 0.19 to 0.20
204 Don't test twice for bootstrap file.
208 =head2 Removed Modules and Pragmata
220 XXX Changes to files in F<pod/> go here. Consider grouping entries by
221 file and be sure to link to the appropriate page, e.g. L<perlfunc>.
223 =head2 New Documentation
225 XXX Changes which create B<new> files in F<pod/> go here.
229 XXX Description of the purpose of the new file here
231 =head2 Changes to Existing Documentation
233 XXX Changes which significantly change existing files in F<pod/> go here.
234 However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
243 XXX Description of the change here
249 The following additions or changes have been made to diagnostic output,
250 including warnings and fatal error messages. For the complete list of
251 diagnostic messages, see L<perldiag>.
253 XXX New or changed warnings emitted by the core's C<C> code go here. Also
254 include any changes in L<perldiag> that reconcile it to the C<C> code.
256 =head2 New Diagnostics
258 XXX Newly added diagnostic messages go under here, separated into New Errors
267 XXX L<message|perldiag/"message">
277 XXX L<message|perldiag/"message">
281 =head2 Changes to Existing Diagnostics
283 XXX Changes (i.e. rewording) of diagnostic messages go here
289 "Variable %s will not stay shared" has been changed to say "Subroutine"
290 when it is actually a lexical sub that will not stay shared.
294 =head1 Utility Changes
296 XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go here.
297 Most of these are built within the directory F<utils>.
299 [ List utility changes as a =head2 entry for each utility and =item
300 entries for each change
301 Use L<XXX> with program names to get proper documentation linking. ]
313 =head1 Configuration and Compilation
315 XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
316 go here. Any other changes to the Perl build process should be listed here.
317 However, any platform-specific changes should be listed in the
318 L</Platform Support> section, instead.
320 [ List changes as a =item entry ].
332 XXX Any significant changes to the testing of a freshly built perl should be
333 listed here. Changes which create B<new> files in F<t/> go here as do any
334 large changes to the testing harness (e.g. when parallel testing was added).
335 Changes to existing files in F<t/> aren't worth summarizing, although the bugs
336 that they represent may be covered elsewhere.
338 [ List each test improvement as a =item entry ]
348 =head1 Platform Support
350 XXX Any changes to platform support should be listed in the sections below.
352 [ Within the sections, list each platform as a =item entry with specific
353 changes as paragraphs below it. ]
357 XXX List any platforms that this version of perl compiles on, that previous
358 versions did not. These will either be enabled by new files in the F<hints/>
359 directories, or new subdirectories and F<README> files at the top level of the
364 =item XXX-some-platform
370 =head2 Discontinued Platforms
372 XXX List any platforms that this version of perl no longer compiles on.
376 =item XXX-some-platform
382 =head2 Platform-Specific Notes
390 Intel C builds are now always built with C99 mode on.
394 =head1 Internal Changes
396 XXX Changes which affect the interface available to C<XS> code go here. Other
397 significant internal changes for future core maintainers should be noted as
400 [ List each change as a =item entry ]
406 The PADNAME and PADNAMELIST types are now separate types, and no longer
407 simply aliases for SV and AV. [perl #123223]
411 Pad names are now always UTF8. The C<PadnameUTF8> macro always returns
412 true. Previously, this was effectively the case already, but any support
413 for two different internal representations of pad names has now been
418 =head1 Selected Bug Fixes
420 XXX Important bug fixes in the core language are summarized here. Bug fixes in
421 files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>.
423 [ List each fix as a =item entry ]
429 On Win32, restoring in a child pseudo-process a variable that was
430 C<local()>ed in a parent pseudo-process before the C<fork> happened caused
431 memory corruption and a crash in the child pseudo-process (and therefore OS
432 process). [perl #40565]
436 Calling C<write> on a format with a C<^**> field could produce a panic
437 in sv_chop() if there were insufficient arguments or if the variable
438 used to fill the field was empty. [perl #123245]
442 Non-ASCII lexical sub names (use in error messages) on longer have extra
447 The C<\@> subroutine prototype no longer flattens parenthesized arrays
448 (taking a reference to each element), but takes a reference to the array
449 itself. [perl #47363]
453 A block containing nothing except a C-style C<for> loop could corrupt the
454 stack, causing lists outside the block to lose elements or have elements
455 overwritten. This could happen with C<map { for(...){...} } ...> and with
456 lists containing C<do { for(...){...} }>. [perl #123286]
460 C<scalar()> now propagates lvalue context, so that
461 C<for(scalar($#foo)) { ... }> can modify C<$#foo> through C<$_>.
465 C<qr/@array(?{block})/> no longer dies with "Bizarre copy of ARRAY".
470 =head1 Known Problems
472 XXX Descriptions of platform agnostic bugs we know we can't fix go here. Any
473 tests that had to be C<TODO>ed for the release would be noted here. Unfixed
474 platform specific bugs also go here.
476 [ List each fix as a =item entry ]
486 =head1 Errata From Previous Releases
492 XXX Add anything here that we forgot to add, or were mistaken about, in
493 the perldelta of a previous release.
499 XXX If any significant core contributor has died, we've added a short obituary
502 =head1 Acknowledgements
504 XXX Generate this with:
506 perl Porting/acknowledgements.pl v5.21.6..HEAD
508 =head1 Reporting Bugs
510 If you find what you think is a bug, you might check the articles recently
511 posted to the comp.lang.perl.misc newsgroup and the perl bug database at
512 https://rt.perl.org/ . There may also be information at
513 http://www.perl.org/ , the Perl Home Page.
515 If you believe you have an unreported bug, please run the L<perlbug> program
516 included with your release. Be sure to trim your bug down to a tiny but
517 sufficient test case. Your bug report, along with the output of C<perl -V>,
518 will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
520 If the bug you are reporting has security implications, which make it
521 inappropriate to send to a publicly archived mailing list, then please send it
522 to perl5-security-report@perl.org. This points to a closed subscription
523 unarchived mailing list, which includes all the core committers, who will be
524 able to help assess the impact of issues, figure out a resolution, and help
525 co-ordinate the release of patches to mitigate or fix the problem across all
526 platforms on which Perl is supported. Please only use this address for
527 security issues in the Perl core, not for modules independently distributed on
532 The F<Changes> file for an explanation of how to view exhaustive details on
535 The F<INSTALL> file for how to build Perl.
537 The F<README> file for general stuff.
539 The F<Artistic> and F<Copying> files for copyright information.