Skip to content
Newer
Older
100644 27 lines (21 sloc) 567 Bytes
385a54d @cosimo First import. Nothing functional yet. Halfway converted code straight…
authored Jul 30, 2010
1 #!/usr/bin/env perl -w
2
3 use strict;
4 use Test::More;
5 use Cache::Memcached;
6 use IO::Socket::INET;
7
8 my $testaddr = "127.0.0.1:11211";
9 my $msock = IO::Socket::INET->new(PeerAddr => $testaddr,
10 Timeout => 3);
11 if ($msock) {
12 plan tests => 2;
13 } else {
14 plan skip_all => "No memcached instance running at $testaddr\n";
15 exit 0;
16 }
17
18 my $memd = Cache::Memcached->new({
19 servers => [ $testaddr ],
20 });
21
22 use utf8;
23 my $key = "Ïâ";
24
25 ok($memd->set($key, "val1"), "set key1 as val1");
26 is($memd->get($key), "val1", "get key1 is val1");
Something went wrong with that request. Please try again.