Bob Ernst > Weather-Com > weather.pl

Download:
Weather-Com-2.0.0.tar.gz

Annotate this POD

CPAN RT

New  5
Open  1
View/Report Bugs
Source  

NAME ^

weather.pl - Sample script to show the usage of the Weather::Com::Simple module

SYNOPSIS ^

  #> ./weather.pl [-d]
  
  Welcome to Uncle Tom's weather station...
  
  Please enter a location name to look for, e.g
  'Heidelberg' or 'Seattle, WA', or 'Munich, Germany'
  
  Type 'end' to exit.
  
  $>

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::Simple module to get the current weather conditions 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 (Weather::Com::Simple, Weather::Com::Cached, Weather::Com::Base).

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.

syntax highlighting: