Branch Coverage

blib/lib/Net/SNMP/Dispatcher.pm
Criterion Covered Total %
branch 37 122 30.3


line true false branch
49 1 0 if (eval 'require Time::HiRes')
52 1 0 if (eval 'Time::HiRes::clock_gettime(Time::HiRes::CLOCK_MONOTONIC())' > 0)
62 0 1 if (not defined($MESSAGE_PROCESSING = 'Net::SNMP::MessageProcessing'->instance))
79 0 1 if $$this{'_active'}
95 0 0 if $$this{'_active'}
97 0 0 if (defined $$this{'_event_queue_h'} or keys %{$$this{'_descriptors'};})
123 0 0 if (@_ < 2 or not ref $pdu)
130 0 0 if ($delay < 0)
131 0 0 if ($$this{'_active'})
175 0 1 unless (defined $transport and defined($fileno = $transport->fileno))
183 1 0 if (not exists $$this{'_descriptors'}{$fileno}) { }
186 1 0 unless (defined $$this{'_rin'})
217 0 1 unless (defined $transport and defined($fileno = $transport->fileno))
221 1 0 if (exists $$this{'_descriptors'}{$fileno}) { }
224 1 0 if (--$$this{'_descriptors'}{$fileno}[2] < 1)
235 1 0 unless (keys %{$$this{'_descriptors'};})
256 0 0 $_[1] ? :
0 0 @_ == 2 ? :
287 0 0 unless (defined $msg)
295 0 0 unless (defined $msg->send)
298 0 0 if ($pdu->expect_response)
303 0 0 if ($retries-- > 0 and $!{'EAGAIN'} || $!{'EWOULDBLOCK'})
317 0 0 if ($pdu->expect_response)
340 0 0 if ($retries-- > 0) { }
364 0 0 unless (ref $transport)
371 0 0 unless (defined $msg)
376 0 0 unless (defined $msg->recv)
377 0 0 unless ($transport->connectionless)
386 0 0 unless ($msg->length)
392 0 0 unless (defined $MESSAGE_PROCESSING->prepare_data_elements($msg))
397 0 0 if ($MESSAGE_PROCESSING->error)
421 0 4 $$this{'_active'} ? :
439 1 7 unless (defined $$this{'_event_queue_h'})
453 7 0 if ($$event[_TIME()] >= $midpoint) { }
458 7 0 if ($$e[_TIME()] <= $$event[_TIME()])
461 7 0 if ($e eq $$this{'_event_queue_t'}) { }
481 0 0 if ($$e[_TIME()] > $$event[_TIME()])
484 0 0 if ($e eq $$this{'_event_queue_h'}) { }
511 0 8 if (defined $$event[_PREVIOUS()]) { }
8 0 elsif ($event eq $$this{'_event_queue_h'}) { }
514 7 1 if (defined($$this{'_event_queue_h'} = $$event[_NEXT()])) { }
526 7 0 if (defined $$event[_NEXT()]) { }
0 0 elsif ($event eq $$this{'_event_queue_t'}) { }
556 4 0 $$this{'_active'} ? :
571 12 0 if (defined(my $event = $$this{'_event_queue_h'}))
577 4 8 if (not $$event[_ACTIVE()] and $$event[_TIME()])
581 4 4 if ($$event[_TIME()] <= $time) { }
4 0 elsif (not defined $timeout) { }
606 0 8 if (not defined $nfound or $nfound < 0) { }
1 7 elsif ($nfound > 0) { }
608 0 0 if ($!{'EINTR'}) { }
618 1 0 if (defined $rout)
620 1 0 if (vec $rout, $_, 1)
642 5 0 if (ref $callback eq 'ARRAY' and ref $$callback[0] eq 'CODE') { }
0 0 elsif (ref $callback eq 'CODE') { }
664 0 5 $@ ? :
671 0 0 unless (defined $$this{'_error'})
672 0 0 @_ > 1 ? :
673 0 0 if ($this->debug)
689 27 0 unless $DEBUG
691 0 0 @_ > 1 ? :