diff options
-rw-r--r-- | lib/Tie/Hash.pm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Tie/Hash.pm b/lib/Tie/Hash.pm index 397272bece..c28e828d57 100644 --- a/lib/Tie/Hash.pm +++ b/lib/Tie/Hash.pm @@ -24,7 +24,7 @@ Tie::Hash, Tie::StdHash, Tie::ExtraHash - base class definitions for tied hashes # All methods provided by default, define only those needing overrides # Accessors access the storage in %{$_[0]}; - # TIEHANDLE should return a reference to the actual storage + # TIEHASH should return a reference to the actual storage sub DELETE { ... } package NewExtraHash; @@ -34,7 +34,7 @@ Tie::Hash, Tie::StdHash, Tie::ExtraHash - base class definitions for tied hashes # All methods provided by default, define only those needing overrides # Accessors access the storage in %{$_[0][0]}; - # TIEHANDLE should return an array reference with the first element being + # TIEHASH should return an array reference with the first element being # the reference to the actual storage sub DELETE { $_[0][1]->('del', $_[0][0], $_[1]); # Call the report writer @@ -110,7 +110,7 @@ Clear all values from the tied hash I<this>. The accessor methods assume that the actual storage for the data in the tied hash is in the hash referenced by C<tied(%tiedhash)>. Thus overwritten -C<TIEHANDLE> method should return a hash reference, and the remaining methods +C<TIEHASH> method should return a hash reference, and the remaining methods should operate on the hash referenced by the first argument: package ReportHash; @@ -131,7 +131,7 @@ should operate on the hash referenced by the first argument: The accessor methods assume that the actual storage for the data in the tied hash is in the hash referenced by C<(tied(%tiedhash))[0]>. Thus overwritten -C<TIEHANDLE> method should return an array reference with the first +C<TIEHASH> method should return an array reference with the first element being a hash reference, and the remaining methods should operate on the hash C<< %{ $_[0]->[0] } >>: @@ -149,7 +149,7 @@ hash C<< %{ $_[0]->[0] } >>: $_[0][0]{$_[1]} = $_[2] } -The default C<TIEHANDLE> method stores "extra" arguments to tie() starting +The default C<TIEHASH> method stores "extra" arguments to tie() starting from offset 1 in the array referenced by C<tied(%tiedhash)>; this is the same storage algorithm as in TIEHASH subroutine above. Hence, a typical package inheriting from B<Tie::ExtraHash> does not need to overwrite this |