Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

27 lines (21 sloc) 0.567 kb
#!/usr/bin/env perl -w
use strict;
use Test::More;
use Cache::Memcached;
use IO::Socket::INET;
my $testaddr = "127.0.0.1:11211";
my $msock = IO::Socket::INET->new(PeerAddr => $testaddr,
Timeout => 3);
if ($msock) {
plan tests => 2;
} else {
plan skip_all => "No memcached instance running at $testaddr\n";
exit 0;
}
my $memd = Cache::Memcached->new({
servers => [ $testaddr ],
});
use utf8;
my $key = "Ïâ";
ok($memd->set($key, "val1"), "set key1 as val1");
is($memd->get($key), "val1", "get key1 is val1");
Jump to Line
Something went wrong with that request. Please try again.