line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Log::Dispatch::Configurator; |
2
|
|
|
|
|
|
|
|
3
|
10
|
|
|
10
|
|
16627
|
use strict; |
|
10
|
|
|
|
|
15
|
|
|
10
|
|
|
|
|
365
|
|
4
|
10
|
|
|
10
|
|
44
|
use vars qw($VERSION); |
|
10
|
|
|
|
|
11
|
|
|
10
|
|
|
|
|
2627
|
|
5
|
|
|
|
|
|
|
$VERSION = 0.11_02; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub new { |
8
|
10
|
|
|
10
|
0
|
159
|
my($class, $file) = @_; |
9
|
10
|
|
|
|
|
67
|
bless { |
10
|
|
|
|
|
|
|
file => $file, |
11
|
|
|
|
|
|
|
_ctime => 0, |
12
|
|
|
|
|
|
|
_watch => 0, |
13
|
|
|
|
|
|
|
}, $class; |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
3
|
|
|
3
|
0
|
8
|
sub parse { } |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub needs_reload { |
19
|
1
|
|
|
1
|
0
|
3
|
my $self = shift; |
20
|
1
|
|
|
|
|
126
|
return $self->{_ctime} < (stat($self->{file}))[9]; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub conf_time { |
24
|
12
|
|
|
12
|
0
|
24
|
my $self = shift; |
25
|
12
|
50
|
|
|
|
109
|
$self->{_ctime} = shift if @_; |
26
|
12
|
|
|
|
|
72
|
$self->{_ctime}; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub should_watch { |
30
|
12
|
|
|
12
|
0
|
21
|
my $self = shift; |
31
|
12
|
100
|
|
|
|
34
|
$self->{_watch} = shift if @_; |
32
|
12
|
|
|
|
|
76
|
return $self->{_watch}; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub _abstract_method { |
36
|
1
|
|
|
1
|
|
9
|
require Carp; |
37
|
1
|
|
|
|
|
226
|
Carp::croak(shift, " is an abstract method of ", __PACKAGE__); |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
1
|
|
|
1
|
0
|
5
|
sub get_attrs_global { _abstract_method('get_attrs_global') } |
41
|
0
|
|
|
0
|
0
|
|
sub get_attrs { _abstract_method('get_attrs') } |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
1; |
44
|
|
|
|
|
|
|
__END__ |