Branch Coverage

blib/lib/App/Dest.pm
Criterion Covered Total %
branch 128 172 74.4


line true false branch
22 0 4 unless mkdir ".dest"
23 0 4 unless open my $watch, ">", ".dest/watch"
27 4 0 if (-f "dest.watch")
28 0 4 unless open my $watches, "<", "dest.watch"
47 0 4 @errors ? :
57 0 8 unless @_
62 1 7 unless -d $dir
65 1 6 if grep {$rel_dir eq $_;} @watches
69 0 6 unless open my $watch, ">", $self->_rel2dir(".dest/watch")
78 0 1 unless @_
86 0 1 unless grep {$dir eq $_;} @watches
91 0 1 unless open my $watch_file, ">", $self->_rel2dir(".dest/watch")
93 1 0 if (grep {$watch_dir eq $_;} @rms) { }
108 2 1 if @watches
116 0 1 unless -f $file
118 0 1 unless open my $new_watches, "<", $file
124 1 0 if grep {$_ eq $old;} @new
128 1 1 if grep {$_ eq $new;} @old
138 0 1 unless copy($self->_rel2dir(".dest/watch"), $self->_rel2dir("dest.watch"))
145 0 2 unless $path
147 1 1 if defined $ext
180 2 0 @{$tree->{$path};} ? :
192 1 2 @{$action->{'prereqs'};} ? :
202 5 0 if (-f $self->_rel2dir("dest.watch"))
204 0 5 if $diff
211 2 10 if ($action->{'modified'}) { }
212 3 7 $action->{'deployed'} ? :
228 1 1 unless (defined $path)
238 2 1 if $a =~ m[/dest.wrap$]u or $b =~ m[/dest.wrap$]u or not -f $a or not -f $b
249 1 1 if (@_) { }
270 0 1 if (@_) { }
291 0 5 unless $action
297 8 0 if $_->{'action'} eq $action
1 4 unless @$execute_stack and scalar grep({$_->{'type'} eq "deploy" if $_->{'action'} eq $action;} @$execute_stack)
300 1 3 if ($dry_run) { }
334 0 3 unless $action
339 3 4 if $_->{'action'} eq $action
0 3 unless @$execute_stack and scalar grep({$_->{'type'} eq "revert" if $_->{'action'} eq $action;} @$execute_stack)
342 1 2 if ($dry_run) { }
363 0 2 unless ($App::Dest::b->{'modified'} || 0) <=> ($App::Dest::a->{'modified'} || 0)
369 2 12 if $_->{'modified'} or $_->{'deployed'}
375 1 2 if @incs
379 8 0 if (index($execution->{'file'}, $_) > -1)
390 1 2 if ($dry_run) { }
408 41 9 unless (ref $self)
414 4 24 if ($self->{'root_dir'}->is_rootdir)
422 5 36 if ($expect_no_root_dir) { }
423 1 4 if $self->{'root_dir'}
426 0 36 unless $self->{'root_dir'}
435 3 8 @clean != @_ ? :
459 0 110 unless open my $watch, "<", $self->_rel2dir(".dest/watch")
474 899 261 unless m[/deploy(?:\.[^\/]+)?]u
477 261 0 if not defined $filter or index($action, $filter) > -1
498 0 114 unless open my $content, "<", $file
503 0 59 unless $1
545 29 128 if $a and $a =~ m[/dest.wrap$]u or $b and $b =~ m[/dest.wrap$]u
546 31 97 unless $printed_path++
548 18 110 if (not $b) { }
93 17 elsif (not $a) { }
17 0 elsif ($a and $b) { }
592 31 2 if (ref $data->{'actions'} eq "ARRAY")
607 5 20 if ($type eq "revert")
620 9 30 if $seen_action->{$action}++
621 8 22 unless $prereqs->{$action}
623 20 10 $type ne 'revert' ? :
629 30 0 unless (exists $wraps->{$action})
633 9 21 if defined $nodes[0] and $nodes[0] eq ".dest"
636 28 28 if (-f $path)
645 0 27 unless $file
647 27 0 $wraps->{$action} ? :
648 0 27 unless -x $executable
660 17 10 if ($type eq "deploy")
662 0 17 unless $verify_file
678 19 11 if ($type eq 'deploy') { }
10 1 elsif ($type eq 'revert') { }
1 0 elsif ($type eq 'verify') { }
679 17 2 unless $state->{$action}{'deployed'} and not $redeploy
682 9 1 if $state->{$action}{'deployed'} or $state->{$action}{'modified'}
694 17 0 $_->{'wrap'} ? :
713 0 27 if ($err)
716 0 0 if ($died) { }
725 12 15 if ($type eq 'verify') { }
728 0 12 if $err
730 12 0 if ($out) { }
744 15 12 unless $type eq "verify"
745 11 16 if $type eq "deploy"