line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Data::Section::TestBase; |
2
|
11
|
|
|
11
|
|
24924
|
use strict; |
|
11
|
|
|
|
|
23
|
|
|
11
|
|
|
|
|
459
|
|
3
|
11
|
|
|
11
|
|
58
|
use warnings; |
|
11
|
|
|
|
|
25
|
|
|
11
|
|
|
|
|
463
|
|
4
|
11
|
|
|
11
|
|
57
|
use utf8; |
|
11
|
|
|
|
|
24
|
|
|
11
|
|
|
|
|
103
|
|
5
|
|
|
|
|
|
|
|
6
|
11
|
|
|
11
|
|
1241
|
use parent qw/Exporter/; |
|
11
|
|
|
|
|
352
|
|
|
11
|
|
|
|
|
426
|
|
7
|
|
|
|
|
|
|
our @EXPORT = qw/blocks/; |
8
|
11
|
|
|
11
|
|
8970
|
use Text::TestBase; |
|
11
|
|
|
|
|
35
|
|
|
11
|
|
|
|
|
3515
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $VERSION = '0.12'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub new { |
13
|
1
|
|
|
1
|
0
|
3
|
my $class = shift; |
14
|
1
|
50
|
|
|
|
7
|
my %args= @_==1 ? %{$_[0]} : @_; |
|
0
|
|
|
|
|
0
|
|
15
|
1
|
|
|
|
|
10
|
bless { %args }, $class; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub blocks() { |
19
|
1
|
50
|
|
1
|
1
|
21
|
my $self = ref $_[0] ? shift : __PACKAGE__->new(package => scalar caller); |
20
|
|
|
|
|
|
|
|
21
|
11
|
|
|
11
|
|
86
|
my $d = do { no strict 'refs'; \*{$self->{package}."::DATA"} }; |
|
11
|
|
|
|
|
22
|
|
|
11
|
|
|
|
|
2279
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
14
|
|
22
|
1
|
50
|
|
|
|
5
|
return unless defined fileno $d; |
23
|
|
|
|
|
|
|
|
24
|
1
|
|
|
|
|
13
|
seek $d, 0, 0; |
25
|
|
|
|
|
|
|
|
26
|
1
|
|
|
|
|
3
|
my $line_offset = 0; |
27
|
|
|
|
|
|
|
|
28
|
1
|
|
|
|
|
44
|
my $content = join '', <$d>; |
29
|
|
|
|
|
|
|
|
30
|
1
|
|
|
|
|
13
|
my $parser = Text::TestBase->new(); |
31
|
1
|
|
|
|
|
6
|
my @blocks = $parser->parse($content); |
32
|
1
|
|
|
|
|
4
|
for my $block (@blocks) { |
33
|
2
|
|
|
|
|
5
|
$block->{_lineno} += $line_offset; |
34
|
|
|
|
|
|
|
} |
35
|
1
|
|
|
|
|
24
|
return @blocks; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
1; |
39
|
|
|
|
|
|
|
__END__ |