App-cpm

 view release on metacpan or  search on metacpan

lib/App/cpm/HTTP.pm  view on Meta::CPAN

        $try->supports("https") or next;
        ($tool) = sort keys $meta->%*;
        ($desc = $meta->{$tool}) =~ s/^(.*?)\n.*/$1/s;
        $backend = $try, last;
    }
    die "Couldn't find HTTP Clients that support https" if !$backend;

    my $http = $backend->new(
        agent => "App::cpm/$App::cpm::VERSION",
        timeout => 60,
        verify_SSL => 1,
        %args,
    );
    my $keep_alive = exists $args{keep_alive} ? $args{keep_alive} : 1;
    if ($keep_alive and $backend =~ /LWP$/) {
        $http->{ua}->conn_cache({ total_capacity => 3 });
    }

    $wantarray ? ($http, "$tool $desc") : $http;
}



( run in 2.309 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )