Geo-Weather

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

                wind            - Current wind speed
                dewp            - Current dew point (degrees F)
                humi            - Current rel. humidity
                visb            - Current visibility
                baro            - Current barometric pressure
                heat            - Current heat index (Feels Like string)

        Errors

                On error, it returns one of the following exported error variables

                $ERROR_QUERY            - Invalid data supplied
                $ERROR_PAGE_INVALID     - No URL, or incorrectly formatted URL for retrieving the information
                $ERROR_CONNECT          - Error connecting to weather.com
                $ERROR_NOT_FOUND        - Weather for the specified city/state or zip could not be found
                $ERROR_TIMEOUT          - Timed out while trying to connect or get data from weather.com
                $ERROR_BUSY             - weather.com is too busy to handle requests and is in Severe Weather Alert Mode

    * report
        Returns an HTML table containing the current weather. Must call
        get_weather first.

        Sample Code

                print $weather->report();

    * lookup
        Gets current weather given a full weather.com URL

        Sample Code

                my $current = $weather->lookup('http://www.weather.com/search/search?where=95630');

        Returns

                On sucess, lookup returns a hashref with the same keys as the get_weather function

                On error, lookup returns the same errors defined for get_weather

OBJECT KEYS
    There are several object hash keys that can be set to manipulate how
    Geo::Weather works. The hash keys should be set directly following
    `new'.

    Below is a list of each key and what it does:

    * debug
    Enable debug output of the connection attempts to weather.com Valid
    values are 0 to 4, increasing debugging respectivley.

    * timeout
    Controls the timeout, in seconds, when trying to connect to or get data
    from weather.com. Default timeout is 10 seconds. Set to 0 to disable
    timeouts.

    * proxy
    Use HTTP proxy for the request. Format is http://proxy.server:port/.
    Default is no proxy.

    * proxy_user
    Sets the username to use for proxying. Defaults to the HTTP_PROXY_USER
    environment variable, if set, or don't use authentication if blank.

    * proxy_pass
    Sets the password to use for proxying. Defaults to the HTTP_PROXY_PASS
    environment variable, if set.

    * agent_string
    HTTP User-Agent header for request. Default is Geo::Weather/$VERSION.

AUTHOR
     Geo::Weather was wrtten by Mike Machado <mike@innercite.com>



( run in 0.855 second using v1.01-cache-2.11-cpan-71847e10f99 )