Branch Coverage

blib/lib/App/Dest.pm
Criterion Covered Total %
branch 132 180 73.3


line true false branch
23 0 4 unless mkdir ".dest"
24 0 4 unless open my $watch, ">", ".dest/watch"
28 4 0 if (-f "dest.watch")
29 0 4 unless open my $watches, "<", "dest.watch"
48 0 4 @errors ? :
58 0 8 unless @_
63 1 7 unless -d $dir
66 1 6 if grep {$rel_dir eq $_;} @watches
70 0 6 unless open my $watch, ">", $self->_rel2dir(".dest/watch")
79 0 1 unless @_
87 0 1 unless grep {$dir eq $_;} @watches
92 0 1 unless open my $watch_file, ">", $self->_rel2dir(".dest/watch")
94 1 0 if (grep {$watch_dir eq $_;} @rms) { }
109 2 1 if @watches
117 0 1 unless -f $file
119 0 1 unless open my $new_watches, "<", $file
125 1 0 if grep {$_ eq $old;} @new
129 1 1 if grep {$_ eq $new;} @old
139 0 1 unless copy($self->_rel2dir(".dest/watch"), $self->_rel2dir("dest.watch"))
146 0 2 unless $path
150 1 1 if defined $ext
156 0 6 unless open my $file, ">", "$path/$_$ext"
183 2 0 @{$tree->{$path};} ? :
195 1 2 @{$action->{'prereqs'};} ? :
205 5 0 if (-f $self->_rel2dir("dest.watch"))
207 0 5 if $diff
214 2 10 if ($action->{'modified'}) { }
215 3 7 $action->{'deployed'} ? :
231 1 1 unless (defined $path)
241 2 1 if $a =~ m[/dest.wrap$]u or $b =~ m[/dest.wrap$]u or not -f $a or not -f $b
252 1 1 if (@_) { }
273 0 1 if (@_) { }
299 0 5 unless $action
305 8 0 if $_->{'action'} eq $action
1 4 unless @$execute_stack and scalar grep({$_->{'type'} eq "deploy" if $_->{'action'} eq $action;} @$execute_stack)
308 1 3 if ($dry_run) { }
342 0 3 unless $action
347 3 4 if $_->{'action'} eq $action
0 3 unless @$execute_stack and scalar grep({$_->{'type'} eq "revert" if $_->{'action'} eq $action;} @$execute_stack)
350 1 2 if ($dry_run) { }
371 0 2 unless ($App::Dest::b->{'modified'} || 0) <=> ($App::Dest::a->{'modified'} || 0)
377 2 12 if $_->{'modified'} or $_->{'deployed'}
383 1 2 if @incs
387 8 0 if (index($execution->{'file'}, $_) != -1)
398 1 2 if ($dry_run) { }
416 42 9 unless (ref $self)
422 4 24 if ($self->{'root_dir'}->is_rootdir)
430 5 37 if ($expect_no_root_dir) { }
431 1 4 if $self->{'root_dir'}
434 0 37 unless $self->{'root_dir'}
443 3 8 @clean != @_ ? :
467 0 110 unless open my $watch, "<", $self->_rel2dir(".dest/watch")
482 899 261 unless m[/deploy(?:\.[^\/]+)?]u
485 261 0 if not defined $filter or index($action, $filter) != -1
506 0 114 unless open my $content, "<", $file
511 0 59 unless $1
553 29 128 if $a and $a =~ m[/dest.wrap$]u or $b and $b =~ m[/dest.wrap$]u
554 31 97 unless $printed_path++
556 18 110 if (not $b) { }
93 17 elsif (not $a) { }
17 0 elsif ($a and $b) { }
591 0 0 if $e =~ /Not a directory/u
594 2 31 unless $printed_path
600 31 2 if (ref $data->{'actions'} eq "ARRAY")
615 5 20 if ($type eq "revert")
628 9 30 if $seen_action->{$action}++
629 8 22 unless $prereqs->{$action}
631 20 10 $type ne 'revert' ? :
637 30 0 unless (exists $wraps->{$action})
641 9 21 if defined $nodes[0] and $nodes[0] eq ".dest"
644 28 28 if (-f $path)
653 0 27 unless $file
655 27 0 $wraps->{$action} ? :
656 0 27 unless -x $executable
668 17 10 if ($type eq "deploy")
670 0 17 unless $verify_file
686 19 11 if ($type eq 'deploy') { }
10 1 elsif ($type eq 'revert') { }
1 0 elsif ($type eq 'verify') { }
687 17 2 unless $state->{$action}{'deployed'} and not $redeploy
690 9 1 if $state->{$action}{'deployed'} or $state->{$action}{'modified'}
702 17 0 $_->{'wrap'} ? :
713 0 27 unless run([grep({defined $_;} $wrap), $file, $type], \(undef), \$out, \$err)
721 0 27 if ($err)
724 0 0 if ($died) { }
733 12 15 if ($type eq 'verify') { }
736 0 12 if $err
738 12 0 if ($out) { }
752 15 12 unless $type eq "verify"
753 11 16 if $type eq "deploy"