X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlsec.pod;h=41f96691aca4905d665c752766fa6d87f27ebaed;hb=14bb0a9a08468b34d6bd39a990c2bd5d097cab1f;hp=ecd9bbc4bc1648b6acce119ae5d29d71947ed977;hpb=f66d27219d38f673658dece7f9afd3498a458e6d;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perlsec.pod b/pod/perlsec.pod index ecd9bbc..41f9669 100644 --- a/pod/perlsec.pod +++ b/pod/perlsec.pod @@ -404,14 +404,18 @@ into account. In Perls before 5.8.1 one could rather easily generate data that as hash keys would cause Perl to consume large amounts of time because -internal structure of hashes would badly degenerate. In Perl 5.8.1 it -is possible to randomly perturb the hash function by a pseudorandom -seed which makes generating such naughty hash keys harder. See -L for more information. - -Perturbing the hash ordering affects for example modules like -Data::Dumper: if one is dumping hashes, the outputs of two different -runs are no more identical. +internal structure of hashes would badly degenerate. In Perl 5.8.1 +the hash function is randomly perturbed by a pseudorandom seed which +makes generating such naughty hash keys harder. +See L for more information. + +The random perturbation is done by default but if one wants for some +reason emulate the old behaviour one can set the environment variable +PERL_HASH_SEED to zero (or any other integer). One possible reason +for wanting to emulate the old behaviour is that in the new behaviour +consecutive runs of Perl will order hash keys differently, which may +confuse some applications (like Data::Dumper: the outputs of two +different runs are no more identical). B, and the ordering has already changed several times during the lifetime of