Branch Coverage

blib/lib/Math/Symbolic/Custom/Transformation.pm
Criterion Covered Total %
branch 32 54 59.2


line true false branch
292 0 114 unless (defined $pattern and defined $replacement)
296 114 0 unless (ref $pattern)
299 2 112 unless (ref $pattern)
304 112 0 unless ($pattern->isa('Math::Symbolic::Custom::Pattern'))
306 0 112 if ($@ or not ref $pattern or not $pattern->isa('Math::Symbolic::Custom::Pattern'))
309 0 0 $@ ? :
316 112 0 unless (ref($replacement) =~ /^Math::Symbolic/)
319 0 112 unless (ref($replacement) =~ /^Math::Symbolic/)
356 0 138 unless (ref($tree) =~ /^Math::Symbolic/)
365 66 72 unless $matched
380 105 80 if ($tree->term_type == 2) { }
382 14 91 if ($name eq 'TRANSFORMATION_HOOK') { }
90 1 elsif ($name =~ /^(VAR|CONST|TREE)_(\w+)/) { }
385 0 14 if (not ref $hook eq 'ARRAY' and @$hook == 2) { }
395 13 1 if ($type eq 'simplify') { }
1 0 elsif ($type eq 'value') { }
402 0 1 unless (defined $value)
417 0 90 if ($type eq 'VAR') { }
86 4 elsif ($type eq 'TREE') { }
418 0 0 if (exists $$match_vars{$name})
427 86 0 if (exists $$match_trees{$name})
432 4 0 if (exists $$match_consts{$name})
452 52 0 if ($_[0]->term_type == 0) { }
493 0 0 if (defined $res and not $@)
502 0 0 if $matched
530 11 56 if ($repl_str =~ /TRANSFORMATION_HOOK/)
535 11 22 if (ref($node) =~ /^Math::Symbolic::Variable$/ and $node->name eq 'TRANSFORMATION_HOOK')