Branch Coverage

blib/lib/MojoMojo/Controller/PageAdmin.pm
Criterion Covered Total %
branch 27 74 36.4


line true false branch
39 0 2 unless $c->response->status
47 0 20 if $c->req->params->{'pass'} and not $c->stash->{'user'}
50 20 0 if 'MojoMojo'->pref('anonymous_user')
52 0 0 if $user and $user->can_edit($c->stash->{'path'})
53 0 0 if $user and not $c->pref('restricted_user')
73 20 0 $c->user_exists ? :
79 0 20 unless ($path_pages)
86 8 12 @$proto_pages > 0 ? :
94 20 0 $c->user_exists ? :
95 8 12 @$proto_pages > 0 ? :
96 8 12 $permtocheck eq 'create' ? :
102 0 20 unless ($perms->{$permtocheck})
103 0 0 ref $page eq 'HASH' ? :
109 0 20 if ($user_id == 1 and not $c->pref('anonymous_user'))
115 0 20 if ($user_id == 1 and $c->pref('use_captcha'))
129 20 0 if ($kate_installed)
135 6 14 if ($form->submitted_and_valid) { }
140 4 2 if (@$proto_pages)
159 6 0 if ($form->params->{'submit'} eq $c->localize('Save'))
164 1 5 if ($c->stash->{'content'} and $c->stash->{'content'}->body eq $form->params->{'body'})
175 0 5 if ($c->stash->{'content'} and $c->req->params->{'version'} != $c->stash->{'content'}->version)
199 0 5 $c->stash->{'precompile_off'} ? :
205 5 0 unless $c->pref('disable_search')
223 0 28 if (my $attachment_id = $c->req->query_params->{$attachment_action})
260 0 0 exists $data->{$current_path} ? :
271 0 0 exists $$current_data{$role->id} ? :
283 0 0 $current{$_} ? :
0 0 exists $current{$_}{'subpages'} ? :
297 0 0 unless $parent_path and $parent_path =~ /^$path/
298 0 0 if $path eq $current_path
301 0 0 unless exists $roles{$role}
304 0 0 if exists $role_perms->{'subpages'}
323 0 0 if ($c->req->method ne 'POST')
329 0 0 if ($c->req->param('rev'))
353 0 0 $c->user_exists ? :
355 0 0 if ($c->req->method ne 'POST')
361 0 0 if ($c->req->param('update_value')) { }