Branch Coverage

blib/lib/String/Diff.pm
Criterion Covered Total %
branch 72 82 87.8


line true false branch
13 6 8 if ($ENV{'STRING_DIFF_PP'}) { }
18 14 0 if ($@)
20 0 14 if $@
37 30 96 if ($opts{'linebreak'}) { }
40 60 106 if ($line->[0] eq 'c') { }
32 74 elsif ($line->[0] eq '-') { }
20 54 elsif ($line->[0] eq '+') { }
60 100 26 wantarray ? :
65 2 154 unless $old or $new
71 304 4 $_ ? :
74 1032 6696 if ($last_mode ne $line->[0])
75 1032 0 if defined $old_str
76 1032 0 if defined $new_str
79 0 1032 unless defined $old_str
80 0 1032 unless defined $new_str
89 154 0 if defined $old_str
90 154 0 if defined $new_str
104 312 2060 if $line->[0] eq "c"
105 112 2260 if ($last_line->[0] eq $line->[0])
109 1526 734 if length $last_line->[1]
112 270 38 if length $last_line->[1]
125 23 22 wantarray ? :
133 2 88 if ($opts{'escape'} and ref $opts{'escape'} eq "CODE")
137 6 752 $escape ? :
138 97 661 if ($parts->[0] eq '-') { }
177 484 elsif ($parts->[0] eq '+') { }
159 20 35 if ($opts{'regexp'}) { }
3 64 elsif ($opts{'escape'} and ref $opts{'escape'} eq 'CODE') { }
166 195 308 $escape ? :
167 195 308 $escape ? :
169 276 227 if ($old_diff->[$old_c][0] eq 'u' and $new_diff->[$new_c][0] eq 'u') { }
67 160 elsif ($old_diff->[$old_c][0] eq '-' and $new_diff->[$new_c][0] eq '+') { }
114 46 elsif ($old_diff->[$old_c][0] eq 'u' and $new_diff->[$new_c][0] eq '+') { }
46 0 elsif ($old_diff->[$old_c][0] eq '-' and $new_diff->[$new_c][0] eq 'u') { }
175 39 28 unless $opts{'regexp'}
176 28 39 if $opts{'regexp'}
200 40 70 if ($opts{'regexp'}) { }
6 128 elsif ($opts{'escape'} and ref $opts{'escape'} eq 'CODE') { }
206 8 14 $escape ? :
207 9 13 if ($diff->[$c][0] eq '-') { }
13 0 elsif ($diff->[$c][0] eq '+') { }