Branch Coverage

blib/lib/SQL/DBx/Deploy.pm
Criterion Covered Total %
branch 41 68 60.2


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 164 if ($end) { }
43 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 35 0 if (exists $$cmd{'sql'}) { }
0 0 elsif (exists $$cmd{'pl'}) { }
109 0 35 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])
220 10 11 unless $count > $latest_change_id
222 0 11 unless exists $$cmd{'sql'} or exists $$cmd{'pl'}
226 7 4 if (exists $$cmd{'sql'})
229 0 7 if $@
242 4 7 if (exists $$cmd{'pl'})
249 0 4 unless system($^X, $tmp->filename) == 0
280 0 5 unless -d $dir
286 12 10 if $file =~ /.+\.((sql)|(pl))$/ and -f $file
301 1 0 unless ($dbschema)
302 1 0 if ($self->dbd eq 'SQLite') { }
0 0 elsif ($self->dbd eq 'Pg') { }