Branch Coverage

lib/DBIx/Deployer.pm
Criterion Covered Total %
branch 106 202 52.4


line true false branch
26 15 0 @_ ? :
27 0 15 if ($self->deploy_sql and $self->deploy_script) { }
13 2 elsif ($self->deploy_sql) { }
2 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 2 unless $self->deploy_script_args
1 1 if (my $status = system($self->deploy_script, @{[] unless $self->deploy_script_args;}))
49 15 0 @_ ? :
50 0 15 if $self->deployed
51 13 2 if ($self->supports_transactions and not $self->deploy_script)
54 13 0 @_ ? :
59 13 0 @_ ? :
60 1 12 if ($self->no_verify)
65 1 11 unless $self->verify_expects
1 11 unless ($self->verify_sql and @{[] unless $self->verify_expects;})
71 1 10 if ($self->verify_sql_args) { }
72 0 1 unless $result = $self->db->selectall_arrayref($self->verify_sql, {}, @{$self->verify_sql_args;})
76 0 10 unless $result = $self->db->selectall_arrayref($self->verify_sql)
83 12 0 @_ ? :
84 11 1 if ($self->verified) { }
85 10 1 if ($self->supports_transactions and not $self->deploy_script)
95 4 0 @_ ? :
0 4 if @_ != 1
4 0 $#_ >= 0 ? :
4 0 Type::Tiny::XS::Str($error) ? :
4 0 if ($#_ >= 0)
96 3 1 if ($self->supports_transactions and not $self->deploy_script)
98 0 3 unless $self->db->rollback
103 11 0 @_ ? :
0 11 if @_ != 1
11 0 $#_ >= 0 ? :
11 0 XXX ? :
11 0 if ($#_ >= 0)
105 1 10 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 59 0 ref $_[0] eq 'Kavorka::Signature::NOBBLE' ? :
59 0 @_ ? :
0 59 unless ($____nobble_checks)
0 59 if @_ != 1
59 0 $#_ >= 0 ? :
0 0 XXX ? :
0 0 if ($#_ >= 0)
0 59 unless ($____nobble_checks)
132 167 0 ref $_[0] eq 'Kavorka::Signature::NOBBLE' ? :
167 0 @_ ? :
0 167 unless ($____nobble_checks)
0 167 if @_ != 1
167 0 $#_ >= 0 ? :
0 0 Type::Tiny::XS::Str($params) ? :
0 0 if ($#_ >= 0)
0 167 unless ($____nobble_checks)
136 32 0 ref $_[0] eq 'Kavorka::Signature::NOBBLE' ? :
32 0 @_ ? :
0 32 unless ($____nobble_checks)
0 32 if @_ != 1
32 0 $#_ >= 0 ? :
0 0 !defined($params) ? :
0 0 if ($#_ >= 0)
0 32 unless ($____nobble_checks)
190 20 0 @_ ? :
191 9 11 if %{$self->_patches_hashref;}
209 13 0 unless $self->keep_newlines
216 15 0 unless $status
230 15 0 @_ ? :
0 15 if @_ != 1
15 0 $#_ >= 0 ? :
15 0 Type::Tiny::XS::Str($name) ? :
15 0 if ($#_ >= 0)
231 0 15 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 11 0 @_ ? :
0 11 if @_ != 1
11 0 $#_ >= 0 ? :
11 0 Type::Tiny::XS::AUTO::TC3($db) ? :
11 0 if ($#_ >= 0)
275 0 11 unless $db->do(sprintf('CREATE TABLE %s (name VARCHAR UNIQUE, deployed INT, verified INT)', $self->deployer_patch_table))