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