Weather Report

NAME

Weather Report is an Embperl control to retrieve and display a weather forecast report for specified location.

It retrieve the forecast from www.weather.com and you’ll need to register at weather.com to to get a free partner id and a license key to be used within all applications that you want to write against weather.com’s xoap interface.

Also, after registration you’ll able to download a set of weather icons needed to display the weather forecast.

SYNOPSIS

use Weather::Com;

my %params = (
'current' => 1,
'forecast' => 4,
'links' => 1,
'units' => 'm',
'proxy' => 'none',
'timeout' => 250,
'debug' => 0,
'partner_id'=> 'some id',
'license' => 'some license',
);

$weather = Weather::Com->new(%params) or
die "Cannot create a weather new object: $!";
$res = $weather->search($location) or
die "No location found!\n";
$weather_rep = $weather->get_weather($code);

my($w_rep);
$w_rep->{current} = $weather_rep->{cc};
$w_rep->{forecast} = $weather_rep->{dayf}{day};

Execute('Elements/Weather', $w_rep);

DONWLOAD

REQUIRES

  • Weather::Com
  • Cache::FileCache

CHANGELOG

AUTHOR

Michael Stepanov stepanov.michael[at]gmail.com

Leave a Reply

Your email address will not be published. Required fields are marked *