Branch Coverage

blib/lib/MongoDB/MongoClient.pm
Criterion Covered Total %
branch 58 132 43.9


line true false branch
137 1 188 unless (length $app_name <= 128)
175 31 157 length $self->username || length $source ? :
534 3 165 defined $self->_deferred->{'password'} ? :
19 168 defined $self->_uri->password ? :
951 62 125 exists $self->_deferred->{'ssl'} ? :
954 184 2 unless (defined $uri_ssl or defined $opt_ssl)
959 0 3 if (ref $opt_ssl and ref $opt_ssl ne 'HASH')
964 2 1 unless (defined $uri_ssl)
969 1 0 unless ($uri_ssl)
974 0 0 if (ref $opt_ssl ne 'HASH')
979 0 0 if (ref $uri_ssl ne 'HASH')
1002 187 0 unless ($saw_tls_options)
1003 1 186 $saw_tls_boolean ? :
1007 0 0 if (exists $uri_options->{'tlscafile'})
1010 0 0 if (exists $uri_options->{'tlscertificatekeyfile'})
1013 0 0 if (exists $uri_options->{'tlscertificatekeyfilepassword'})
1016 0 0 if (exists $uri_options->{'tlsallowinvalidhostnames'})
1019 0 0 if (exists $uri_options->{'tlsallowinvalidcertificates'})
1022 0 0 if (exists $uri_options->{'tlsinsecure'})
1060 3 157 defined $self->_deferred->{'username'} ? :
28 160 defined $self->_uri->username ? :
1167 186 0 defined $self->read_pref_mode ? :
186 0 defined $self->read_pref_tag_sets ? :
186 0 defined $self->max_staleness_seconds ? :
1200 10 174 defined $self->w ? :
7 177 defined $self->j ? :
1226 4 1 $self->read_concern_level ? :
1287 0 181 @{$self->_uri->hostids;} > 1 ? :
2 181 length $self->replica_set_name ? :
1290 174 0 $self->connect_timeout_ms >= 0 ? :
174 0 $self->socket_timeout_ms >= 0 ? :
1 173 ref $self->ssl eq 'HASH' ? :
1331 30 153 $self->username ? :
21 162 $self->password ? :
11 172 $source ? :
16 167 $self->db_name ? :
1352 132 57 if ($self->host =~ m[^[\w\+]+://]) { }
1358 1 56 $self->host =~ /:\d+$/ ? :
1466 183 0 unless ($self->bson_codec->error_callback)
1471 0 0 if ($op =~ /^encode/) { }
1502 346 3794 exists $deferred->{$e} ? :
80 4140 exists $uri_options->{$u} ? :
1508 190 186 if defined $_
1604 0 0 if $opts{'refresh'}
1631 0 0 unless ($self->_topology->_supports_sessions)
1642 0 0 unless $self->_topology->_supports_sessions
1676 0 0 ref $read_pref ? :
0 0 if $read_pref and ref $read_pref ne 'MongoDB::ReadPreference'
1697 0 0 ref $read_pref ? :
0 0 if $read_pref and ref $read_pref ne 'MongoDB::ReadPreference'
1741 0 0 $args ? :
1742 0 0 if (ref $output eq 'HASH' and exists $output->{'databases'})
1746 0 0 unless (eval { do { my $output = $self->send_admin_command(['listDatabases', 1, $args ? %$args : ()])->output; if (ref $output eq 'HASH' and exists $output->{'databases'}) { @databases = @{$output->{'databases'};}; } ; return 1 } })
1748 0 0 if ($error->$MongoDB::MongoClient::_isa('MongoDB::DatabaseError'))
1749 0 0 if $error->result->output->{'code'} == 15927
1798 0 0 $options ? :
1836 0 0 unless defined $ns and length $ns
1839 0 0 unless defined $db and defined $coll
1897 0 0 if (defined $session) { }
1898 0 0 if $session->client->_id ne $self->_id
1900 0 0 unless defined $session->session_id
1963 0 0 exists $options->{'startAtOperationTime'} ? :
0 0 exists $options->{'fullDocument'} ? :
0 0 exists $options->{'resumeAfter'} ? :
0 0 exists $options->{'startAfter'} ? :
0 0 exists $options->{'maxAwaitTimeMS'} ? :