DDLock::Client - Client library for distributed lock daemon
use DDLock::Client (); my $cl = DDLock::Client->new( servers => ['locks.localnet:7004', 'locks2.localnet:7002', 'localhost'] ); # Do something that requires locking if ( my $lock = $cl->trylock("foo") ) { ...do some 'foo'-synchronized stuff... } else { die "Failed to lock 'foo': $!"; } # You can either just let $lock go out of scope or explicitly release it: $lock->release;
This is a client library for ddlockd, a distributed lock daemon not entirely unlike a very simplified version of the CPAN module IPC::Locker.
This can be used as a drop in replacment for the unreleased DDLockClient class that some of us in the world may be using. Simply replace the class name.
Nothing.
Jonathan Steinert <hachi@cpan.org>
Brad Fitzpatrick <brad@danga.com>
Copyright (c) 2004 Danga Interactive, Inc.
To install DDLock::Client, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DDLock::Client
CPAN shell
perl -MCPAN -e shell install DDLock::Client
For more information on module installation, please visit the detailed CPAN module installation guide.