Branch Coverage

blib/lib/DBD/PgPP.pm
Criterion Covered Total %
branch 25 276 9.0


line true false branch
54 0 0 unless defined $dsn
58 0 0 if ($dsn =~ /([^:;]*)[:;](.*)/) { }
66 0 0 if ($val =~ /([^=]*)=(.*)/) { }
69 0 0 if ($var eq 'hostname' or $var eq 'host') { }
0 0 elsif ($var eq 'db' or $var eq 'dbname') { }
81 0 0 unless (defined $$hash{$var})
123 0 0 if ($@)
148 0 0 if (not defined $s) { }
180 0 0 $version >= 80100 ? :
187 0 0 if $statement =~ /\0/
209 0 0 if ($@)
223 0 0 if ($@)
233 0 0 if (my $conn = $dbh->FETCH('pgpp_connection'))
244 0 0 if $key =~ /^pgpp_/
245 0 0 if $key eq 'AutoCommit'
252 0 0 if ($key eq 'AutoCommit')
257 0 0 if (not $old and $new and $never_set) { }
0 0 elsif (not $old and $new) { }
0 0 elsif ($old and not $new or not $old || $new and $never_set) { }
282 0 0 if ($key =~ /^pgpp_/)
297 0 0 if (not defined $attr) { }
0 0 elsif (not ref $attr and $attr ne '') { }
0 0 elsif (ref $attr ne 'HASH') { }
309 0 0 unless defined $schema
310 0 0 unless defined $table
313 0 0 exists $$attr{'pgpp_cache'} ? :
320 0 0 if (defined $$attr{'sequence'}) { }
0 0 elsif ($use_cache and exists $$db{'pgpp_liicache'}{$cache_key}) { }
329 0 0 if $table eq ''
336 0 0 if ($$pgsql{'server_version_num'} < 70300) { }
346 0 0 if (length $schema)
358 0 0 unless (defined $count)
361 0 0 if $schema ne ''
381 0 0 unless (defined $count)
391 0 0 unless my($seq) = $$_[2] =~ /^nextval\('([^']+)'::/
395 0 0 unless @def
399 0 0 if (@def > 1)
401 0 0 if @pri != 1
428 0 0 ref $attr ? :
438 0 0 if $$pgsql{'closed'}
442 0 0 if (@args) { }
443 0 0 if @args != $num_params
450 0 0 if @$bind_params != $num_params
458 0 0 ref $_ ? :
468 0 0 if (defined $$pgsql_sth{'affected_rows'}) { }
476 0 0 if (not $$pgsql_sth{'row_description'}) { }
485 0 0 if ($@)
490 0 0 $result ? :
0 0 $pgsql->has_error ? :
499 0 0 if $$iterator{'finished'}
501 0 0 if (my $row = $iterator->fetch)
502 0 0 if ($sth->FETCH('ChopBlanks'))
515 0 0 defined $$sth{'pgpp_rows'} ? :
522 0 0 if $key eq 'NAME'
523 0 0 if $key =~ /^pgpp_/
530 0 0 if ($key eq 'NAME') { }
0 0 elsif ($key =~ /^pgpp_/) { }
0 0 elsif ($key eq 'NUM_OF_FIELDS') { }
542 0 0 if $curr and $curr == $value
587 0 0 if $args{'debug'}
594 0 0 unless my $socket = $$self{'socket'}
595 0 0 unless fileno $socket
598 0 0 if $DEBUG
607 0 0 if $self
621 0 0 if ($$self{'hostname'}) { }
622 0 0 unless $sock = 'IO::Socket::INET'->new('PeerAddr', $$self{'hostname'}, 'PeerPort', $$self{'port'}, 'Proto', 'tcp', 'Timeout', $$self{'timeout'})
631 0 0 unless $sock = 'IO::Socket::UNIX'->new('Type', 1, 'Peer', $path)
659 0 0 if $DEBUG
677 0 0 if (my($ver) = $id =~ /\A PostgreSQL \s+ ([0-9._]+) (?:\s|\z)/x)
679 0 0 if (my($maj, $min, $sub) = $ver =~ /\A ([0-9]+)\.([0-9]{1,2})\.([0-9]{1,2}) \z/x)
688 0 0 unless $DBD::PgPP::Protocol::DEBUG
698 0 0 /[[:graph:] ]/ ? :
706 0 0 unless defined $$self{'stream'}
716 0 0 if $packet->is_end_of_response
717 0 0 if $packet->is_error
731 0 0 if $$self{'error_message'}
747 19 141 if (/\G \z/cgmsx) { }
7 134 elsif (m[\G( /\* .*? ) (?= /\* | \*/) ]cgmsx) { }
10 124 elsif ($comment_depth and m[\G( .*? ) (?= /\* | \*/)]cgmsx) { }
3 121 elsif ($comment_depth and m[\G( \*/ )]cgmsx) { }
16 105 elsif (/\G \?/cgmsx) { }
1 104 elsif (/\G( -- [^\n]* )/cgmsx) { }
11 93 elsif (/\G( \' (?> [^\\\']* (?> \\. [^\\\']*)* ) \' )/cgmsx) { }
2 91 elsif (/\G( \" [^\"]* \" )/cgmsx) { }
57 34 elsif (m[\G( \s+ | \w+ | ::? | \$[0-9]+ | [-/*\$] | [^[:ascii:]]+ | [\0-\037\177]+)]cgmsx) { }
24 10 elsif (/\G( [+<>=~!\@\#%^&|`,;.()\[\]{}]+ )/cgmsx) { }
10 0 elsif (/\G( [\'\"\\] )/cgmsx) { }
752 6 10 if $tokens[-1] eq ''
772 4 15 if @tokens > 1 and $tokens[-1] eq ''
796 0 0 if $DEBUG
805 0 0 if ($packet->is_error) { }
0 0 elsif ($packet->is_end_of_response) { }
0 0 elsif ($packet->is_empty) { }
820 0 0 if ($packet->is_cursor_response) { }
823 0 0 if ($row_info->is_error)
830 0 0 if ($row_packet->is_error)
836 0 0 if $row_packet->is_end_of_response
844 0 0 if ($end->is_error)
848 0 0 if $end->is_end_of_response
860 0 0 if $packet->is_end_of_response
917 0 0 $type eq 'T' ? :
0 0 $type eq 'Z' ? :
0 0 $type eq 'A' ? :
0 0 $type eq 'N' ? :
0 0 $type eq 'V' ? :
0 0 $type eq 'E' ? :
0 0 $type eq 'I' ? :
0 0 $type eq 'P' ? :
0 0 $type eq 'H' ? :
0 0 $type eq 'G' ? :
0 0 $type eq 'C' ? :
0 0 $type eq 'B' ? :
0 0 $type eq 'K' ? :
0 0 $type eq 'R' ? :
0 0 $type eq 'D' ? :
933 0 0 if ($DEBUG)
944 0 0 if ($code == 0) { }
0 0 elsif ($code == 1) { }
0 0 elsif ($code == 2) { }
0 0 elsif ($code == 3) { }
0 0 elsif ($code == 4) { }
0 0 elsif ($code == 5) { }
0 0 elsif ($code == 6) { }
1043 0 0 unless defined $length
1067 0 0 if $null_pos >= 0
1133 0 0 if $DEBUG
1158 0 0 if $DEBUG
1169 0 0 if _is_md5_crypt($crypted, $salt)
1171 0 0 if $@
1199 0 0 if $DEBUG
1345 0 0 if (substr $non_null, $i, 1)
1349 0 0 if ($type_oid == 16) { }
0 0 elsif ($type_oid == 17) { }
1350 0 0 $value eq 'f' ? :
1366 0 0 if $number % 8
1390 0 0 if ($tag =~ /^INSERT (\d+) (\d+)/) { }
0 0 elsif ($tag =~ /^DELETE (\d+)/) { }
0 0 elsif ($tag =~ /^UPDATE (\d+)/) { }