Branch Coverage

blib/lib/DBIx/Raw.pm
Criterion Covered Total %
branch 90 124 72.5


line true false branch
423 0 282 unless $self->sth($self->dbh->prepare($params->{'query'}))
426 157 125 if ($params->{'encrypt'})
432 224 58 if (not defined wantarray) { }
11 47 elsif (wantarray) { }
433 0 224 unless $self->sth->finish
442 47 0 if ($params->{'query'} =~ /SELECT\s+(.*?)\s+FROM/i)
447 37 10 if ($num_commas > 0 or $num_stars > 0)
451 0 58 if ($params->{'query'} =~ /^(\n*?| *?|\r*?)UPDATE /is) { }
58 0 elsif ($params->{'query'} =~ /SELECT /sig or $params->{'query'} =~ /SHOW /sig) { }
456 58 0 unless ($params->{'query'} =~ /INSERT INTO (.*?)SELECT /sig)
457 37 21 if ($return_type eq 'hash') { }
458 1 36 unless $params->{'href'} = $self->sth->fetchrow_hashref
460 8 28 if ($params->{'decrypt'})
467 2 19 unless @return_values = $self->sth->fetchrow_array
469 5 14 if ($params->{'decrypt'})
477 0 55 unless $self->sth->finish
479 10 45 if ($return_type eq 'array') { }
507 2 2 if ($params->{'decrypt'}) { }
545 1 2 if ($params->{'decrypt'}) { }
622 1 2 if ($params->{'decrypt'}) { }
686 0 3 unless $params->{'query'} and $params->{'key'} and $params->{'val'}
692 1 2 if ($params->{'decrypt'}) { }
759 0 3 unless $params->{'query'} and $params->{'key'}
765 1 2 if ($params->{'decrypt'}) { }
804 1 1 if ($params->{'decrypt'}) { }
865 0 3 unless $params->{'query'} and $params->{'key'} and $params->{'val'}
871 1 2 if ($params->{'decrypt'}) { }
967 0 0 unless $params->{'href'} and $params->{'table'}
975 0 0 if (ref $val eq 'SCALAR') { }
979 0 0 if ($params->{'encrypt'} and &first(sub { $_ eq $key; } , @{$$params{'encrypt'};}))
996 0 0 if ($params->{'encrypt'} and @encrypt)
1113 0 17 unless $params->{'href'} and $params->{'table'}
1120 3 48 if (ref $val eq 'SCALAR') { }
1125 24 24 if (defined $params->{'encrypt'} and $params->{'encrypt'} eq '*' or $params->{'encrypt'} and &first(sub { $_ eq $key; } , @{$$params{'encrypt'};}))
1138 11 6 unless $params->{'vals'}
1140 10 7 if ($params->{'where'})
1145 5 12 if ($params->{'id'}) { }
6 6 elsif ($params->{'pk'}) { }
1146 3 2 if ($where eq '') { }
1158 2 4 if ($where eq '') { }
1171 8 9 if ($params->{'encrypt'} and @encrypt)
1178 17 0 unless defined wantarray
1179 0 0 wantarray ? :
1234 0 1 unless $params->{'columns'} and $params->{'table'} and $params->{'rows'}
1374 278 43 if ($self->keys->{$_[0]}) { }
1388 0 321 unless $self->sth($self->dbh->prepare($params->{'query'}))
1390 227 94 if ($params->{'vals'}) { }
1391 0 227 unless $self->sth->execute(@{$$params{'vals'};})
1394 0 94 unless $self->sth->execute
1406 8 23 if ($params->{'decrypt'} eq '*') { }
1407 6 2 if ($params->{'href'}) { }
1418 24 7 if ($params->{'href'}) { }
1420 47 0 if $params->{'href'}{$key}
1425 12 0 if $params->{'return_values'}[$index]
1434 4 161 if ($params->{'encrypt'} eq '*') { }
1437 4 0 if ($params->{'query'} =~ /WHERE\s+(.*)/i)
1455 0 80 if ($self->use_old_crypt)
1465 0 63 if ($self->use_old_crypt)
1476 137 3 if ($self->conf)
1479 0 68 if $self->conf eq $self->prev_conf and $self->dsn and $self->user and $self->password
1486 412 0 if ($self->can($attribute))
1499 0 140 unless defined $self->dsn and defined $self->user and defined $self->password or defined $self->dbh