in reply to How to check connection to Cache::Memcached::libmemcached;

But $mem is awlays true .... How should i do it?

That ought to work, what is the problem?

I suppose you could check ->errstr , but if it returns an object when it should return undef, that is a bug

  • Comment on Re: How to check connection to Cache::Memcached::libmemcached;

Replies are listed 'Best First'.
Re^2: How to check connection to Cache::Memcached::libmemcached;
by himik (Acolyte) on Nov 16, 2012 at 14:07 UTC

    when i do

    my $mem = Cache::Memcached::libmemcached->new( { servers => [ "12133 +21" ], compress_threshold => 10_000 } ); print $mem->errstr;
    The output is SUCCES. But the server is not valid one and I can not connect to it.