Branch Coverage

blib/lib/Net/RNDC/Packet.pm
Criterion Covered Total %
branch 41 58 70.6


line true false branch
39 1 16 unless (exists $args{$r})
44 1 15 if ($args{'data'} and (ref $args{'data'} || '') ne 'HASH')
48 1 14 if (exists $args{'version'} and not +($args{'version'} || '') =~ /^\d+\z/)
52 1 13 if (exists $args{'nonce'} and not +($args{'nonce'} || '') =~ /^\d+\z/)
66 4 9 if ($args{'data'}) { }
72 3 10 if ($args{'nonce'})
84 1 5 unless ($self->_cklen($data, 55))
94 0 5 unless ($self->_cklen($data, $length))
101 0 5 unless ($version == 1)
116 0 0 if (UNIVERSAL::isa($err, 'Net::RNDC::Exception')) { }
123 0 5 if $self->error
125 0 5 if ($check ne $aauth)
134 0 0 if (UNIVERSAL::isa($err, 'Net::RNDC::Exception')) { }
141 0 5 if $self->error
145 0 5 $self->error ? :
152 17 2 if (not $error) { }
2 0 elsif (UNIVERSAL::isa($error, 'Net::RNDC::Exception')) { }
195 1 0 if (UNIVERSAL::isa($err, 'Net::RNDC::Exception')) { }
202 1 5 if $self->error
241 2 28 unless (defined $data)
283 10 16 if ($no_header) { }
333 49 25 if ($msg_type == 1) { }
25 0 elsif ($msg_type == 2) { }
0 0 elsif ($msg_type == 3) { }
352 17 31 if ($r eq 'HASH') { }
0 31 elsif ($r eq 'ARRAY') { }
30 1 elsif ($r eq 'binary') { }
372 1 10 unless ((length $_[1] || 0) >= $_[2])
389 0 296 unless ((length $_[0] || 0) >= $_[1])