package My::MemcacheTest; # ... etc ... - let me know if this bit is important! sub test { my $memd = Cache::Memcached->new( servers => [ "127.0.0.1:11211" ], debug => 0, compress_threshold => 10_000, ); $memd->set('my_test','KISS'); my $simple_test = $memd->get('my_test') || 'This did not work'; print STDERR "Test Result = $simple_test\n"; }