Weather::OpenWeatherMap::Result::Forecast - Weather forecast result
# Normally retrieved via Weather::OpenWeatherMap
This is a subclass of Weather::OpenWeatherMap::Result containing the result of a completed Weather::OpenWeatherMap::Request::Forecast.
These are normally emitted by a Weather::OpenWeatherMap instance.
The number of forecasts (days) as returned by the OpenWeatherMap API.
See "list" and "iter".
The country string.
The OpenWeatherMap city code.
The station's latitude.
The station's longitude.
The city name.
The full forecast list; each item in the list is a Weather::OpenWeatherMap::Result::Forecast::Day instance:
for my $day ($result->list) { my $date = $day->dt->mdy; my $cloudiness = $day->cloud_coverage; # ... }
See the documentation for Weather::OpenWeatherMap::Result::Forecast::Day.
Returns an iterator that, when called, returns the next Weather::OpenWeatherMap::Result::Forecast::Day instance (or undef when the list is empty):
my $iter = $result->iter; while (my $day = $iter->()) { my $wind = $day->wind_speed_mph; # ... }
See also: "list"
http://www.openweathermap.org
Weather::OpenWeatherMap
Weather::OpenWeatherMap::Result
Weather::OpenWeatherMap::Result::Forecast::Day
Weather::OpenWeatherMap::Result::Current
Jon Portnoy <avenj@cobaltirc.org>
To install Weather::OpenWeatherMap, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Weather::OpenWeatherMap
CPAN shell
perl -MCPAN -e shell install Weather::OpenWeatherMap
For more information on module installation, please visit the detailed CPAN module installation guide.