Branch Coverage

blib/lib/Net/POP3.pm
Criterion Covered Total %
branch 22 156 14.1


line true false branch
57 3 0 if (@_ % 2) { }
65 3 0 defined $host ? :
68 2 1 if ($arg{'SSL'})
70 0 2 unless $ssl_class
74 3 0 unless defined $arg{'Timeout'}
86 0 3 exists $arg{'ResvPort'} ? :
3 0 if $obj = $type->SUPER::new("PeerAddr", $host = $h, "PeerPort", $arg{'Port'} || 'pop3(110)', "Proto", "tcp", $family_key, $arg{'Domain'} || $arg{'Family'}, "LocalAddr", $arg{'LocalAddr'}, "LocalPort", exists $arg{'ResvPort'} ? $arg{'ResvPort'} : $arg{'LocalPort'}, "Timeout", $arg{'Timeout'})
90 0 3 unless defined $obj
94 2 1 if ($arg{'SSL'})
95 0 2 unless "Net::POP3::_SSL"->start_SSL($obj, %arg)
99 3 0 exists $arg{'Debug'} ? :
101 0 3 unless ($obj->response == 2)
123 0 0 $_[2] =~ /^(pass|rpop)/i ? :
127 0 0 unless @_ >= 1 and @_ <= 3
130 0 0 if (@_ <= 2)
134 0 0 if $me->user($user)
140 0 1 unless $ssl_class
141 0 1 unless $self->_STLS
143 0 1 unless "Net::POP3::_SSL"->start_SSL($self, %{${*$self;}{"net_pop3_arg"};}, @_)
150 0 0 unless @_ >= 1 and @_ <= 3
155 0 0 if (eval { do { local $SIG{'__DIE__'}; require Digest::MD5 } }) { }
0 0 elsif (eval { do { local $SIG{'__DIE__'}; require MD5 } }) { }
167 0 0 unless $banner = (do { *$me }->{'net_pop3_banner'} =~ /(<.*>)/)[0]
169 0 0 if (@_ <= 2)
176 0 0 unless $me->_APOP($user, $md->hexdigest)
183 0 0 unless @_ == 2
184 0 0 $_[0]->_USER($_[1]) ? :
189 0 0 unless @_ == 2
194 0 0 unless $me->_PASS($pass)
201 0 0 unless @_ == 1
205 0 0 unless $me->_RSET
208 0 0 if (defined do { *$me }->{'net_pop3_mail'})
218 0 0 unless @_ == 1
221 0 0 unless $_[0]->_LAST and $_[0]->message =~ /(\d+)/
228 0 0 unless @_ == 2 or @_ == 3
232 0 0 unless $me->_TOP($_[0], $_[1] || 0)
239 0 0 unless @_ == 1
243 0 0 unless $me->_STAT and $me->message =~ /(\d+)\D+(\d+)/
250 0 0 unless @_ == 1 or @_ == 2
254 0 0 unless $me->_LIST(@_)
256 0 0 if (@_)
261 0 0 unless my $info = $me->read_until_dot
271 0 0 unless @_ == 2 or @_ == 3
275 0 0 unless $me->_RETR(shift())
282 0 0 unless @_ == 2
285 0 0 unless $me->_RETR(shift())
291 0 0 unless @_ == 2
293 0 0 unless $me->_DELE(@_)
299 0 0 unless @_ == 1 or @_ == 2
303 0 0 unless $me->_UIDL(@_)
305 0 0 if (@_) { }
309 0 0 unless my $ref = $me->read_until_dot
322 0 0 unless @_ == 2
325 0 0 unless $me->_PING(@_) and $me->message =~ /(\d+)\D+(\d+)/
344 0 0 $m ? :
354 0 0 $me->message =~ /(\d+)\s+message/io ? :
357 0 0 $ret ? :
391 0 0 if (defined fileno $me and do { *$me }->{'net_pop3_deleted'})
404 0 7 unless my $str = $cmd->getline
407 0 7 if $cmd->debug
410 7 0 if ($str =~ s/^\+OK\s*//io) { }
0 0 elsif ($str =~ s/^\+\s*//io) { }
432 0 0 if $this->banner =~ /<.*>/
434 0 0 if ($this->_CAPA) { }
442 0 0 if ($this->command("AUTH")->response == 2)
455 0 0 unless do { *$this }->{'net_pop3e_capabilities'}
462 0 0 unless eval { do { require MIME::Base64; require Authen::SASL } }
472 0 0 if (ref $username and UNIVERSAL::isa($username, 'Authen::SASL')) { }
481 0 0 @user_mech ? :
483 0 0 unless (@mech)
498 0 0 unless length $username
514 0 0 unless ($client)
527 0 0 unless (my($token) = $client->client_start)
546 0 0 if defined $token and length $token
551 0 0 unless (my($token) = $client->client_step(MIME::Base64::decode_base64(($self->message)[0])))
562 0 0 defined $token ? :
585 3 0 if not defined $arg{'SSL_hostname'} and $class->can_client_sni
588 0 3 unless $ok