X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=src%2FNet.pl;h=2050c9e8b65c5e0234b24a3faf7e4a3e1ca038c7;hb=3936a3e1255582305fc4200485b71fa692e66bd3;hp=035ceba84001833a50b4d58c36c0cb62fa9936ac;hpb=8b54ff5060a6605e169acc0694cb00b89ed22cab;p=infobot.git diff --git a/src/Net.pl b/src/Net.pl index 035ceba..2050c9e 100644 --- a/src/Net.pl +++ b/src/Net.pl @@ -84,10 +84,10 @@ sub ftpGet { my $delta_time = &timedelta($start_time); if ($delta_time > 0 and $verbose_ftp) { &status(sprintf("FTP: %.02f sec to complete.", $delta_time)); - my ($rateunit,$rate) = ("B", $size / $delta_time); + my ($rateunit,$rate) = ('B', $size / $delta_time); if ($rate > 1024) { $rate /= 1024; - $rateunit = "kB"; + $rateunit = 'kB'; } &status(sprintf("FTP: %.01f ${rateunit}/sec.", $rate)); } @@ -153,7 +153,7 @@ sub getURL { return unless &loadPerlModule("LWP::UserAgent"); $ua = new LWP::UserAgent; - $ua->proxy('http', $param{'httpProxy'}) if &IsParam("httpProxy"); + $ua->proxy('http', $param{'httpProxy'}) if &IsParam('httpProxy'); if (defined $post) { $req = new HTTP::Request('POST',$url); @@ -189,7 +189,7 @@ sub getURLAsFile { } $ua = new LWP::UserAgent; - $ua->proxy('http', $param{'httpProxy'}) if &IsParam("httpProxy"); + $ua->proxy('http', $param{'httpProxy'}) if &IsParam('httpProxy'); $req = HTTP::Request->new('GET', $url); &status("getURLAsFile: getting '$url' as '$file'"); $res = $ua->request($req, $file);