Branch Coverage

blib/lib/POE/Component/EasyDBI/SubProcess.pm
Criterion Covered Total %
branch 0 396 0.0


line true false branch
27 0 0 if ($^O eq "MSWin32")
40 0 0 if ($_[0] == 1) { }
47 0 0 if defined $opts
51 0 0 if (@{$opts;})
64 0 0 unless (defined $self->{'sig_ignore_off'})
78 0 0 if $self->{'done'}
83 0 0 if ($self->{'done'})
85 0 0 if ($self->{'dbh'})
96 0 0 if $d
109 0 0 unless ($self->process)
110 0 0 if $self->{'done'}
112 0 0 if ($self->{'reconnect'})
118 0 0 if $self->{'done'}
124 0 0 if ($self->{'dbh'})
157 0 0 ref $self->{'options'} eq 'HASH' ? :
172 0 0 if (not defined $self->{'dbh'})
180 0 0 if ($self->{'error'} and $self->{'no_connect_failures'} and kill 0, $self->{'parent_pid'}) { }
0 0 elsif ($self->{'error'}) { }
181 0 0 if $self->{'reconnect_wait'}
205 0 0 unless @{$self->{'queue'};}
209 0 0 unless $input->{'action'}
213 0 0 if ($input->{'action'} eq "exit")
221 0 0 ($self->{'ping_timeout'} == 0 || $self->{'ping_timeout'} > 0) && $now - $self->{'lastpingtime'} >= $self->{'ping_timeout'} ? :
223 0 0 if ($self->{'dbh'}) { }
233 0 0 if ($needping)
234 0 0 if (eval { do { $self->{'dbh'}->ping } }) { }
257 0 0 if (defined $self->{'no_cache'} and not defined $input->{'no_cache'})
261 0 0 if (defined $input->{'sql'})
266 0 0 if ($input->{'action'} =~ /^(func|commit|rollback|begin_work)$/) { }
0 0 elsif ($input->{'action'} eq 'method') { }
0 0 elsif ($input->{'action'} eq 'insert') { }
0 0 elsif ($input->{'action'} eq 'do') { }
0 0 elsif ($input->{'action'} eq 'single') { }
0 0 elsif ($input->{'action'} eq 'quote') { }
0 0 elsif ($input->{'action'} eq 'arrayhash') { }
0 0 elsif ($input->{'action'} eq 'hashhash') { }
0 0 elsif ($input->{'action'} eq 'hasharray') { }
0 0 elsif ($input->{'action'} eq 'array') { }
0 0 elsif ($input->{'action'} eq 'arrayarray') { }
0 0 elsif ($input->{'action'} eq 'hash') { }
0 0 elsif ($input->{'action'} eq 'keyvalhash') { }
313 0 0 if ($input->{'id'} eq "DBI" or $self->{'output'}{'error'} and $self->{'output'}{'error'} =~ /no connection to the server/i || $self->{'output'}{'error'} =~ /server has gone away/i || $self->{'output'}{'error'} =~ /server closed the connection/i || $self->{'output'}{'error'} =~ /connect failed/i)
337 0 0 $self->{'output'} ? :
348 0 0 $self->{'output'} ? :
361 0 0 if (ref $error and ref $error eq 'Error::Simple') { }
367 0 0 if ($data->{'error'} =~ /has gone away/i or $data->{'error'} =~ /lost connection/i)
393 0 0 if ($data->{'begin_work'})
394 0 0 unless $self->begin_work($data)
399 0 0 if ($data->{'args'} and ref $data->{'args'} eq 'ARRAY') { }
412 0 0 unless (defined $self->{'output'})
438 0 0 unless (defined $self->{'output'})
464 0 0 if ($data->{'begin_work'})
465 0 0 unless $self->begin_work($data)
471 0 0 if ($data->{'no_cache'}) { }
479 0 0 if (not defined $sth) { }
486 0 0 defined $sth->errstr ? :
488 0 0 if $self->{'dbh'}->errstr
495 0 0 if (exists $data->{'separator'}) { }
504 0 0 if $self->{'dbh'}->errstr
511 0 0 unless (defined $self->{'output'})
517 0 0 if (defined $sth)
542 0 0 if (defined $data->{'hash'} and not defined $data->{'insert'})
546 0 0 if (defined $data->{'insert'} and ref $data->{'insert'} eq "HASH")
551 0 0 if (defined $data->{'insert'} and ref $data->{'insert'} eq 'ARRAY') { }
0 0 elsif (not defined $data->{'sql'} && $data->{'sql'} =~ /^INSERT/i) { }
576 0 0 if ($data->{'begin_work'} and $i == 0)
577 0 0 unless $self->begin_work($data)
583 0 0 if ($data->{'no_cache'}) { }
591 0 0 if (not defined $sth) { }
598 0 0 if (defined $sth->errstr) { }
604 0 0 if $self->{'dbh'}->errstr
611 0 0 if $do_last
614 0 0 if ($data->{'commit'} and defined $rows and not defined $self->{'output'})
619 0 0 if (defined $rows and not defined $self->{'output'}) { }
0 0 elsif (not defined $rows || defined $self->{'output'}) { }
623 0 0 unless ($data->{'last_insert_id'})
624 0 0 if (defined $sth)
632 0 0 if (ref $data->{'last_insert_id'} eq 'HASH') { }
635 0 0 if ($dsn =~ /dbi:pg/i) { }
0 0 elsif ($dsn =~ /dbi:mysql/i) { }
0 0 elsif ($dsn =~ /dbi:oracle/i) { }
0 0 elsif ($dsn =~ /dbi:sqlite/i) { }
638 0 0 if (defined $self->{'dbh'}{'mysql_insertid'}) { }
655 0 0 if (defined $sth)
659 0 0 if ($qry)
666 0 0 if $self->{'dbh'}->errstr
679 0 0 if (defined $sth)
706 0 0 if ($data->{'begin_work'})
707 0 0 unless $self->begin_work($data)
713 0 0 if ($data->{'no_cache'}) { }
721 0 0 if (not defined $sth) { }
728 0 0 defined $sth->errstr ? :
730 0 0 if $self->{'dbh'}->errstr
738 0 0 if ($data->{'commit'} and defined $rows and not defined $self->{'output'})
743 0 0 if (defined $rows and not defined $self->{'output'}) { }
0 0 elsif (not defined $rows || defined $self->{'output'}) { }
753 0 0 if (defined $sth)
780 0 0 if ($data->{'begin_work'})
781 0 0 unless $self->begin_work($data)
787 0 0 if ($data->{'no_cache'}) { }
795 0 0 if (not defined $sth) { }
802 0 0 defined $sth->errstr ? :
804 0 0 if $self->{'dbh'}->errstr
819 0 0 if (exists $data->{'chunked'} and defined $self->{'output'})
828 0 0 if (exists $data->{'chunked'} and $data->{'chunked'} == $rows)
841 0 0 if $self->{'dbh'}->errstr
844 0 0 if ($sth->err)
855 0 0 unless (defined $self->{'output'})
858 0 0 if (exists $data->{'chunked'})
865 0 0 if (defined $sth)
894 0 0 if ($data->{'begin_work'})
895 0 0 unless $self->begin_work($data)
901 0 0 if ($data->{'no_cache'}) { }
909 0 0 if (not defined $sth) { }
916 0 0 defined $sth->errstr ? :
918 0 0 if $self->{'dbh'}->errstr
928 0 0 unless (defined $data->{'primary_key'})
932 0 0 if ($data->{'primary_key'} =~ /^\d+$/)
934 0 0 if ($data->{'primary_key'} > $sth->{'NUM_OF_FIELDS'})
946 0 0 if $sth->{'NAME'}[$i] eq $data->{'primary_key'}
949 0 0 unless ($foundprimary == 1)
956 0 0 if (exists $data->{'chunked'} and defined $self->{'output'})
966 0 0 if (exists $data->{'chunked'} and $data->{'chunked'} == $rows)
985 0 0 if $self->{'dbh'}->errstr
988 0 0 if ($sth->err)
999 0 0 unless (defined $self->{'output'})
1002 0 0 if (exists $data->{'chunked'})
1009 0 0 if (defined $sth)
1038 0 0 if ($data->{'begin_work'})
1039 0 0 unless $self->begin_work($data)
1045 0 0 if ($data->{'no_cache'}) { }
1053 0 0 if (not defined $sth) { }
1060 0 0 defined $sth->errstr ? :
1062 0 0 if $self->{'dbh'}->errstr
1071 0 0 if ($data->{'primary_key'} =~ /^\d+$/)
1073 0 0 if ($data->{'primary_key'} > $sth->{'NUM_OF_FIELDS'})
1085 0 0 if $sth->{'NAME'}[$i] eq $data->{'primary_key'}
1088 0 0 unless ($foundprimary == 1)
1095 0 0 if (exists $data->{'chunked'} and defined $self->{'output'})
1103 0 0 if (exists $data->{'chunked'} and $data->{'chunked'} == $rows)
1115 0 0 if $self->{'dbh'}->errstr
1118 0 0 if ($sth->err)
1129 0 0 unless (defined $self->{'output'})
1132 0 0 if (exists $data->{'chunked'})
1139 0 0 if (defined $sth)
1166 0 0 if ($data->{'begin_work'})
1167 0 0 unless $self->begin_work($data)
1173 0 0 if ($data->{'no_cache'}) { }
1181 0 0 if (not defined $sth) { }
1188 0 0 defined $sth->errstr ? :
1190 0 0 if $self->{'dbh'}->errstr
1202 0 0 if (exists $data->{'chunked'} and defined $self->{'output'})
1209 0 0 if (exists $data->{'separator'}) { }
1214 0 0 if (exists $data->{'chunked'} and $data->{'chunked'} == $rows)
1227 0 0 if $self->{'dbh'}->errstr
1230 0 0 if ($sth->err)
1241 0 0 unless (defined $self->{'output'})
1244 0 0 if (exists $data->{'chunked'})
1251 0 0 if (defined $sth)
1278 0 0 if ($data->{'begin_work'})
1279 0 0 unless $self->begin_work($data)
1285 0 0 if ($data->{'no_cache'}) { }
1293 0 0 if (not defined $sth) { }
1300 0 0 defined $sth->errstr ? :
1302 0 0 if $self->{'dbh'}->errstr
1311 0 0 if (exists $data->{'chunked'} and defined $self->{'output'})
1320 0 0 if (exists $data->{'chunked'} and $data->{'chunked'} == $rows)
1333 0 0 if $self->{'dbh'}->errstr
1336 0 0 if ($sth->err)
1348 0 0 unless (defined $self->{'output'})
1351 0 0 if (exists $data->{'chunked'})
1358 0 0 if (defined $sth)
1385 0 0 if ($data->{'begin_work'})
1386 0 0 unless $self->begin_work($data)
1392 0 0 if ($data->{'no_cache'}) { }
1400 0 0 if (not defined $sth) { }
1407 0 0 defined $sth->errstr ? :
1409 0 0 if $self->{'dbh'}->errstr
1420 0 0 if (@row)
1431 0 0 if $self->{'dbh'}->errstr
1434 0 0 if ($sth->err)
1445 0 0 unless (defined $self->{'output'})
1451 0 0 if (defined $sth)
1478 0 0 if ($data->{'begin_work'})
1479 0 0 unless $self->begin_work($data)
1485 0 0 if ($data->{'no_cache'}) { }
1493 0 0 if (not defined $sth) { }
1500 0 0 defined $sth->errstr ? :
1502 0 0 if $self->{'dbh'}->errstr
1508 0 0 if ($#row < 1)
1511 0 0 if (exists $data->{'chunked'} and defined $self->{'output'})
1519 0 0 if (exists $data->{'chunked'} and $data->{'chunked'} == $rows)
1531 0 0 if $self->{'dbh'}->errstr
1534 0 0 if ($sth->err)
1545 0 0 unless (defined $self->{'output'})
1548 0 0 if (exists $data->{'chunked'})
1555 0 0 if (defined $sth)
1569 0 0 unless (defined $data)