arashi has asked for the wisdom of the Perl Monks concerning the following question:
I'm using the Geo::WeatherNWS module to get METAR data, and it works fine...for the most part. Sometimes when trying to access the server, the script will hang and there doesn't seem to be any timeout check in the module. Is there something I can do that would allow me to set a timeout for the script, so it doesn't hang (I'll probably use the last good values if it fails)?
Thanks in advance for your help#!/usr/bin/perl -w use strict; use Geo::WeatherNWS; my $Report=Geo::WeatherNWS::new(); $Report->setservername("weather.noaa.gov"); $Report->setusername("anonymous"); $Report->setpassword('email@example.com'); $Report->setdirectory("/data/observations/metar/stations"); $Report->getreport('kmrj'); print $report;