line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package DTL::Fast::Filter::Linenumbers; |
2
|
2
|
|
|
2
|
|
744
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
46
|
|
3
|
2
|
|
|
2
|
|
8
|
use utf8; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
11
|
|
4
|
2
|
|
|
2
|
|
39
|
use warnings FATAL => 'all'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
58
|
|
5
|
2
|
|
|
2
|
|
9
|
use parent 'DTL::Fast::Filter'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
10
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
$DTL::Fast::FILTER_HANDLERS{linenumbers} = __PACKAGE__; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
#@Override |
10
|
|
|
|
|
|
|
sub filter |
11
|
|
|
|
|
|
|
{ |
12
|
1
|
|
|
1
|
0
|
1
|
shift; # self |
13
|
1
|
|
|
|
|
2
|
shift; # filter_manager |
14
|
1
|
|
|
|
|
4
|
my $value = shift; # value |
15
|
1
|
|
|
|
|
2
|
shift; # context |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
|
18
|
1
|
|
|
|
|
2
|
my $counter = 1; |
19
|
|
|
|
|
|
|
my $nextcounter = sub { |
20
|
6
|
|
|
6
|
|
18
|
return $counter++.". "; |
21
|
1
|
|
|
|
|
4
|
}; |
22
|
|
|
|
|
|
|
|
23
|
1
|
|
|
|
|
5
|
$value =~ s/^/$nextcounter->()/gme; |
|
6
|
|
|
|
|
11
|
|
24
|
|
|
|
|
|
|
|
25
|
1
|
|
|
|
|
7
|
return $value; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
1; |