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   1521 use v5.12.5;
  121         418  
8 121     121   711 use warnings;
  121         357  
  121         4560  
9              
10             our $VERSION = '1.14.2.3'; # TRIAL VERSION
11              
12 121     114   777 use Data::Dumper;
  114         459  
  114         19561  
13              
14             sub create {
15 213     213 0 651 my ( $class, $type ) = @_;
16              
17 213 50       580 unless ($type) {
18 213         458 $type = "Default";
19             }
20              
21 213         591 my $class_name = "Rex::Interface::Executor::$type";
22 67     67   820 eval "use $class_name;";
  67     38   342  
  67     35   544  
  50     23   489  
  38         88  
  38         345  
  35         283  
  35         171  
  35         197  
  23         180  
  23         52  
  23         139  
  213         18485  
23 213 50       3853 if ($@) { die("Error loading file interface $type.\n$@"); }
  0         0  
24              
25 213         1357 return $class_name->new;
26              
27             }
28              
29             1;