Branch Coverage

blib/lib/DBIx/Tree/MaterializedPath/Node.pm
Criterion Covered Total %
branch 151 162 93.2


line true false branch
60 1 428 unless $root
61 427 1 if ref $root
62 2 426 unless (eval { do { $root->isa('DBIx::Tree::MaterializedPath') if ref $root } })
64 219 207 ref $args[0] eq 'HASH' ? :
73 218 208 if $$options{'data'}
126 1 24 unless $node
127 23 1 if ref $node
129 2 22 unless (eval { do { $node->isa('DBIx::Tree::MaterializedPath::Node') if ref $node } })
148 1 16 unless $node
149 15 1 if ref $node
151 2 14 unless (eval { do { $node->isa('DBIx::Tree::MaterializedPath::Node') if ref $node } })
171 1 15 unless $node
172 14 1 if ref $node
174 2 13 unless (eval { do { $node->isa('DBIx::Tree::MaterializedPath::Node') if ref $node } })
262 35 268 unless defined $row
276 486 243 if exists $$data{$id_col}
277 486 243 if exists $$data{$path_col}
279 23 706 if ($ignore_empty_hash)
281 23 0 unless keys %{$data;}
296 0 238 unless $$data{$path_col}
304 0 238 unless (eval { do { $sth = $root->_cached_sth($sql); 1 } })
340 23 444 if ($path) { }
0 444 elsif (not exists $$self{'_path'}) { }
403 10 197 if ($data) { }
23 174 elsif (not exists $$self{'_data'}) { }
405 1 9 unless ref $data eq 'HASH'
406 1 8 unless keys %{$data;}
411 1 7 if exists $$data{$id_col}
415 1 6 if exists $$data{$path_col}
425 1 5 unless (eval { do { $sth = $root->_cached_sth($sql); 1 } })
486 1 99 unless defined $args[0]
488 97 2 ref $args[0] eq 'ARRAY' ? :
501 0 94 unless (eval { do { $$self{'_root'}->_do_transaction($func); 1 } })
553 1 9 unless defined $args[0]
555 8 1 ref $args[0] eq 'ARRAY' ? :
581 2 2 if ($descendants->has_nodes)
589 5 4 if ($node->depth == $initial_depth) { }
609 0 4 unless (eval { do { $root->_do_transaction($func); 1 } })
618 2 106 unless @{$children;}
630 2 210 unless ref $data eq 'HASH'
632 2 208 if exists $$data{$id_col}
635 2 206 if exists $$data{$path_col}
649 99 1 if (@columns)
655 2 97 unless (eval { do { my $sth = $root->_cached_sth($sql); 1 } })
695 1 11 if $$self{'_is_root'}
706 0 11 unless defined $row
751 2 7 ref $args[0] eq 'HASH' ? :
753 2 7 $$options{'delay_load'} ? :
755 2 7 $delay_load ? :
795 2 5 ref $args[0] eq 'HASH' ? :
797 2 5 $$options{'delay_load'} ? :
799 2 5 $delay_load ? :
871 3 17 ref $args[0] eq 'HASH' ? :
873 15 5 unless $side eq 'LEFT'
875 3 17 $$options{'delay_load'} ? :
877 3 17 $delay_load ? :
947 0 34 ref $args[0] eq 'HASH' ? :
949 1 33 $$options{'delay_load'} ? :
951 1 33 $delay_load ? :
1009 1 5 if $$self{'_is_root'}
1045 0 5 unless (eval { do { $root->_do_transaction($func); 1 } })
1184 2 11 ref $args[0] eq 'HASH' ? :
1186 2 11 unless $$options{'where'}
1188 1 10 $$options{'delay_load'} ? :
1211 1 10 $delay_load ? :
1272 1 6 unless $node
1273 5 1 if ref $node
1275 2 4 unless (eval { do { $node->isa('DBIx::Tree::MaterializedPath::Node') if ref $node } })
1277 2 2 if $$self{'_is_root'} or $$node{'_is_root'}
1279 1 1 if $self->is_same_node_as($node)
1290 0 1 unless (eval { do { $$self{'_root'}->_do_transaction($func, $self, $node); 1 } })
1342 1 8 unless $node
1343 7 1 if ref $node
1345 2 6 unless (eval { do { $node->isa('DBIx::Tree::MaterializedPath::Node') if ref $node } })
1347 2 4 if $self->is_root or $node->is_root
1349 1 3 if $self->is_same_node_as($node)
1351 2 1 if $self->is_ancestor_of($node) or $self->is_descendant_of($node)
1377 0 1 unless (eval { do { $$self{'_root'}->_do_transaction($func, $self, $node); 1 } })
1421 2 92 defined $row ? :
1434 2 92 if ($last_child_path) { }
1460 179 7 unless ($sql_info)