line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Linux::Perl::ParseFlags; |
2
|
|
|
|
|
|
|
|
3
|
11
|
|
|
11
|
|
84
|
use strict; |
|
11
|
|
|
|
|
34
|
|
|
11
|
|
|
|
|
339
|
|
4
|
11
|
|
|
11
|
|
65
|
use warnings; |
|
11
|
|
|
|
|
20
|
|
|
11
|
|
|
|
|
1543
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub parse { |
7
|
46
|
|
|
46
|
0
|
197
|
my ($arch_module, $flags_ar) = @_; |
8
|
|
|
|
|
|
|
|
9
|
46
|
|
|
|
|
112
|
my $flags = 0; |
10
|
46
|
100
|
|
|
|
176
|
if ( $flags_ar ) { |
11
|
16
|
|
|
|
|
295
|
for my $fl ( @$flags_ar ) { |
12
|
18
|
50
|
|
|
|
494
|
my $val_cr = $arch_module->can("_flag_$fl") or do { |
13
|
0
|
|
|
|
|
0
|
die "unknown flag: “$fl”"; |
14
|
|
|
|
|
|
|
}; |
15
|
18
|
|
|
|
|
117
|
$flags |= $val_cr->(); |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
46
|
|
|
|
|
203
|
return $flags; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
1; |