Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

weather.pl
Sample script to show the usage of the I<Weather::Com::Simple> module

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



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.

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy