AST.pm

filter: Statementstmt 5.2% 1 / 19 Branchbran n/a Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 0.0% 0 / 7 Podpod 0.0% 0 / 7 totaltotal 2.6% 1 / 38 CC 2 SCAR 11.0
CC
2
Cov
5%
new
6.0
init
2.0
content
2.0
CRAP 3.0
« Parser.pm ↑ Summary AST/Tree.pm »
1 package Document::AST;
2  
3 0 ▶sub new {
Subroutine new: not called CC=2 SCAR=17.9
Pod undocumented
4 0 my $class = shift;
5 0 ▶ my $self = bless { @_ }, ref($class) || $class;
Condition0%0/3
ref $class || $class
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $class || $class
ref $class $class
Truth table0%0/3
A || B
A= ref $classB= $class
ABresult
1X1
011
000
6 }
7  
8 0 ▶sub init {
Subroutine init: not called CC=1 SCAR=6.9
Pod undocumented
9 0 my $self = shift;
10 0 die "You need to override Document::AST::insert";
11 # $self->{output} = [];
12 }
13  
14 0 ▶sub content {
Subroutine content: not called CC=1 SCAR=6.9
Pod undocumented
15 0 my $self = shift;
16 0 return $self->{output};
17 }
18  
19 0 ▶sub insert {
Subroutine insert: not called CC=1 SCAR=6.9
Pod undocumented
20 0 my $self = shift;
21 0 my $ast = shift;
22 0 die "You need to override Document::AST::insert";
23 # $self->{output} .= $ast->{output};
24 }
25  
26 0 ▶sub begin_node {
Subroutine begin_node: not called CC=1 SCAR=6.9
Pod undocumented
27 0 my $self = shift;
28 0 my $tag = shift;
29 0 die "You need to override Document::AST::begin_node";
30 # $self->{output} .= "+$tag\n";
31 }
32  
33 0 ▶sub end_node {
Subroutine end_node: not called CC=1 SCAR=6.9
Pod undocumented
34 0 my $self = shift;
35 0 my $tag = shift;
36 0 die "You need to override Document::AST::end_node";
37 # $self->{output} .= "-$tag\n";
38 }
39  
40 0 ▶sub text_node {
Subroutine text_node: not called CC=1 SCAR=6.9
Pod undocumented
41 0 my $self = shift;
42 0 my $text = shift;
43 0 die;
44 # $self->{output} .= " $text\n";
45 }
46  
47 1 1;
« Parser.pm ↑ Summary AST/Tree.pm »