This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
b25ad8d94fe07bfe2e6767888aba25bfde722aa3
[perl5.git] / pod / perldelta.pod
1 =encoding utf8
2
3 =for todo
4 ba593ad davem    clone() wasn't cloning the whole stack
5 7dc8663 demerphq Hash Function Change - Murmur hash and true per process...
6
7 =head1 NAME
8
9 [ this is a template for a new perldelta file.  Any text flagged as XXX needs
10 to be processed before release. ]
11
12 perldelta - what is new for perl v5.17.6
13
14 =head1 DESCRIPTION
15
16 This document describes differences between the 5.17.5 release and the 5.17.6
17 release.
18
19 If you are upgrading from an earlier release such as 5.17.4, first read
20 L<perl5175delta>, which describes differences between 5.17.4 and 5.17.5.
21
22 =head1 Notice
23
24 XXX Any important notices here
25
26 =head1 Core Enhancements
27
28 XXX New core language features go here.  Summarize user-visible core language
29 enhancements.  Particularly prominent performance optimisations could go
30 here, but most should go in the L</Performance Enhancements> section.
31
32 [ List each enhancement as a =head2 entry ]
33
34 =head2 Character name aliases may now include non-Latin1-range characters
35
36 It is possible to define your own names for characters for use in
37 C<\N{...}>, C<charnames::vianame()>, etc.  These names can now be
38 comprised of characters from the whole Unicode range.  This allows for
39 names to be in your native language, and not just English.  Certain
40 restrictions apply to the characters that may be used (you can't define
41 a name that has punctuation in it, for example).  See L<charnames/CUSTOM
42 ALIASES>.
43
44 =head2 New hash function Murmurhash-32 (v3)
45
46 We have switched perls hash function to use Murmurhash-32 and added build
47 support for several other hash functions. This new function is expected to
48 performance equivalent for shorter strings and is faster, potentially
49 twice as fast, for hashing longer strings.
50
51 =head1 Security
52
53 XXX Any security-related notices go here.  In particular, any security
54 vulnerabilities closed should be noted here rather than in the
55 L</Selected Bug Fixes> section.
56
57 [ List each security issue as a =head2 entry ]
58
59 =head1 Incompatible Changes
60
61 XXX For a release on a stable branch, this section aspires to be:
62
63     There are no changes intentionally incompatible with 5.XXX.XXX
64     If any exist, they are bugs, and we request that you submit a
65     report.  See L</Reporting Bugs> below.
66
67 [ List each incompatible change as a =head2 entry ]
68
69 =head2 An unknown character name in C<\N{...}> is now a syntax error
70
71 Previously, it warned, and the Unicode REPLACEMENT CHARACTER was
72 substituted.  Unicode now recommends that this situation be a syntax
73 error.  Also, the previous behavior led to some confusing warnings and
74 behaviors, and since the REPLACEMENT CHARACTER has no use other than as
75 a stand-in for some unknown character, any code that has this problem is
76 buggy.
77
78 =head2 Formerly deprecated characters in C<\N{}> character name aliases are now errors.
79
80 Since v5.12.0, it has been deprecated to use certain characters in
81 user-defined C<\N{...}> character names.  These now cause a syntax
82 error.  For example, it is now an error to begin a name with a digit,
83 such as in
84
85  my $undraftable = "\N{4F}";    # Syntax error!
86
87 or to have commas anywhere in the name.  See L<charnames/CUSTOM ALIASES>
88
89 =head2 Per process hash randomization
90
91 The seed used by perls hash function is now random. This means that the
92 order which keys/values will be returned from functions like keys(),
93 values(), and each() will differ from run to run.
94
95 This change was introduced to make perls hashes more robust to algorithmic
96 complexity attacks and also because we discovered that it exposes hash
97 ordering dependency bugs and make them easier to track down.
98
99 =head1 Deprecations
100
101 XXX Any deprecated features, syntax, modules etc. should be listed here.  In
102 particular, deprecated modules should be listed here even if they are listed as
103 an updated module in the L</Modules and Pragmata> section.
104
105 [ List each deprecation as a =head2 entry ]
106
107 =head1 Performance Enhancements
108
109 XXX Changes which enhance performance without changing behaviour go here.
110 There may well be none in a stable release.
111
112 [ List each enhancement as a =item entry ]
113
114 =over 4
115
116 =item *
117
118 Lists of lexical variable declarations (C<my($x, $y)>) are now optimised
119 down to a single op, and are hence faster than before.
120
121 =item *
122
123 A new C preprocessor define NO_TAINT_SUPPORT was added that, if set, disables
124 Perl's taint support altogether. Using the -T or -t command line flags will
125 cause a fatal error. Beware that both core tests as well as many a CPAN
126 distribution's tests will fail with this change. On the upside, it provides
127 a small performance benefit due to reduced branching.
128 Do not enable this unless you know exactly what you are getting yourself into.
129
130 =back
131
132 =head1 Modules and Pragmata
133
134 XXX All changes to installed files in F<cpan/>, F<dist/>, F<ext/> and F<lib/>
135 go here.  If Module::CoreList is updated, generate an initial draft of the
136 following sections using F<Porting/corelist-perldelta.pl>, which prints stub
137 entries to STDOUT.  Results can be pasted in place of the '=head2' entries
138 below.  A paragraph summary for important changes should then be added by hand.
139 In an ideal world, dual-life modules would have a F<Changes> file that could be
140 cribbed.
141
142 [ Within each section, list entries as a =item entry ]
143
144 =head2 New Modules and Pragmata
145
146 =over 4
147
148 =item *
149
150 XXX
151
152 =back
153
154 =head2 Updated Modules and Pragmata
155
156 =over 4
157
158 =item *
159
160 L<Carp> has been upgraded from version 1.27 to 1.28.
161
162 Carp is no longer confused when C<caller> returns undef for a package that
163 has been deleted.
164
165 =item *
166
167 L<CPAN> has been upgraded from version 1.98 to 1.99_51.
168
169 =item *
170
171 L<DynaLoader> has been upgraded from version 1.16 to 1.17.
172
173 =item *
174
175 L<Env> has been upgraded from version 1.03 to 1.04.
176
177 Its SPLICE implementation no longer misbehaves in list context.
178
179 =item *
180
181 L<Tie::Hash::NamedCapture> has been upgraded from version 0.08 to 0.09.
182
183 =back
184
185 =head2 Removed Modules and Pragmata
186
187 =over 4
188
189 =item *
190
191 XXX
192
193 =back
194
195 =head1 Documentation
196
197 XXX Changes to files in F<pod/> go here.  Consider grouping entries by
198 file and be sure to link to the appropriate page, e.g. L<perlfunc>.
199
200 =head2 New Documentation
201
202 XXX Changes which create B<new> files in F<pod/> go here.
203
204 =head3 L<XXX>
205
206 XXX Description of the purpose of the new file here
207
208 =head2 Changes to Existing Documentation
209
210 XXX Changes which significantly change existing files in F<pod/> go here.
211 However, any changes to F<pod/perldiag.pod> should go in the L</Diagnostics>
212 section.
213
214 =head3 L<perlref>
215
216 =over 4
217
218 =item *
219
220 C<*foo{NAME}> and C<*foo{PACKAGE}>, which have existed since perl 5.005,
221 are now documented.
222
223 =back
224
225 =head1 Diagnostics
226
227 The following additions or changes have been made to diagnostic output,
228 including warnings and fatal error messages.  For the complete list of
229 diagnostic messages, see L<perldiag>.
230
231 XXX New or changed warnings emitted by the core's C<C> code go here.  Also
232 include any changes in L<perldiag> that reconcile it to the C<C> code.
233
234 =head2 New Diagnostics
235
236 XXX Newly added diagnostic messages go under here, separated into New Errors
237 and New Warnings
238
239 =head3 New Errors
240
241 =over 4
242
243 =item *
244
245 XXX L<message|perldiag/"message">
246
247 =back
248
249 =head3 New Warnings
250
251 =over 4
252
253 =item *
254
255 XXX L<message|perldiag/"message">
256
257 =back
258
259 =head2 Changes to Existing Diagnostics
260
261 XXX Changes (i.e. rewording) of diagnostic messages go here
262
263 =over 4
264
265 =item *
266
267 XXX Describe change here
268
269 =back
270
271 =head1 Utility Changes
272
273 XXX Changes to installed programs such as F<perlbug> and F<xsubpp> go here.
274 Most of these are built within the directories F<utils> and F<x2p>.
275
276 [ List utility changes as a =head3 entry for each utility and =item
277 entries for each change
278 Use L<XXX> with program names to get proper documentation linking. ]
279
280 =head3 L<XXX>
281
282 =over 4
283
284 =item *
285
286 XXX
287
288 =back
289
290 =head1 Configuration and Compilation
291
292 XXX Changes to F<Configure>, F<installperl>, F<installman>, and analogous tools
293 go here.  Any other changes to the Perl build process should be listed here.
294 However, any platform-specific changes should be listed in the
295 L</Platform Support> section, instead.
296
297 [ List changes as a =item entry ].
298
299 =over 4
300
301 =item *
302
303 XXX
304
305 =back
306
307 =head1 Testing
308
309 XXX Any significant changes to the testing of a freshly built perl should be
310 listed here.  Changes which create B<new> files in F<t/> go here as do any
311 large changes to the testing harness (e.g. when parallel testing was added).
312 Changes to existing files in F<t/> aren't worth summarizing, although the bugs
313 that they represent may be covered elsewhere.
314
315 [ List each test improvement as a =item entry ]
316
317 =over 4
318
319 =item *
320
321 XXX
322
323 =back
324
325 =head1 Platform Support
326
327 XXX Any changes to platform support should be listed in the sections below.
328
329 [ Within the sections, list each platform as a =item entry with specific
330 changes as paragraphs below it. ]
331
332 =head2 New Platforms
333
334 XXX List any platforms that this version of perl compiles on, that previous
335 versions did not.  These will either be enabled by new files in the F<hints/>
336 directories, or new subdirectories and F<README> files at the top level of the
337 source tree.
338
339 =over 4
340
341 =item XXX-some-platform
342
343 XXX
344
345 =back
346
347 =head2 Discontinued Platforms
348
349 =over 4
350
351 =item EPOC
352
353 Support code relating to EPOC has been removed.  EPOC was a family of
354 operating systems developed by Psion for mobile devices.  It was the
355 predecessor of Symbian.  The port was last updated in April 2002.
356
357 =back
358
359 =head2 Platform-Specific Notes
360
361 XXX List any changes for specific platforms.  This could include configuration
362 and compilation changes or changes in portability/compatibility.  However,
363 changes within modules for platforms should generally be listed in the
364 L</Modules and Pragmata> section.
365
366 =over 4
367
368 =item XXX-some-platform
369
370 XXX
371
372 =back
373
374 =head1 Internal Changes
375
376 XXX Changes which affect the interface available to C<XS> code go here.  Other
377 significant internal changes for future core maintainers should be noted as
378 well.
379
380 [ List each change as a =item entry ]
381
382 =over 4
383
384 =item *
385
386 The private Perl_croak_no_modify has had its context parameter removed. It is
387 now has a void prototype. Users of the public API croak_no_modify remain
388 unaffected.
389
390 =item *
391
392 Copy-on-write (shared hash key) scalars are no longer marked read-only.
393 C<SvREADONLY> returns false on such an SV, but C<SvIsCOW> still returns
394 true.
395
396 =item *
397
398 A new op type, C<OP_PADRANGE> has been introduced. The perl peephole
399 optimiser will, where possible, substitute a single padrange op for a
400 pushmark followed by one or more pad ops, and possibly also skipping list
401 and nextstate ops. In addition, the op can carry out the tasks associated
402 with the RHS of a my(...) = @_ assignment, so those ops may be optimised
403 away too.
404
405 =back
406
407 =head1 Selected Bug Fixes
408
409 XXX Important bug fixes in the core language are summarized here.  Bug fixes in
410 files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>.
411
412 [ List each fix as a =item entry ]
413
414 =over 4
415
416 =item *
417
418 Uninitialized warnings mentioning hash elements would only mention the
419 element name if it was not in the first bucket of the hash, due to an
420 off-by-one error.
421
422 =item *
423
424 A regular expression optimizer bug could cause multiline "^" to behave
425 incorrectly in the presence of line breaks, such that
426 C<"/\n\n" =~ m#\A(?:^/$)#im> would not match [perl #115242].
427
428 =item *
429
430 Failed C<fork> in list context no longer currupts the stack.
431 C<@a = (1, 2, fork, 3)> used to gobble up the 2 and assign C<(1, undef, 3)>
432 if the C<fork> call failed.
433
434 =item *
435
436 Numerous memory leaks have been fixed, mostly involving tied variables that
437 die, regular expression character classes and code blocks, and syntax
438 errors.
439
440 =item *
441
442 Assigning a regular expression (C<${qr//}>) to a variable that happens to
443 hold a floating point number no longer causes assertion failures on
444 debugging builds.
445
446 =item *
447
448 Assigning a regular expression to a scalar containing a number no longer
449 causes subsequent nummification to produce random numbers.
450
451 =item *
452
453 Assigning a regular expression to a magic variable no longer wipes away the
454 magic.  This is a regression from 5.10.
455
456 =item *
457
458 Assigning a regular expression to a blessed scalar no longer results in
459 crashes.  This is also a regression from 5.10.
460
461 =item *
462
463 Regular expression can now be assigned to tied hash and array elements with
464 flattening into strings.
465
466 =item *
467
468 Nummifying a regular expression no longer results in an uninitialized
469 warning.
470
471 =item *
472
473 Negative array indices no longer cause EXISTS methods of tied variables to
474 be ignored.  This is a regression from 5.12.
475
476 =item *
477
478 Negative array indices no longer result in crashes on arrays tied to
479 non-objects.
480
481 =item *
482
483 C<$x = "(?{})"; /a++(?{})+$x/x> no longer erroneous produces an error (just
484 a warning, as expected).  This was broken in 5.17.1.
485
486 =item *
487
488 C<$byte_overload .= $utf8> no longer results in doubly-encoded UTF8 if the
489 left-hand scalar happened to have produced a UTF8 string the last time
490 overloading was invoked.
491
492 =item *
493
494 C<goto &sub> now uses the current value of @_, instead of using the array
495 the subroutine was originally called with.  This means
496 C<local @_ = (...); goto &sub> now works [perl #43077].
497
498 =item *
499
500 If a debugger is invoked recursively, it no longer stomps on its own
501 lexical variables.  Formerly under recursion all calls would share the same
502 set of lexical variables [perl #115742].
503
504 =item *
505
506 C<*_{ARRAY}> returned from a subroutine no longer spontaneously
507 becomes empty.
508
509 =back
510
511 =head1 Known Problems
512
513 XXX Descriptions of platform agnostic bugs we know we can't fix go here.  Any
514 tests that had to be C<TODO>ed for the release would be noted here.  Unfixed
515 platform specific bugs also go here.
516
517 [ List each fix as a =item entry ]
518
519 =over 4
520
521 =item *
522
523 XXX
524
525 =back
526
527 =head1 Obituary
528
529 XXX If any significant core contributor has died, we've added a short obituary
530 here.
531
532 =head1 Acknowledgements
533
534 XXX Generate this with:
535
536   perl Porting/acknowledgements.pl v5.17.5..HEAD
537
538 =head1 Reporting Bugs
539
540 If you find what you think is a bug, you might check the articles recently
541 posted to the comp.lang.perl.misc newsgroup and the perl bug database at
542 http://rt.perl.org/perlbug/ .  There may also be information at
543 http://www.perl.org/ , the Perl Home Page.
544
545 If you believe you have an unreported bug, please run the L<perlbug> program
546 included with your release.  Be sure to trim your bug down to a tiny but
547 sufficient test case.  Your bug report, along with the output of C<perl -V>,
548 will be sent off to perlbug@perl.org to be analysed by the Perl porting team.
549
550 If the bug you are reporting has security implications, which make it
551 inappropriate to send to a publicly archived mailing list, then please send it
552 to perl5-security-report@perl.org.  This points to a closed subscription
553 unarchived mailing list, which includes all the core committers, who will be
554 able to help assess the impact of issues, figure out a resolution, and help
555 co-ordinate the release of patches to mitigate or fix the problem across all
556 platforms on which Perl is supported.  Please only use this address for
557 security issues in the Perl core, not for modules independently distributed on
558 CPAN.
559
560 =head1 SEE ALSO
561
562 The F<Changes> file for an explanation of how to view exhaustive details on
563 what changed.
564
565 The F<INSTALL> file for how to build Perl.
566
567 The F<README> file for general stuff.
568
569 The F<Artistic> and F<Copying> files for copyright information.
570
571 =cut