The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

weather_ext.pl - Sample script to show the usage of the OO API of Weather::Com

SYNOPSIS

  #> ./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
  
  $>

DESCRIPTION

**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.

AUTHOR

Thomas Schnuecker, <thomas@schnuecker.de>

COPYRIGHT AND LICENSE

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.