In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/883f220b1a9552b53f705c439a73a5c235feaedc?hp=dd25c352db6f2a0adb8324232f6ccfd456d603e9>
- Log ----------------------------------------------------------------- commit 883f220b1a9552b53f705c439a73a5c235feaedc Author: Tony Cook <[email protected]> Date: Tue Aug 5 15:18:25 2014 +1000 [perl #121404] tied hashes are different ----------------------------------------------------------------------- Summary of changes: pod/perlfunc.pod | 11 +++++++++-- pod/perlsec.pod | 3 +++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index 173615b..b93bb32 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -1683,6 +1683,9 @@ returned by C<each()>, so the following code works properly: delete $hash{$key}; # This is safe } +Tied hashes may have a different ordering behaviour to perl's hash +implementation. + This prints out your environment like the printenv(1) program, but in a different order: @@ -3155,7 +3158,9 @@ rely on C<keys>, C<values> and C<each> to repeatedly return the same order as each other. See L<perlsec/"Algorithmic Complexity Attacks"> for details on why hash order is randomized. Aside from the guarantees provided here the exact details of Perl's hash algorithm and the hash -traversal order are subject to change in any release of Perl. +traversal order are subject to change in any release of Perl. Tied hashes +may behave differently to Perl's hashes with respect to changes in order on +insertion and deletion of items. As a side effect, calling keys() resets the internal iterator of the HASH or ARRAY (see L</each>). In particular, calling keys() in void context resets @@ -8747,7 +8752,9 @@ rely on C<keys>, C<values> and C<each> to repeatedly return the same order as each other. See L<perlsec/"Algorithmic Complexity Attacks"> for details on why hash order is randomized. Aside from the guarantees provided here the exact details of Perl's hash algorithm and the hash -traversal order are subject to change in any release of Perl. +traversal order are subject to change in any release of Perl. Tied hashes +may behave differently to Perl's hashes with respect to changes in order on +insertion and deletion of items. As a side effect, calling values() resets the HASH or ARRAY's internal iterator, see L</each>. (In particular, calling values() in void context diff --git a/pod/perlsec.pod b/pod/perlsec.pod index 703bd46..b6474e6 100644 --- a/pod/perlsec.pod +++ b/pod/perlsec.pod @@ -534,6 +534,9 @@ or the CPAN module C<Algorithm::Numerical::Shuffle>), or for generating permutations (use e.g. the CPAN modules C<Algorithm::Permute> or C<Algorithm::FastPermute>), or for any cryptographic applications. +Tied hashes may have their own ordering and algorithmic complexity +attacks. + =item * Regular expressions - Perl's regular expression engine is so called NFA -- Perl5 Master Repository
