}
my $ua = new LWP::UserAgent;
- $ua->proxy('http', $::param{'httpProxy'}) if (&::IsParam("httpProxy"));
+ $ua->proxy('http', $::param{'httpProxy'}) if (&::IsParam('httpProxy'));
$ua->timeout(10);
my $request = new HTTP::Request('GET', "http://weather.noaa.gov/weather/current/$station.html");
if (!$response->is_success) {
if ($response->code == 404) {
return "I can't find station code \"$station\""
- . " (see http://www.nws.noaa.gov/oso/site.shtml "
- . " or http://www.nws.noaa.gov/tg/siteloc.shtml "
+ . " (see http://www.nws.noaa.gov/oso/site.shtml"
+ . " or http://www.nws.noaa.gov/tg/siteloc.shtml"
. " for ICAO locations codes).";
} else {
- return "Something failed in connecting to the NOAA web"
+ return 'Something failed in connecting to the NOAA web'
. " server. Try again later.";
}
}
if ($time) {
if ($wxmode eq 'metar' && defined($feat{'ob'})) {
- return ("METAR " . $place . ": " . $feat{'ob'});
+ return ('METAR ' . $place . ": " . $feat{'ob'});
}
$result = "$place; $id; last updated: $time";
1;
+# vim:ts=4:sw=4:expandtab:tw=80
+
__END__
=head1 NAME