Visitor/PreOrderTraversal.pm

filter: Statementstmt 100% 15 / 15 Branchbran n/a Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 4 / 4 Podpod 100% 1 / 1 totaltotal 84.0% 21 / 25 CC 2 SCAR 3.6
CC
2
Cov
89%
new
2.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.4
« VisitorFactory.pm ↑ Summary
1 package Tree::Simple::Visitor::PreOrderTraversal;
2  
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 our $VERSION = '0.16';
7  
8 2 ▶use base qw(Tree::Simple::Visitor);
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 # make sure we use the "new" interface
11 # so we enforce it here
12 13 ▶sub new {
Subroutine new: called CC=2 SCAR=7.4
Pod documented
13 13 my ($_class) = @_;
14 13 ▶ my $class = ref($_class) || $_class;
Condition33%1/3
ref $_class || $_class
l!l&&r!l&&!r
0130
MC/DC0%0/2
ref $_class || $_class
ref $_class $_class
Truth table33%1/3
A || B
A= ref $_classB= $_class
ABresult
1X1
011
000
15 13 my $visitor = $class->SUPER::new();
16 13 return $visitor;
17 }
18  
19 2 1;
20  
21 __END__
« VisitorFactory.pm ↑ Summary