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.pm52
1 files changed, 51 insertions, 1 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;
4use parent 'Config::HAProxy::Node::Section'; 4use parent 'Config::HAProxy::Node::Section';
5use Carp; 5use Carp;
6 6
7=head1 NAME
8
9Config::HAProxy::Node::Root - root node of HAProxy configuration parse tree
10
11=head1 DESCRIPTION
12
13Objects of this class represent the topmost node in HAProxy configuration tree.
14Each parse tree contains exactly one object of this class. This node can be
15reached from every node in the tree by following its B<parent> attribute
16and is returned by the B<tree> method of B<Config::HAProxy> class.
17
18=cut
19
7sub new { 20sub new {
8 my $class = shift; 21 my $class = shift;
9 my $self = $class->SUPER::new(@_); 22 my $self = $class->SUPER::new(@_);
@@ -11,21 +24,58 @@ sub new {
11 return $self; 24 return $self;
12} 25}
13 26
27=head1 METHODS
28
29=head2 is_root
30
31Always true.
32
33=head2 is_dirty
34
35 $bool = $node->is_dirty;
36
37Returns true if the tree is C<dirty>, i.e. it was modified since it has been
38created from the disk configuration file.
39
40=cut
41
14sub is_dirty { 42sub is_dirty {
15 my $self = shift; 43 my $self = shift;
16 return $self->{dirty} 44 return $self->{dirty}
17} 45}
18 46
47=head2 mark_dirty
48
49 $node->mark_dirty;
50
51Sets the C<dirty> attribute.
52
53=cut
54
19sub mark_dirty { 55sub mark_dirty {
20 my $self = shift; 56 my $self = shift;
21 $self->{dirty} = 1; 57 $self->{dirty} = 1;
22} 58}
23 59
60=head2 clear_dirty
61
62 $node->clear_dirty;
63
64Clears the C<dirty> attribute.
65
66=cut
67
24sub clear_dirty { 68sub clear_dirty {
25 my $self = shift; 69 my $self = shift;
26 $self->{dirty} = 0; 70 $self->{dirty} = 0;
27} 71}
28 72
73=head1 SEE ALSO
74
75B<Config::HAProxy::Node>.
76
77=cut
78
291; 791;
30 80
31 81

Return to:

Send suggestions and report system problems to the System administrator.