diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2018-07-08 22:16:49 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2018-07-08 22:16:49 +0300 |
commit | 69ff9c1766ed89edf0ffdb63bf487396b6bd081b (patch) | |
tree | ef644a810f50d81d3b4e47d7cdbf64df976d8be6 /lib/Config/HAProxy/Node/Root.pm | |
parent | 32b6c6394dc6a789826bd51575d9703bb4097f70 (diff) | |
download | config-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.pm | 52 |
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; | |||
4 | use parent 'Config::HAProxy::Node::Section'; | 4 | use parent 'Config::HAProxy::Node::Section'; |
5 | use Carp; | 5 | use Carp; |
6 | 6 | ||
7 | =head1 NAME | ||
8 | |||
9 | Config::HAProxy::Node::Root - root node of HAProxy configuration parse tree | ||
10 | |||
11 | =head1 DESCRIPTION | ||
12 | |||
13 | Objects of this class represent the topmost node in HAProxy configuration tree. | ||
14 | Each parse tree contains exactly one object of this class. This node can be | ||
15 | reached from every node in the tree by following its B<parent> attribute | ||
16 | and is returned by the B<tree> method of B<Config::HAProxy> class. | ||
17 | |||
18 | =cut | ||
19 | |||
7 | sub new { | 20 | sub 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 | |||
31 | Always true. | ||
32 | |||
33 | =head2 is_dirty | ||
34 | |||
35 | $bool = $node->is_dirty; | ||
36 | |||
37 | Returns true if the tree is C<dirty>, i.e. it was modified since it has been | ||
38 | created from the disk configuration file. | ||
39 | |||
40 | =cut | ||
41 | |||
14 | sub is_dirty { | 42 | sub 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 | |||
51 | Sets the C<dirty> attribute. | ||
52 | |||
53 | =cut | ||
54 | |||
19 | sub mark_dirty { | 55 | sub 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 | |||
64 | Clears the C<dirty> attribute. | ||
65 | |||
66 | =cut | ||
67 | |||
24 | sub clear_dirty { | 68 | sub 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 | |||
75 | B<Config::HAProxy::Node>. | ||
76 | |||
77 | =cut | ||
78 | |||
29 | 1; | 79 | 1; |
30 | 80 | ||
31 | 81 | ||