Skip Menu |

This queue is for tickets about the Weather-NOAA-Alert CPAN distribution.

Report information
The Basics
Id: 78335
Status: open
Priority: 0/
Queue: Weather-NOAA-Alert

People
Owner: STOVENOUR [...] cpan.org
Requestors: racarr [...] fs.fed.us
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Recentl Errors Using Weather::NOAA::Alert
Date: Thu, 12 Jul 2012 21:34:15 +0000
To: "bug-weather-noaa-alert [...] rt.cpan.org" <bug-weather-noaa-alert [...] rt.cpan.org>
From: "Carr, Robert A -FS" <racarr [...] fs.fed.us>
I suspect this may be related to a change in the format of CAP alerts from NOAA, but can't be sure. This past week, when I pass a list of zones to this module, if there are no alerts for any zone, the script returns the error message: "Can't call method "children" on an undefined value at c:/perl/site/lib/Weather/N OAA/Alert.pm line 442." I first noticed the error on Monday, July 9. Any help or advice is appreciated. Thanks. Bob Carr US Forest Service - Eastern Region Milwaukee, Wisconsin (414) 297-1057 This electronic message contains information generated by the USDA solely for the intended recipients. Any unauthorized interception of this message or the use or disclosure of the information it contains may violate the law and subject the violator to civil or criminal penalties. If you believe you have received this message in error, please notify the sender and delete the email immediately.
This problem is caused by changes to the format of the ATOM file <link> element when there are "no watches, warnings, or alerts". Unfortunately the current ATOM format is ambiguous when there are no published events. I've replicated this error and have tested a fix that might be a little less fragile. I'll be releasing a new version soon with the changes. In the meanwhile you could make the following one line change to Alert.pm: 343c343 < if( $capId eq $atomURL) { --- Show quoted text
> if( !defined($atomItem->first_child('cap:event'))) {