NAME
Geo::StormTracker::Parser - Perl extension for Parsing Weather Advisories
SYNOPSIS
use Geo::StormTracker::Parser;
#Create a parser object
$parser_obj=Geo::StormTracker::Parser->new();
#Parse input and return a Geo::StormTracker::Advisory object.
$adv_obj=$parser_obj->read(\*STDIN);
#An alternative to the read method above,
#which accepts the advisory as a string.
$adv_obj=$parser_obj->read_data($advisory_data);
#Same as above two methods but reads from a file instead.
$adv_obj=$parser_obj->read_file($advisory_data);
DESCRIPTION
The Geo::StormTracker::Parser module is a component of the Storm-Tracker perl bundle. The Storm-Tracker perl bundle is designed to track weather events using the national weather advisories. The original intent is to track tropical depressions, storms and hurricanes. The various read methods of Geo::StormTracker::Parser take a plain text advisory as input and return Geo::StormTracker::Advisory objects.
CONSTRUCTOR
- new
-
Creates a new instance of a Geo::StormTracker::Parser object and returns a blessed reference to it.
METHODS
- read (TYPEGLOB_REF)
-
Reads from the type glob reference passed as an argument and returns a Geo::StormTracker::Advisory object if successful. If unsuccessful the method returns an undefined value.
- read_data (STRING)
-
Attempts to parse the advisory text input as a string argument and returns a Geo::StormTracker::Advisory object if successful. If unsuccessful the method returns an undefined value.
- read_file (STRING)
-
Reads an advisory saved in a file whose path is passed as a string argument and returns a Geo::StormTracker::Advisory object if successful. If unsuccessful the method returns an undefined value.
AUTHOR
James Lee Carpenter, Jimmy.Carpenter@chron.com
All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Thanks to Dr. Paul Ruscher for his assistance in helping me to understand the weather advisory formats.
SEE ALSO
Geo::StormTracker::Advisory
Geo::StormTracker::Main
Geo::StormTracker::Data
perl(1).