App-SpeedTest
view release on metacpan or search on metacpan
$timeout ||= 10;
my $ua = LWP::UserAgent->new (
max_redirect => 2,
agent => "speedtest/$VERSION",
parse_head => 0,
timeout => $timeout,
cookie_jar => {},
);
$ua->env_proxy;
binmode STDOUT, ":encoding(utf-8)";
# Speedtest.net defines Mbit/s and kbit/s using 1000 as multiplier,
# https://support.speedtest.net/entries/21057567-What-do-mbps-and-kbps-mean-
my $k = 1000;
my $config = get_config ();
my $client = $config->{"client"} or die "Config saw no client\n";
my $times = $config->{"times"} or die "Config saw no times\n";
my $downld = $config->{"download"} or die "Config saw no download\n";
my $upld = $config->{"upload"} or die "Config saw no upload\n";
( run in 2.420 seconds using v1.01-cache-2.11-cpan-3cd7ad12f66 )