Branch Coverage

blib/lib/Tree/Parser.pm
Criterion Covered Total %
branch 57 62 91.9


line true false branch
33 15 3 if ($input) { }
36 2 13 if (blessed $input and $input->isa('Tree::Simple')) { }
59 0 0 unless defined $file_encoding
65 1 4 unless defined $input
81 1 16 if blessed $input and $input->isa('Array::Iterator')
85 1 15 if ref $input eq 'ARRAY'
89 2 13 if ($input =~ /\.tree$/) { }
90 0 3 defined $$self{'file_encoding'} ? :
94 1 2 unless open TREE_FILE, '<' . $encoding, $input
102 8 5 if ($input =~ /\n/) { }
3 2 elsif ($input =~ /^\(/) { }
104 0 8 unless scalar @lines > 1
112 1 1 if -f $input
334 3 6 unless defined $filter and ref $filter eq 'CODE'
341 3 2 unless defined $filter and ref $filter eq 'CODE'
361 1 8 unless defined $$self{'deparse_filter'}
363 1 7 if $$self{'tree'}->isLeaf
371 1 19 unless defined $$self{'parse_filter'}
373 1 18 unless defined $$self{'iterator'}
387 1 6 if defined $$self{'deparse_filter_cleanup'}
390 2 5 wantarray ? :
405 3 2 unless $depth or $node or $i->hasNext
407 1 1 defined $depth ? :
2 129 unless defined $depth and $depth =~ /^\d+(\.\d*)?$/o
414 1 128 unless defined $node
420 9 119 if (blessed $node and $node->isa($tree_type) || $node->isa('Tree::Simple')) { }
429 15 113 if ($current_tree->isRoot)
435 38 75 if ($depth == $tree_depth) { }
47 28 elsif ($depth > $tree_depth) { }
28 0 elsif ($depth < $tree_depth) { }
440 1 46 unless $depth - $tree_depth <= 1