Branch Coverage

blib/lib/Text/Shorten.pm
Criterion Covered Total %
branch 81 102 79.4


line true false branch
23 519 9561 if length $scalar < $maxlen
25 0 9561 if ($scalar =~ /^['"]./ and substr($scalar, 0, 1) eq substr($scalar, -1))
43 0 9561 if ("$d1$d2" eq '')
55 0 9561 unless defined $d2
57 1135 8426 unless defined $exp
60 9540 21 if length "$sign$d1$d$d2$e$exp" > $maxlen
61 9534 27 if length "$sign$d1$d$d2$e$exp" > $maxlen
62 9449 112 if length "$sign$d1$d2$e$exp" > $maxlen
63 9318 243 if length "$sign$d1$d$d2$exp" > $maxlen
64 9291 270 if length "$sign$d1$d$d2$e$exp" > $maxlen
69 7331 655142 if ($d and $d2 eq '')
75 4518 507039 if ($e and $exp eq '' || $exp == 0)
80 606 650018 if ($d1 eq '' || $d1 == 0 and $d2 ne '')
92 138348 511670 if ($e eq '' and $d2 ne '')
95 65492 72856 if ($c > 5 or $c == 5 and $lastc) { }
98 0 65492 if (length $new_d2 > length $d2)
108 329209 182461 if ($d eq '' and $d2 eq '')
111 192178 137031 if ($c > 5 or $c == 5 and $lastc) { }
122 182461 0 if ($d2 ne '')
125 86038 96423 if ($c > 5 or $c == 5 and $lastc) { }
128 0 86038 if (length $new_d2 > length $d2)
139 8292 1269 if $d2 eq ''
145 8292 1269 if $d2 eq ''
154 4 3 if (not defined $seplen) { }
0 3 elsif ($seplen =~ /\D/) { }
162 4 3 if @key == 0
163 112 0 if $_ >= 0
166 6 1 $n > 0 ? :
167 3 4 if (@key > 1 or @key == 1 and $key[0] != 0) { }
175 3 0 if ($n > 0)
182 0 37 unless $prio[$b] <=> $prio[$a]
183 1 324 if $prio[$i] < 8 and $len > $maxlen
204 122 202 if ($prio[$i] >= 8 or $len + $dlen <= $maxlen) { }
214 2 200 if ++$insert_fails > 100
223 0 123 if $len > $maxlen
227 20 103 if ($len + $dlen <= $maxlen) { }
231 1 102 if ++$insert_fails > 100
241 4 138 if ($i < $explicit[0])
248 5 2 if ($i < $n)
257 48 0 if (not defined $sep1) { }
0 0 elsif ($sep1 =~ /\D/) { }
262 48 0 if (not defined $sep2) { }
0 0 elsif ($sep2 =~ /\D/) { }
272 48 311 if $total_len > $maxlen
274 0 48 if ($total_len <= $maxlen)
283 9 39 if (@key > 0) { }
285 0 9 if (100 > @safekeys) { }
286 0 0 unless ($key{$b} || 0) <=> ($key{$a} || 0)
295 25 14 if (100 > @safekeys) { }
304 2 46 if ($HASHREPR_SORTKEYS)
310 48 302 if $len + $dlen > $maxlen and @r > 0