lib/Rex/Interface/Executor.pm

filter: Statementstmt 96.6% 29 / 30 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod 0.0% 0 / 1 totaltotal 90.7% 39 / 43 CC 3 SCAR 3.2
CC
3
Cov
91%
create
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.4
« lib/Rex/Shared/Var/Array.pm ↑ Summary lib/Rex/Interface/Shell/Sh.pm »
1 #
2 # (c) Jan Gehring <jan.gehring@gmail.com>
3 #
4  
5 package Rex::Interface::Executor;
6  
7 124 ▶use v5.14.4;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 124 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 105 our $VERSION = '1.16.1'; # VERSION
11  
12 124 ▶use Data::Dumper;
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 213 ▶sub create {
Subroutine create: called CC=3 SCAR=11.0
Pod undocumented
15 213 my ( $class, $type ) = @_;
16  
17 213 ▶ unless ($type) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($type) 213 0 213
18 213 $type = "Default";
19 }
20  
21 213 my $class_name = "Rex::Interface::Executor::$type";
22 67 ▶ eval "use $class_name;";
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
23 0 ▶ if ($@) { die("Error loading file interface $type.\n$@"); }
Branch: 1 branch
BranchTrueFalseTotal
if ($@) 0 213 213
24  
25 213 return $class_name->new;
26  
27 }
28  
29 105 1;
« lib/Rex/Shared/Var/Array.pm ↑ Summary lib/Rex/Interface/Shell/Sh.pm »