This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta: Add #40565 bug number
[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.21.7
9
10 =head1 DESCRIPTION
11
12 This document describes differences between the 5.21.6 release and the 5.21.7
13 release.
14
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.
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 C<fileno> now works on directory handles
31
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.
38
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.
41
42 =head1 Security
43
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.
47
48 [ List each security issue as a =head2 entry ]
49
50 =head1 Incompatible Changes
51
52 XXX For a release on a stable branch, this section aspires to be:
53
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.
57
58 [ List each incompatible change as a =head2 entry ]
59
60 =head2 C<&> and C<\&> prototypes accepts only subs
61
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]
65 [perl #123062]
66
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.
69 [perl #77860]
70
71 =head2 C<use encoding> is now lexical
72
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.
76
77 =head1 Deprecations
78
79 XXX Any deprecated features, syntax, modules etc. should be listed here.
80
81 =head2 Module removals
82
83 XXX Remove this section if inapplicable.
84
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
88 prerequisites.
89
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.
93
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.
98
99 =over
100
101 =item XXX
102
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.
105
106 =back
107
108 [ List each other deprecation as a =head2 entry ]
109
110 =head2 Setting C<${^ENCODING}> to anything but C<undef>
111
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.
117
118 =head1 Performance Enhancements
119
120 XXX Changes which enhance performance without changing behaviour go here.
121 There may well be none in a stable release.
122
123 [ List each enhancement as a =item entry ]
124
125 =over 4
126
127 =item *
128
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.
132
133 =back
134
135 =head1 Modules and Pragmata
136
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.
142
143 [ Within each section, list entries as a =item entry ]
144
145 =head2 New Modules and Pragmata
146
147 =over 4
148
149 =item *
150
151 XXX
152
153 =back
154
155 =head2 Updated Modules and Pragmata
156
157 =over 4
158
159 =item *
160
161 L<B> has been upgraded from version 1.53 to 1.54.
162
163 Nulled COPs are now of class C<B::COP>, rather than C<B::OP>.
164
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.
167
168 B::PMOP now provides a C<pmregexp> method returning a B::REGEXP object.
169
170 Two new classes, B::PADNAME and B::PADNAMELIST, have been introduced.
171
172 =item *
173
174 L<B::Deparse> has been upgraded from version 1.30 to 1.31.
175
176 BEGIN blocks at the end of the enclosing scope are now deparsed in the
177 right place.  [perl #77452]
178
179 Lexical subroutines are now fully deparsed.  [perl #116553]
180
181 =item *
182
183 L<ExtUtils::ParseXS> has been upgraded from version 3.26 to 3.27.
184
185 Only declare C<file> unused if we actually define it.
186
187 Improve generated C<RETVAL> code generation to avoid repeated
188 references to C<ST(0)>.  [perl #123278]
189
190 =item *
191
192 The PathTools module collection has been upgraded from 3.52 to 3.53.
193
194 Don't turn leading C<//> into C</> on Cygwin. [perl #122635]
195
196 =item *
197
198 L<Locale::Maketext> has been upgraded from version 1.25 to 1.26.
199
200 =item *
201
202 L<XSLoader> has been upgraded from version 0.19 to 0.20
203
204 Don't test twice for bootstrap file.
205
206 =back
207
208 =head2 Removed Modules and Pragmata
209
210 =over 4
211
212 =item *
213
214 XXX
215
216 =back
217
218 =head1 Documentation
219
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>.
222
223 =head2 New Documentation
224
225 XXX Changes which create B<new> files in F<pod/> go here.
226
227 =head3 L<XXX>
228
229 XXX Description of the purpose of the new file here
230
231 =head2 Changes to Existing Documentation
232
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>
235 section.
236
237 =head3 L<XXX>
238
239 =over 4
240
241 =item *
242
243 XXX Description of the change here
244
245 =back
246
247 =head1 Diagnostics
248
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>.
252
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.
255
256 =head2 New Diagnostics
257
258 XXX Newly added diagnostic messages go under here, separated into New Errors
259 and New Warnings
260
261 =head3 New Errors
262
263 =over 4
264
265 =item *
266
267 XXX L<message|perldiag/"message">
268
269 =back
270
271 =head3 New Warnings
272
273 =over 4
274
275 =item *
276
277 XXX L<message|perldiag/"message">
278
279 =back
280
281 =head2 Changes to Existing Diagnostics
282
283 XXX Changes (i.e. rewording) of diagnostic messages go here
284
285 =over 4
286
287 =item *
288
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.
291
292 =back
293
294 =head1 Utility Changes
295
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>.
298
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. ]
302
303 =head2 L<XXX>
304
305 =over 4
306
307 =item *
308
309 XXX
310
311 =back
312
313 =head1 Configuration and Compilation
314
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.
319
320 [ List changes as a =item entry ].
321
322 =over 4
323
324 =item *
325
326 XXX
327
328 =back
329
330 =head1 Testing
331
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.
337
338 [ List each test improvement as a =item entry ]
339
340 =over 4
341
342 =item *
343
344 XXX
345
346 =back
347
348 =head1 Platform Support
349
350 XXX Any changes to platform support should be listed in the sections below.
351
352 [ Within the sections, list each platform as a =item entry with specific
353 changes as paragraphs below it. ]
354
355 =head2 New Platforms
356
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
360 source tree.
361
362 =over 4
363
364 =item XXX-some-platform
365
366 XXX
367
368 =back
369
370 =head2 Discontinued Platforms
371
372 XXX List any platforms that this version of perl no longer compiles on.
373
374 =over 4
375
376 =item XXX-some-platform
377
378 XXX
379
380 =back
381
382 =head2 Platform-Specific Notes
383
384 =head3 Win32
385
386 =over
387
388 =item *
389
390 Intel C builds are now always built with C99 mode on.
391
392 =back
393
394 =head1 Internal Changes
395
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
398 well.
399
400 [ List each change as a =item entry ]
401
402 =over 4
403
404 =item *
405
406 The PADNAME and PADNAMELIST types are now separate types, and no longer
407 simply aliases for SV and AV.  [perl #123223]
408
409 =item *
410
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
414 removed.
415
416 =back
417
418 =head1 Selected Bug Fixes
419
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>.
422
423 [ List each fix as a =item entry ]
424
425 =over 4
426
427 =item *
428
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]
433
434 =item *
435
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]
439
440 =item *
441
442 Non-ASCII lexical sub names (use in error messages) on longer have extra
443 junk on the end.
444
445 =item *
446
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]
450
451 =item *
452
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]
457
458 =item *
459
460 C<scalar()> now propagates lvalue context, so that
461 C<for(scalar($#foo)) { ... }> can modify C<$#foo> through C<$_>.
462
463 =item *
464
465 C<qr/@array(?{block})/> no longer dies with "Bizarre copy of ARRAY".
466 [#123344]
467
468 =back
469
470 =head1 Known Problems
471
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.
475
476 [ List each fix as a =item entry ]
477
478 =over 4
479
480 =item *
481
482 XXX
483
484 =back
485
486 =head1 Errata From Previous Releases
487
488 =over 4
489
490 =item *
491
492 XXX Add anything here that we forgot to add, or were mistaken about, in
493 the perldelta of a previous release.
494
495 =back
496
497 =head1 Obituary
498
499 XXX If any significant core contributor has died, we've added a short obituary
500 here.
501
502 =head1 Acknowledgements
503
504 XXX Generate this with:
505
506   perl Porting/acknowledgements.pl v5.21.6..HEAD
507
508 =head1 Reporting Bugs
509
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.
514
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.
519
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
528 CPAN.
529
530 =head1 SEE ALSO
531
532 The F<Changes> file for an explanation of how to view exhaustive details on
533 what changed.
534
535 The F<INSTALL> file for how to build Perl.
536
537 The F<README> file for general stuff.
538
539 The F<Artistic> and F<Copying> files for copyright information.
540
541 =cut