Nagios/Plugin/CheckHost/Node.pm

filter: Statementstmt 100% 13 / 13 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 0.0% 0 / 5 totaltotal 80.0% 20 / 25 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
new
1.0
CRAP 1.0
« Nagios/Plugin/CheckHost/Ping.pm ↑ Summary Nagios/Plugin/CheckHost/Result/Http.pm »
1 package Nagios::Plugin::CheckHost::Node;
2  
3 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 7 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
7 7 my ($class, $id, $location) = @_;
8 7 bless {
9 id => $id,
10 country => $location->[0],
11 city => $location->[1],
12 }, $class;
13 }
14  
15 80 ▶sub identifier {
Subroutine identifier: called CC=1 SCAR=0.0
Pod undocumented
16 $_[0]->{id}
17 80 }
18  
19 1 ▶sub city {
Subroutine city: called CC=1 SCAR=0.0
Pod undocumented
20 $_[0]->{city}
21 1 }
22  
23 32 ▶sub country {
Subroutine country: called CC=1 SCAR=0.0
Pod undocumented
24 $_[0]->{country}
25 32 }
26  
27 31 ▶sub shortname {
Subroutine shortname: called CC=1 SCAR=0.0
Pod undocumented
28 31 sprintf("%s_%s", $_[0]->country, $_[0]->identifier);
29 }
30  
31 3 1;
« Nagios/Plugin/CheckHost/Ping.pm ↑ Summary Nagios/Plugin/CheckHost/Result/Http.pm »