line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# (c) Jan Gehring |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Rex::Report; |
6
|
|
|
|
|
|
|
|
7
|
133
|
|
|
133
|
|
1581
|
use v5.12.5; |
|
133
|
|
|
|
|
413
|
|
8
|
133
|
|
|
107
|
|
772
|
use warnings; |
|
107
|
|
|
|
|
267
|
|
|
107
|
|
|
|
|
2771
|
|
9
|
107
|
|
|
102
|
|
594
|
use Data::Dumper; |
|
102
|
|
|
|
|
232
|
|
|
102
|
|
|
|
|
22284
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $VERSION = '1.14.2.3'; # TRIAL VERSION |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
my $report; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub create { |
16
|
104
|
|
|
104
|
0
|
4726
|
my ( $class, $type ) = @_; |
17
|
104
|
100
|
100
|
|
|
1363
|
if ( $report && $type && ref($report) =~ m/::\Q$type\E$/ ) { return $report; } |
|
1
|
|
66
|
|
|
23
|
|
18
|
|
|
|
|
|
|
|
19
|
103
|
|
100
|
|
|
1189
|
$type ||= "Base"; |
20
|
|
|
|
|
|
|
|
21
|
103
|
|
|
|
|
447
|
my $c = "Rex::Report::$type"; |
22
|
103
|
|
|
67
|
|
8389
|
eval "use $c"; |
|
67
|
|
|
|
|
838
|
|
|
67
|
|
|
|
|
296
|
|
|
67
|
|
|
|
|
1108
|
|
23
|
|
|
|
|
|
|
|
24
|
103
|
50
|
|
|
|
1919
|
if ($@) { |
25
|
0
|
|
|
|
|
0
|
die("No reporting class $type found."); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
103
|
|
|
|
|
650
|
$report = $c->new; |
29
|
103
|
|
|
|
|
1713
|
return $report; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
1
|
|
|
1
|
0
|
40
|
sub destroy { $report = undef; } |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
1; |