Branch Coverage

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


line true false branch
47 6 63 unless (exists $args{$r})
52 1 7 unless (exists $args{'is_client'} or exists $args{'is_server'})
57 0 22 unless exists $args{$r}
59 4 18 unless ((ref $args{$r} || '') eq 'CODE')
64 1 2 if (exists $args{'is_client'} and exists $args{'is_server'})
72 1 1 if (exists $args{'is_client'}) { }
100 13 12 if ($state)
101 0 13 unless (exists $states{$state})
121 0 2 unless (my $state = $self->_state eq 'start')
134 0 10 unless ($sub)
149 1 1 if ($self->_is_client) { }
169 2 2 if ($self->_is_client) { }
172 0 2 unless ($packet->parse($data))
178 1 1 if (not $self->_nonce) { }
205 0 2 unless ($packet->parse($data))
211 1 1 if (not $self->_nonce) { }
234 0 1 unless ($$packet{'data'}{'_ctrl'}{'_nonce'})
240 0 1 unless ($$packet{'data'}{'_ctrl'}{'_nonce'} == $nonce)
266 2 2 if ($self->_is_client) { }
2 0 elsif ($self->_is_server) { }