Branch Coverage

blib/lib/Net/RNDC/Session.pm
Criterion Covered Total %
branch 31 40 77.5


line true false branch
44 6 63 unless (exists $args{$r})
49 1 1 unless (exists $args{'is_client'} or exists $args{'is_server'})
54 0 22 unless exists $args{$r}
56 4 18 unless ((ref $args{$r} || '') eq 'CODE')
61 1 1 if (exists $args{'is_client'} and exists $args{'is_server'})
69 1 1 if (exists $args{'is_client'}) { }
97 13 12 if ($state)
98 0 13 unless (exists $states{$state})
118 0 2 unless (my $state = $self->_state eq 'start')
131 0 10 unless ($sub)
146 1 1 if ($self->_is_client) { }
166 2 2 if ($self->_is_client) { }
169 0 2 unless ($packet->parse($data))
175 1 1 if (not $self->_nonce) { }
202 0 2 unless ($packet->parse($data))
208 1 1 if (not $self->_nonce) { }
231 0 1 unless ($packet->{'data'}{'_ctrl'}{'_nonce'})
237 0 1 unless ($packet->{'data'}{'_ctrl'}{'_nonce'} == $nonce)
263 2 2 if ($self->_is_client) { }
2 0 elsif ($self->_is_server) { }