Next | The Perl Hardware Store | DC.pm Version | 16 |
Perl's tie feature creates a magical variable
tie %magical => 'Package', args...;
This makes a call to Package::TIEHASH
Package->TIEHASH(args...);
Package::TIEHASH must construct an object, say $o
$o and %magical are now associated
Attempts to read or modify %magical turn into method calls on $o
... = $magical{$key} $magical{$key} = ...; $o->FETCH($key) $o->STORE($key, ...)
This is how the various DBM modules work
Next | Copyright © 2003 M. J. Dominus |