Tie::Dict - tie a hash to an RPC dict server


perlrpcgen documentation  | view source Contained in the perlrpcgen distribution.

Index


NAME

Top

Tie::Dict - tie a hash to an RPC dict server

SYNOPSIS

Top

    use Tie::Dict;

    tie %hash, Tie::Dict, $server, $dictionary;

    $hash{'this'} = 'that';
    $this = $hash{'this'};
    delete $hash{'this'};

    untie %foo;

DESCRIPTION

Top

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.

SEE ALSO

Top

Tie::Hash(3), Dict.pl(1)

AUTHOR

Top

Jake Donham <jake@organic.com>

THANKS

Top

Thanks to Organic Online <http://www.organic.com/> for letting me hack at work.

BUGS

Top

The full tied hash interface is not implemented.


perlrpcgen documentation  | view source Contained in the perlrpcgen distribution.