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 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 sub new {
7 7 ▶ my ($class, $id, $location) = @_;
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
8 7 bless {
9 id => $id,
10 country => $location->[0],
11 city => $location->[1],
12 }, $class;
13 }
14  
15 sub identifier {
16 $_[0]->{id}
17 80 ▶}
Subroutine identifier: called CC=1 SCAR=0.0
Pod undocumented
18  
19 sub city {
20 $_[0]->{city}
21 1 ▶}
Subroutine city: called CC=1 SCAR=0.0
Pod undocumented
22  
23 sub country {
24 $_[0]->{country}
25 32 ▶}
Subroutine country: called CC=1 SCAR=0.0
Pod undocumented
26  
27 sub shortname {
28 31 ▶ sprintf("%s_%s", $_[0]->country, $_[0]->identifier);
Subroutine shortname: called CC=1 SCAR=0.0
Pod undocumented
29 }
30  
31 3 1;
« Nagios/Plugin/CheckHost/Ping.pm ↑ Summary Nagios/Plugin/CheckHost/Result/Http.pm »