line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package System::Introspector::Probe::Hosts; |
2
|
1
|
|
|
1
|
|
34979
|
use Moo; |
|
1
|
|
|
|
|
26691
|
|
|
1
|
|
|
|
|
8
|
|
3
|
|
|
|
|
|
|
|
4
|
1
|
|
|
|
|
253
|
use System::Introspector::Util qw( |
5
|
|
|
|
|
|
|
output_from_file |
6
|
|
|
|
|
|
|
transform_exceptions |
7
|
1
|
|
|
1
|
|
6327
|
); |
|
1
|
|
|
|
|
4
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
has hosts_file => ( |
10
|
|
|
|
|
|
|
is => 'ro', |
11
|
|
|
|
|
|
|
default => sub { '/etc/hosts' }, |
12
|
|
|
|
|
|
|
); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub gather { |
15
|
1
|
|
|
1
|
0
|
1339
|
my ($self) = @_; |
16
|
1
|
|
|
|
|
5
|
my $file = $self->hosts_file; |
17
|
|
|
|
|
|
|
return { |
18
|
|
|
|
|
|
|
hosts_file => transform_exceptions { |
19
|
|
|
|
|
|
|
return { |
20
|
1
|
|
|
1
|
|
9
|
file_name => $file, |
21
|
|
|
|
|
|
|
body => scalar output_from_file $file, |
22
|
|
|
|
|
|
|
}; |
23
|
|
|
|
|
|
|
}, |
24
|
1
|
|
|
|
|
10
|
}; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
1; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
__END__ |