| line |
true |
false |
branch |
|
226
|
21 |
1 |
if (defined $opts{'acl'} and ref $opts{'acl'} eq 'HASH') { } |
|
|
1 |
0 |
elsif (defined $opts{'acl'} and ref $opts{'acl'} ne 'HASH') { } |
|
236
|
142 |
47 |
if (not defined $opts{'acl'}{$acl}{$boolean_key}) { } |
|
239
|
9 |
38 |
if (ref $opts{'acl'}{$acl}{$boolean_key} ne "") |
|
253
|
0 |
16 |
if (not defined $opts{'acl'}{$acl}{'final'} and $acl eq 'undef' || $acl eq 'nonexistent') { } |
|
|
0 |
16 |
elsif (not defined $opts{'acl'}{$acl}{'final'}) { } |
|
266
|
62 |
38 |
if (not defined $opts{'acl'}{$acl}{$array_key}) { } |
|
|
8 |
30 |
elsif (ref $opts{'acl'}{$acl}{$array_key} ne 'ARRAY') { } |
|
282
|
3 |
0 |
unless (defined $opts{'acl'}{'undef'}) |
|
304
|
3 |
0 |
unless (defined $opts{'acl'}{'nonexistent'}) |
|
358
|
1 |
15 |
if (not defined $opts{'apikey'}) { } |
|
|
1 |
14 |
elsif (not defined $self->{'acl'}{$opts{'apikey'}}) { } |
|
366
|
7 |
9 |
if (not defined $opts{'slugs'}) { } |
|
368
|
0 |
7 |
if ($self->{'acl'}{$opts{'apikey'}}{'require_slug'}) |
|
372
|
9 |
0 |
if (ref $opts{'slugs'} eq 'ARRAY') { } |
|
|
0 |
0 |
elsif (ref $opts{'slugs'} eq '') { } |
|
378
|
0 |
9 |
if ($self->{'acl'}{$opts{'apikey'}}{'require_slug'} and not defined $slugs[0]) { } |
|
|
0 |
9 |
elsif (not defined $slugs[0]) { } |
|
387
|
13 |
3 |
if (not defined $opts{'ua'}) { } |
|
388
|
1 |
12 |
if ($self->{'acl'}{$opts{'apikey'}}{'require_ua'}) |
|
397
|
12 |
3 |
if (not defined $opts{'path'}) { } |
|
398
|
0 |
12 |
if ($self->{'acl'}{$opts{'apikey'}}{'require_path'}) |
|
407
|
6 |
9 |
if (not defined $opts{'ip'}) { } |
|
408
|
0 |
6 |
if ($self->{'acl'}{$opts{'apikey'}}{'require_ip'}) |
|
416
|
5 |
10 |
if (defined $ip and $self->{'acl'}{$opts{'apikey'}}{'ip_auth'}) { } |
|
|
0 |
10 |
elsif (not defined $ip and $self->{'acl'}{$opts{'apikey'}}{'ip_auth'}) { } |
|
419
|
0 |
5 |
if ($@) |
|
426
|
0 |
5 |
if (&$denied_subnets($ip)) |
|
432
|
0 |
5 |
if ($@) |
|
439
|
2 |
3 |
unless (&$allowed_subnets($ip)) |
|
447
|
4 |
9 |
if ($self->{'acl'}{$opts{'apikey'}}{'slug_auth'}) |
|
453
|
2 |
2 |
if ($item eq $slug) |
|
459
|
2 |
2 |
unless ($matched_slugs{$slug}) |
|
461
|
0 |
0 |
if ($slug =~ /$item/) |
|
470
|
2 |
2 |
unless ($matched_slugs{$slug}) |
|
477
|
3 |
8 |
if (defined $ua and $self->{'acl'}{$opts{'apikey'}}{'ua_auth'}) { } |
|
|
0 |
8 |
elsif (not defined $ua and $self->{'acl'}{$opts{'apikey'}}{'ua_auth'}) { } |
|
479
|
3 |
0 |
if (defined $self->{'acl'}{$opts{'apikey'}}{'ua_regex_allow'}[0]) |
|
483
|
1 |
2 |
if ($ua =~ /$item/) |
|
489
|
2 |
1 |
unless ($ua_matched) |
|
494
|
1 |
0 |
if (defined $self->{'acl'}{$opts{'apikey'}}{'ua_regex_deny'}[0]) |
|
498
|
0 |
0 |
if ($ua =~ /$item/) |
|
504
|
0 |
1 |
if ($ua_matched) |
|
513
|
3 |
6 |
if (defined $path and $self->{'acl'}{$opts{'apikey'}}{'path_auth'}) { } |
|
|
0 |
6 |
elsif (not defined $path and $self->{'acl'}{$opts{'apikey'}}{'path_auth'}) { } |
|
515
|
3 |
0 |
if (defined $self->{'acl'}{$opts{'apikey'}}{'path_regex_allow'}[0]) |
|
519
|
1 |
2 |
if ($path =~ /$item/) |
|
525
|
2 |
1 |
unless ($path_matched) |
|
530
|
0 |
1 |
if (defined $self->{'acl'}{$opts{'apikey'}}{'ua_regex_deny'}[0]) |
|
534
|
0 |
0 |
if ($path =~ /$item/) |
|
540
|
0 |
0 |
if ($path_matched) |