Mercurial > hg > egg-tcls
comparison fetch_weather.pl @ 198:60a4c69c7f25
Cosmetics.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 16 Jun 2014 03:18:38 +0300 |
parents | 0fd2435371eb |
children | 95012f8f687a |
comparison
equal
deleted
inserted
replaced
197:0fd2435371eb | 198:60a4c69c7f25 |
---|---|
44 } | 44 } |
45 | 45 |
46 | 46 |
47 sub fetch_http($) | 47 sub fetch_http($) |
48 { | 48 { |
49 my $tmpAgent = LWP::UserAgent->new; | 49 my $agent = LWP::UserAgent->new; |
50 $tmpAgent->agent($settings{"http_user_agent"}); | 50 $agent->agent($settings{"http_user_agent"}); |
51 $tmpAgent->timeout(10); | 51 $agent->timeout(10); |
52 | 52 |
53 my $tmpRequest = HTTP::Request->new(GET => $_[0]); | 53 my $req = HTTP::Request->new(GET => $_[0]); |
54 | 54 |
55 return $tmpAgent->request($tmpRequest); | 55 return $agent->request($req); |
56 } | 56 } |
57 | 57 |
58 | 58 |
59 sub parse_timestamp($$) | 59 sub parse_timestamp($$) |
60 { | 60 { |