```{index} single: hash_traversal_mask; Hash::Util function ``` ```{index} single: Hash::Util::hash_traversal_mask; Perl function ``` # hash_traversal_mask Read or set the per-hash bucket-traversal mask used by `keys`, `values`, and `each`. ## Synopsis my $mask = hash_traversal_mask(%hash); hash_traversal_mask(%hash, 1234); Every hash carries a `U32` mask that is XOR'd with each bucket index during iteration, so two hashes with the same contents still visit their keys in different orders. Called with one argument, the function returns the current mask. Called with two, it sets the mask — pinning the iteration order of that particular hash for reproducible test output. Pinning the mask does not make two *different* hashes iterate identically: keys that collide into the same bucket may still appear in different orders because chain order depends on insertion history. Currently returns `0` in pperl and ignores any set value; the pperl hash table does not expose a per-hash traversal mask.