Tie::Dict - tie a hash to an RPC dict server
use Tie::Dict; tie %hash, Tie::Dict, $server, $dictionary; $hash{'this'} = 'that'; $this = $hash{'this'}; delete $hash{'this'}; untie %foo;
Tie::Dict is a module which allows Perl programs to tie a hash to an RPC server running the 'dict' service. This allows several processes (on the same machine or different machines) to share a dictionary without worrying about concurrency (RPC calls are serialized on the server).
The arguments to the tie call are the hostname of the server and the dictionary to tie to. If the tie fails for some reason (e.g. the server is down, the dictionary couldn't be opened, etc.), an exception is raised.
In the default implementation of the 'dict' service, the dictionary is the filename of an underlying DB_File. Other implementations could map names differently.
Tie::Hash(3), Dict.pl(1)
Jake Donham <jake@organic.com>
Thanks to Organic Online <http://www.organic.com/> for letting me hack at work.
The full tied hash interface is not implemented.
To install RPC::ONC, copy and paste the appropriate command in to your terminal.
cpanm
cpanm RPC::ONC
CPAN shell
perl -MCPAN -e shell install RPC::ONC
For more information on module installation, please visit the detailed CPAN module installation guide.