Branch Coverage

blib/lib/App/Sqitch/Command/add.pm
Criterion Covered Total %
branch 50 58 86.2


line true false branch
101 1 10 unless -e $file
106 1 9 unless -f $file
132 43 23 unless $dir and -d $dir
134 0 67 unless $subdir->is_dir
135 22 45 if $$tmpl{my $script = $subdir->basename}
137 45 0 if -f $file
147 3 3 if not $tmpl->{$script} and $with->{$script} || !exists $with->{$script}
180 1 3 if (exists $vars{$key}) { }
181 1 0 unless ref $vars{$key}
187 0 7 unless &Getopt::Long::GetOptionsFromArray($args, \%opts, $class->options, "set|s=s%", sub {
188 2 5 if %vars
192 6 1 unless (my $nk = $k) =~ s/-/_/g
199 6 1 unless delete $opts{'with'}
200 6 1 unless delete $opts{'without'}
268 2 14 unless @_ or $self->change_name
278 2 10 unless (defined $name)
279 1 1 if (my $target = &first(sub {
299 1 13 if ($change) { }
317 36 3 unless $seen{$_->[1]}++
324 4 39 unless not exists $with->{$_}
338 1 13 unless my $spec = delete $added{$file}
355 1 9 if ($self->open_editor)
365 4 40 if (-e $file)
385 0 40 unless my $fh = $file->open(">:utf8_strict")
391 38 2 if (eval 'use Template; 1') { }
393 1 37 unless $tt->process($self->_slurp($tmpl), $vars, $fh)
399 0 2 unless eval "use Template::Tiny 0.11; 1"
405 0 39 unless close $fh
415 0 40 unless open my $fh, "<:utf8_strict", $tmpl