| Weather-YR documentation | Contained in the Weather-YR distribution. |
Weather::YR - Perl extension for talking to yr.no
use Weather::YR;
#
# Location forecast
#
use Weather::YR::Locationforecast;
my $loc = Weather::YR::Locationforecast->new(
{
'latitude' => '59.6327',
'longitude' => '10.2468',
}
);
my $loc_forecast = $loc->forecast;
print $loc_forecast->[0]->{'temperature'}->{'value'} . " degrees celcius";
#
# Text forecast
#
use Weather::YR::Textforecast;
my $text = Weather::YR::Textforecast->new(
{
'language' => 'nb',
'forecast' => 'land',
}
);
$text_forecast = $text->forecast;
print $text_forecast->{'title'};
This Perl package contains parsers and web service clients for using web services from yr.no.
None by default.
Knut-Olav Hoven, <knut-olav@hoven.ws>
Copyright (C) 2008 by Knut-Olav Hoven
This library is free software; you can redireibute it and/or modify it under the terms as GNU GPL version 2.
| Weather-YR documentation | Contained in the Weather-YR distribution. |
package Weather::YR; use 5.008008; use strict; use warnings; require Exporter; use AutoLoader qw(AUTOLOAD); our @ISA = qw(Exporter); # Items to export into callers namespace by default. Note: do not export # names by default without a very good reason. Use EXPORT_OK instead. # Do not simply export all your public functions/methods/constants. # This allows declaration use Weather::YR ':all'; # If you do not need this, moving things directly into @EXPORT or @EXPORT_OK # will save memory. our %EXPORT_TAGS = ( 'all' => [ qw( ) ] ); our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); our @EXPORT = qw( ); our $VERSION = '0.23'; # Preloaded methods go here. # Autoload methods go after =cut, and are processed by the autosplit program. 1; __END__