Perl Cache::Memcached not connecting

Adam Dixon adamtdixon at
Thu Nov 9 06:42:21 UTC 2006

First time playing about with memcached, seems pretty straight
forward, start it up, and start 'set'ing objects into the cache; My
example perl script however doesnt work, I cannot seem to get it to
actually connect (when starting memcached with -vv).
Ive tried this on 3 systems 2 CentOS4 perl 5.8.5 and a FreeBSD 6.1
with perl 5.8.8 both seem to be acting the same.
I installed libevent and memcached from the source downloads and
Cache::Memcached from CPAN

memcache source files 'make test' looks ok to me, 2 subtests skipped
but that seems normal from my googling.
use Cache::Memcached;
use Data::Dumper;
use strict;

my ($obj, $username);
my $mcd = new Cache::Memcached {'servers' => ""};

print $mcd->set("my_key", "Some value");

This always prints 0, as in, not actually set properly. I dont get any
output when memcached is running under -vv (apart from when it starts

Anyone know what I can try to get this going properly?


More information about the memcached mailing list