Mon::Protocol - Methods for parsing / dumping a protocol block
use Mon::Protocol;
Creates a new object. A hash can be supplied which sets the default values. An example which contains all of the variables that you can initialize:
$c = new Mon::Protocol;
parse_data
.
parse_data
type
(new_type)
Sets or returns the type of the current command block. See @TYPES for valid type codes.
In the future, it is possible that this module will perform additional checking based on the type, for now it is left to the application to interpret this.
get_section_list
get_section
(section_name)
delete_section
(section_name)
add_to_section
(section_name,$hash_ref)
Adds the key/value pairs in the hash to the specified section.
$foo->add_to_section("_hostgroup", { "ns1.baz.com" -> "ok" });
delete_from_section
(section_name,$key)
Deletes the key/value pair from the section.
$foo->delete_from_section("_hostgroup", "ns1.baz.com");
error