Condition Coverage

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


and 2 conditions

line l !l condition
2312 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'
578 0 0 0 $auth and $auth ne 'LOGIN'
586 0 0 0 defined $passwd and defined $user
930 0 0 0 ref $file and ref $file ne 'SCALAR'
934 0 0 0 ref $file eq 'SCALAR' and not defined $$file
974 0 0 0 $peer and $peer->IsConnected
1019 0 0 0 defined $size and defined $date
1107 2 3 2 $popped and $popped =~ /^\)$Mail::IMAPClient::CRLF$/o
1151 0 0 0 $ret > 0 and $self->IsConnected
1252 0 0 0 not defined $rc and $retry
0 0 0 not defined $rc and $retry and $self->IsUnconnected
1264 0 0 0 defined $ret and $ret == 0
1266 0 0 0 exists $opt->{'doretry'} and not $opt->{'doretry'}
1287 0 0 0 not $self->Debug and $len > $sz * 2
1329 0 0 0 $self->Count >= $clear and $clear > 0
1352 0 0 0 $good and $code eq $good
1375 0 0 0 $good eq '+' and $_[0] =~ /^$qgood/
1378 0 0 0 defined $qtag and $_[0] =~ /^$qtag\s+($qgood)/i
1383 0 0 0 $tag eq '+' and $_[0] =~ /^$qtag/
1432 0 0 0 $good and $code eq $good
1440 0 0 0 $good and $code eq $good
1485 0 0 0 $array->[2] =~ /^\d+ LOGIN/i and not $self->Showcredentials
1541 0 0 0 $self->IsConnected && !$self->IsAuthenticated
1560 0 0 0 $self->IsConnected && !$self->IsAuthenticated
1582 0 0 0 $maxagain and lc $maxagain eq 'unlimited'
1598 0 0 0 defined $maxagain and $temperrs++ > $maxagain
1639 0 0 0 $self->IsConnected and $socket
1668 0 0 0 $maxagain and lc $maxagain eq 'unlimited'
1670 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
1698 0 0 0 defined $maxagain and $temperrs++ >= $maxagain
1708 0 0 0 defined $ret and $ret == 0
1761 0 0 0 $maxagain and lc $maxagain eq 'unlimited'
1788 0 0 0 defined $maxagain and $temperrs++ >= $maxagain
1802 0 0 0 defined $ret and $ret == 0
0 0 0 defined $ret and $ret > 0
1880 0 0 0 $socket->isa('IO::Socket::SSL') and $socket->pending
2075 0 0 0 length $output and $self->_is_literal($o)
2121 0 0 0 length $output and $self->_is_literal($o)
2176 0 0 0 $cmd and not wantarray
2260 2 25 42 $l and not $l =~ /\G\s*\)\s*$/cg
2400 0 0 0 $self->select($old) and $succ
2437 0 0 0 $cmd and not wantarray
2565 0 0 0 not $msgid and $header =~ /^\s*UID\s+(\d+).*\)$/
2581 0 0 0 $header and $header =~ s/^(\S+?)\:\s*//
0 0 0 $field and ref $h->{$field} eq 'ARRAY'
2776 0 0 0 @a > 1 and not exists $SEARCH_KEYS{uc $a[-1]}
2782 0 0 0 defined $thread_parser and $thread_parser == 0
2830 0 0 0 defined $line && $line =~ /\(UIDVALIDITY\s+([^\)]+)/
2837 0 0 0 defined $line && $line =~ /\(UIDNEXT\s+([^\)]+)/
3041 0 0 0 $_[2] and $maxl
0 0 0 $_[2] and $maxl and length $_[2] > $maxl
3073 0 0 0 defined $folder and $folder ne ''
3077 0 0 0 ref $file and ref $file ne 'SCALAR'
3132 0 0 0 not $buflen and eof $fh
3197 0 0 0 $self->Count >= $clear and $clear > 0
3366 0 0 0 $self->create($target) and $self->subscribe($target)
3552 0 0 0 ref $_[1] && defined $_[1][1]
3555 0 0 0 ref $_[1] && defined $_[1][1]
3561 11 0 0 ref $_[1] and $_[1][1]
3567 0 0 0 ref $_[1] and defined $_[1][1]
3573 0 0 0 ref $_[1] and $_[1][1]
3576 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 ||= ''
538 0 0 $len || 4096
910 0 0 $offset ||= 0
1215 0 0 $self->LastError || ''
1240 0 0 $self->Reconnectretry || 0
1648 0 0 $self->Buffer || 4096
2095 0 0 $bs || 'UNDEF'
2140 0 0 $bs || 'UNDEF'
2150 0 0 shift() || 'ALL'
2772 0 0 shift() || 'UTF-8'
2857 0 0 $self->{'CAPABILITY'}{uc $caps[$i]} ||= []
3234 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, ''); }
3260 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; }
3275 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 : ''), ''); }
3286 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); }
3476 0 0 shift() || 'INBOX'
3483 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
676 0 0 0 $target eq '*' or $target eq '""'
704 0 0 0 $self->separator($what) || $self->separator(undef)
796 0 0 0 $target ||= $self->Folder
799 0 0 0 $user ||= $self->User
827 0 0 0 $perm =~ /\Q$target\E"?$/ or not $perm
841 0 0 0 $target ||= $self->Folder
844 0 0 0 $user ||= $self->User
869 0 0 0 $old || $self
995 0 0 0 $peer->exists($folder) or $peer->create($folder)
1001 0 0 0 not defined $msgs or uc $msgs eq 'ALL'
1107 2 0 5 $popped and $popped =~ /^\)$Mail::IMAPClient::CRLF$/o or not grep(/^\)$Mail::IMAPClient::CRLF$/o, @$ref)
1156 0 0 0 not defined $rc or $ret < 0
1183 0 0 0 shift() || $self->Count
1247 0 0 0 $tries == 1 or $self->IsConnected
1255 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/
1333 0 0 0 $opt->{'tag'} || $count
1545 0 0 0 $dat || $string
1564 0 0 0 $dat || $string
1610 0 0 0 $! == 32 or $! == 104
0 0 0 $! == 32 or $! == 104 or $! == 9
1895 0 0 0 $rc or $err_on_timeout
1916 0 0 0 $_[1] or $_[0]->Transaction
2153 0 0 0 ref $what or $what =~ /^[,:\d]+\w*$/
2245 6 1 20 @words > 1 || $words[0] =~ /\s/
2387 0 0 0 defined $folder or defined $self->Folder
2391 0 0 0 not defined $folder or $folder eq $old
2496 0 0 0 $2 || $4
2527 0 0 0 !defined($self->Peek) || $self->Peek
2582 0 0 0 $fieldmap{lc $1} || $1
2625 0 0 0 shift() || $self->Folder
2765 0 0 0 shift() || ($self->has_capability('THREAD=REFERENCES') ? 'REFERENCES' : 'ORDEREDSUBJECT')
2980 0 0 0 $self->separator($folder) || $self->separator(undef)
3077 0 0 0 ref $file || -f $file
3194 0 0 0 $scheme ||= $self->Authmechanism
3195 0 0 0 $response ||= $self->Authcallback
3501 0 0 0 $force or $name =~ /["\\[:^ascii:][:cntrl:]]/s
0 0 0 $name =~ /[(){}\s%*\[\]]/s or $name eq ''
3521 0 0 0 $folder ||= $self->Folder
3567 0 0 0 $_[1][1] eq 'OUTPUT' or $_[1][1] eq 'LITERAL'