line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package String::Comments::Extract::SlashStar; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
102225
|
use strict; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
126
|
|
4
|
3
|
|
|
3
|
|
15
|
use warnings; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
86
|
|
5
|
|
|
|
|
|
|
|
6
|
3
|
|
|
3
|
|
699
|
use String::Comments::Extract; |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
844
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub extract_comments { |
9
|
7
|
|
|
7
|
0
|
94
|
my $self = shift; |
10
|
7
|
|
|
|
|
10
|
my $input = shift; |
11
|
7
|
|
|
|
|
213
|
return String::Comments::Extract::_slash_star_extract_comments($input); |
12
|
|
|
|
|
|
|
} |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub extract { |
15
|
6
|
|
|
6
|
0
|
15244
|
return shift->extract_comments(@_); |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub collect_comments { |
19
|
3
|
|
|
3
|
0
|
8
|
my $self = shift; |
20
|
3
|
|
|
|
|
7
|
my $input = shift; |
21
|
3
|
|
|
|
|
5
|
my @comments; |
22
|
3
|
|
|
|
|
627
|
my $comments = String::Comments::Extract::_slash_star_extract_comments($input); |
23
|
3
|
|
|
|
|
42
|
while ($comments =~ m{/\*(.*?)\*/|//(.*?)$}msg) { |
24
|
13
|
50
|
66
|
|
|
66
|
next unless defined $1 || defined $2; |
25
|
13
|
100
|
|
|
|
102
|
push @comments, defined $1 ? $1 : $2; |
26
|
|
|
|
|
|
|
} |
27
|
3
|
|
|
|
|
25
|
return @comments; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub collect { |
31
|
2
|
|
|
2
|
0
|
875
|
return shift->collect_comments(@_); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
1; |