NAME

DDLock::Client - Client library for distributed lock daemon

SYNOPSIS

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;

DESCRIPTION

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.

EXPORTS

Nothing.

MAINTAINER

Jonathan Steinert <hachi@cpan.org>

AUTHOR

Brad Fitzpatrick <brad@danga.com>

Copyright (c) 2004 Danga Interactive, Inc.