- SEE ALSO
- LICENSE AND COPYRIGHT
RedisDB::Parse::Redis - redis protocol parser for RedisDB
use RedisDB::Parse::Redis; my $parser = RedisDB::Parse::Redis->new( redisdb => $ref ); $parser->add_callback(\&cb); $parser->add($data);
This module provides functions to build redis requests and parse replies from the server. Normally you don't want to use this module directly, see RedisDB instead.
$self->new(redisdb => $redis, utf8 => $flag)
Creates new parser object. redisdb parameter points to the RedisDB object which owns this parser. The reference will be passed to callbacks as the first argument. utf8 flag may be set if you want all data encoded as UTF-8 before sending to server, and decoded when received.
Encodes $command and @arguments as redis request.
Pushes callback to the queue of callbacks.
Set callback to invoke when there are no callbacks in queue. Used by subscription loop.
Returns true if there are callbacks in queue
Process new data received from the server. For every reply found callback from the queue will be invoked with two parameters -- reference to RedisDB object, and decoded reply from the server.
<zwon at cpan.org>
LICENSE AND COPYRIGHT
Copyright 2011, 2012 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.