Branch Coverage

lib/DBIx/Deployer.pm
Criterion Covered Total %
branch 98 202 48.5


line true false branch
26 13 0 @_ ? :
27 0 13 if ($self->deploy_sql and $self->deploy_script) { }
13 0 elsif ($self->deploy_sql) { }
0 0 elsif ($self->deploy_script) { }
31 1 12 if ($self->deploy_sql_args) { }
32 0 1 unless $self->db->do($self->deploy_sql, {}, @{$self->deploy_sql_args;})
36 1 11 unless $self->db->do($self->deploy_sql)
40 0 0 unless $self->deploy_script_args
0 0 if (my $status = system($self->deploy_script, @{[] unless $self->deploy_script_args;}))
49 13 0 @_ ? :
50 0 13 if $self->deployed
51 13 0 if ($self->supports_transactions and not $self->deploy_script)
54 12 0 @_ ? :
59 12 0 @_ ? :
60 1 11 if ($self->no_verify)
65 1 10 unless $self->verify_expects
1 10 unless ($self->verify_sql and @{[] unless $self->verify_expects;})
71 1 9 if ($self->verify_sql_args) { }
72 0 1 unless $result = $self->db->selectall_arrayref($self->verify_sql, {}, @{$self->verify_sql_args;})
76 0 9 unless $result = $self->db->selectall_arrayref($self->verify_sql)
83 11 0 @_ ? :
84 10 1 if ($self->verified) { }
85 10 0 if ($self->supports_transactions and not $self->deploy_script)
95 3 0 @_ ? :
0 3 if @_ != 1
3 0 $#_ >= 0 ? :
3 0 Type::Tiny::XS::Str($error) ? :
3 0 if ($#_ >= 0)
96 3 0 if ($self->supports_transactions and not $self->deploy_script)
98 0 3 unless $self->db->rollback
103 10 0 @_ ? :
0 10 if @_ != 1
10 0 $#_ >= 0 ? :
10 0 XXX ? :
10 0 if ($#_ >= 0)
105 1 9 unless ($is_equal)
114 0 0 ref $_[0] eq 'Kavorka::Signature::NOBBLE' ? :
0 0 @_ ? :
0 0 unless ($____nobble_checks)
0 0 if @_ != 1
0 0 $#_ >= 0 ? :
0 0 XXX ? :
0 0 if ($#_ >= 0)
0 0 unless ($____nobble_checks)
126 53 0 ref $_[0] eq 'Kavorka::Signature::NOBBLE' ? :
53 0 @_ ? :
0 53 unless ($____nobble_checks)
0 53 if @_ != 1
53 0 $#_ >= 0 ? :
0 0 XXX ? :
0 0 if ($#_ >= 0)
0 53 unless ($____nobble_checks)
132 147 0 ref $_[0] eq 'Kavorka::Signature::NOBBLE' ? :
147 0 @_ ? :
0 147 unless ($____nobble_checks)
0 147 if @_ != 1
147 0 $#_ >= 0 ? :
0 0 Type::Tiny::XS::Str($params) ? :
0 0 if ($#_ >= 0)
0 147 unless ($____nobble_checks)
136 28 0 ref $_[0] eq 'Kavorka::Signature::NOBBLE' ? :
28 0 @_ ? :
0 28 unless ($____nobble_checks)
0 28 if @_ != 1
28 0 $#_ >= 0 ? :
0 0 !defined($params) ? :
0 0 if ($#_ >= 0)
0 28 unless ($____nobble_checks)
190 18 0 @_ ? :
191 8 10 if %{$self->_patches_hashref;}
209 12 0 unless $self->keep_newlines
216 13 0 unless $status
230 13 0 @_ ? :
0 13 if @_ != 1
13 0 $#_ >= 0 ? :
13 0 Type::Tiny::XS::Str($name) ? :
13 0 if ($#_ >= 0)
231 0 13 unless $self->deployer_db->do(sprintf('INSERT INTO %s (name, deployed, verified) VALUES (?, ?, ?)', $self->deployer_patch_table), {}, $name, 0, 0)
236 10 0 @_ ? :
0 10 if @_ != 1
10 0 $#_ >= 0 ? :
10 0 Type::Tiny::XS::AUTO::TC4($patch) ? :
10 0 if ($#_ >= 0)
239 0 10 unless $self->deployer_db->do(sprintf('UPDATE %s SET deployed = ?, verified = ? WHERE name = ?', $self->deployer_patch_table), {}, map({$patch->$_;} 'deployed', 'verified', 'name'))
243 8 0 @_ ? :
251 13 0 @_ ? :
0 13 if @_ != 1
13 0 $#_ >= 0 ? :
13 0 Type::Tiny::XS::AUTO::TC4($patch) ? :
13 0 if ($#_ >= 0)
252 2 11 if $patch->deployed
254 8 3 unless $patch->dependencies
256 3 8 if (@dependencies)
259 2 1 if ($patches->{$name}) { }
271 1 9 if ($error)
274 10 0 @_ ? :
0 10 if @_ != 1
10 0 $#_ >= 0 ? :
10 0 Type::Tiny::XS::AUTO::TC3($db) ? :
10 0 if ($#_ >= 0)
275 0 10 unless $db->do(sprintf('CREATE TABLE %s (name VARCHAR UNIQUE, deployed INT, verified INT)', $self->deployer_patch_table))