line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# (c) Jan Gehring |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Rex::File::Parser::Data; |
6
|
|
|
|
|
|
|
|
7
|
45
|
|
|
45
|
|
600
|
use v5.12.5; |
|
45
|
|
|
|
|
157
|
|
8
|
45
|
|
|
45
|
|
220
|
use warnings; |
|
45
|
|
|
|
|
182
|
|
|
45
|
|
|
|
|
13167
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $VERSION = '1.14.3'; # VERSION |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub new { |
13
|
4
|
|
|
4
|
0
|
11
|
my $that = shift; |
14
|
4
|
|
33
|
|
|
20
|
my $proto = ref($that) || $that; |
15
|
4
|
|
|
|
|
13
|
my $self = {@_}; |
16
|
|
|
|
|
|
|
|
17
|
4
|
|
|
|
|
11
|
bless( $self, $proto ); |
18
|
|
|
|
|
|
|
|
19
|
4
|
|
|
|
|
11
|
return $self; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub read { |
23
|
4
|
|
|
4
|
0
|
19
|
my ( $self, $file ) = @_; |
24
|
4
|
|
|
|
|
16
|
return $self->_read_file($file); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub _read_file { |
28
|
4
|
|
|
4
|
|
9
|
my ( $self, $file ) = @_; |
29
|
|
|
|
|
|
|
|
30
|
4
|
|
|
|
|
7
|
my $content = ""; |
31
|
|
|
|
|
|
|
|
32
|
4
|
|
|
|
|
7
|
my $in_file = 0; |
33
|
4
|
|
|
|
|
17
|
for my $line ( @{ $self->{"data"} } ) { |
|
4
|
|
|
|
|
22
|
|
34
|
426
|
|
|
|
|
549
|
chomp $line; |
35
|
|
|
|
|
|
|
|
36
|
426
|
100
|
|
|
|
620
|
if ( $line eq "\@end" ) { |
37
|
10
|
|
|
|
|
13
|
$in_file = 0; |
38
|
10
|
|
|
|
|
19
|
next; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
416
|
100
|
|
|
|
588
|
if ($in_file) { |
42
|
170
|
|
|
|
|
273
|
$content .= $line . $/; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
416
|
100
|
|
|
|
753
|
if ( $line eq "\@$file" ) { |
46
|
4
|
|
|
|
|
7
|
$in_file = 1; |
47
|
4
|
|
|
|
|
8
|
next; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
4
|
|
|
|
|
51
|
return $content; |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
sub get { |
55
|
0
|
|
|
0
|
0
|
|
my ( $self, $file ) = @_; |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
1; |