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