This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perlthrtut: Shorten/rewrap long lines
[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.19.1
9
10 =head1 DESCRIPTION
11
12 This document describes differences between the 5.19.0 release and the 5.19.1
13 release.
14
15 =head1 Notice
16
17 XXX Any important notices here
18
19 =head1 Core Enhancements
20
21 XXX New core language features go here.  Summarize user-visible core language
22 enhancements.  Particularly prominent performance optimisations could go
23 here, but most should go in the L</Performance Enhancements> section.
24
25 [ List each enhancement as a =head2 entry ]
26
27 =head1 Security
28
29 XXX Any security-related notices go here.  In particular, any security
30 vulnerabilities closed should be noted here rather than in the
31 L</Selected Bug Fixes> section.
32
33 [ List each security issue as a =head2 entry ]
34
35 =head1 Incompatible Changes
36
37 XXX For a release on a stable branch, this section aspires to be:
38
39     There are no changes intentionally incompatible with 5.XXX.XXX
40     If any exist, they are bugs, and we request that you submit a
41     report.  See L</Reporting Bugs> below.
42
43 [ List each incompatible change as a =head2 entry ]
44
45 =head1 Deprecations
46
47 XXX Any deprecated features, syntax, modules etc. should be listed here.
48
49 =head2 Module removals
50
51 XXX Remove this section if inapplicable.
52
53 The following modules will be removed from the core distribution in a future
54 release, and will at that time need to be installed from CPAN. Distributions
55 on CPAN which require these modules will need to list them as prerequisites.
56
57 The core versions of these modules will now issue C<"deprecated">-category
58 warnings to alert you to this fact. To silence these deprecation warnings,
59 install the modules in question from CPAN.
60
61 Note that these are (with rare exceptions) fine modules that you are encouraged
62 to continue to use. Their disinclusion from core primarily hinges on their
63 necessity to bootstrapping a fully functional, CPAN-capable Perl installation,
64 not usually on concerns over their design.
65
66 XXX Note that deprecated modules should be listed here even if they are listed
67 as an updated module in the L</Modules and Pragmata> section.
68
69 =over
70
71 =item *
72
73 ...
74
75 =back
76
77 [ List each other deprecation as a =head2 entry ]
78
79 =head1 Performance Enhancements
80
81 XXX Changes which enhance performance without changing behaviour go here.
82 There may well be none in a stable release.
83
84 [ List each enhancement as a =item entry ]
85
86 =over 4
87
88 =item *
89
90 Perl has a new copy-on-write mechanism that avoids the need to copy the
91 internal string buffer when assigning from one scalar to another. This
92 makes copying large strings appear much faster.  Modifying one of the two
93 (or more) strings after an assignment will force a copy internally. This
94 makes it unnecessary to pass strings by reference for efficiency.
95
96 This feature was already available in 5.18.0, but wasn't enabled by
97 default. It is the default now, and so you no longer need build perl with
98 the F<Configure> argument:
99
100     -Accflags=PERL_NEW_COPY_ON_WRITE
101
102 It can be disabled (for now) in a perl build with:
103
104     -Accflags=PERL_NO_COW
105
106 =back
107
108 =head1 Modules and Pragmata
109
110 XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
111 go here.  If Module::CoreList is updated, generate an initial draft of the
112 following sections using F<Porting/corelist-perldelta.pl>, which prints stub
113 entries to STDOUT.  Results can be pasted in place of the '=head2' entries
114 below.  A paragraph summary for important changes should then be added by hand.
115 In an ideal world, dual-life modules would have a F<Changes> file that could be
116 cribbed.
117
118 [ Within each section, list entries as a =item entry ]
119
120 =head2 New Modules and Pragmata
121
122 =over 4
123
124 =item *
125
126 XXX
127
128 =back
129
130 =head2 Updated Modules and Pragmata
131
132 =over 4
133
134 =item *
135
136 Test::Harness has been upgraded from version 3.26 to 3.28
137
138 Memory usage is dramatically reduced. t/harness now uses about 10% of the
139 memory used by 3.26 and earlier.
140
141 C<PERL5LIB> is always propagated to a test's C<@INC>, even under C<-T>.
142
143 =item *
144
145 Unicode::UCD has been upgraded from version 0.51 to 0.52.
146
147 A function, L<Unicode::UCD/search_invlist()> is now available to do
148 search an inversion list or map for a code point.
149
150 =back
151
152 =head2 Removed Modules and Pragmata
153
154 =over 4
155
156 =item *
157
158 XXX
159
160 =back
161
162 =head1 Documentation
163
164 XXX Changes to files in F<pod/> go here.  Consider grouping entries by
165 file and be sure to link to the appropriate page, e.g. L<perlfunc>.
166
167 =head2 New Documentation
168
169 XXX Changes which create B<new> files in F<pod/> go here.
170
171 =head3 L<XXX>
172
173 XXX Description of the purpose of the new file here
174
175 =head2 Changes to Existing Documentation
176
177 XXX Changes which significantly change existing files in F<pod/> go here.
178 However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
179 section.
180
181 =head3 L<XXX>
182
183 =over 4
184
185 =item *
186
187 XXX Description of the change here
188
189 =back
190
191 =head1 Diagnostics
192
193 The following additions or changes have been made to diagnostic output,
194 including warnings and fatal error messages.  For the complete list of
195 diagnostic messages, see L<perldiag>.
196
197 XXX New or changed warnings emitted by the core's C<C> code go here.  Also
198 include any changes in L<perldiag> that reconcile it to the C<C> code.
199
200 =head2 New Diagnostics
201
202 XXX Newly added diagnostic messages go under here, separated into New Errors
203 and New Warnings
204
205 =head3 New Errors
206
207 =over 4
208
209 =item *
210
211 XXX L<message|perldiag/"message">
212
213 =back
214
215 =head3 New Warnings
216
217 =over 4
218
219 =item *
220
221 XXX L<message|perldiag/"message">
222
223 =back
224
225 =head2 Changes to Existing Diagnostics
226
227 XXX Changes (i.e. rewording) of diagnostic messages go here
228
229 =over 4
230
231 =item *
232
233 XXX Describe change here
234
235 =back
236
237 =head1 Utility Changes
238
239 XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go here.
240 Most of these are built within the directories F<utils> and F<x2p>.
241
242 [ List utility changes as a =head3 entry for each utility and =item
243 entries for each change
244 Use L<XXX> with program names to get proper documentation linking. ]
245
246 =head3 F<bisect.pl> enhancements
247
248 The git bisection tool F<Porting/bisect.pl> has had many enhancements.
249
250 =over 4
251
252 =item *
253
254 Can optionally run the test case with a timeout.
255
256 =item *
257
258 Can now run in-place in a clean git checkout.
259
260 =item *
261
262 Can run the test case under C<valgrind>.
263
264 =item *
265
266 Can apply user supplied patches and fixes to the source checkout before
267 building.
268
269 =item *
270
271 Now has fixups to enable building several more historical ranges of bleadperl,
272 which can be useful for pinpointing the origins of bugs or behaviour changes.
273
274 =back
275
276 It is provided as part of the source distribution but not installed because
277 it is not self-contained as it relies on being run from within a git
278 checkout. Note also that it makes no attempt to fix tests, correct runtime
279 bugs or make something useful to install - its purpose is to make minimal
280 changes to get any historical revision of interest to build and run as close
281 as possible to "as-was", and thereby make C<git bisect> easy to use.
282
283 =head1 Configuration and Compilation
284
285 XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
286 go here.  Any other changes to the Perl build process should be listed here.
287 However, any platform-specific changes should be listed in the
288 L</Platform Support> section, instead.
289
290 [ List changes as a =item entry ].
291
292 =over 4
293
294 =item *
295
296 XXX
297
298 =back
299
300 =head1 Testing
301
302 XXX Any significant changes to the testing of a freshly built perl should be
303 listed here.  Changes which create B<new> files in F<t/> go here as do any
304 large changes to the testing harness (e.g. when parallel testing was added).
305 Changes to existing files in F<t/> aren't worth summarizing, although the bugs
306 that they represent may be covered elsewhere.
307
308 [ List each test improvement as a =item entry ]
309
310 =over 4
311
312 =item *
313
314 XXX
315
316 =back
317
318 =head1 Platform Support
319
320 XXX Any changes to platform support should be listed in the sections below.
321
322 [ Within the sections, list each platform as a =item entry with specific
323 changes as paragraphs below it. ]
324
325 =head2 New Platforms
326
327 XXX List any platforms that this version of perl compiles on, that previous
328 versions did not.  These will either be enabled by new files in the F<hints/>
329 directories, or new subdirectories and F<README> files at the top level of the
330 source tree.
331
332 =over 4
333
334 =item XXX-some-platform
335
336 XXX
337
338 =back
339
340 =head2 Discontinued Platforms
341
342 XXX List any platforms that this version of perl no longer compiles on.
343
344 =over 4
345
346 =item XXX-some-platform
347
348 XXX
349
350 =back
351
352 =head2 Platform-Specific Notes
353
354 XXX List any changes for specific platforms.  This could include configuration
355 and compilation changes or changes in portability/compatibility.  However,
356 changes within modules for platforms should generally be listed in the
357 L</Modules and Pragmata> section.
358
359 =over 4
360
361 =item Mixed-endian platforms
362
363 The code supporting C<pack> and C<unpack> operations on mixed endian
364 platforms has been removed. We believe that Perl has long been unable to
365 build on mixed endian architectures (such as PDP-11s), so we don't think
366 that this change will affect any platforms which are able to build v5.18.0.
367
368 =back
369
370 =head1 Internal Changes
371
372 XXX Changes which affect the interface available to C<XS> code go here.  Other
373 significant internal changes for future core maintainers should be noted as
374 well.
375
376 [ List each change as a =item entry ]
377
378 =over 4
379
380 =item *
381
382 Perl's new copy-on-write mechanism  (which is now enabled by default),
383 allows any C<SvPOK> scalar to be automatically upgraded to a copy-on-write
384 scalar when copied. A reference count on the string buffer is stored in
385 the string buffer itself.
386
387 For example:
388
389     $ perl -MDevel::Peek -e'$a="abc"; $b = $a; Dump $a; Dump $b'
390     SV = PV(0x260cd80) at 0x2620ad8
391       REFCNT = 1
392       FLAGS = (POK,IsCOW,pPOK)
393       PV = 0x2619bc0 "abc"\0
394       CUR = 3
395       LEN = 16
396       COW_REFCNT = 1
397     SV = PV(0x260ce30) at 0x2620b20
398       REFCNT = 1
399       FLAGS = (POK,IsCOW,pPOK)
400       PV = 0x2619bc0 "abc"\0
401       CUR = 3
402       LEN = 16
403       COW_REFCNT = 1
404
405 Note that both scalars share the same PV buffer and have a COW_REFCNT
406 greater than zero.
407
408 This means that XS code which wishes to modify the C<SvPVX()> buffer of an
409 SV should call C<SvPV_force()> or similar first, to ensure a valid (and
410 unshared) buffer, and to call C<SvSETMAGIC()> afterwards. This in fact has
411 always been the case (for example hash keys were already copy-on-write);
412 this change just spreads the COW behaviour to a wider variety of SVs.
413
414 One important difference is that before 5.18.0, shared hash-key scalars
415 used to have the C<SvREADONLY> flag set; this is no longer the case.
416
417 This new behaviour can still be disabled by running F<Configure> with
418 B<-Accflags=-DPERL_NO_COW>.  This option will probably be removed in Perl
419 5.22.
420
421 =item *
422
423 C<PL_sawampersand> is now a constant.  The switch this variable provided
424 (to enable/disable the pre-match copy depending on whether C<$&> had been
425 seen) has been removed and replaced with copy-on-write, eliminating a few
426 bugs.
427
428 The previous behaviour can still be enabled by running F<Configure> with
429 B<-Accflags=-DPERL_SAWAMPERSAND>.
430
431 =item *
432
433 The functions C<my_swap>, C<my_htonl> and C<my_ntohl> have been removed.
434 It is unclear why these functions were ever marked as I<A>, part of the
435 API. XS code can't call them directly, as it can't rely on them being
436 compiled. Unsurprisingly, no code on CPAN references them.
437
438 =back
439
440 =head1 Selected Bug Fixes
441
442 XXX Important bug fixes in the core language are summarized here.  Bug fixes in
443 files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>.
444
445 [ List each fix as a =item entry ]
446
447 =over 4
448
449 =item *
450
451 The OP allocation code now returns correctly aligned memory in all cases
452 for C<struct pmop>. Previously it could return memory only aligned to a
453 4-byte boundary, which is not correct for an ithreads build with 64 bit IVs
454 on some 32 bit platforms. Notably, this caused the build to fail completely
455 on sparc GNU/Linux. [RT #118055]
456
457 =item *
458
459 The debugger's C<man> command been fixed. It was broken in the v5.18.0
460 release. The C<man> command is aliased to the names C<doc> and C<perldoc> -
461 all now work again.
462
463 =back
464
465 =head1 Known Problems
466
467 XXX Descriptions of platform agnostic bugs we know we can't fix go here.  Any
468 tests that had to be C<TODO>ed for the release would be noted here.  Unfixed
469 platform specific bugs also go here.
470
471 [ List each fix as a =item entry ]
472
473 =over 4
474
475 =item *
476
477 XXX
478
479 =back
480
481 =head1 Obituary
482
483 XXX If any significant core contributor has died, we've added a short obituary
484 here.
485
486 =head1 Acknowledgements
487
488 XXX Generate this with:
489
490   perl Porting/acknowledgements.pl v5.19.1..HEAD
491
492 =head1 Reporting Bugs
493
494 If you find what you think is a bug, you might check the articles recently
495 posted to the comp.lang.perl.misc newsgroup and the perl bug database at
496 http://rt.perl.org/perlbug/ .  There may also be information at
497 http://www.perl.org/ , the Perl Home Page.
498
499 If you believe you have an unreported bug, please run the L<perlbug> program
500 included with your release.  Be sure to trim your bug down to a tiny but
501 sufficient test case.  Your bug report, along with the output of C<perl -V>,
502 will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
503
504 If the bug you are reporting has security implications, which make it
505 inappropriate to send to a publicly archived mailing list, then please send it
506 to perl5-security-report@perl.org.  This points to a closed subscription
507 unarchived mailing list, which includes all the core committers, who will be
508 able to help assess the impact of issues, figure out a resolution, and help
509 co-ordinate the release of patches to mitigate or fix the problem across all
510 platforms on which Perl is supported.  Please only use this address for
511 security issues in the Perl core, not for modules independently distributed on
512 CPAN.
513
514 =head1 SEE ALSO
515
516 The F<Changes> file for an explanation of how to view exhaustive details on
517 what changed.
518
519 The F<INSTALL> file for how to build Perl.
520
521 The F<README> file for general stuff.
522
523 The F<Artistic> and F<Copying> files for copyright information.
524
525 =cut