Branch Coverage

blib/lib/MojoMojo/Controller/Jsrpc.pm
Criterion Covered Total %
branch 6 38 15.7


line true false branch
33 66 2 if ($input and $input =~ /(\S+)/)
37 0 68 unless ($output)
56 0 1 if ($c->req->params->{'page_id'} =~ /^\d+$/)
72 0 0 unless ($revision)
73 0 0 unless (my $page = $c->model('DBIC::Page')->find($page))
85 0 0 $against ? :
0 0 if (my $previous = $against ? $c->model('DBIC::Content')->search({'page', $page, 'version', $against})->next : $revision->previous) { }
125 6 0 if ($tag and not $c->model('DBIC::Tag')->search({'page', $page->id, 'person', $c->req->{'user_id'}, 'tag', $tagname})->next)
141 6 0 if $page
157 0 0 unless ref $page
165 0 0 if $tag
194 0 0 if (defined $query and length $query)
217 0 0 $c->req->param($_) ? :
237 0 0 if ($subpages eq 'yes') { }
260 0 0 if ($c->pref('cache_permission_data'))
284 0 0 if ($role)
293 0 0 if ($c->pref('cache_permission_data'))
316 0 0 unless ($user and $user->is_admin)
326 0 0 unless ($role)