Branch Coverage

lib/PAGI/Middleware/Auth/Basic.pm
Criterion Covered Total %
branch 12 26 46.1


line true false branch
74 0 3 if ($scope->{'type'} ne "http")
80 0 3 unless ($self->_requires_auth($scope->{'path'}))
88 1 2 unless ($auth_header)
96 0 2 unless (defined $username)
103 1 1 if ($@ or not $valid)
124 3 0 unless $self->{'paths'}
127 0 0 if (ref $pattern eq 'Regexp') { }
128 0 0 if $path =~ /$pattern/
130 0 0 if index($path, $pattern) == 0
139 0 2 unless $header =~ /^Basic\s+(.+)$/i
143 0 2 unless $decoded
146 0 2 unless defined $username
180 2 0 if lc $h->[0] eq $name