AnyEvent-Memcached
view release on metacpan or search on metacpan
lib/AnyEvent/Memcached.pm view on Meta::CPAN
elsif (/(CLIENT|SERVER)_ERROR (.*)/) {
warn ucfirst(lc $1)." error: $2";
}
else {
warn "Bad response from $peer->{host}:$peer->{port}: $_";
}
}
sub _do {
my $self = shift;
my $key = shift; utf8::decode($key) xor utf8::encode($key) if utf8::is_utf8($key);
my $command = shift; utf8::decode($command) xor utf8::encode($command) if utf8::is_utf8($command);
my $worker = shift; # CODE
my %args = @_;
my $servers = $self->{hash}->servers($key);
my %res;
my %err;
my $res;
if ($key =~ /[\x00-\x20\x7F]/) {
carp "Invalid characters in key '$key'";
return $args{cb} ? $args{cb}(undef, "Invalid key") : 0;
t/lib/Test/AE/MC.pm view on Meta::CPAN
Test::AE::MC;
# Memcached test class
use Test::More;
use AnyEvent::Impl::Perl;
use AnyEvent;
use AnyEvent::Socket;
BEGIN{ eval q{use AnyEvent::Memcached;1} or BAIL_OUT("$@") }
use common::sense;
use utf8;
sub import {
*{caller().'::runtest'} = \&runtest;
@_ = 'Test::More';
goto &{ Test::More->can('import') };
}
sub runtest(&) {
my $cx = shift;
my $code = sub {
t/lib/Test/AE/MD.pm view on Meta::CPAN
package #hide
Test::AE::MD;
# MemcacheDB test class
use AnyEvent::Impl::Perl;
use AnyEvent;
use AnyEvent::Socket;
use AnyEvent::Memcached;
use common::sense;
use utf8;
use Test::More;
use lib::abs;
sub import {
*{caller().'::runtest'} = \&runtest;
@_ = 'Test::More';
goto &{ Test::More->can('import') };
}
sub runtest(&) {
( run in 0.960 second using v1.01-cache-2.11-cpan-49f99fa48dc )