Branch Coverage

File:lib/OpenAPI/Handler/Role.pm
Coverage:68.7%

line%coveragebranch
1150TFunless _IDENT($role)
23100TFif ($role eq '~')
26100TFif ($role eq 'Admin' or $role eq 'Public')
2950TFif (not $self->has_role($role))
3450TF$self->do($sql) >= 0 ? :
4250TFif (not $self->has_role($role))
4550TFif ($col ne '~' and $col ne 'method' and $col ne 'url' and $col ne 'id')
4850TFif ($role eq 'Admin')
52100TFif ($value eq '~') { }
50TFelsif ($col eq '~') { }
6350TF$res >= 0 ? :
7250TFif (not $self->has_role($role))
7550TFif ($col ne '~' and $col ne 'method' and $col ne 'url' and $col ne 'id')
80100TFif ($value eq '~') { }
85100TFif ($op eq 'like')
90100TFif ($col eq '~') { }
10850TFif (not $self->has_role($role))
11150TFif ($role eq 'Admin')
11450TFif ($col ne '~' and $col ne 'method' and $col ne 'url' and $col ne 'id')
12050TFunless _HASH $data
123100TFif (lc $col eq 'id')
12950TFif ($value eq '~') { }
13450TFif ($op eq 'like')
13950TFif ($col eq '~') { }
15250TF$res >= 0 ? :
16150TFif (not $self->has_role($role))
167100TFif (_HASH $data) { }
50TFelsif (_ARRAY $data) { }
16950TF$rows_affected >= 1 ? :
17950TF$rows_affected == @$data ? :
18550TF$rows_affected >= 0 ? :
50TF$last_id ? :
19450TFif (defined $id)
19850TFunless _STRING $method
20050TFif (not $method =~ /^(?:GET|POST|PUT|DELETE|HEAD)$/)
204100TFif (not defined $url)
20750TFif (not $url =~ m[^/=/])
21050TFif (%$data)
236100TFif ($role eq '~')
240100TFif (not $role_id)
26050TF$self->do($sql) >= 0 ? :
270100TFif ($last_bits[$max_i] ne '~')
28650TFunless my $data = _HASH($$self{'_req_data'})
29150TFif ($role eq '~')
29550TFif ($name = delete $$data{'name'} and $name ne $role)
31250TFif ($nroles >= $ROLE_LIMIT)
31650TFunless my $name = delete $$data{'name'}
31850TFunless _IDENT($name)
319100TFif ($self->has_role($name))
324100TFif (not defined $desc)
32750TFunless _STRING $desc
330100TFif (not defined $login)
33350TFunless _STRING $login
335100TFif (not $login =~ /^(?:password|captcha|anonymous)$/)
34050TFif (defined $password and $login ne 'password')
344100TFif ($login eq 'password')
345100TFif (not defined $password) { }
100TFelsif (length $password < $PASSWORD_MIN_LEN) { }
35250TFif (%$data)
36150TF$self->do($insert) ? :
36750TFunless my $data = _HASH($$self{'_req_data'})
37050TFunless $self->has_role($role)
377100TFif (defined $new_name)
37850TFunless _IDENT($new_name)
384100TFif (defined $new_login)
385100TFunless _STRING $new_login
387100TFif (not $new_login =~ /^(?:password|anonymous|captcha)$/)
394100TFif (defined $new_password)
395100TFif (defined $new_login and $new_login ne 'password')
39850TFunless _STRING $new_password
404100TFif (defined $new_login and $new_login eq 'password' and not defined $new_password)
409100TFif (defined $new_desc)
410100TFunless _STRING $new_desc
41450TFif (%$data)
41850TF$retval >= 0 ? :