line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# (c) Jan Gehring |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Rex::Interface::Cache; |
6
|
|
|
|
|
|
|
|
7
|
141
|
|
|
141
|
|
1580
|
use v5.12.5; |
|
141
|
|
|
|
|
491
|
|
8
|
141
|
|
|
108
|
|
956
|
use warnings; |
|
108
|
|
|
|
|
246
|
|
|
108
|
|
|
|
|
16442
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $VERSION = '1.14.3'; # VERSION |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub create { |
13
|
119
|
|
|
113
|
0
|
609
|
my ( $class, $type ) = @_; |
14
|
|
|
|
|
|
|
|
15
|
113
|
50
|
|
|
|
515
|
unless ($type) { |
16
|
113
|
|
|
|
|
1424
|
$type = Rex::Config->get_cache_type; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
113
|
|
|
|
|
583
|
my $class_name = "Rex::Interface::Cache::$type"; |
20
|
113
|
|
|
68
|
|
8787
|
eval "use $class_name;"; |
|
68
|
|
|
|
|
918
|
|
|
68
|
|
|
|
|
356
|
|
|
68
|
|
|
|
|
965
|
|
21
|
113
|
50
|
|
|
|
2202
|
if ($@) { die("Error loading connection interface $type.\n$@"); } |
|
0
|
|
|
|
|
0
|
|
22
|
|
|
|
|
|
|
|
23
|
113
|
|
|
|
|
702
|
return $class_name->new; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |