Permalink
Browse files

Minimal connect example

  • Loading branch information...
1 parent 520687c commit 18f444519f98d988b3de546d1ac996e64361c6de Cosimo Streppone committed May 18, 2011
Showing with 22 additions and 0 deletions.
  1. +22 −0 t/999_connect.t
View
@@ -0,0 +1,22 @@
+use v6;
+use Test;
+use Cache::Memcached;
+
+my $mc = Cache::Memcached.new(
+ servers => [ "127.0.0.1:11211" ],
+);
+
+ok($mc, "memcached object created");
+
+#my $rv = $mc.set("mykey", "myvalue");
+#say "Set rv = '$rv'";
+#is($rv, "myvalue", "set() should return the set value");
+
+diag("Calling get() now");
+
+my $rv = $mc.get("mykey");
+say "Get rv = '$rv'";
+is($rv, "myvalue", "get() should get back the same value");
+
+done_testing;
+

0 comments on commit 18f4445

Please sign in to comment.