summaryrefslogtreecommitdiff
path: root/pod
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-07-18 10:26:31 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-07-18 10:26:31 +0000
commit8d4a1e6ca30520db246b5fce3fe5bd367590922f (patch)
tree708f1b14cd14ee8ceaa726847427189db794ee61 /pod
parentd760c846dd64642dd0b62a13fbbc003a481c1224 (diff)
downloadperl-8d4a1e6ca30520db246b5fce3fe5bd367590922f.tar.gz
Clarifications on the hash seed
p4raw-id: //depot/perl@31624
Diffstat (limited to 'pod')
-rw-r--r--pod/perlrun.pod11
1 files changed, 7 insertions, 4 deletions
diff --git a/pod/perlrun.pod b/pod/perlrun.pod
index 246d5b3f43..73850f3619 100644
--- a/pod/perlrun.pod
+++ b/pod/perlrun.pod
@@ -1261,8 +1261,13 @@ X<PERL_HASH_SEED>
(Since Perl 5.8.1.) Used to randomise Perl's internal hash function.
To emulate the pre-5.8.1 behaviour, set to an integer (zero means
exactly the same order as 5.8.0). "Pre-5.8.1" means, among other
-things, that hash keys will be ordered the same between different runs
-of Perl.
+things, that hash keys not always be ordered the same between different
+runs of Perl.
+
+Most hashes return elements in the same order as Perl 5.8.0 by default.
+On a hash by hash basis, if pathological data is detected during a hash
+key insertion, then that hash will switch to an alternative random hash
+seed.
The default behaviour is to randomise unless the PERL_HASH_SEED is set.
If Perl has been compiled with C<-DUSE_HASH_SEED_EXPLICIT>, the default
@@ -1270,8 +1275,6 @@ behaviour is B<not> to randomise unless the PERL_HASH_SEED is set.
If PERL_HASH_SEED is unset or set to a non-numeric string, Perl uses
the pseudorandom seed supplied by the operating system and libraries.
-This means that each different run of Perl will have a different
-ordering of the results of keys(), values(), and each().
B<Please note that the hash seed is sensitive information>. Hashes are
randomized to protect against local and remote attacks against Perl