Branch Coverage

blib/lib/App/Sqitch/Command.pm
Criterion Covered Total %
branch 58 62 93.5


line true false branch
84 3 261 if $class eq "App::Sqitch::Command"
98 9 56 unless (eval "require $pkg; 1")
109 1 38 unless my $cmd = delete $p->{'command'}
110 3 35 unless my $pkg = $class->class_for($p->{'sqitch'}, $cmd)
150 33 16 unless $args and @{$args;}
154 2 14 unless &Getopt::Long::GetOptionsFromArray($args, \%opts, $class->options)
159 8 2 unless (my $nk = $k) =~ s/-/_/g
196 1 1 if ref $self eq "App::Sqitch::Command"
230 1 3 if $p{'target'}
238 130 49 unless $p{'no_changes'}
239 46 133 if ($p{'target'})
247 49 145 if (not $p{'no_changes'} and $target and -e $target->plan_file and $target->plan->contains($arg)) { }
39 106 elsif ($config->get('key', "target.$arg.uri") or 'URI'->new($arg)->isa('URI::db')) { }
21 85 elsif ($engines{$arg}) { }
7 78 elsif (-e $arg) { }
253 38 0 unless $seen{$target->name}++
258 21 0 unless $seen{$target->name}++
262 7 0 unless %target_for
264 6 1 if ($target_for{$arg}) { }
267 6 0 unless $seen{$target->name}++
279 59 7 unless $_
124 54 unless $p{'names'}
282 21 157 if (my(@unknown) = @{$rec{'unknown'};})
293 12 145 if ($p{'all'}) { }
65 80 elsif (not @targets) { }
295 4 8 if @targets
304 4 61 $self->sqitch->config->get('key', $key, 'as', 'bool') ? :
306 1 60 if $deftarget_err
316 116 94 if make_path($dir, {"error", \my $err})
319 208 2 unless my $diag = shift @{$err;}
322 1 1 if $path