Branch Coverage

blib/lib/SQL/DBx/Deploy.pm
Criterion Covered Total %
branch 42 70 60.0


line true false branch
20 2 11 unless @{$sth->fetchall_arrayref;}
32 0 24 unless $type =~ s/.*\.(.+)$/$1/
40 18 6 if ($type eq 'sql') { }
6 0 elsif ($type eq 'pl') { }
48 70 167 if ($end) { }
46 121 elsif ($try =~ /;/) { }
0 121 elsif ($try =~ /^\s*CREATE( OR REPLACE)? FUNCTION.*AS (\S*)/i) { }
7 114 elsif ($try =~ /^\s*CREATE TRIGGER/i) { }
49 7 63 if ($try =~ /$end/) { }
52 7 0 if ($try =~ /;/)
106 38 0 if (exists $$cmd{'sql'}) { }
0 0 elsif (exists $$cmd{'pl'}) { }
109 0 38 if $@
115 0 0 unless system($^X, $tmp->filename) == 0
139 0 10 unless -d $dir
144 10 20 if $file =~ /.+\.((sql)|(pl))$/ and -f $file
170 0 7 if (-d $dir1) { }
7 0 elsif (-d $dir2) { }
171 0 0 unless $self->run_dir($dir1->subdir('deploy'))
175 0 7 unless $self->run_dir($dir2->subdir('deploy'))
181 0 0 unless $self->run_dir($distdir)
200 0 7 unless ref $ref eq 'ARRAY'
207 3 4 unless ($current[0])
218 0 7 if @$ref < $latest_change_id
223 10 11 unless $count > $latest_change_id
225 0 11 unless exists $$cmd{'sql'} or exists $$cmd{'pl'}
229 7 4 if (exists $$cmd{'sql'})
232 0 7 if $@
245 4 7 if (exists $$cmd{'pl'})
252 0 4 unless system($^X, $tmp->filename) == 0
283 0 5 unless -d $dir
289 12 10 if $file =~ /.+\.((sql)|(pl))$/ and -f $file
304 1 0 unless ($dbschema)
305 1 0 if ($self->dbd eq 'SQLite') { }
0 0 elsif ($self->dbd eq 'Pg') { }