Branch Coverage

lib/CatalystX/Eta/Controller/CheckRoleForPUT.pm
Criterion Covered Total %
branch 8 16 50.0


line true false branch
17 2 0 if (exists $self->config->{'update_roles'})
19 1 1 unless ($c->check_any_user_role(@{$$config{'update_roles'};}))
24 0 0 if ($do_detach == 1 and exists $config->{'object_key'} and $c->stash->{$config->{'object_key'}} and not $config->{'check_only_roles'} and $c->stash->{$config->{'object_key'}}->can('id') || $c->stash->{$config->{'object_key'}}->can('user_id') || $c->stash->{$config->{'object_key'}}->can('created_by'))
36 1 0 $obj->can('roles') && $obj->can('id') ? :
0 1 $obj->can('user_id') && defined $obj->user_id ? :
0 1 $obj->can('created_by') && defined $obj->created_by ? :
44 1 0 if $obj_id != $user_id
51 0 1 if ($do_detach)