Weather::OpenWeatherMap::Result::Find
# Normally retrieved via Weather::OpenWeatherMap
This is a subclass of Weather::OpenWeatherMap::Result containing the result of a completed Weather::OpenWeatherMap::Request::Find.
These are normally emitted by a Weather::OpenWeatherMap instance.
The message from the OpenWeatherMap backend indicating the type of search completed (accurate or like).
accurate
like
The full result list, as a List::Objects::WithUtils::Array.
See "list".
Returns the number of items available in the current result "list".
The full result list; each item in the list is a Weather::OpenWeatherMap::Result::Current instance:
for my $place ($result->list) { my $region = $place->country; my $tempf = $place->temp_f; # ... }
See Weather::OpenWeatherMap::Result::Current.
The current weather returned by a Find is not quite as complete as a full Weather::OpenWeatherMap::Request::Current might return. In particular:
The country attribute is likely to be a two-letter region identifier, not a full country name.
The sunrise and sunset attributes are unavailable.
Wind gust speed may be unavailable.
The station name is unavailable.
Returns an iterator that, when called, returns the next Weather::OpenWeatherMap::Result::Current instance (or undef when the list is empty):
my $iter = $result->iter; while (my $place = $iter->()) { my $region = $place->country; # ... }
An alias for "message".
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.