Browse files

Docs stuff.

  • Loading branch information...
1 parent 927143f commit cdd6906c9f7be6cc074c44957555267eb25bbb95 @cofyc committed Sep 6, 2012
Showing with 32 additions and 16 deletions.
  1. +9 −8 README.md
  2. +23 −8 lib/Redis.pm
View
17 README.md
@@ -1,17 +1,13 @@
# Redis - Perl6 binding for Redis
-Port of Redis from Perl 5.
-
Synopsis
========
- # create a Redis object
- my $redis = Redis.new("192.168.1.12:6379");
- # connect to server
- $redis.connect();
- # execute commands...
+ my $redis = Redis.new("127.0.0.1:6379");
$redis.set("key", "value");
say $redis.get("key");
+ say $redis.info();
+ $redis.quit();
Build & Test & Install
======================
@@ -32,7 +28,12 @@ Unit Tests
==========
Tested agaist Redis version 2.4.16 and 2.5.12.
-
+
+Docs
+====
+
+ $ p6doc Redis
+
References
==========
View
31 lib/Redis.pm
@@ -1,19 +1,34 @@
use v6;
-=begin Pod
+=begin pod
-=head1 Redis
+=TITLE Redis
-C<Redis> is a Perl6 binding for Redis database.
+ A Perl6 binding for Redis.
=head1 Synopsis
-my $redis = Redis.new("192.168.1.12:6379");
-$redis.connect();
-$redis.set("key", "value");
-say $redis.get("key");
+ my $redis = Redis.new("127.0.0.1:6379");
+ $redis.set("key", "value");
+ say $redis.get("key");
+ say $redis.info();
+ $redis.quit();
-=end Pod
+=head1 Methods
+
+=head2 new
+
+ method new(Str $server?, Str :$encoding?, Bool :$decode_response?)
+
+Returns the redis object.
+
+=head2 exec_command
+
+ method exec_command(Str $command, *@args) returns Any
+
+Executes arbitrary command.
+
+=end pod
class Redis;

0 comments on commit cdd6906

Please sign in to comment.