Branch Coverage

blib/lib/Text/Diff.pm
Criterion Covered Total %
branch 89 104 85.5


line true false branch
41 32 32 !$i ? :
43 32 32 if ($type eq 'ARRAY') { }
24 8 elsif ($type eq 'SCALAR') { }
4 4 elsif (not $type) { }
4 0 elsif ($type eq 'GLOB' or UNIVERSAL::isa($seq, 'IO::Handle')) { }
46 32 0 unless defined $$options{"OFFSET_$AorB"}
51 24 0 unless defined $$options{"OFFSET_$AorB"}
55 4 0 unless defined $$options{"OFFSET_$AorB"}
57 4 0 unless defined $$options{"FILENAME_$AorB"}
59 4 0 unless defined $$options{"MTIME_$AorB"}
62 0 4 unless open F, "<$seq"
69 4 0 unless defined $$options{"OFFSET_$AorB"}
82 28 4 if (not defined $output_handler) { }
1 3 elsif ($type eq 'CODE') { }
0 3 elsif ($type eq 'SCALAR') { }
1 2 elsif ($type eq 'ARRAY') { }
2 0 elsif ($type eq 'GLOB' or UNIVERSAL::isa($output_handler, 'IO::Handle')) { }
106 19 13 unless defined $options->{'STYLE'}
107 31 1 if exists $internal_styles{$style}
109 2 30 unless ($style->can('hunk'))
110 0 2 unless eval "require $style; 1"
113 31 1 if not ref $style and $style->can('new')
116 29 3 unless defined $ctx_lines
117 1 31 if $style->isa('Text::Diff::OldStyle')
120 1 31 $options->{'KEYGEN_ARGS'} ? :
130 24 7 unless $hunks++
152 11 107 if ($diffs and ++$ctx > $ctx_lines * 2)
158 47 71 if not $diffs and @ops > $ctx_lines
167 20 12 if ($diffs)
168 0 20 if $ctx > $ctx_lines
172 24 8 if $hunks
174 28 4 defined $output ? :
189 9 5 unless defined $fn1 and defined $fn2
191 5 0 defined $t1 ? :
5 0 defined $t2 ? :
208 21 21 $a_or_b == 0 ? :
23 19 unless $ops->[-1][2] eq ($a_or_b == 0 ? '+' : '-')
216 36 6 unless $empty_range
219 2 16 $format eq 'unified' && $empty_range ? :
22 2 $format eq 'unified' ? :
18 24 $start == $after ? :
232 12 103 unless defined $op_prefixes->{$opcode}
234 4 99 defined $op->[3] ? :
236 0 103 unless defined $op_sym
238 55 14 $op->[2] ne '+' ? :
69 34 unless defined $a_or_b
322 11 6 if $opcode eq ' '
330 2 4 if ($bang_it)
353 2 4 if grep(($_->[2] ne $op), @$ops)
354 2 4 if $op eq '+'
355 2 4 if $op eq '-'
380 1 2 $op eq 'c' ? :