Branch Coverage

blib/lib/Data/Radius/Packet.pm
Criterion Covered Total %
branch 76 118 64.4


line true false branch
89 0 7 if ($h{'secret'})
92 0 7 unless defined $self->secret
94 0 7 if ($self->is_reply($type) and not $h{'authenticator'})
100 2 5 if ($IS_ACCOUNTING{$type}) { }
101 1 1 if ($h{'with_msg_auth'})
103 0 1 if $h{'RaiseError'}
104 1 0 if $h{'PrintError'}
115 3 4 if ($type == 1)
123 2 5 if ($with_msg_auth)
133 2 13 if ($av->{'Name'} eq "Message-Authenticator" and not $av->{'Value'})
134 1 1 if ($IS_ACCOUNTING{$type})
136 0 1 if $h{'RaiseError'}
137 1 0 if $h{'PrintError'}
141 0 1 if ($n > 1) { }
1 0 elsif (not $with_msg_auth) { }
143 0 0 if $h{'RaiseError'}
144 0 0 if $h{'PrintError'}
157 0 13 if ($@)
159 0 0 if $h{'RaiseError'}
160 0 0 if $h{'PrintError'}
162 13 0 if $bin
175 3 4 if ($with_msg_auth)
179 2 1 if ($type == 1) { }
1 0 elsif ($self->is_request($type)) { }
206 4 3 unless ($authenticator)
208 4 0 $self->is_request($type) ? :
217 0 7 unless $authenticator
241 2 14 if ($av->{'Id'}) { }
14 0 elsif (defined $av->{'Name'}) { }
242 0 2 unless $av->{'Type'}
254 0 14 unless $dict
257 2 12 if ($av->{'Name'} =~ /^([\w-]+):(\d+)$/)
262 0 14 unless $attr = $dict->attribute($av->{'Name'})
268 3 13 if (defined $av->{'Tag'})
270 0 3 if $av->{'Tag'} < 1 or $av->{'Tag'} > 31
274 0 16 unless defined $value
276 3 13 if ($attr->{'id'} == 2 and not $vendor_id)
281 4 12 if ($attr->{'type'} ne "tlv" and is_enum_type($attr->{'type'}) and $dict)
288 0 16 unless my $len_encoded = length $encoded
291 13 3 unless ($vendor_id)
299 1 2 if ($vendor_id == 24757) { }
321 2 4 if ($type == 1) { }
326 4 0 if ($self->is_request($type)) { }
331 0 0 unless ($orig_auth)
344 0 4 if ($auth ne $expected_auth)
363 1 12 if ($attr_id == 26) { }
367 0 1 if ($vendor_id == 24757)
371 0 0 if $wimax_cont
375 1 0 if ($dict)
383 12 0 if ($dict)
390 2 11 if ($attr_id == 80 and not $vendor)
391 0 2 if $attr_len != 18
400 0 13 unless ($attr)
413 4 9 if (is_enum_type($attr->{'type'}))
419 2 6 if ($type == 1 and $attr->{'id'} == 2 and not $attr->{'vendor'})
432 2 4 if ($msg_auth)
435 0 2 if ($self->is_reply($type)) { }
1 1 elsif ($type == 1) { }
456 0 2 if ($msg_auth ne $exp_msg_auth)