Branch Coverage

blib/lib/DBIx/ThinSQL/Deploy.pm
Criterion Covered Total %
branch 38 64 59.3


line true false branch
22 60 265 if ($end) { }
107 158 elsif ($try =~ /;/) { }
0 158 elsif ($try =~ /^\s*CREATE( OR REPLACE)? FUNCTION.*AS (\S*)/i) { }
6 152 elsif ($try =~ /^\s*CREATE TRIGGER/i) { }
23 6 54 if ($try =~ /$end/i) { }
26 6 0 if ($try =~ /;/)
71 0 46 unless $type =~ s/.*\.(.+)$/$1/
74 41 5 if ($type eq 'sql') { }
5 0 elsif ($type eq 'pl') { }
97 100 0 if (exists $cmd->{'sql'}) { }
0 0 elsif (exists $cmd->{'pl'}) { }
104 0 0 unless system($^X, $tmp->filename) == 0
130 0 34 if ($@)
140 0 6 unless -d $dir
146 6 0 if $file =~ /.+\.((sql)|(pl))$/ and -f $file
159 0 6 if (defined &static::find)
161 0 0 unless my $sql = static::find($src)
174 2 10 unless @{$sth->fetchall_arrayref;}
186 0 6 unless ref $ref eq 'ARRAY'
194 2 4 unless ($current[0])
205 0 6 if @$ref < $latest_change_id
213 10 8 unless $count > $latest_change_id
217 0 3 unless exists $cmd->{'sql'} or exists $cmd->{'pl'}
219 5 3 if (exists $cmd->{'sql'})
222 0 5 if $@
235 3 5 if (exists $cmd->{'pl'})
242 0 3 unless system($^X, $tmp) == 0
283 0 4 unless -d $dir
290 10 0 if ($file =~ /.+\.((sql)|(pl))$/ and -f $file) { }
309 1 0 unless ($dbschema)
310 1 0 if ($driver eq 'SQLite') { }
0 0 elsif ($driver eq 'Pg') { }