lib/Monitoring/Generator/TestConfig/P1Data.pm

filter: Statementstmt 100% 14 / 14 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod 100% 1 / 1 totaltotal 95.0% 19 / 20 CC 2 SCAR 4.1
CC
2
Cov
94%
get_p1_script
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.5
« lib/Monitoring/Generator/TestConfig/HostCheckData.pm ↑ Summary lib/Monitoring/Generator/TestConfig/ServiceCheckData.pm »
1 package # hidden from cpan
2 Monitoring::Generator::TestConfig::P1Data;
3  
4 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 ########################################
8  
9 =over 4
10  
11 =item get_p1_script
12  
13 returns the p1 script source
14  
15 adapted from the nagios debian package
16  
17 =back
18  
19 =cut
20  
21 1 ▶sub get_p1_script {
Subroutine get_p1_script: called CC=2 SCAR=7.0
Pod documented
22 1 my $self = shift;
23 1 our $scriptsource;
24 1 ▶ if(!defined $scriptsource) {
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $Monitoring::Generator::TestConfig::P1Data::scriptsource) 1 0 1
25 1 $scriptsource = do { local $/; <DATA> };
26 }
27 1 return($scriptsource);
28 }
29  
30 3 1;
31  
32 __DATA__
« lib/Monitoring/Generator/TestConfig/HostCheckData.pm ↑ Summary lib/Monitoring/Generator/TestConfig/ServiceCheckData.pm »