Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

hiredis based parser compatible with Protocol::Redis

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 hiredis @ 857b269
Octocat-spinner-32 lib
Octocat-spinner-32 t
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .gitmodules
Octocat-spinner-32 Changes
Octocat-spinner-32 MANIFEST
Octocat-spinner-32 MANIFEST.SKIP
Octocat-spinner-32 Makefile.PL
Octocat-spinner-32 README
Octocat-spinner-32 TODO
Octocat-spinner-32 XS.xs
Octocat-spinner-32 ppport.h
Octocat-spinner-32 typemap
README
NAME
    Protocol::Redis::XS - hiredis based parser compatible with
    Protocol::Redis

SYNOPSIS
      use Protocol::Redis::XS;
      my $redis = Protocol::Redis::XS->new;
      $redis->parse("+OK\r\n");
      $redis->get_message;

DESCRIPTION
    This provides a fast parser for the Redis protocol using the code from
    hiredis <http://github.com/antirez/hiredis> and with API compatibility
    with Protocol::Redis.

    (If you've found yourself here just looking to use Redis in Perl: This
    is a low level parsing module, you probably want to look at the modules
    mentioned in "SEE ALSO" first.)

METHODS
    As per Protocol::Redis, API version 1.

  parse($string)
    Parse a chunk of data (calls "on_message" callback if defined and a
    complete message is received).

  get_message
    Return a message. This is a potentially nested data structure, for
    example as follows:

      {
        type => '*',
        data => [
          {
            type => '$',
            data => 'hello'
          }
        ]
      }

  on_message
    Set callback for "parse".

THREADS
    This module will work on a threaded perl and will work with threads,
    however instances of Protcol::Redis should not be shared between
    threads.

SUPPORT
  IRC
    #redis on irc.perl.org <irc://irc.perl.org/redis>

DEVELOPMENT
    See github: <https://github.com/dgl/protocol-redis-xs>.

    Developer note, hiredis is pulled in via a git submodule, run:

     git submodule update --init

    to make the development version buildable.

AUTHOR
    David Leadbeater <dgl@dgl.cx>

    With thanks to Sergey Zasenko <undef@cpan.org> for the original
    Protocol::Redis and defining the API.

COPYRIGHT AND LICENSE
    Copyright (C) 2011 David Leadbeater.

    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.

    The hiredis library included in this distribution has a seperate license
    (3 clause BSD). See hiredis/COPYING.

SEE ALSO
    Redis, Redis::hiredis, AnyEvent::Redis, Protocol::Redis.

Something went wrong with that request. Please try again.