Test::RedisDB - start redis-server for testing
use Test::RedisDB; my $test_server = Test::RedisDB->new; my $redis = $test_server->redisdb_client; $redis->set('foo', 1); my $res = $redis->get('foo');
This module allows you to start an instance of redis-server for testing your modules that use RedisDB.
start a new redis-server instance, return Test::RedisDB object tied to this instance. Accepts the following options:
server should require a password to connect
start the server. You only need to call this method if you stopped the server using the stop method
stop the server
return hostname or address, at the moment always 'localhost'
return port number on which server accept connections
return a new RedisDB client object connected to the test server, %options passed to RedisDB constructor
return URL for the server
Pavel Shaydo, <zwon at cpan.org>
<zwon at cpan.org>
Copyright 2011-2016 Pavel Shaydo.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install RedisDB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm RedisDB
CPAN shell
perl -MCPAN -e shell install RedisDB
For more information on module installation, please visit the detailed CPAN module installation guide.