Branch Coverage

blib/lib/App/UniqFiles.pm
Criterion Covered Total %
branch 79 126 62.7


line true false branch
28 0 30 if -l $_
29 10 20 unless -f _
297 0 11 unless $files and @$files
305 0 9 $digest_args ? :
308 0 11 if ($args{'detail'})
315 2 9 $args{'authoritative_dirs'} && @{$args{'authoritative_dirs'};} ? :
317 0 2 unless -d $dir
318 0 2 unless my $abs_dir = abs_path($dir)
327 0 0 if (ref $re0 eq 'Regexp') { }
331 0 0 if $@
332 0 0 if Regexp::Util::regexp_seen_evals($re)
340 0 0 if (ref $re0 eq 'Regexp') { }
344 0 0 if $@
345 0 0 if Regexp::Util::regexp_seen_evals($re)
350 5 6 if ($recurse)
352 0 35 if (-l $_) { }
10 25 elsif (-d _) { }
366 0 87 if (-l $f)
370 12 75 if (-d _)
374 0 75 unless (-f _)
379 0 75 if (@include_re)
382 0 0 if ($f =~ /$re/)
384 0 0 unless ($included)
389 0 75 if (@exclude_re)
391 0 0 if ($f =~ /$re/)
399 0 75 if ($args{'exclude_empty_files'} and not $size)
403 0 75 if ($args{'min_size'} and $size < $args{'min_size'})
407 0 75 if ($args{'max_size'} and $size > $args{'max_size'})
424 75 0 unless grep {$_ eq $f;} @{$name_files{$basename};}
435 0 75 unless (@st)
453 1 10 unless $calc_digest
457 0 66 unless defined $file_sizes{$f}
458 6 60 if $size_counts{$file_sizes{$f}} == 1
461 0 60 unless $res->[0] == 200
473 0 75 unless defined $file_sizes{$f}
474 15 60 if (not defined $file_digests{$f}) { }
482 9 2 unless @authoritative_dirs
483 0 0 $algorithm eq 'name' ? :
2 0 $calc_digest ? :
487 6 4 unless @files > 1
489 0 12 unless (my $abs_file = abs_path($file))
501 0 10 if ($file_a =~ m[\A\Q$d\E(?:/|\z)(.*)])
507 2 8 if ($file_b =~ m[\A\Q$d\E(?:/|\z)(.*)])
513 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)
525 24 51 if ($file_counts{$f} == 1) { }
527 14 10 if $report_unique
532 42 9 $calc_digest ? :
534 6 45 if ($report_duplicate == 0) { }
15 30 elsif ($report_duplicate == 1) { }
21 9 elsif ($report_duplicate == 2) { }
9 0 elsif ($report_duplicate == 3) { }
539 6 15 if $is_first_copy
541 6 3 unless $is_first_copy
550 10 1 unless $group_by_digest
553 0 7 unless $file_sizes{$a} <=> $file_sizes{$b}
564 4 5 if ($group_by_digest and defined $last_digest and $digest ne $last_digest)
565 4 0 $show_count || $show_digest || $show_size ? :
569 19 22 if ($show_count or $show_digest or $show_size) { }
571 5 14 if $show_count
572 12 7 if $show_digest
573 2 17 if $show_size