Branch Coverage

blib/lib/Net/SIP/Authorize.pm
Criterion Covered Total %
branch 23 70 32.8


line true false branch
48 0 0 unless $args{'user2pass'} or $args{'user2a1'}
55 0 1 if (my $f = $args{'filter'})
56 0 0 if ref $f ne 'HASH'
59 0 0 if ref $chain ne 'ARRAY'
60 0 0 if ref $_ ne 'ARRAY'
66 0 0 if (ref $_) { }
71 0 0 unless my $sub = UNIVERSAL::can($pkg, 'verify') || do { eval "require $pkg"; UNIVERSAL::can($pkg, 'verify') }
100 0 10 if ($packet->is_response)
108 0 10 $self->{'i_am_proxy'} ? :
123 0 5 if ($param->{'realm'} ne $realm)
128 0 5 if (defined $opaque)
129 0 0 if (not defined $param->{'opaque'}) { }
0 0 elsif ($param->{'opaque'} ne $opaque) { }
140 0 5 if (lc $data ne 'digest' or $algo and lc $algo ne 'md5' or $qop and $qop ne 'auth')
150 0 5 if (ref $user2a1)
151 0 0 if (ref $user2a1 eq 'HASH') { }
157 5 0 if (not defined $a1_hex and ref $user2pass)
159 5 0 if (ref $user2pass eq 'HASH') { }
165 0 5 unless defined $pass
169 0 5 unless defined $a1_hex
175 0 3 $method eq 'CANCEL' ? :
2 3 $method eq 'ACK' ? :
182 0 5 if ($qop) { }
201 5 0 if ($resp eq $want_response)
202 0 5 if ($self->{'filter'} and my $or = $self->{'filter'}{$method}) { }
206 0 0 unless (invoke_callback($cb, $packet, $leg, $addr, $user, $realm))
212 0 0 if $authorized
224 5 5 if ($authorized)
235 2 3 if ($method eq 'ACK') { }
0 3 elsif ($method eq 'CANCEL') { }
245 0 3 defined $opaque ? :
288 0 0 if lc $domain eq lc $auth_realm
289 0 0 if $domain =~ /\.\Q$auth_realm\E$/i
302 0 0 if lc $user eq lc $auth_user
316 0 0 if lc $from eq lc $to