AnyEvent-Memcached
view release on metacpan or search on metacpan
t/lib/Test/AE/MC.pm view on Meta::CPAN
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 {
alarm 10;
eval {
$cx->(@_,noreply => 1, cas => 1);
1;
} or do {
warn "DIED $@";
die "$@";
}
t/lib/Test/AE/MD.pm view on Meta::CPAN
use utf8;
use Test::More;
use lib::abs;
sub import {
*{caller().'::runtest'} = \&runtest;
@_ = 'Test::More';
goto &{ Test::More->can('import') };
}
sub runtest(&) {
my $cx = shift;
my $code = sub {
alarm 10;
$cx->(@_,cas => 0, noreply => 0,);
};
my ($host,$port);
if (defined $ENV{MEMCACHEDB_SERVER}) {
my $testaddr = $ENV{MEMCACHEDB_SERVER};
($host,$port) = split ':',$testaddr;$host ||= '127.0.0.1'; # allow *_SERVER=:port
my $do;
( run in 1.041 second using v1.01-cache-2.11-cpan-49f99fa48dc )