Knut-Olav Hoven > Weather-YR-0.22 > Weather::YR::Base

Download:
Weather-YR-0.22.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Source  

NAME ^

Weather::YR::Base - Base class for all YR service classes.

DESCRIPTION ^

This module contains helper functions for all other YR service classes.

CONFIGURATION ^

This base class contains no default configuration. To set default configuration parameters in your sub class, configure a %CONFIG variable in your class.

METHODS ^

new(\%args)

Constructor. Takes parameters as a HASHREF that will be merged with the default configuration in "%CONFIG".

config(%args)

Sets default package configuration values.

fetch

This method will try to fetch the content of the web service.

get_ua

Creates and returns an user agent instance which can be used to fetch data from the YR web services.

get_url

This method should be overridden by a subclass. By default it will return the value of $self->{url}.

merge_config

Method for overriding values in the object with values from a HASHREF.

SEE ALSO ^

Weather::YR

AUTHOR ^

Knut-Olav, <knut-olav@hoven.ws>

COPYRIGHT AND LICENSE ^

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.