DR::Tnt::Client::AE - AnyEvent (async) driver for tarantool
use DR::Tnt; my $tnt = tarantool host => $host, port => $port, user => $user, password => $password, lua_dir => $lua_dir, hashify_tuples => 1, driver => 'async' ; # the same use DR::Tnt::Client::AE; my $tnt = DR::Tnt::Client::AE->new( host => $host, port => $port, user => $user, password => $password, lua_dir => $lua_dir, hashify_tuples => 1, driver => 'async' ); $tnt->ping(sub { my $res = shift; if ($res) { say "ping ok"; } else { say "can not ping: %s: %s", @{ $tnt->last_error }; } }); $tnt->select($space, 'index', 'key', sub { my ($list) = @_; if ($list) { } else { say "can not select: %s: %s", @{ $tnt->last_error }; } });
To install DR::Tnt, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DR::Tnt
CPAN shell
perl -MCPAN -e shell install DR::Tnt
For more information on module installation, please visit the detailed CPAN module installation guide.