ЭЛЕКТРОННАЯ БИБЛИОТЕКА КОАПП |
Сборники Художественной, Технической, Справочной, Английской, Нормативной, Исторической, и др. литературы. |
7.2.72 Tie::Hash, Tie::StdHash - Base Class Definitions for Tied Hashespackage NewHash; require Tie::Hash; @ISA = (Tie::Hash); sub DELETE { ... } # Provides additional method sub CLEAR { ... } # Overrides inherited method package NewStdHash; require Tie::Hash; @ISA = (Tie::StdHash); sub DELETE { ... } package main; tie %new_hash, "NewHash"; tie %new_std_hash, "NewStdHash"; This module provides some skeletal methods for hash-tying classes. (See
Chapter 5 for a list of the functions required in order to tie a hash to
a package.) The basic Tie::Hash package provides a For developers wishing to write their own tied hashes, the required methods are briefly defined below. (Chapter 5 not only documents these methods, but also has sample code.)
Chapter 5 includes a method called 7.2.72.1 See alsoThe library modules relating to various DBM-related implementations (DB_File, GDBM_File, NDBM_File, ODBM_File, and SDBM_File) show examples of general tied hashes, as does the Config module. While these modules do not utilize Tie::Hash, they serve as good working examples. |