summaryrefslogtreecommitdiff
path: root/lib/Config/HAProxy/Node/Root.pm
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2018-07-08 22:16:49 +0300
committerSergey Poznyakoff <gray@gnu.org>2018-07-08 22:16:49 +0300
commit69ff9c1766ed89edf0ffdb63bf487396b6bd081b (patch)
treeef644a810f50d81d3b4e47d7cdbf64df976d8be6 /lib/Config/HAProxy/Node/Root.pm
parent32b6c6394dc6a789826bd51575d9703bb4097f70 (diff)
downloadconfig-haproxy-69ff9c1766ed89edf0ffdb63bf487396b6bd081b.tar.gz
config-haproxy-69ff9c1766ed89edf0ffdb63bf487396b6bd081b.tar.bz2
Add documentationv1.00
Diffstat (limited to 'lib/Config/HAProxy/Node/Root.pm')
-rw-r--r--lib/Config/HAProxy/Node/Root.pm50
1 files changed, 50 insertions, 0 deletions
diff --git a/lib/Config/HAProxy/Node/Root.pm b/lib/Config/HAProxy/Node/Root.pm
index 656bb9f..ca6e575 100644
--- a/lib/Config/HAProxy/Node/Root.pm
+++ b/lib/Config/HAProxy/Node/Root.pm
@@ -4,6 +4,19 @@ use warnings;
use parent 'Config::HAProxy::Node::Section';
use Carp;
+=head1 NAME
+
+Config::HAProxy::Node::Root - root node of HAProxy configuration parse tree
+
+=head1 DESCRIPTION
+
+Objects of this class represent the topmost node in HAProxy configuration tree.
+Each parse tree contains exactly one object of this class. This node can be
+reached from every node in the tree by following its B<parent> attribute
+and is returned by the B<tree> method of B<Config::HAProxy> class.
+
+=cut
+
sub new {
my $class = shift;
my $self = $class->SUPER::new(@_);
@@ -11,21 +24,58 @@ sub new {
return $self;
}
+=head1 METHODS
+
+=head2 is_root
+
+Always true.
+
+=head2 is_dirty
+
+ $bool = $node->is_dirty;
+
+Returns true if the tree is C<dirty>, i.e. it was modified since it has been
+created from the disk configuration file.
+
+=cut
+
sub is_dirty {
my $self = shift;
return $self->{dirty}
}
+=head2 mark_dirty
+
+ $node->mark_dirty;
+
+Sets the C<dirty> attribute.
+
+=cut
+
sub mark_dirty {
my $self = shift;
$self->{dirty} = 1;
}
+=head2 clear_dirty
+
+ $node->clear_dirty;
+
+Clears the C<dirty> attribute.
+
+=cut
+
sub clear_dirty {
my $self = shift;
$self->{dirty} = 0;
}
+=head1 SEE ALSO
+
+B<Config::HAProxy::Node>.
+
+=cut
+
1;

Return to:

Send suggestions and report system problems to the System administrator.