line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MDOM::Util; |
2
|
|
|
|
|
|
|
|
3
|
15
|
|
|
15
|
|
80
|
use strict; |
|
15
|
|
|
|
|
35
|
|
|
15
|
|
|
|
|
473
|
|
4
|
15
|
|
|
15
|
|
82
|
use warnings; |
|
15
|
|
|
|
|
30
|
|
|
15
|
|
|
|
|
420
|
|
5
|
15
|
|
|
15
|
|
75
|
use base 'Exporter'; |
|
15
|
|
|
|
|
29
|
|
|
15
|
|
|
|
|
158
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our @EXPORT_OK = qw( |
8
|
|
|
|
|
|
|
trim_tokens |
9
|
|
|
|
|
|
|
); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub trim_tokens ($) { |
12
|
12
|
|
|
12
|
0
|
23
|
my $tokens = shift; |
13
|
12
|
100
|
|
|
|
39
|
return if !@$tokens; |
14
|
9
|
100
|
|
|
|
25
|
if ($tokens->[0] =~ /^\s+$/) { |
15
|
6
|
|
|
|
|
9
|
shift @$tokens; |
16
|
|
|
|
|
|
|
} |
17
|
9
|
50
|
|
|
|
25
|
return if !@$tokens; |
18
|
9
|
100
|
|
|
|
23
|
if ($tokens->[-1] =~ /^\s+$/) { |
19
|
7
|
|
|
|
|
16
|
pop @$tokens; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
1; |