man Genders () - Perl library for querying a genders file

NAME

Genders - Perl library for querying a genders file

SYNOPSIS

 use Genders;

 $Genders::GENDERS_DEFAULT_FILE;

 $obj = Genders->new([$filename])

 $obj->debug($num)

 $obj->getnodename()
 $obj->getnodes([$attr, [$val]])
 $obj->getattr([$node])
 $obj->getattr_all()
 $obj->getattrval($attr, [$node])

 $obj->testattr($attr, [$node])
 $obj->testattrval($attr, $val, [$node])

 $obj->isnode([$node])
 $obj->isattr($attr)
 $obj->isattrval($attr, $val)

DESCRIPTION

This package provides a perl interface for querying a genders file.

Genders->new([$filename])
Creates a Genders object and load genders data from the specified file. If the genders file is not specified, the default genders file will be used. Returns undef if file cannot be read.
$obj->debug($num)
Set the debug level in the genders object. By default, the debug level is 0 and all debugging is turned off. To turn it on, set the level to 1.
$obj->BIgetnodename()
Returns the name of the current node.
$obj->getnodes([$attr, [$val]])
Returns a list of nodes with the specified attribute and value. If a value is not specified only the attribute is considered. If the attribute is not specified, all nodes listed in the genders file are returned.
$obj->getattr([$node])
Returns a list of attributes for the specified node. If the node is not specified, the local node's attributes returned.
$obj->BIgetattr_all()
Returns a list of all attributes listed in the genders file.
$obj->getattrval($attr, [$node])
Returns the value of the specified attribute for the specified node. If the attribute does not exist or the attribute has no value, an empty string is returned. If the node is not specified, the local node's attribute value is returned.
$obj->testattr($attr, [$node])
Returns 1 if the specified node has the specified attribute, 0 if it does not. If the node is not specified, the local node is checked. Returns 1 if the specified node has the specified attribute and value, 0 if it does not. If the node is not specified, the local node is checked.
$obj->isnode([$node])
Returns 1 if the specified node is listed in the genders file, 0 if it is not. If the node is not specified, the local node is checked.
$obj->isattr($attr)
Returns 1 if the specified attribute is listed in the genders file, 0 if it is not. Returns 1 if the specified attribute is equal to the specified value for some node in the genders file, 0 if it is not.

AUTHOR

Albert Chu <chu11@llnl.gov>

SEE ALSO

Libgenders.

libgenders.