Branch Coverage

blib/lib/Database/Async/Engine/PostgreSQL.pm
Criterion Covered Total %
branch 18 132 13.6


line true false branch
94 0 12 if exists $args{$_}
168 0 0 if $connected->as_numeric
173 0 0 if $self->service
175 0 0 unless ref $uri
188 0 0 if ($uri->host and not $uri->host =~ m[^[/\@]]) { }
0 0 elsif ($uri->host eq '') { }
213 0 0 if ($sock->sockdomain == 2 or $sock->sockdomain == 10) { }
0 0 elsif ($sock->sockdomain == 1) { }
276 4 4 if exists $ENV{'PGSERVICEFILE'}
277 2 2 if exists $ENV{'PGSYSCONFDIR'}
279 1 1 if -r $path
293 1 2 unless $data->{$srv}
313 18 0 unless ($^O eq "MSWin32")
316 0 18 unless my(undef, undef, $mode) = stat $pwfile
317 0 18 unless (-f _)
322 1 17 if ($mode & 63)
332 0 17 unless open my $fh, "<", $pwfile
335 0 17 if $line =~ /^#/
337 0 17 unless my($host, $port, $db, $user, $pw) = $line =~ /((?:\\.|[^:])*)(?::|$)/g
341 17 0 if $host eq '*' || $host eq $self->uri->host and $port eq '*' || $port eq $self->uri->port and $user eq '*' || $user eq $self->database_user and $db eq '*' || $db eq $self->database_name
368 0 0 unless my $ssl = $self->ssl
380 0 0 $eof ? :
381 0 0 if $eof
383 0 0 if ($resp eq 'S') { }
0 0 elsif ($resp eq 'N') { }
400 0 0 if $self->ssl == 2
421 0 0 unless $dsn =~ s/^DBI:Pg://i
438 0 0 if exists $cfg->{'hostaddr'}
553 0 0 if $v
556 0 0 if (my $query = delete $self->{'active_query'})
557 0 0 unless $query->completed->is_ready
561 0 0 if (my $db = $self->db)
714 0 0 unless my $code = $AUTH_HANDLER{$msg->auth_type}
732 0 0 unless my $q = $self->active_query
740 0 0 $_ ? :
741 0 0 if $self->stream
748 0 0 unless (my $query = delete $self->{'active_query'})
753 0 0 unless $query->completed->is_ready
770 0 0 if $self->db
795 0 0 if (my $query = $self->active_query) { }
798 0 0 unless $f->is_ready
834 0 0 unless $query->ready_to_stream->is_ready
844 0 0 unless (my $query = $self->active_query)
885 0 0 if (my $param = $self->{'parameter'}{$k}) { }
911 0 0 unless my $idle = $self->{'idle'} and $v
912 0 0 unless $idle->is_ready
919 0 0 if $self->{'active_query'}
930 0 0 unless defined $txt and my $encoding = $self->encoding
931 0 0 if $encoding eq "UTF-8"
937 0 0 unless defined $txt and my $encoding = $self->encoding
938 0 0 if $encoding eq "UTF-8"
944 0 0 if $self->{'active_query'}
968 0 0 unless ($query->{'in'})
1000 0 0 if (my $query = delete $self->{'active_query'})
1001 0 0 unless $query->completed->is_ready
1003 0 0 if (my $idle = delete $self->{'idle'})
1006 0 0 if (my $auth = delete $self->{'authenticated'})
1009 0 0 if (my $connected = delete $self->{'connected'})
1012 0 0 if (my $outgoing = delete $self->{'outgoing'})
1013 0 0 unless $outgoing->is_ready
1015 0 0 if (my $incoming = delete $self->{'incoming'})
1016 0 0 unless $incoming->is_ready
1018 0 0 if (my $stream = delete $self->{'stream'})
1022 0 0 if (my $conn = delete $self->{'connection'})
1028 0 0 if $param
1030 0 0 if (my $ryu = delete $self->{'ryu'})