Branch Coverage

blib/lib/Net/IMAP/Client.pm
Criterion Covered Total %
branch 0 298 0.0


line true false branch
38 0 0 exists $args{$_} ? :
41 0 0 if $self->{'tls'} and $self->{'ssl'}
50 0 0 $@ ? :
58 0 0 if $self->{'socket'}->opened
64 0 0 if (defined $val) { }
97 0 0 unless ($capability)
99 0 0 if ($ok)
101 0 0 if ($line =~ /^\*\s+CAPABILITY\s+(.*?)\s*$/)
106 0 0 if ($requirement and $capability)
116 0 0 if (ref $_[0] eq 'ARRAY') { }
132 0 0 if (@{$row->[1];} > 1)
140 0 0 if ($i->[0])
150 0 0 $wants_one ? :
168 0 0 if ($ok)
173 0 0 if ($line =~ /^\*\s+(\d+)\s+EXISTS/i) { }
0 0 elsif ($line =~ /^\*\s+FLAGS\s+\((.*?)\)/i) { }
0 0 elsif ($line =~ /^\*\s+(\d+)\s+RECENT/i) { }
0 0 elsif ($line =~ /^\*\s+OK\s+\[(.*?)\s+(.*?)\]/i) { }
181 0 0 if ($value =~ /\((.*?)\)/) { }
197 0 0 unless ($sep)
199 0 0 if ($ok) { }
212 0 0 if ($ok)
214 0 0 wantarray ? :
221 0 0 if ($ns)
235 0 0 if ($ok)
249 0 0 if ($ok)
277 0 0 if ($ok)
279 0 0 if $_->[0] =~ /^\*\s+(\d+)\s+FETCH\s*\(\s*UID\s+(\d+)/
308 0 0 $sort ? :
309 0 0 if ($sort) { }
310 0 0 if (ref $sort eq 'ARRAY') { }
0 0 elsif (not $sort =~ /^\(/) { }
322 0 0 if (ref $criteria eq "HASH")
327 0 0 if $no_args{$key}
330 0 0 unless $key eq "UID"
337 0 0 if ($ok)
341 0 0 if ($line =~ s/^\*\s+(?:SEARCH|SORT)\s+//gi)
355 0 0 if (ref $msg eq "ARRAY")
360 0 0 if ($ok)
362 0 0 $wants_many ? :
371 0 0 if ($ok)
375 0 0 if ($hash{'FLAGS'})
387 0 0 if ($ok)
391 0 0 if ($hash{'FLAGS'})
402 0 0 if (not $msg) { }
0 0 elsif (ref $msg eq 'ARRAY') { }
407 0 0 if ($headers) { }
413 0 0 if ($ok) { }
418 0 0 if ($tokens->[2] eq 'FETCH') { }
420 0 0 if ($hash{'ENVELOPE'}) { }
432 0 0 if $summary
444 0 0 if (ref $msg eq "ARRAY")
448 0 0 if (ref $keys eq "ARRAY")
452 0 0 if ($ok)
458 0 0 $wants_many || @ret > 1 ? :
476 0 0 if ($ok)
496 0 0 unless ref $rfc822 eq "SCALAR"
501 0 0 if ($flags)
507 0 0 if ($date)
521 0 0 if (ref $msg eq "ARRAY")
531 0 0 if (ref $msg eq "ARRAY")
536 0 0 if ($ok)
542 0 0 $wants_many ? :
551 0 0 if ($ok)
555 0 0 if ($msg)
561 0 0 if ($c eq '(') { }
0 0 elsif ($c eq ')') { }
565 0 0 if ($par == 0)
579 0 0 if (ref $msg eq "ARRAY")
582 0 0 unless (ref $flags)
612 0 0 if ($ok and $lines and @$lines)
614 0 0 if ($ret =~ /^\*\s+(\d+)\s+EXPUNGE/)
618 0 0 $ok ? :
623 0 0 unless defined $self->{'_error'}
632 0 0 wantarray ? :
654 0 0 if (not $self->{'ssl_verify_peer'} or not $self->{'ssl_ca_path'} || $self->{'ssl_ca_file'} and $^O ne "linux")
663 0 0 if ($^O eq "linux" and not $self->{'ssl_ca_path'} and not $self->{'ssl_ca_file'})
665 0 0 -d '/etc/ssl/certs/' ? :
668 0 0 unless -d $ssl_config{'SSL_ca_path'}
670 0 0 if $self->{'ssl_ca_path'}
671 0 0 if $self->{'ssl_ca_file'}
679 0 0 if defined $socket and $socket->isa('IO::Socket::SSL') || $socket->isa('IO::Socket::INET')
682 0 0 $self->{'ssl'} ? :
0 0 unless $self->{'socket'} = ($self->{'ssl'} ? "IO::Socket::SSL" : "IO::Socket::INET")->new((%{$$self{"ssl_options"};}) x !!$self->{'ssl'}, "PeerAddr", $self->_get_server, "PeerPort", $self->_get_port, "Timeout", $self->_get_timeout, "Proto", "tcp", "Blocking", 1, $self->_get_ssl_config)
694 0 0 if $self->{'tls'}
705 0 0 if ($ok) { }
707 0 0 if $line =~ /^\*\s+CAPABILITY.*\s+STARTTLS/
711 0 0 unless $can_do_starttls
715 0 0 if ($ok) { }
717 0 0 if "IO::Socket::SSL"->can_client_sni
720 0 0 unless "IO::Socket::SSL"->start_SSL($self->{'socket'}, $self->_get_ssl_config, @sni_args)
753 0 0 if ($self->uid_mode and exists $UID_COMMANDS{$cmd})
757 0 0 if (ref $args eq "ARRAY")
760 0 0 if (ref $_ eq "SCALAR")
768 0 0 if (@literals == 0) { }
769 0 0 $args ? :
781 0 0 if ($line =~ /^\+/) { }
806 0 0 unless $read
818 0 0 if ($res =~ /^NIC$id\s+OK/i) { }
0 0 elsif ($res =~ /^NIC$id\s+(?:NO|BAD)(?:\s+(.+))?/i) { }
831 0 0 if ($res =~ /^(NIC\d+)\s+OK/i) { }
0 0 elsif ($res =~ /^(NIC\d+)\s+(?:NO|BAD)(?:\s+(.+))?/i) { }
845 0 0 if ($force or not $self->_get_socket->connected)
848 0 0 if ($self->login)
849 0 0 if ($self->{'selected_folder'})
868 0 0 if $self->_reconnect_if_needed
876 0 0 if ($res =~ /^\*/)
880 0 0 if @$accumulator
883 0 0 if ($res =~ /(.*)\{(\d+)\}\r\n/) { }
890 0 0 if (defined $ok) { }
898 0 0 if @$accumulator
900 0 0 unless (defined $res)
901 0 0 if $self->_reconnect_if_needed(1)
904 0 0 if ($do_notf)
910 0 0 if scalar @$line != 1
920 0 0 if ($text =~ /^\*\s+\d+\s+FETCH\s*\(\s*FLAGS\s*\([^\)]*?\)\)/ or not $text =~ /^\*\s+(?:\d+\s+)?$cmd/)
923 0 0 if ($self->_handle_notification($tokens, 1))
933 0 0 $ok ? :
0 0 wantarray ? :
950 0 0 if $self->_reconnect_if_needed
961 0 0 if ($res =~ /^\*/)
962 0 0 if @$accumulator
965 0 0 if ($res =~ /(.*)\{(\d+)\}\r\n/) { }
972 0 0 if (defined $ok) { }
980 0 0 if @$accumulator
981 0 0 unless (defined $res)
982 0 0 if $self->_reconnect_if_needed(1)
997 0 0 if ($_[0] =~ s/^"//g)
1032 0 0 if (ref $text)
1033 0 0 $no_deref ? :
1038 0 0 if ($text =~ /\G[([]/cg) { }
0 0 elsif ($text =~ /\G(BODY\[[a-zA-Z0-9._() -]*\])/cg) { }
0 0 elsif ($text =~ /\G[])]/cg) { }
0 0 elsif ($text =~ /\G\"((?:\\.|[^\"\\])*)\"/cg) { }
0 0 elsif ($text =~ /\G(\d+)/cg) { }
0 0 elsif ($text =~ m[\G([a-zA-Z0-9_\$\\.+/*&-]+)]cg) { }
1056 0 0 if (lc $atom eq "nil")
1076 0 0 if ($sf)
1078 0 0 if ($tokens->[2] eq 'FETCH') { }
0 0 elsif ($tokens->[2] eq 'EXISTS') { }
0 0 elsif ($tokens->[2] eq 'EXPUNGE') { }
0 0 elsif ($tokens->[2] eq 'RECENT') { }
0 0 elsif ($tokens->[1] eq 'FLAGS') { }
0 0 elsif ($tokens->[1] eq 'OK') { }
1080 0 0 if (my $flags = $data{'FLAGS'})
1083 0 0 if (&first(sub { $_ eq "\\Deleted"; } , @$flags))
1087 0 0 if ($data{'UID'})
1113 0 0 if (defined $not)
1115 0 0 if ($reverse) { }