Branch Coverage

bin/stow
Criterion Covered Total %
branch 37 54 68.5


line true false branch
472 2 0 unless caller()
484 0 0 if (%conflicts) { }
486 0 0 unless $conflicts{$action}
499 0 0 if ($options->{'simulate'})
537 1 9 if (defined $type and $type eq 'ARRAY' and defined $rc_value) { }
610 2 20 if ($action eq 'restow') { }
3 17 elsif ($action eq 'unstow') { }
621 1 33 unless &GetOptionsFromArray(\@_, \%options, "verbose|v:+", "help|h", "simulate|n|no", "version|V", "compat|p", "dir|d=s", "target|t=s", "adopt", "no-folding", "dotfiles", "ignore=s", sub { my $regex = $_[1]; push @{$options{"ignore"};}, qr/($regex)\z/; } , "override=s", sub { my $regex = $_[1]; push @{$options{"override"};}, qr/\A($regex)/; } , "defer=s", sub { my $regex = $_[1]; push @{$options{"defer"};}, qr/\A($regex)/; } , "D|delete", sub { $action = "unstow"; } , "S|stow", sub { $action = "stow"; } , "R|restow", sub { $action = "restow"; } , "<>", sub { if ($action eq "restow") { push @pkgs_to_unstow, $_[0]; push @pkgs_to_stow, $_[0]; } elsif ($action eq "unstow") { push @pkgs_to_unstow, $_[0]; } else { push @pkgs_to_stow, $_[0]; } ; } )
623 1 32 if $options{'help'}
624 0 32 if $options{'version'}
632 7 8 unless (exists $options->{'dir'})
633 0 7 length $ENV{'STOW_DIR'} ? :
637 0 15 unless -d $options->{'dir'}
639 8 7 if (exists $options->{'target'}) { }
641 0 8 unless -d $options->{'target'}
651 0 14 unless (@$pkgs_to_stow or @$pkgs_to_unstow)
658 0 24 if ($package =~ m[/])
678 15 2 if (defined $ENV{'HOME'})
682 11 21 if (-r $file)
683 0 11 unless open my $FILE, "<", $file
689 0 11 unless close $FILE
697 8 9 if (exists $rc_options->{'target'})
701 9 8 if (exists $rc_options->{'dir'})
757 2 5 unless (exists $ENV{$var})
779 0 3 if ($1) { }
799 0 2 if ($msg)
840 1 1 defined $msg ? :