Tatsuhiko Miyagawa > Data-YUID-0.03 > Data::YUID::Client

Download:
Data-YUID-0.03.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  1
View/Report Bugs
Source   Latest Release: Data-YUID-0.06

NAME ^

Data::YUID::Client - Client for distributed YUID generation

SYNOPSIS ^

    use Data::YUID::Client;
    my $client = Data::YUID::Client->new(
            servers => [
                '192.168.100.4:11001',
                '192.168.100.5:11001',
            ],
        );
    my $id = $client->get_id;

DESCRIPTION ^

Data::YUID::Client is a client for the client/server protocol used to generate distributed unique IDs. bin/yuidd implements the server portion of the protocol.

USAGE ^

Data::YUID::Client->new(%param)

Creates a new client object, initialized with %param, and returns the new object.

%param can contain:

$client->get_id([ $namespace ])

Obtains a unique ID from one of the servers, in the optional namespace $namespace.

Returns undef if it can't get an ID from any server.

AUTHOR & COPYRIGHT ^

Please see the Data::YUID manpage for author, copyright, and license information.

syntax highlighting: