File Coverage

lib/Rex/Interface/Executor.pm
Criterion Covered Total %
statement 27 28 96.4
branch 2 4 50.0
condition n/a
subroutine 8 8 100.0
pod 0 1 0.0
total 37 41 90.2


line stmt bran cond sub pod time code
1             #
2             # (c) Jan Gehring
3             #
4              
5             package Rex::Interface::Executor;
6              
7 121     121   1466 use v5.12.5;
  121         461  
8 121     121   886 use warnings;
  121         416  
  121         4731  
9              
10             our $VERSION = '1.14.2.2'; # TRIAL VERSION
11              
12 121     114   883 use Data::Dumper;
  114         415  
  114         19396  
13              
14             sub create {
15 213     213 0 677 my ( $class, $type ) = @_;
16              
17 213 50       569 unless ($type) {
18 213         462 $type = "Default";
19             }
20              
21 213         578 my $class_name = "Rex::Interface::Executor::$type";
22 67     67   850 eval "use $class_name;";
  67     38   404  
  67     35   629  
  50     23   473  
  38         108  
  38         408  
  35         362  
  35         165  
  35         327  
  23         198  
  23         177  
  23         221  
  213         17658  
23 213 50       4194 if ($@) { die("Error loading file interface $type.\n$@"); }
  0         0  
24              
25 213         1321 return $class_name->new;
26              
27             }
28              
29             1;