This function binds a variable to a package that will provide the implementation for the variable. VARIABLE is the name of the variable to be enchanted. PACKAGENAME is the name of a package implementing objects of correct type. Any additional arguments are passed to the "new" method of the package (meaning TIESCALAR, TIEARRAY, or TIEHASH). Typically these are arguments such as might be passed to the dbm_open() function of C.
Note that functions such as keys() and values() may return huge array values when used on large objects, like DBM files. You may prefer to use the each() function to iterate over such. Example:
A package implementing an associative array should have the following methods:
A package implementing an ordinary array should have the following methods:
A package implementing a scalar should have the following methods: