This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta: encoding.pm change is incompatible
[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<&> prototype 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 =head2 C<use encoding> is now lexical
68
69 The L<encoding> pragma's effect is now limited to lexical scope.  This
70 pragma is deprecated, but in the meantime, it could adversely affect
71 unrelated modules that are included in the same program.
72
73 =head1 Deprecations
74
75 XXX Any deprecated features, syntax, modules etc. should be listed here.
76
77 =head2 Module removals
78
79 XXX Remove this section if inapplicable.
80
81 The following modules will be removed from the core distribution in a
82 future release, and will at that time need to be installed from CPAN.
83 Distributions on CPAN which require these modules will need to list them as
84 prerequisites.
85
86 The core versions of these modules will now issue C<"deprecated">-category
87 warnings to alert you to this fact.  To silence these deprecation warnings,
88 install the modules in question from CPAN.
89
90 Note that these are (with rare exceptions) fine modules that you are encouraged
91 to continue to use.  Their disinclusion from core primarily hinges on their
92 necessity to bootstrapping a fully functional, CPAN-capable Perl installation,
93 not usually on concerns over their design.
94
95 =over
96
97 =item XXX
98
99 XXX Note that deprecated modules should be listed here even if they are listed
100 as an updated module in the L</Modules and Pragmata> section.
101
102 =back
103
104 [ List each other deprecation as a =head2 entry ]
105
106 =head2 Setting C<${^ENCODING}> to anything but C<undef>
107
108 This variable allows Perl scripts to be written in a non-ASCII,
109 non-UTF-8 encoding.  However, it affects all modules globally, leading
110 to wrong answers and segmentation faults.  New scripts should be written
111 in UTF-8; old scripts should be converted to UTF-8, which is easily done
112 with the L<encoding> pragma.
113
114 =head1 Performance Enhancements
115
116 XXX Changes which enhance performance without changing behaviour go here.
117 There may well be none in a stable release.
118
119 [ List each enhancement as a =item entry ]
120
121 =over 4
122
123 =item *
124
125 Win32 Perl uses 8 KB less of per-process memory than before for every perl
126 process of this version. This data is now memory mapped from disk and shared
127 between perl processes from the same perl binary.
128
129 =back
130
131 =head1 Modules and Pragmata
132
133 XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
134 go here.  If Module::CoreList is updated, generate an initial draft of the
135 following sections using F<Porting/corelist-perldelta.pl>.  A paragraph summary
136 for important changes should then be added by hand.  In an ideal world,
137 dual-life modules would have a F<Changes> file that could be cribbed.
138
139 [ Within each section, list entries as a =item entry ]
140
141 =head2 New Modules and Pragmata
142
143 =over 4
144
145 =item *
146
147 XXX
148
149 =back
150
151 =head2 Updated Modules and Pragmata
152
153 =over 4
154
155 =item *
156
157 L<B> has been upgraded from version 1.53 to 1.54.
158
159 Nulled COPs are now of class C<B::COP>, rather than C<B::OP>.
160
161 =item *
162
163 L<B::Deparse> has been upgraded from version 1.30 to 1.31.
164
165 BEGIN blocks at the end of the enclosing scope are now deparsed in the
166 right place.  [perl #77452]
167
168 =item *
169
170 L<ExtUtils::ParseXS> has been upgraded from version 3.26 to 3.27.
171
172 Only declare C<file> unused if we actually define it.
173
174 Improve generated C<RETVAL> code generation to avoid repeated
175 references to C<ST(0)>.  [perl #123278]
176
177 =item *
178
179 The PathTools module collection has been upgraded from 3.52 to 3.53.
180
181 Don't turn leading C<//> into C</> on Cygwin. [perl #122635]
182
183 =item *
184
185 L<Locale::Maketext> has been upgraded from version 1.25 to 1.26.
186
187 =item *
188
189 L<XSLoader> has been upgraded from version 0.19 to 0.20
190
191 Don't test twice for bootstrap file.
192
193 =back
194
195 =head2 Removed Modules and Pragmata
196
197 =over 4
198
199 =item *
200
201 XXX
202
203 =back
204
205 =head1 Documentation
206
207 XXX Changes to files in F<pod/> go here.  Consider grouping entries by
208 file and be sure to link to the appropriate page, e.g. L<perlfunc>.
209
210 =head2 New Documentation
211
212 XXX Changes which create B<new> files in F<pod/> go here.
213
214 =head3 L<XXX>
215
216 XXX Description of the purpose of the new file here
217
218 =head2 Changes to Existing Documentation
219
220 XXX Changes which significantly change existing files in F<pod/> go here.
221 However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
222 section.
223
224 =head3 L<XXX>
225
226 =over 4
227
228 =item *
229
230 XXX Description of the change here
231
232 =back
233
234 =head1 Diagnostics
235
236 The following additions or changes have been made to diagnostic output,
237 including warnings and fatal error messages.  For the complete list of
238 diagnostic messages, see L<perldiag>.
239
240 XXX New or changed warnings emitted by the core's C<C> code go here.  Also
241 include any changes in L<perldiag> that reconcile it to the C<C> code.
242
243 =head2 New Diagnostics
244
245 XXX Newly added diagnostic messages go under here, separated into New Errors
246 and New Warnings
247
248 =head3 New Errors
249
250 =over 4
251
252 =item *
253
254 XXX L<message|perldiag/"message">
255
256 =back
257
258 =head3 New Warnings
259
260 =over 4
261
262 =item *
263
264 XXX L<message|perldiag/"message">
265
266 =back
267
268 =head2 Changes to Existing Diagnostics
269
270 XXX Changes (i.e. rewording) of diagnostic messages go here
271
272 =over 4
273
274 =item *
275
276 XXX Describe change here
277
278 =back
279
280 =head1 Utility Changes
281
282 XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go here.
283 Most of these are built within the directory F<utils>.
284
285 [ List utility changes as a =head2 entry for each utility and =item
286 entries for each change
287 Use L<XXX> with program names to get proper documentation linking. ]
288
289 =head2 L<XXX>
290
291 =over 4
292
293 =item *
294
295 XXX
296
297 =back
298
299 =head1 Configuration and Compilation
300
301 XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
302 go here.  Any other changes to the Perl build process should be listed here.
303 However, any platform-specific changes should be listed in the
304 L</Platform Support> section, instead.
305
306 [ List changes as a =item entry ].
307
308 =over 4
309
310 =item *
311
312 XXX
313
314 =back
315
316 =head1 Testing
317
318 XXX Any significant changes to the testing of a freshly built perl should be
319 listed here.  Changes which create B<new> files in F<t/> go here as do any
320 large changes to the testing harness (e.g. when parallel testing was added).
321 Changes to existing files in F<t/> aren't worth summarizing, although the bugs
322 that they represent may be covered elsewhere.
323
324 [ List each test improvement as a =item entry ]
325
326 =over 4
327
328 =item *
329
330 XXX
331
332 =back
333
334 =head1 Platform Support
335
336 XXX Any changes to platform support should be listed in the sections below.
337
338 [ Within the sections, list each platform as a =item entry with specific
339 changes as paragraphs below it. ]
340
341 =head2 New Platforms
342
343 XXX List any platforms that this version of perl compiles on, that previous
344 versions did not.  These will either be enabled by new files in the F<hints/>
345 directories, or new subdirectories and F<README> files at the top level of the
346 source tree.
347
348 =over 4
349
350 =item XXX-some-platform
351
352 XXX
353
354 =back
355
356 =head2 Discontinued Platforms
357
358 XXX List any platforms that this version of perl no longer compiles on.
359
360 =over 4
361
362 =item XXX-some-platform
363
364 XXX
365
366 =back
367
368 =head2 Platform-Specific Notes
369
370 =head3 Win32
371
372 =over
373
374 =item *
375
376 Intel C builds are now always built with C99 mode on.
377
378 =back
379
380 =head1 Internal Changes
381
382 XXX Changes which affect the interface available to C<XS> code go here.  Other
383 significant internal changes for future core maintainers should be noted as
384 well.
385
386 [ List each change as a =item entry ]
387
388 =over 4
389
390 =item *
391
392 XXX
393
394 =back
395
396 =head1 Selected Bug Fixes
397
398 XXX Important bug fixes in the core language are summarized here.  Bug fixes in
399 files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>.
400
401 [ List each fix as a =item entry ]
402
403 =over 4
404
405 =item *
406
407 On Win32, restoring in a child pseudo-process a variable that was
408 C<local()>ed in a parent pseudo-process before the C<fork> happened caused
409 memory corruption and a crash in the child pseudo-process (and therefore OS
410 process). 
411
412 =item *
413
414 Calling C<write> on a format with a C<^**> field could produce a panic
415 in sv_chop() if there were insufficient arguments or if the variable
416 used to fill the field was empty.  [perl #123245]
417
418 =item *
419
420 Non-ASCII lexical sub names (use in error messages) on longer have extra
421 junk on the end.
422
423 =back
424
425 =head1 Known Problems
426
427 XXX Descriptions of platform agnostic bugs we know we can't fix go here.  Any
428 tests that had to be C<TODO>ed for the release would be noted here.  Unfixed
429 platform specific bugs also go here.
430
431 [ List each fix as a =item entry ]
432
433 =over 4
434
435 =item *
436
437 XXX
438
439 =back
440
441 =head1 Errata From Previous Releases
442
443 =over 4
444
445 =item *
446
447 XXX Add anything here that we forgot to add, or were mistaken about, in
448 the perldelta of a previous release.
449
450 =back
451
452 =head1 Obituary
453
454 XXX If any significant core contributor has died, we've added a short obituary
455 here.
456
457 =head1 Acknowledgements
458
459 XXX Generate this with:
460
461   perl Porting/acknowledgements.pl v5.21.6..HEAD
462
463 =head1 Reporting Bugs
464
465 If you find what you think is a bug, you might check the articles recently
466 posted to the comp.lang.perl.misc newsgroup and the perl bug database at
467 https://rt.perl.org/ .  There may also be information at
468 http://www.perl.org/ , the Perl Home Page.
469
470 If you believe you have an unreported bug, please run the L<perlbug> program
471 included with your release.  Be sure to trim your bug down to a tiny but
472 sufficient test case.  Your bug report, along with the output of C<perl -V>,
473 will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
474
475 If the bug you are reporting has security implications, which make it
476 inappropriate to send to a publicly archived mailing list, then please send it
477 to perl5-security-report@perl.org.  This points to a closed subscription
478 unarchived mailing list, which includes all the core committers, who will be
479 able to help assess the impact of issues, figure out a resolution, and help
480 co-ordinate the release of patches to mitigate or fix the problem across all
481 platforms on which Perl is supported.  Please only use this address for
482 security issues in the Perl core, not for modules independently distributed on
483 CPAN.
484
485 =head1 SEE ALSO
486
487 The F<Changes> file for an explanation of how to view exhaustive details on
488 what changed.
489
490 The F<INSTALL> file for how to build Perl.
491
492 The F<README> file for general stuff.
493
494 The F<Artistic> and F<Copying> files for copyright information.
495
496 =cut