Branch Coverage

blib/lib/App/UniqFiles.pm
Criterion Covered Total %
branch 78 122 63.9


line true false branch
28 0 30 if -l $_
29 10 20 unless -f _
293 0 11 unless $files and @$files
301 0 9 $digest_args ? :
304 0 11 if ($args{'detail'})
311 2 9 $args{'authoritative_dirs'} && @{$args{'authoritative_dirs'};} ? :
313 0 2 unless -d $dir
314 0 2 unless my $abs_dir = abs_path($dir)
323 0 0 if (ref $re0 eq 'Regexp') { }
327 0 0 if $@
328 0 0 if Regexp::Util::regexp_seen_evals($re)
336 0 0 if (ref $re0 eq 'Regexp') { }
340 0 0 if $@
341 0 0 if Regexp::Util::regexp_seen_evals($re)
346 5 6 if ($recurse)
348 0 35 if (-l $_) { }
10 25 elsif (-d _) { }
362 0 87 if (-l $f)
366 12 75 if (-d _)
370 0 75 unless (-f _)
375 0 75 if (@include_re)
378 0 0 if ($f =~ /$re/)
380 0 0 unless ($included)
385 0 75 if (@exclude_re)
387 0 0 if ($f =~ /$re/)
395 0 75 if ($args{'exclude_empty_files'} and not $size)
399 0 75 if ($args{'min_size'} and $size < $args{'min_size'})
403 0 75 if ($args{'max_size'} and $size > $args{'max_size'})
419 0 75 unless (@st)
437 1 10 unless $calc_digest
441 0 66 unless defined $file_sizes{$f}
442 6 60 if $size_counts{$file_sizes{$f}} == 1
445 0 60 unless $res->[0] == 200
457 0 75 unless defined $file_sizes{$f}
458 15 60 if (not defined $file_digests{$f}) { }
466 9 2 unless @authoritative_dirs
467 2 0 $calc_digest ? :
471 6 4 unless @files > 1
473 0 12 unless (my $abs_file = abs_path($file))
485 0 10 if ($file_a =~ m[\A\Q$d\E(?:/|\z)(.*)])
491 2 8 if ($file_b =~ m[\A\Q$d\E(?:/|\z)(.*)])
497 0 10 $file_a_in_authoritative_dirs ? :
2 8 $file_b_in_authoritative_dirs ? :
0 2 unless ($file_a_in_authoritative_dirs ? $subdir_len_file_a : 9999) <=> ($file_b_in_authoritative_dirs ? $subdir_len_file_b : 9999)
509 24 51 if ($file_counts{$f} == 1) { }
511 14 10 if $report_unique
516 42 9 $calc_digest ? :
518 6 45 if ($report_duplicate == 0) { }
15 30 elsif ($report_duplicate == 1) { }
21 9 elsif ($report_duplicate == 2) { }
9 0 elsif ($report_duplicate == 3) { }
523 6 15 if $is_first_copy
525 6 3 unless $is_first_copy
534 10 1 unless $group_by_digest
537 0 7 unless $file_sizes{$a} <=> $file_sizes{$b}
548 4 5 if ($group_by_digest and defined $last_digest and $digest ne $last_digest)
549 4 0 $show_count || $show_digest || $show_size ? :
553 19 22 if ($show_count or $show_digest or $show_size) { }
555 5 14 if $show_count
556 12 7 if $show_digest
557 2 17 if $show_size