Cache-Memcached-Indexable

 view release on metacpan or  search on metacpan

inc/Module/Install/Fetch.pm  view on Meta::CPAN


    require Cwd;
    my $dir = Cwd::getcwd();
    chdir $args{local_dir} or return if exists $args{local_dir};

    if (eval { require LWP::Simple; 1 }) {
        LWP::Simple::mirror($args{url}, $file);
    }
    elsif (eval { require Net::FTP; 1 }) { eval {
        # use Net::FTP to get past firewall
        my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600);
        $ftp->login("anonymous", 'anonymous@example.com');
        $ftp->cwd($path);
        $ftp->binary;
        $ftp->get($file) or (warn("$!\n"), return);
        $ftp->quit;
    } }
    elsif (my $ftp = $self->can_run('ftp')) { eval {
        # no Net::FTP, fallback to ftp.exe
        require FileHandle;
        my $fh = FileHandle->new;

t/all.t  view on Meta::CPAN

use strict;
use Test::More;
use Cache::Memcached::Indexable;
use IO::Socket::INET;

my $testaddr = "127.0.0.1:11211";
my $msock = IO::Socket::INET->new(
    PeerAddr => $testaddr,
    Timeout  => 3,
);
if ($msock) {
    plan tests => 10;
}
else {
    plan skip_all => "No memcached instance running at $testaddr\n";
    exit 0;
}

my $memd = Cache::Memcached::Indexable->new({

t/logic_default.t  view on Meta::CPAN

use strict;
use Test::More;
use Cache::Memcached::Indexable;
use IO::Socket::INET;

my $testaddr = "127.0.0.1:11211";
my $msock = IO::Socket::INET->new(
    PeerAddr => $testaddr,
    Timeout  => 3,
);
if ($msock) {
    plan tests => 10;
}
else {
    plan skip_all => "No memcached instance running at $testaddr\n";
    exit 0;
}

my $memd = Cache::Memcached::Indexable->new({

t/logic_digest_sha1.t  view on Meta::CPAN

use strict;
use Test::More;
use Cache::Memcached::Indexable;
use IO::Socket::INET;

my $testaddr = "127.0.0.1:11211";
my $msock = IO::Socket::INET->new(
    PeerAddr => $testaddr,
    Timeout  => 3,
);
if ($msock) {
    plan tests => 10;
}
else {
    plan skip_all => "No memcached instance running at $testaddr\n";
    exit 0;
}

my $memd = Cache::Memcached::Indexable->new({



( run in 0.272 second using v1.01-cache-2.11-cpan-4d50c553e7e )