Branch Coverage

blib/lib/Mail/POP3Client.pm
Criterion Covered Total %
branch 0 330 0.0


line true false branch
69 0 0 if $^O =~ /MacOS/i
73 0 0 if (defined $self->User and defined $self->Pass)
90 0 0 if (@_ and scalar(@_) % 2 == 0) { }
94 0 0 if (defined $hashargs{'USER'} and defined $hashargs{'PASSWORD'} or defined $hashargs{'HOST'}) { }
118 0 0 if $host
120 0 0 if $port
122 0 0 if $debug
124 0 0 if $auth_mode
126 0 0 if $localaddr
153 0 0 unless my $stat = shift()
164 0 0 unless my $msg = shift()
175 0 0 unless my $debug = shift()
187 0 0 unless my $port = shift()
200 0 0 unless my $host = shift()
213 0 0 unless my $addr = shift()
225 0 0 unless my $socket = shift()
232 0 0 unless $mode
242 0 0 unless my $user = shift()
254 0 0 unless my $pass = shift()
268 0 0 if (defined $c and length $c > 0) { }
284 0 0 if (defined $c and length $c > 0) { }
313 0 0 if ($me->Alive and $me->Socket and $me->Socket->connected)
320 0 0 unless (defined $line)
328 0 0 unless CORE::close $me->Socket
334 0 0 unless $line =~ /^\+OK/i
359 0 0 if $host
360 0 0 if $port
365 0 0 unless ($s)
366 0 0 if ($me->{'USESSL'}) { }
367 0 0 if ($me->Port == 110)
371 0 0 if $@ and $me->Message("Could not load IO::Socket::SSL: $@")
378 0 0 unless $s = "IO::Socket::SSL"->new("PeerAddr", $me->Host, "PeerPort", $me->Port, "Proto", "tcp", "Type", 1, "LocalAddr", $me->LocalAddr, "Timeout", $me->{'TIMEOUT'})
389 0 0 unless $s = "IO::Socket::INET"->new("PeerAddr", $me->Host, "PeerPort", $me->Port, "Proto", "tcp", "Type", 1, "LocalAddr", $me->LocalAddr, "Timeout", $me->{'TIMEOUT'})
399 0 0 unless defined(my $msg = $me->_sockread)
405 0 0 unless $msg =~ /^\+OK/i
408 0 0 if $msg =~ /(<$atom(?:\.$atom)*\@$atom(?:\.$atom)*>)/o
412 0 0 if defined $me->User and defined $me->Pass
429 0 0 if $me->State eq "TRANSACTION"
431 0 0 if ($me->{'AUTH_MODE'} eq 'BEST') { }
0 0 elsif ($me->{'AUTH_MODE'} eq 'APOP') { }
0 0 elsif ($me->{'AUTH_MODE'} eq 'CRAM-MD5') { }
0 0 elsif ($me->{'AUTH_MODE'} ne 'PASS') { }
433 0 0 if ($me->{'MESG_ID'})
435 0 0 if $me->State eq "TRANSACTION"
439 0 0 if $capa =~ /^SASL.*?\sCRAM-MD5\b/ and $has_cram_md5 = 1
441 0 0 if ($has_cram_md5)
443 0 0 if $me->State eq "TRANSACTION"
447 0 0 unless $me->{'MESG_ID'}
471 0 0 if $@ and $me->Message("APOP failed: $@")
475 0 0 unless $me->_checkstate("AUTHORIZATION", "APOP")
478 0 0 unless (defined $line)
486 0 0 unless ($me->NOOP)
493 0 0 unless $line =~ /^\+OK/
496 0 0 unless $me->POPStat
511 0 0 if $@ and $me->Message("AUTH CRAM-MD5 failed: $@")
513 0 0 unless $me->_checkstate("AUTHORIZATION", "AUTH")
519 0 0 if ($line =~ /^\+ (.+)$/) { }
529 0 0 unless $line =~ /^\+OK/
533 0 0 if $me->Message("AUTH CRAM-MD5 failed: $line")
538 0 0 unless $me->POPStat
549 0 0 unless $me->_checkstate("AUTHORIZATION", "USER")
552 0 0 unless (defined $line)
559 0 0 unless $line =~ /^\+/
564 0 0 unless (defined $line)
571 0 0 unless $line =~ /^\+OK/
576 0 0 unless $me->POPStat >= 0
592 0 0 unless $lines =~ /\d+/
596 0 0 unless $me->_checkstate("TRANSACTION", "TOP")
599 0 0 unless (defined $line)
604 0 0 unless $line =~ /^\+OK/
605 0 0 if $line =~ /^\+OK (\d+) /
609 0 0 unless (defined $line)
613 0 0 if $line =~ /^\.\s*$/
618 0 0 wantarray ? :
631 0 0 unless $me->_checkstate("TRANSACTION", "RETR")
634 0 0 unless (defined $line)
639 0 0 unless $line =~ /^\+OK/
640 0 0 if $line =~ /^\+OK (\d+) /
644 0 0 unless (defined $line)
648 0 0 if $line =~ /^\.\s*$/
654 0 0 wantarray ? :
672 0 0 unless $me->_checkstate("TRANSACTION", "RETR")
675 0 0 unless (defined $line)
680 0 0 unless $line =~ /^\+OK/
681 0 0 if $line =~ /^\+OK (\d+) /
685 0 0 unless (defined $line)
689 0 0 if $line =~ /^\.\s*$/
708 0 0 unless $me->_checkstate("TRANSACTION", "RETR")
711 0 0 unless (defined $line)
716 0 0 unless $line =~ /^\+OK/
717 0 0 if $line =~ /^\+OK (\d+) /
722 0 0 unless (defined $line)
728 0 0 if $line =~ /^\.\s*$/
732 0 0 unless (defined $line)
736 0 0 if $line =~ /^\.\s*$/
742 0 0 wantarray ? :
759 0 0 unless $me->_checkstate("TRANSACTION", "RETR")
762 0 0 unless (defined $line)
767 0 0 unless $line =~ /^\+OK/
768 0 0 if $line =~ /^\+OK (\d+) /
773 0 0 unless (defined $line)
779 0 0 if $line =~ /^\.\s*$/
783 0 0 unless (defined $line)
788 0 0 if $line =~ /^\.\s*$/
804 0 0 unless $me->_checkstate("TRANSACTION", "STAT")
807 0 0 unless (defined $line)
811 0 0 unless $line =~ /^\+OK/
812 0 0 if $line =~ /^\+OK (\d+) (\d+)/
827 0 0 unless $me->Alive
832 0 0 unless $me->_checkstate("TRANSACTION", $CMD)
833 0 0 $num ? :
836 0 0 unless (defined $line)
840 0 0 unless $line =~ /^\+OK/
841 0 0 if ($num)
846 0 0 if $line =~ /^\.\s*$/
851 0 0 if ($ret)
852 0 0 wantarray ? :
865 0 0 unless $me->Alive
870 0 0 unless $me->_checkstate("TRANSACTION", $CMD)
871 0 0 $num ? :
873 0 0 unless (defined $line)
877 0 0 unless $line =~ /^\+OK/
878 0 0 if ($num)
883 0 0 if $line =~ /^\.\s*$/
889 0 0 if ($ret)
890 0 0 wantarray ? :
918 0 0 unless $me->_checkstate("TRANSACTION", "LAST")
921 0 0 unless (defined $line)
926 0 0 if $line =~ /\+OK (\d+)\D*$/
937 0 0 unless $me->_checkstate("TRANSACTION", "RSET")
940 0 0 unless (defined $line)
944 0 0 if $line =~ /^\+OK/
956 0 0 unless $me->_checkstate("TRANSACTION", "DELE")
959 0 0 unless (defined $line)
964 0 0 if $line =~ /^\+OK/
978 0 0 unless $me->Alive
983 0 0 unless $me->_checkstate("TRANSACTION", "UIDL")
984 0 0 $num ? :
986 0 0 unless (defined $line)
990 0 0 unless $line =~ /^\+OK/
991 0 0 if ($num)
996 0 0 if $line =~ /^\.\s*$/
1002 0 0 if ($ret)
1003 0 0 wantarray ? :
1017 0 0 unless $me->Alive
1025 0 0 unless $line =~ /^\+OK/
1028 0 0 if $line =~ /^\.\s*$/
1034 0 0 if ($ret)
1035 0 0 wantarray ? :
1046 0 0 if ($xtndarg eq "")
1052 0 0 unless $me->_checkstate("TRANSACTION", "XTND")
1053 0 0 unless $me->Alive
1057 0 0 unless $line =~ /^\+OK/
1067 0 0 if (grep {/^UTF8 USER/;} $me->Capa)
1069 0 0 if ($me->Alive)
1073 0 0 unless $result =~ /^\+OK/
1089 0 0 unless $me->Alive
1094 0 0 unless $line =~ /^\+OK/
1116 0 0 unless $count
1127 0 0 if ($currstate ne $state) { }
1146 0 0 if $me->Debug
1157 0 0 unless (defined $line)
1163 0 0 if $me->{'STRIPCR'}
1165 0 0 if $me->Debug
1166 0 0 if ($line =~ /^[\\+\\-](OK|ERR)/i)