line |
true |
false |
branch |
92
|
0 |
6 |
unless (exists $args{'spec'}) |
|
0 |
0 |
@$_sahv_dpath ? : |
|
6 |
0 |
ref $args{'spec'} eq 'HASH' ? : |
|
0 |
0 |
@$_sahv_dpath ? : |
|
6 |
0 |
defined $args{'spec'} ? : |
|
6 |
0 |
if defined $args{'spec'} ? 1 : ($arg_err //= (@$_sahv_dpath ? '@' . join('/', @$_sahv_dpath) . ': ' : '') . 'Required input not specified', 0) |
|
0 |
6 |
if ($arg_err) |
|
0 |
6 |
unless (exists $args{'dbh'}) |
|
0 |
0 |
@$_sahv_dpath ? : |
|
6 |
0 |
&Scalar::Util::blessed($args{'dbh'}) ? : |
|
0 |
0 |
@$_sahv_dpath ? : |
|
6 |
0 |
defined $args{'dbh'} ? : |
|
6 |
0 |
if defined $args{'dbh'} ? 1 : ($arg_err //= (@$_sahv_dpath ? '@' . join('/', @$_sahv_dpath) . ': ' : '') . 'Required input not specified', 0) |
|
0 |
6 |
if ($arg_err) |
105
|
2 |
4 |
if (@t) |
118
|
0 |
6 |
unless (defined $latest_v) |
121
|
0 |
0 |
unless /^upgrade_to_v(\d+)$/ |
122
|
0 |
0 |
if $1 > $latest_v |
133
|
4 |
6 |
if ($v == 0 and not @t) |
135
|
0 |
4 |
unless ($dbh->do('CREATE TABLE meta (name VARCHAR(64) NOT NULL PRIMARY KEY, value VARCHAR(255))')) |
137
|
0 |
4 |
unless ($dbh->do(q[INSERT INTO meta (name,value) VALUES ('schema_version',0)])) |
140
|
1 |
9 |
if ($v == 0 and $$spec{'install'}) { } |
144
|
0 |
2 |
unless ($dbh->do($sql)) |
148
|
0 |
1 |
unless ($dbh->do("UPDATE meta SET value=$latest_v WHERE name='schema_version'")) |
153
|
0 |
9 |
unless ($$spec{"upgrade_to_v$i"}) |
155
|
3 |
14 |
unless ($dbh->do($sql)) |
158
|
0 |
6 |
unless ($dbh->do("UPDATE meta SET value=$i WHERE name='schema_version'")) |
161
|
0 |
7 |
unless ($dbh->commit) |
165
|
3 |
3 |
if ($err) { } |