Author image A.Krishna Chaitanya
and 1 contributors


Yahoo::Weather - Perl extension to Find Current Observation WEATHER and Two Day Forecast for a given Location or ZIP CODE.

                - This module also gives you the sugestions based on Location Name or Zip, it gives you GEOGRAPHICAL DETAILS.


  use Yahoo::Weather;




Documentation for Yahoo::Weather. This module will get you Weather for 4.5 Million Locations (approx) but one at a time either by ZIPCODE or Place Name.

Create an Object for Yahoo::Weather.


Get Weather Details Based on Location Name


Get Weather Details Based on Zip Code


Get Weather Details Based on Location Name in FAH


Get Weather Details Based on Zip Code


Default is Cel and if you need it in FARENHEIT only pass 'f' or 'F' as last parameter(second parameter) or else it defaults to Celsius.

getWeatherByLocation function needs either ZIPCODE or PLACENAME as mandate. Second Parameter is Optional. In none specified it defaults to CENTIGRADE.

Get GEOGRAPHICAL Sugestions based Zip Code or Place Name


Above 2 functions gives you GEO Details based on either ZIP or PLACE NAME.

getSugestions function takes only one ARG.

ALL above mentioned methods gives you a HASHREF as return value unless some thing goes wrong.

In case of exceptions, we get following






INVALID_KEYWORD = -4 -For Getting Sugestions

SUGESTIONS_NOT_AVAILABLE = -4 For Getting Sugestions


None by default.


LWP::Simple (

XML::Simple (

Please Go through YDN( as it is built using it.

If you can't Find Weather for Particular Location , Please refer to http::/

Weather Data Provider is

Weather Data Processor is

This module needs to be extended further like getting temp of Today only and Forecast of NexDay only etc...When I have time I will defnetly extend it.

Please Note that curently if you give incorrect place name, this module will not give you weather Details or if that particular location(incorrect) is available in YAHOO'S 4.5 million locations it will end up giving those details.

Also this module can't be used more than 1000 times an Hour, As it was the restriction from YDN.

This can be overcome in next Release by adding a method to query the licenced URLS of YDN. This means that you will have to get license your self from YDN( and pass them as parametrs to subroutines.


Krishna Chaitanya Averineni, <>


Copyright (C) 2010 by Krishna Chaitanya Averineni

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.