Branch Coverage

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


line true false branch
42 1 16 unless (exists $args{$r})
47 1 15 if ($args{'data'} and (ref $args{'data'} || '') ne 'HASH')
51 1 14 if (exists $args{'version'} and not +($args{'version'} || '') =~ /^\d+\z/)
55 1 13 if (exists $args{'nonce'} and not +($args{'nonce'} || '') =~ /^\d+\z/)
69 4 9 if ($args{'data'}) { }
75 3 10 if ($args{'nonce'})
87 1 5 unless ($self->_cklen($data, 55))
97 0 5 unless ($self->_cklen($data, $length))
104 0 5 unless ($version == 1)
119 0 0 if (UNIVERSAL::isa($err, 'Net::RNDC::Exception')) { }
126 0 5 if $self->error
128 0 5 if ($check ne $aauth)
137 0 0 if (UNIVERSAL::isa($err, 'Net::RNDC::Exception')) { }
144 0 5 if $self->error
148 0 5 $self->error ? :
155 17 2 if (not $error) { }
2 0 elsif (UNIVERSAL::isa($error, 'Net::RNDC::Exception')) { }
198 1 0 if (UNIVERSAL::isa($err, 'Net::RNDC::Exception')) { }
205 1 5 if $self->error
244 2 28 unless (defined $data)
286 10 16 if ($no_header) { }
336 49 25 if ($msg_type == 1) { }
25 0 elsif ($msg_type == 2) { }
0 0 elsif ($msg_type == 3) { }
355 17 31 if ($r eq 'HASH') { }
0 31 elsif ($r eq 'ARRAY') { }
30 1 elsif ($r eq 'binary') { }
375 1 10 unless ((length $_[1] || 0) >= $_[2])
392 0 296 unless ((length $_[0] || 0) >= $_[1])