All methods, throw the OutsideClass exception, if you use them as class methods. Besides OutsideClass
the methods are throwing other exceptions as well. Refer to each method documentation for more
information.
new(%hash)
The class constructor. Accepts a hash as parameter. At this moment only one parameter can be specified
inside the hash: filename . If this parameter is present, the file specified is parsed and loaded into
the object.
AddParam($pname,$pvalue)
Add a new global parameter named $pname with value $value.
AddComment($pval)
Add a new global comment with value $pvalAddBlank($bval)
Add a new global blank line with value $bvalAddNode($node)
Adds a new RoPkg::Rsync::Node object to the current object. Before the node is added, the nodes list is
checked for duplicates of the object. If a duplicate is found, the method does nothing.
Exceptions:
If $node is not a instance of RoPkg::Rsync::Node, Param::Wrong exception is raised.
DelNode($node_name)
Removes a node from the nodes list. The nodes are searched by their names. Returns -1 if the node was not
found, the new number of nodes otherwise.
HasNode($node_name)
Returns 1 if the node with name $node_name was found in the nodes list, 0 otherwise.
Clean()
Clean the object. Removes all information (the nodes list, statistics, etc). Always returns 1.
Parse($filename)
Parse the configuration file $filename and returns the number of nodes. If $filename is not defined
Param::Missing exception is raised. If the path does not point to a existing file, File::NotFound
exception is raised. If the file could not be opened, File::Open exception is raised.
Write($path)
Write the configuration into the file specified by path $path.
ToString()
Returns the string representation of the configuration file.