weather_ext.pl - Sample script to show the usage of the OO API of Weather::Com
#> ./weather_ext.pl [-d] Welcome to Uncle Tom's weather station, extended edition... This is V1.006 Please enter a location name to look for, e.g 'Heidelberg' or 'Seattle, WA', or 'Munich, Germany' Additional commands are: 'end' to quit this program 'set language <lang_tag>' to dynamically change the language 'language' to get the current languages tag 'reset language' to change back to your default language $>
**IMPORTANT** You first have to register at weather.com to get a partner id and a license key for free. Please visit their web site http://www.weather.com/services/xmloap.html. Then edit this script and fill in the data into the corresponding variables at the top of the script.
The sample script weather.pl asks you for a location name - either a city or a 'city, region' or 'city, country' combination. It then uses the Weather::Com OO API to get location information, current weather conditions and 9 days of weahter forecast for this location(s).
If no location matching your input is found, a "no locations found" message is printed out.
Else, the number of locations found is printed followed by nicely formatted weather data for each location.
The command line parameter '-d' enables debugging mode (which is enabling debugging within all used packages.
Thomas Schnuecker, <firstname.lastname@example.org>
Copyright (C) 2004-2005 by Thomas Schnuecker
This script is free software; you can redistribute it and/or modify it under the same terms as Perl itself.