Condition Coverage

blib/lib/Mail/IMAPClient.pm
Criterion Covered Total %
condition 21 407 5.1


and 2 conditions

line l !l condition
2302 118 1 $l =~ /\G\s*$/cg and scalar @$output

and 3 conditions

line !l l&&!r l&&r condition
224 0 0 0 not ref $_[0] and @_ == 1
314 0 1 0 not $self->{'Socket'} and $self->{'Server'}
330 0 0 0 $self->Socketargs and ref $self->Socketargs eq 'ARRAY'
373 0 0 0 not $lasterr and $self->Ssl
0 0 0 not $lasterr and $self->Ssl and $ioclass
423 0 0 0 defined $self->User and defined $self->Password
458 0 0 0 $self->Starttls && ref $self->Starttls eq 'ARRAY'
485 0 0 0 $self->Compress and ref $self->Compress eq 'ARRAY'
568 0 0 0 $auth and $auth ne 'LOGIN'
576 0 0 0 defined $passwd and defined $user
920 0 0 0 ref $file and ref $file ne 'SCALAR'
924 0 0 0 ref $file eq 'SCALAR' and not defined $$file
964 0 0 0 $peer and $peer->IsConnected
1009 0 0 0 defined $size and defined $date
1097 2 3 2 $popped and $popped =~ /^\)$Mail::IMAPClient::CRLF$/o
1141 0 0 0 $ret > 0 and $self->IsConnected
1242 0 0 0 not defined $rc and $retry
0 0 0 not defined $rc and $retry and $self->IsUnconnected
1254 0 0 0 defined $ret and $ret == 0
1256 0 0 0 exists $opt->{'doretry'} and not $opt->{'doretry'}
1277 0 0 0 not $self->Debug and $len > $sz * 2
1319 0 0 0 $self->Count >= $clear and $clear > 0
1342 0 0 0 $good and $code eq $good
1365 0 0 0 $good eq '+' and $_[0] =~ /^$qgood/
1368 0 0 0 defined $qtag and $_[0] =~ /^$qtag\s+($qgood)/i
1373 0 0 0 $tag eq '+' and $_[0] =~ /^$qtag/
1422 0 0 0 $good and $code eq $good
1430 0 0 0 $good and $code eq $good
1475 0 0 0 $array->[2] =~ /^\d+ LOGIN/i and not $self->Showcredentials
1531 0 0 0 $self->IsConnected && !$self->IsAuthenticated
1550 0 0 0 $self->IsConnected && !$self->IsAuthenticated
1572 0 0 0 $maxagain and lc $maxagain eq 'unlimited'
1588 0 0 0 defined $maxagain and $temperrs++ > $maxagain
1629 0 0 0 $self->IsConnected and $socket
1658 0 0 0 $maxagain and lc $maxagain eq 'unlimited'
1660 0 0 0 @$oBuffer and $oBuffer->[-1][1] eq 'OUTPUT'
0 0 0 @$oBuffer and $oBuffer->[-1][1] eq 'OUTPUT' and $oBuffer->[-1][2] =~ /$Mail::IMAPClient::CR?$Mail::IMAPClient::LF$/o
0 0 0 @$oBuffer and $oBuffer->[-1][1] eq 'OUTPUT' and $oBuffer->[-1][2] =~ /$Mail::IMAPClient::CR?$Mail::IMAPClient::LF$/o and not length $iBuffer
1688 0 0 0 defined $maxagain and $temperrs++ >= $maxagain
1698 0 0 0 defined $ret and $ret == 0
1751 0 0 0 $maxagain and lc $maxagain eq 'unlimited'
1778 0 0 0 defined $maxagain and $temperrs++ >= $maxagain
1792 0 0 0 defined $ret and $ret == 0
0 0 0 defined $ret and $ret > 0
1870 0 0 0 $socket->isa('IO::Socket::SSL') and $socket->pending
2065 0 0 0 length $output and $self->_is_literal($o)
2111 0 0 0 length $output and $self->_is_literal($o)
2166 0 0 0 $cmd and not wantarray
2250 2 25 42 $l and not $l =~ /\G\s*\)\s*$/cg
2390 0 0 0 $self->select($old) and $succ
2427 0 0 0 $cmd and not wantarray
2555 0 0 0 not $msgid and $header =~ /^\s*UID\s+(\d+).*\)$/
2571 0 0 0 $header and $header =~ s/^(\S+)\:\s*//
0 0 0 $field and ref $h->{$field} eq 'ARRAY'
2766 0 0 0 @a > 1 and not exists $SEARCH_KEYS{uc $a[-1]}
2772 0 0 0 defined $thread_parser and $thread_parser == 0
2820 0 0 0 defined $line && $line =~ /\(UIDVALIDITY\s+([^\)]+)/
2827 0 0 0 defined $line && $line =~ /\(UIDNEXT\s+([^\)]+)/
3027 0 0 0 $_[2] and $maxl
0 0 0 $_[2] and $maxl and length $_[2] > $maxl
3059 0 0 0 defined $folder and $folder ne ''
3063 0 0 0 ref $file and ref $file ne 'SCALAR'
3118 0 0 0 not $buflen and eof $fh
3183 0 0 0 $self->Count >= $clear and $clear > 0
3352 0 0 0 $self->create($target) and $self->subscribe($target)
3538 0 0 0 ref $_[1] && defined $_[1][1]
3541 0 0 0 ref $_[1] && defined $_[1][1]
3547 11 0 0 ref $_[1] and $_[1][1]
3553 0 0 0 ref $_[1] and defined $_[1][1]
3559 0 0 0 ref $_[1] and $_[1][1]
3562 0 0 0 ref $_[1] and $_[1][1]

or 2 conditions

line l !l condition
84 0 0 $self->{'Debug_fh'} || \*STDERR
120 0 0 $self->{'LastError'} || ''
208 4 4 shift() || '+0000'
295 0 1 $self->{'Debug_fh'} ||= \*STDERR
335 0 0 $self->Server || ' '
376 0 0 $lasterr ||= ''
900 0 0 $offset ||= 0
1205 0 0 $self->LastError || ''
1230 0 0 $self->Reconnectretry || 0
1638 0 0 $self->Buffer || 4096
2085 0 0 $bs || 'UNDEF'
2130 0 0 $bs || 'UNDEF'
2140 0 0 shift() || 'ALL'
2762 0 0 shift() || 'UTF-8'
2847 0 0 $self->{'CAPABILITY'}{$caps[$i]} ||= []
3220 0 0 $response ||= sub { my($code, $client) = @_; require Digest::HMAC_MD5; my $hmac = Digest::HMAC_MD5::hmac_md5_hex(&decode_base64($code), $client->Password); &encode_base64($client->User . ' ' . $hmac, ''); }
3246 0 0 $response ||= sub { my($code, $client) = @_; require Authen::SASL; require Digest::MD5; my $authname = defined $client->Authuser ? $client->Authuser : $client->User; my $sasl = 'Authen::SASL'->new('mechanism', 'DIGEST-MD5', 'callback', {'user', $client->User, 'pass', $client->Password, 'authname', $authname}); my $conn = $sasl->client_new('imap', 'localhost', ''); my $answer = $conn->client_step(&decode_base64($code)); &encode_base64($answer, '') if defined $answer; }
3261 0 0 $response ||= sub { my($code, $client) = @_; &encode_base64(join("\000", defined $client->Proxy ? ($client->User, $client->Proxy) : ('', $client->User), defined $client->Password ? $client->Password : ''), ''); }
3272 0 0 $response ||= sub { my($code, $client) = @_; require Authen::NTLM; Authen::NTLM::ntlm_user($client->User); Authen::NTLM::ntlm_password($client->Password); Authen::NTLM::ntlm_domain($client->Domain) if $client->Domain; Authen::NTLM::ntlm($code); }
3462 0 0 shift() || 'INBOX'
3469 0 0 shift() || 'INBOX'

or 3 conditions

line l !l&&r !l&&!r condition
61 0 0 0 $Load_Module{$modkey} || $modkey
282 0 1 0 ref $class || $class
285 0 0 1 exists $self->{'Fast_io'} or $self->{'Socket'}
0 0 1 exists $self->{'Fast_io'} or $self->{'Socket'} or $self->{'Rawsocket'}
336 0 0 0 $self->Port || $self->Port($self->Ssl ? '993' : '143')
410 0 0 0 $code eq 'BYE' or $code eq 'NO'
528 0 0 0 length $Zbuf or length $Ibuf
537 0 0 0 $lz or not $li
540 0 0 0 $ret or $lz
666 0 0 0 $target eq '*' or $target eq '""'
694 0 0 0 $self->separator($what) || $self->separator(undef)
786 0 0 0 $target ||= $self->Folder
789 0 0 0 $user ||= $self->User
817 0 0 0 $perm =~ /\Q$target\E"?$/ or not $perm
831 0 0 0 $target ||= $self->Folder
834 0 0 0 $user ||= $self->User
859 0 0 0 $old || $self
985 0 0 0 $peer->exists($folder) or $peer->create($folder)
991 0 0 0 not defined $msgs or uc $msgs eq 'ALL'
1097 2 0 5 $popped and $popped =~ /^\)$Mail::IMAPClient::CRLF$/o or not grep(/^\)$Mail::IMAPClient::CRLF$/o, @$ref)
1146 0 0 0 not defined $rc or $ret < 0
1173 0 0 0 shift() || $self->Count
1237 0 0 0 $tries == 1 or $self->IsConnected
1245 0 0 0 $! == 32 or $! == 104
0 0 0 $! == 32 or $! == 104 or $self->LastError =~ /(?:error\(.*?\)|timeout) waiting\b/
0 0 0 $! == 32 or $! == 104 or $self->LastError =~ /(?:error\(.*?\)|timeout) waiting\b/ or $self->LastError =~ /(?:socket closed|\* BYE)\b/
1323 0 0 0 $opt->{'tag'} || $count
1535 0 0 0 $dat || $string
1554 0 0 0 $dat || $string
1600 0 0 0 $! == 32 or $! == 104
0 0 0 $! == 32 or $! == 104 or $! == 9
1885 0 0 0 $rc or $err_on_timeout
1906 0 0 0 $_[1] or $_[0]->Transaction
2143 0 0 0 ref $what or $what =~ /^[,:\d]+\w*$/
2235 6 1 20 @words > 1 || $words[0] =~ /\s/
2377 0 0 0 defined $folder or defined $self->Folder
2381 0 0 0 not defined $folder or $folder eq $old
2486 0 0 0 $2 || $4
2517 0 0 0 !defined($self->Peek) || $self->Peek
2572 0 0 0 $fieldmap{lc $1} || $1
2615 0 0 0 shift() || $self->Folder
2755 0 0 0 shift() || ($self->has_capability('THREAD=REFERENCES') ? 'REFERENCES' : 'ORDEREDSUBJECT')
2966 0 0 0 $self->separator($folder) || $self->separator(undef)
3063 0 0 0 ref $file || -f $file
3180 0 0 0 $scheme ||= $self->Authmechanism
3181 0 0 0 $response ||= $self->Authcallback
3487 0 0 0 $force or $name =~ /["\\[:^ascii:][:cntrl:]]/s
0 0 0 $name =~ /[(){}\s%*\[\]]/s or $name eq ''
3507 0 0 0 $folder ||= $self->Folder
3553 0 0 0 $_[1][1] eq 'OUTPUT' or $_[1][1] eq 'LITERAL'