Branch Coverage

blib/lib/App/Sqitch/Role/TargetConfigCommand.pm
Criterion Covered Total %
branch 58 66 87.8


line true false branch
118 4 33 if (my $engine = $props->{'engine'})
122 0 4 unless &first(sub {
125 5 32 if (my $uri = $props->{'uri'})
130 2 3 unless eval {
132 1 2 unless my $engine = $uri->canonical_engine
140 1 1 unless &first(sub {
151 12 24 if (my $name = $p{'name'} || $props->{'target'}) { }
10 14 elsif (my $engine = $p{'engine'} || $props->{'engine'}) { }
153 1 11 if (my $uri = $p{'uri'}) { }
157 5 2 unless ($name =~ /:/ or $config->get("key", "target.$name.uri"))
211 13 6 if (my $top_dir = $props->{'top_dir'}) { }
213 39 0 unless $$props{"${_}_$_"}
218 18 0 unless $props->{$name}
223 13 6 if (my $reworked_dir = $props->{'reworked_dir'} || $props->{'top_dir'}) { }
225 35 4 unless $$props{"reworked_${_}_dir"}
230 18 0 unless $props->{$name}
247 23 50 if -d $dir
249 47 3 if make_path($dir, {"error", \my $err})
253 3 47 if (my $diag = shift @{$err;})
255 2 1 if $path
274 12 2 unless ($project and $uri)
278 10 2 if (&try(sub {
1 1 elsif (&try(sub {
285 0 1 unless $project
292 9 5 if (-e $file)
293 0 9 unless -f $file
304 1 8 unless my $file_proj = &try(sub {
310 1 7 if $plan->project ne $project
318 1 4 unless -d $file->dir
320 0 5 unless my $fh = $file->open(">:utf8_strict")
326 2 3 $uri ? :
331 0 5 unless $fh->close
345 6 50 if (ref $val eq 'HASH') { }