• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

lib/Redis/H02-Apr-2013-15329

t/H02-Apr-2013-678504

COPYRIGHTH A D02-Apr-20131.4 KiB117

ChangesH A D02-Apr-20132 KiB5439

MANIFESTH A D02-Apr-2013563 3635

META.jsonH A D02-Apr-2013855 4039

META.ymlH A D02-Apr-2013501 2221

Makefile.PLH A D02-Apr-2013533 1815

READMEH A D02-Apr-20133.8 KiB11079

Redis-hiredis.xsH A D02-Apr-20135.3 KiB207179

async.cH A D02-Apr-201321.1 KiB623402

async.hH A D02-Apr-20134.8 KiB12656

dict.cH A D02-Apr-201310.3 KiB339202

dict.hH A D02-Apr-20134.6 KiB12771

fmacros.hH A D02-Apr-2013256 1713

hiredis-COPYRIGHTH A D02-Apr-20131.6 KiB3023

hiredis.cH A D02-Apr-201335.9 KiB1,286939

hiredis.hH A D02-Apr-20138.7 KiB211113

net.cH A D02-Apr-20138.7 KiB292213

net.hH A D02-Apr-20132.1 KiB4811

ppport.hH A D02-Apr-2013151.3 KiB6,3772,613

sds.cH A D02-Apr-201316.9 KiB606468

sds.hH A D02-Apr-20133 KiB8949

typemapH A D02-Apr-201332 32

README

1INSTALLATION
2
3To install this module type the following:
4
5   perl Makefile.PL
6   make
7   make test
8   make install
9
10Documentation is provided in the module and perldoc output is copied below:
11
12NAME
13       Redis::hiredis − interact with Redis using the hiredis client.
14
15SYNOPSIS
16         use Redis::hiredis;
17         my $redis = Redis::hiredis−>new();
18         $redis−>connect('127.0.0.1', 6379);
19         $redis−>command('set foo bar');
20         $redis−>command(["set", "foo", "bar baz"]); # values with spaces
21         my $val = $redis−>command('get foo');
22
23         # to pipeline commands
24         $redis−>append_command('set abc 123');
25         $redis−>append_command('get abc');
26         my $set_status = $redis−>get_reply(); # 'OK'
27         my $get_val = $redis−>get_reply(); # 123
28
29DESCRIPTION
30       "Redis::hiredis" is a simple wrapper around Salvatore Sanfilippo’s
31       hiredis C client that allows connecting and sending any command just
32       like you would from a command line Redis client.
33
34       NOTE Versions >= 0.9.2 and <= 0.9.2.4 are not compatible with prior
35       versions
36
37       METHODS
38
39
40       new([utf8 => 1], [host => "localhost"], [port => 6379], [path => "/tmp/redis.sock"])
41           Creates a new Redis::hiredis object.
42
43           If the host attribute is provided the "connect" method will
44           automatically be called.
45
46           If the path attribute is provided the "connect_unix" method will
47           automatically be called.
48
49       connect( $hostname, $port )
50           $hostname is the hostname of the Redis server to connect to
51
52           $port is the port to connect on.  Default 6379
53
54       connect_unix( $path )
55           $path is the path to the unix socket
56
57       command( $command_and_args )
58       command( [ $command, $arg, ... ] )
59       command( $command, $arg, ... )
60           command supports multiple types of calls to be backwards compatible
61           and provide more convenient use.  Examples of how to pass arguments
62           are:
63
64             $redis−>command('set foo bar');
65             $redis−>command(["set", "foo", "bar baz"]);
66             $redis−>command("set", "foo", "bar baz");
67
68           Note that if you have spaces in your values, you must use one of
69           the last 2 forms.
70
71           command will return a scalar value which will either be an integer,
72           string or an array ref (if multiple values are returned).
73
74       append_command( $command )
75           For performance reasons, it’s sometimes useful to pipeline
76           commands.  When pipelining, muiltple commands are sent to the
77           server at once and the results are read as they become available.
78           hiredis supports this via append_command() and get_reply().
79           Commands passed to append_command() are buffered locally until the
80           first call to get_reply() when all the commands are sent to the
81           server at once.  The results are then returned one at a time via
82           calls to get_reply().
83
84           See the hiredis documentation for a more detailed explanation.
85
86       get_reply()
87           See append_command().
88
89       Autoloaded Methods
90
91       Autoload is used to allow an interface like $redis−>set("foo", "bar").
92       The method name you provide will be passed blindly to Redis, so any
93       supported command should work.
94
95       Note that to use any autoloaded method, you must pass arguments as an
96       array, the string and array ref forms supported by command will not
97       work.
98
99SEE ALSO
100       The Redis command reference can be found here:
101       <http://redis.io/commands>
102
103       A discusion of pipelining can be found here:
104       <http://redis.io/topics/pipelining>
105
106       Documentation on the hiredis client can be found here:
107       <https://github.com/antirez/hiredis>
108
109       Redis::hiredis on github: <https://github.com/neophenix/redis−hiredis>
110