Geo::Storm_Tracker::Advisory - The weather advisory object of the perl Storm-Tracker bundle.
use Geo::Storm_Tracker::Advisory; #Create a new advisory object for holding #all the various elements of an advisory. $adv_obj=Storm_Tracker::Advisory->new(); #Return the entire advisory as a string. #Internally calls stringify_header and #stringify_body and joins the result. $adv_obj->stringify();
All of the following methods can be used as both access and as assignment methods. The use and functionality of the methods should be obvious.
It is important to realize that changes to a given attribute do not affect other attributes. It is the role of the caller to keep the content self consistent.
#Obtain the header as a string. $header_string=$adv_obj->stringify_header(); #Change the contents of the header string. #Returns new header contents. $header_string=$adv_obj->stringify_header($header_string); #Obtain the body as a string. $body_string=$adv_obj->stringify_body(); #Change the contents of the body string. #Returns new body contents. $body_string=$adv_obj->stringify_body($body_string); #Obtain the name string. $name=$adv_obj->name(); #Change the name string. #Returns new name string. $name=$adv_obj->name($name); #Obtain the wmo header string. $wmo_header=$adv_obj->wmo_header(); #Change the wmo header string. #Returns new wmo header string. $wmo_header=$adv_obj->wmo_header($wmo_header); #Obtain the advisory number value. $advisory_number=$adv_obj->advisory_number(); #Change the advisory number value. #Returns the new advisory number. $advisory_number=$adv_obj->advisory_number($advisory_number); #Obtain the release time string. $release_time=$adv_obj->release_time(); #Change the release time string. #Returns the new release time string. $release_time=$adv_obj->release_time($release_time); #Obtain the weather service string. $weather_service=$adv_obj->weather_service(); #Change the weather service string. #Returns the new weather service string. $weather_service=$adv_obj->weather_service($weather_service); #Obtain the position array or array reference. @position=$adv_obj->position(); or $positon_AR=$adv_obj->position(); #Change the position array. #Returns the new position array or array reference. @position=$adv_obj->position($position_AR); or $position_AR=$adv_obj->position($position_AR); #Obtain the maximum wind value. $max_winds=$adv_obj->max_winds($max_winds); #Change the maximum wind value. #Returns the new maximum wind value. $max_winds=$adv_obj->max_winds($max_winds); #Obtain the minimum central pressure value. $min_central_pressure=$adv_obj->min_central_pressure(); #Change the minimum central pressure value. #Returns the new minimum central pressure value. $min_central_pressure=$adv_obj->min_central_pressure($min_central_pressure) #Determine whether or not the advisory says it is the last one. $is_final=$adv_obj->is_final(); #Change the is_final value. #Returns the new is_final value. $is_final=$adv_obj->min_central_pressure($is_final)
The Geo::Storm_Tracker::Advisory 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. A Geo::Storm_Tracker::Advisory object is designed to contain everything about a single advisory. The Geo::Storm_Tracker::Advisory objects are typically created and populated by the read methods of a Geo::Storm_Tracker::Parser object.
Creates a Geo::Storm_Tracker::Advisory object and returns a blessed reference to it.
Geo::Storm_Tracker::Advisory
Returns the entire advisory. Internally calls stringify_header and stringify_body and joins the result.
The remaining methods function as both assignment and access methods. When called with an argument, they act as assignment methods and when called without an argument they act as access methods.
When successfully called as assignment methods the return value is that of the newly assigned value. If the assignment is unsuccessful the return value will be undefined.
The attribute set/retrieved is identical to the method name.
Returns a string value.
Returns an array value when called in array context and an array reference when called in a scalar context.
Returns a boolean value.
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.
Geo::Storm_Tracker::Main Geo::Storm_Tracker::Data Geo::Storm_Tracker::Parser perl(1).
To install Geo::Storm_Tracker, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Geo::Storm_Tracker
CPAN shell
perl -MCPAN -e shell install Geo::Storm_Tracker
For more information on module installation, please visit the detailed CPAN module installation guide.