Cache-KyotoTycoon
view release on metacpan or search on metacpan
# NAME
Cache::KyotoTycoon - KyotoTycoon client library
# SYNOPSIS
use Cache::KyotoTycoon;
my $kt = Cache::KyotoTycoon->new(host => '127.0.0.1', port => 1978);
$kt->set('foo' => bar');
$kt->get('foo'); # => 'bar'
# DESCRIPTION
KyotoTycoon.pm is [KyotoTycoon](http://fallabs.com/kyototycoon/) client library for Perl5.
**THIS MODULE IS IN ITS BETA QUALITY. THE API MAY CHANGE IN THE FUTURE**.
# ERROR HANDLING POLICY
This module throws exception if got **Server Error**.
# CONSTRUCTOR OPTIONS
- `timeout`
Timeout value for each request in seconds.
_Default_: 1 second
- `host`
Host name of server machine.
_Default_: '127.0.0.1'
- `port`
Port number of server process.
_Default_: 1978
- `db`
DB name or id.
_Default_: 0
# METHODS
- `$kt->db()`
Getter/Setter of DB name/id.
- `my $cursor: Cache::KyotoTycoon::Cursor = $kt->make_cursor($cursor_number: Int);`
Create new cursor object. This method returns instance of [Cache::KyotoTycoon::Cursor](https://metacpan.org/pod/Cache::KyotoTycoon::Cursor).
- `my $res = $kt->echo($args)`
The server returns $args. This method is useful for testing server.
$args is hashref.
_Return_: the copy of $args.
- `$kt->report()`
Get server report.
_Return_: server status information in hashref.
- `my $output = $kt->play_script($name[, \%input]);`
Call a procedure of the script language extension.
_$name_: the name of the procedure to call.
_\\%input_: (optional): arbitrary records.
_Return_: response of the script in hashref.
- `my $info = $kt->status()`
Get database status information.
_Return_: database status information in hashref.
( run in 0.819 second using v1.01-cache-2.11-cpan-8f98c5d2c55 )