line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Config::HAProxy::Node::Root; |
2
|
2
|
|
|
2
|
|
11
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
49
|
|
3
|
2
|
|
|
2
|
|
8
|
use warnings; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
41
|
|
4
|
2
|
|
|
2
|
|
7
|
use parent 'Config::HAProxy::Node::Section'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
16
|
|
5
|
2
|
|
|
2
|
|
69
|
use Carp; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
584
|
|
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
|
4
|
|
|
4
|
0
|
7
|
my $class = shift; |
22
|
4
|
|
|
|
|
18
|
my $self = $class->SUPER::new(@_); |
23
|
4
|
|
|
|
|
8
|
$self->{dirty} = 0; |
24
|
4
|
|
|
|
|
26
|
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
|
|
|
|
|
|
|
|