lib/Rex/Virtualization/LibVirt/status.pm

filter: Statementstmt 66.6% 10 / 15 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 3 / 4 Podpod 0.0% 0 / 1 totaltotal 59.0% 13 / 22 CC 2 SCAR 11.0
CC
2
Cov
59%
execute
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.0
« lib/Rex/Args/Integer.pm ↑ Summary lib/Rex/Pkg/NetBSD.pm »
1 #
2 # (c) Jan Gehring <jan.gehring@gmail.com>
3 #
4  
5 package Rex::Virtualization::LibVirt::status;
6  
7 1 ▶use v5.14.4;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 our $VERSION = '1.16.1'; # VERSION
11  
12 1 ▶use Rex::Virtualization::LibVirt::info;
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 0 ▶sub execute {
Subroutine execute: not called CC=2 SCAR=17.9
Pod undocumented
15 0 my ( $class, $arg1, %opt ) = @_;
16  
17 0 my $info = Rex::Virtualization::LibVirt::info->execute($arg1);
18 0 ▶ if ( $info->{State} eq "shut off" ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($info->{"State"} eq "shut off") 0 0 0
19 0 return "stopped";
20 }
21  
22 0 return "running";
23 }
24  
25 1 1;
« lib/Rex/Args/Integer.pm ↑ Summary lib/Rex/Pkg/NetBSD.pm »