Branch Coverage

blib/lib/Net/NNTP.pm
Criterion Covered Total %
branch 25 244 10.2


line true false branch
59 0 3 if (@_ % 2) { }
71 3 0 defined $host ? :
74 0 3 unless @{$hosts;}
78 2 1 if ($arg{'SSL'})
80 0 2 unless $ssl_class
86 0 9 if exists $arg{$o}
89 3 0 unless defined $connect{'Timeout'}
93 0 3 unless $obj = $type->SUPER::new(%connect)
96 2 1 if ($arg{'SSL'})
97 0 2 unless 'Net::NNTP::_SSL'->start_SSL($obj, %arg)
102 0 3 unless defined $obj
105 3 0 exists $arg{'Debug'} ? :
107 0 3 unless ($obj->response == 2)
115 3 0 unless (exists $arg{'Reader'} and $arg{'Reader'} == 0)
119 3 0 if ($obj->reader) { }
131 0 3 $c == 200 ? :
148 0 0 if (ref $nntp and $nntp->code == 350 and $text =~ /^(\S+)/ or $text =~ /^(authinfo\s+pass)/io)
159 0 0 unless @_ == 1
161 0 0 unless do { *$nntp }->{'net_nntp_post'}
167 0 1 unless $ssl_class
168 0 1 unless $self->_STARTTLS
170 0 1 unless 'Net::NNTP::_SSL'->start_SSL($self, %{${*$self;}{'net_nntp_arg'};}, @_)
178 0 0 unless @_ >= 1 and @_ <= 3
182 0 0 if @_ == 2 or @_ and ref $_[0] || ref \$_[0] eq 'GLOB'
184 0 0 $nntp->_ARTICLE(@_) ? :
191 0 0 unless @_ >= 1 and @_ <= 2
194 0 0 unless $nntp->_ARTICLE(@_)
200 0 0 unless @_ == 3
203 0 0 if $nntp->_AUTHINFO('USER', $user) == 3
209 0 0 unless @_ == 3
212 0 0 if $nntp->_AUTHINFO('SIMPLE') == 3
218 0 0 unless @_ >= 1 and @_ <= 3
222 0 0 if @_ == 2 or (@_ and ref $_[0] or ref \$_[0] eq 'GLOB')
224 0 0 $nntp->_BODY(@_) ? :
231 0 0 unless @_ >= 1 and @_ <= 2
233 0 0 unless $nntp->_BODY(@_)
239 0 0 unless @_ >= 1 and @_ <= 3
243 0 0 if @_ == 2 or (@_ and ref $_[0] or ref \$_[0] eq 'GLOB')
245 0 0 $nntp->_HEAD(@_) ? :
252 0 0 unless @_ >= 1 and @_ <= 2
254 0 0 unless $nntp->_HEAD(@_)
260 0 0 unless @_ == 1 or @_ == 2
263 0 0 $nntp->_STAT(@_) && $nntp->message =~ /(<[^>]+>)/o ? :
270 0 0 unless @_ == 1 or @_ == 2
274 0 0 unless @_ or wantarray
279 0 0 defined $grp && length $grp ? :
0 0 unless defined $newgrp and length $newgrp
283 0 0 unless $nntp->_GROUP($newgrp) and $nntp->message =~ /(\d+)\s+(\d+)\s+(\d+)\s+(\S+)/
288 0 0 if $group =~ /\(/
294 0 0 wantarray ? :
300 0 0 unless @_ == 1
303 0 0 $nntp->_HELP ? :
310 0 0 unless @_ >= 2
314 0 0 $nntp->_IHAVE($msgid) && $nntp->datasend(@_) ? :
321 0 0 unless @_ == 1
324 0 0 $nntp->_LAST && $nntp->message =~ /(<[^>]+>)/o ? :
331 0 0 unless @_ == 1
334 0 0 $nntp->_LIST ? :
341 0 0 unless @_ >= 2
346 0 0 if ref $distributions
349 0 0 $nntp->_NEWGROUPS($since, $distributions) ? :
356 0 0 unless @_ >= 2 and @_ <= 4
360 0 0 @_ ? :
364 0 0 if ref $groups
367 0 0 if ref $distributions
370 0 0 $nntp->_NEWNEWS($groups, $since, $distributions) ? :
377 0 0 unless @_ == 1
380 0 0 $nntp->_NEXT && $nntp->message =~ /(<[^>]+>)/o ? :
387 0 0 unless @_ >= 1
390 0 0 $nntp->_POST && $nntp->datasend(@_) ? :
398 0 0 unless $nntp->_POST
404 0 3 unless @_ == 1
413 0 0 unless @_ == 1
425 0 0 unless @_ == 1 or @_ == 2
428 0 0 $nntp->_LIST('ACTIVE', @_) ? :
435 0 0 unless @_ == 1
438 0 0 $nntp->_LIST('ACTIVE.TIMES') ? :
445 0 0 unless @_ == 1
448 0 0 $nntp->_LIST('DISTRIBUTIONS') ? :
455 0 0 unless @_ == 1
464 0 0 if /^\d/
0 0 $nntp->_LIST('DISTRIB.PATS') && ($arr = $nntp->read_until_dot) ? :
470 0 0 unless @_ == 1 or @_ == 2
473 0 0 $nntp->_LIST('NEWSGROUPS', @_) ? :
480 0 0 unless @_ == 1
483 0 0 $nntp->_LIST('OVERVIEW.FMT') ? :
490 0 0 unless @_ == 1
493 0 0 $nntp->_LIST('SUBSCRIPTIONS') ? :
500 0 0 unless @_ == 1 or @_ == 2
503 0 0 $nntp->_LISTGROUP(@_) ? :
510 0 3 unless @_ == 1
518 0 0 unless @_ == 1 or @_ == 2
521 0 0 $nntp->_XGTITLE(@_) ? :
528 0 0 unless @_ >= 2 and @_ <= 4
533 0 0 $nntp->_XHDR($header, $arg) ? :
540 0 0 unless @_ == 2 or @_ == 3
544 0 0 $nntp->_XOVER($arg) ? :
551 0 0 unless @_ == 4 or @_ == 5
557 0 0 if ref $pattern
560 0 0 $nntp->_XPAT($header, $arg, $pattern) ? :
567 0 0 unless @_ == 2
571 0 0 unless $nntp->_XPATH($message_id)
577 0 0 wantarray ? :
582 0 0 unless @_ == 2 or @_ == 3
586 0 0 $nntp->_XROVER($arg) ? :
593 0 0 unless @_ == 1
596 0 0 $nntp->_DATE && $nntp->message =~ /(\d{4})(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)/ ? :
612 0 0 if (@_)
613 0 0 if $^W
618 0 0 if (defined $spec)
619 0 0 if (ref $spec) { }
621 0 0 if (defined $spec->[1])
622 0 0 if $spec->[1] != $spec->[0]
624 0 0 if $spec->[1] > $spec->[0]
648 0 0 unless my $arr = $nntp->read_until_dot
664 0 0 unless my $arr = $nntp->read_until_dot
683 0 0 if $arr
692 0 0 unless my $arr = $nntp->read_until_dot
700 0 0 if $ln =~ s/^\s*(\S+)\s*//o
750 0 0 if defined fileno $nntp
763 3 0 if not defined $arg{'SSL_hostname'} and $class->can_client_sni
768 0 3 unless $ok