James Lee Carpenter > Storm-Tracker_0.01 > Geo::Storm_Tracker::Parser

Download:
Storm-Tracker_0.01.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.01   Source  

NAME ^

Geo::Storm_Tracker::Parser - Perl extension for Parsing Weather Advisories

SYNOPSIS ^

        use Geo::Storm_Tracker::Parser;

        #Create a parser object
        $parser_obj=Geo::Storm_Tracker::Parser->new();

        #Parse input and return a Geo::Storm_Tracker::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::Storm_Tracker::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::Storm_Tracker::Parser take a plain text advisory as input and return Geo::Storm_Tracker::Advisory objects.

CONSTRUCTOR ^

new

Creates a new instance of a Geo::Storm_Tracker::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::Storm_Tracker::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::Storm_Tracker::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::Storm_Tracker::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::Storm_Tracker::Advisory
        Geo::Storm_Tracker::Main
        Geo::Storm_Tracker::Data
        perl(1).
syntax highlighting: