Branch Coverage

blib/lib/File/AptFetch/Simple.pm
Criterion Covered Total %
branch 71 86 82.5


line true false branch
272 65 97 if ($class->isa('File::AptFetch') and not ref $class) { }
273 6 59 unless defined $args
274 3 56 unless not ref $args or 'HASH' eq ref $args
276 21 35 unless 'HASH' eq ref $args
277 3 53 unless defined $$args{'method'}
278 11 42 if defined $$args{'force_file'}
280 7 46 $$args{'method'} eq 'file' && !$$self{'force_file'} ? :
283 1 33 unless ref $self
285 0 33 if defined $$args{'wink'}
286 0 33 if defined $$args{'beat'}
291 20 77 if ($args and 'HASH' ne ref $args) { }
7 70 elsif (not $args) { }
300 0 129 defined $$self{'wink'} ? :
1 129 defined $$args{'wink'} ? :
304 0 130 defined $$self{'beat'} ? :
0 130 defined $$args{'beat'} ? :
310 30 100 $beat ? :
313 118 0 unless $$self{'force_file'}
316 0 130 if $rv
320 0 188 if $rv
322 0 188 if (not $fn) { }
0 188 elsif (not $$self{'trace'}{$fn}) { }
330 118 70 if (grep(($$self{'Status'} == $_), ('201', '400', '401', '402', '403'))) { }
70 0 elsif ($$self{'Status'} == 200) { }
332 1 117 if $wink
335 2 186 if $wink
349 1 195 unless defined $$slf{'message'}{'uri'}
351 3 192 unless $$slf{'trace'}{$fn} and defined $$slf{'message'}{'size'}
353 1 191 if $$slf{'message'}{'size'} =~ tr[0-9][\000-/:-\377]c
354 119 72 unless defined $$slf{'trace'}{$fn}{'final_size'}
371 45 2 if ($rv)
372 39 6 defined $$rec{'size'} && defined $$rec{'back'} ? :
374 21 24 if $diff > 0
494 258 19 if (not exists $stat{'inc'} || $stat{'activity'}) { }
8 11 elsif (not $stat{'inc'} and $stat{'activity'}) { }
511 623 208 if (@{$stat{'trace'};} < $indexes[$ix])
512 193 15 if (not $stat{'speeds'}[$ix]) { }
522 0 208 if ($stat{'speeds'}[$ix] < 0)
531 0 16 $lag > 30 ? :
0 16 $lag > 1800 ? :
0 16 $lag > 43200 ? :
192 16 !$stat{'speeds'}[$ix] || $lag > 432000 ? :
541 19 258 if $$faf{'cheat_beat'} and defined $$sm[0]