lib/Document/AST/Tree.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 3 | 13 | 23.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | 1 | 6 | 16.6 |
pod | 0 | 5 | 0.0 |
total | 4 | 24 | 16.6 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Document::AST::Tree; | ||||||
2 | 1 | 1 | 359 | use base 'Document::AST'; | |||
1 | 2 | ||||||
1 | 526 | ||||||
3 | |||||||
4 | sub init { | ||||||
5 | 0 | 0 | 0 | my $self = shift; | |||
6 | 0 | $self->{output} = []; | |||||
7 | } | ||||||
8 | |||||||
9 | sub insert { | ||||||
10 | 0 | 0 | 0 | push @{$_[0]{output}[-1][-1]}, @{$_[1]->{output}}; | |||
0 | |||||||
0 | |||||||
11 | } | ||||||
12 | |||||||
13 | sub begin_node { | ||||||
14 | 0 | 0 | 0 | push @{$_[0]->{output}}, [$_[1], []]; | |||
0 | |||||||
15 | } | ||||||
16 | |||||||
17 | sub text_node { | ||||||
18 | 0 | 0 | 0 | push @{$_[0]->{output}}, $_[1]; | |||
0 | |||||||
19 | } | ||||||
20 | |||||||
21 | 0 | 0 | 0 | sub end_node { | |||
22 | } | ||||||
23 | |||||||
24 | 1; |