line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Parse::Win32Registry::File; |
2
|
|
|
|
|
|
|
|
3
|
13
|
|
|
13
|
|
77
|
use strict; |
|
13
|
|
|
|
|
20
|
|
|
13
|
|
|
|
|
418
|
|
4
|
13
|
|
|
13
|
|
83
|
use warnings; |
|
13
|
|
|
|
|
24
|
|
|
13
|
|
|
|
|
4521
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub get_filehandle { |
7
|
10838
|
|
|
10838
|
0
|
14878
|
my $self = shift; |
8
|
|
|
|
|
|
|
|
9
|
10838
|
|
|
|
|
30818
|
return $self->{_filehandle}; |
10
|
|
|
|
|
|
|
} |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub get_filename { |
13
|
2
|
|
|
2
|
0
|
6
|
my $self = shift; |
14
|
|
|
|
|
|
|
|
15
|
2
|
|
|
|
|
21
|
return $self->{_filename}; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub get_length { |
19
|
3055
|
|
|
3055
|
0
|
3947
|
my $self = shift; |
20
|
|
|
|
|
|
|
|
21
|
3055
|
|
|
|
|
12149
|
return $self->{_length}; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub get_entry_iterator { |
25
|
4
|
|
|
4
|
0
|
8
|
my $self = shift; |
26
|
|
|
|
|
|
|
|
27
|
4
|
|
|
|
|
7
|
my $entry_iter; |
28
|
4
|
|
|
|
|
18
|
my $block_iter = $self->get_block_iterator; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
return Parse::Win32Registry::Iterator->new(sub { |
31
|
92
|
|
|
92
|
|
115
|
while (1) { |
32
|
98
|
100
|
|
|
|
224
|
if (defined $entry_iter) { |
33
|
94
|
|
|
|
|
315
|
my $entry = $entry_iter->(); |
34
|
94
|
100
|
|
|
|
242
|
if (defined $entry) { |
35
|
88
|
|
|
|
|
431
|
return $entry; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
# entry iterator is undefined or finished |
39
|
10
|
|
|
|
|
35
|
my $block = $block_iter->(); |
40
|
10
|
100
|
|
|
|
30
|
if (!defined $block) { |
41
|
4
|
|
|
|
|
15
|
return; # block iterator finished |
42
|
|
|
|
|
|
|
} |
43
|
6
|
|
|
|
|
29
|
$entry_iter = $block->get_entry_iterator; |
44
|
|
|
|
|
|
|
} |
45
|
4
|
|
|
|
|
29
|
}); |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
# method provided for backwards compatibility |
49
|
|
|
|
|
|
|
sub move_to_first_entry { |
50
|
2
|
|
|
2
|
0
|
538
|
my $self = shift; |
51
|
|
|
|
|
|
|
|
52
|
2
|
|
|
|
|
6
|
$self->{_entry_iter} = undef; |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
# method provided for backwards compatibility |
56
|
|
|
|
|
|
|
sub get_next_entry { |
57
|
92
|
|
|
92
|
0
|
40089
|
my $self = shift; |
58
|
|
|
|
|
|
|
|
59
|
92
|
|
|
|
|
212
|
my $entry_iter = $self->{_entry_iter}; |
60
|
92
|
100
|
|
|
|
317
|
if (!defined $entry_iter) { |
61
|
4
|
|
|
|
|
24
|
$self->{_entry_iter} = $entry_iter = $self->get_entry_iterator; |
62
|
|
|
|
|
|
|
} |
63
|
92
|
|
|
|
|
228
|
return $entry_iter->(); |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
1; |