line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Config::HAProxy::Node::Root; |
2
|
3
|
|
|
3
|
|
18
|
use strict; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
79
|
|
3
|
3
|
|
|
3
|
|
12
|
use warnings; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
71
|
|
4
|
3
|
|
|
3
|
|
12
|
use parent 'Config::HAProxy::Node::Section'; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
16
|
|
5
|
3
|
|
|
3
|
|
117
|
use Carp; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
420
|
|
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 attribute |
16
|
|
|
|
|
|
|
and is returned by the B method of B class. |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=cut |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub new { |
21
|
6
|
|
|
6
|
0
|
10
|
my $class = shift; |
22
|
6
|
|
|
|
|
30
|
my $self = $class->SUPER::new(@_); |
23
|
6
|
|
|
|
|
14
|
$self->{dirty} = 0; |
24
|
6
|
|
|
|
|
40
|
return $self; |
25
|
|
|
|
|
|
|
} |
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, i.e. it was modified since it has been |
38
|
|
|
|
|
|
|
created from the disk configuration file. |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=cut |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub is_dirty { |
43
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
44
|
|
|
|
|
|
|
return $self->{dirty} |
45
|
0
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head2 mark_dirty |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
$node->mark_dirty; |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
Sets the C attribute. |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=cut |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
sub mark_dirty { |
56
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
57
|
0
|
|
|
|
|
|
$self->{dirty} = 1; |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head2 clear_dirty |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
$node->clear_dirty; |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
Clears the C attribute. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=cut |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
sub clear_dirty { |
69
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
70
|
0
|
|
|
|
|
|
$self->{dirty} = 0; |
71
|
|
|
|
|
|
|
} |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head1 SEE ALSO |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
B. |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=cut |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
1; |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
|