home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam    

Book HomeJava and XSLTSearch this book

8.218. Tie::Hash

Provides skeletal methods for hash-tying classes. Tie::Hash provides a new method, as well as the methods TIEHASH, EXISTS, and CLEAR. The new method is provided as backup in case a class has no TIEHASH method.

To write your own tied hashes, the methods listed here are required. See the perltie manpage for more detailed information and for examples.

TIEHASH

TIEHASH ClassName, list

Constructor. Associates a new hash instance with class ClassName. listis a list of additional arguments needed to complete the association.

tie %hash, ClassName, list
CLEAR

CLEAR this

Clears all values from tied hash this.

DELETE

DELETE this, key

Deletes key from tied hash this.

EXISTS

EXISTS this, key

Verifies that key exists for tied hash this.

FETCH

FETCH this, key

Retrieves value associated with key for tied hash this.

FIRSTKEY

FIRSTKEY this

Returns key/value pair for the first key in tied hash this.

NEXTKEY

NEXTKEY this, lastkey

Returns next key/value pair after lastkeyfor tied hash this.

STORE

STORE this, key, value

Stores value into tied hash this with key key.



Library Navigation Links

Copyright © 2002 O'Reilly & Associates. All rights reserved.











??????????????@Mail.ru