diff options
Diffstat (limited to 'pod/perltie.pod')
-rw-r--r-- | pod/perltie.pod | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/pod/perltie.pod b/pod/perltie.pod index 13135c4ad5..dfc6894172 100644 --- a/pod/perltie.pod +++ b/pod/perltie.pod @@ -293,19 +293,18 @@ the following output demonstrates: =head2 Tying Hashes -As the first Perl data type to be tied (see dbmopen()), associative arrays -have the most complete and useful tie() implementation. A class -implementing a tied associative array should define the following -methods: TIEHASH is the constructor. FETCH and STORE access the key and -value pairs. EXISTS reports whether a key is present in the hash, and -DELETE deletes one. CLEAR empties the hash by deleting all the key and -value pairs. FIRSTKEY and NEXTKEY implement the keys() and each() -functions to iterate over all the keys. And DESTROY is called when the -tied variable is garbage collected. - -If this seems like a lot, then feel free to inherit from -merely the standard Tie::Hash module for most of your methods, redefining only -the interesting ones. See L<Tie::Hash> for details. +As the first Perl data type to be tied (see dbmopen()), hashes have the +most complete and useful tie() implementation. A class implementing a +tied hash should define the following methods: TIEHASH is the constructor. +FETCH and STORE access the key and value pairs. EXISTS reports whether a +key is present in the hash, and DELETE deletes one. CLEAR empties the +hash by deleting all the key and value pairs. FIRSTKEY and NEXTKEY +implement the keys() and each() functions to iterate over all the keys. +And DESTROY is called when the tied variable is garbage collected. + +If this seems like a lot, then feel free to inherit from merely the +standard Tie::Hash module for most of your methods, redefining only the +interesting ones. See L<Tie::Hash> for details. Remember that Perl distinguishes between a key not existing in the hash, and the key existing in the hash but having a corresponding value of |