Condition Coverage

blib/lib/Mojolicious/Plugin/StaticShare/Controller.pm
Criterion Covered Total %
condition 20 117 17.0


and 2 conditions

line l !l condition
173 0 4 push @$dirs, decode('UTF-8', $_) and next
197 0 0 $c->_stash_markdown($file) and $c->stash('index', $index) and last
202 0 1 $c->_stash_pod($file) and $c->stash('index', $index) and last
214 1 0 $c->render_maybe("Mojolicious-Plugin-StaticShare/$_/dir", 'format', 'html', 'handler', 'ep') and return
270 0 0 push @delete, $c->i18n('provide the name of deleted dir') and next
274 0 0 push @delete, $c->i18n('dir or file does not exists') and next
367 0 0 $c->layout($match[0]) and return ''

and 3 conditions

line !l l&&!r l&&r condition
23 0 1 0 not $c->is_admin and grep {/^\./;} @{$c->stash('url_path')->parts;}
35 1 0 0 $c->is_admin and $c->param('admin')
61 0 0 0 $c->param('delete[]') && $c->every_param('delete[]')
80 0 0 0 not $c->is_admin and grep {/^\./;} @{$c->stash('url_path')->parts;}
104 0 0 0 not $name and -d $to
107 0 0 0 not $c->param('replace') and -e $to
169 0 15 0 not $c->is_admin and /^\./
173 11 0 4 -d $child and -r _
197 0 0 0 $c->_stash_markdown($file) and $c->stash('index', $index)
202 0 0 1 $c->_stash_pod($file) and $c->stash('index', $index)
291 0 0 0 $c->is_admin and $c->param('edit')
390 0 0 138 $parent and $parent->type eq 'tag'
0 3 135 $parent and $parent->type eq 'tag' and $child1->type eq 'text'

or 2 conditions

line l !l condition
85 0 0 $c->param('name') || ''
136 0 1 $c->req->headers->accept_language || 'en;q=0.5'
154 0 1 $c->plugin->render_dir // ''
182 9 2 $stat[7] || 0
296 0 0 $c->plugin->render_markdown || ''
299 0 0 $c->plugin->render_pod || ''
362 0 0 $match[1] || 'html'
0 0 $match[2] || 'ep'

or 3 conditions

line l !l&&r !l&&!r condition
82 0 0 0 $c->is_admin or $c->public_uploads
90 0 0 0 not $name or -w $file_path
102 0 0 0 not $name or -d $file_path
158 0 0 0 $c->render_maybe('Mojolicious-Plugin-StaticShare/exception', 'format', 'html', 'handler', 'ep', 'status', 500, 'exception', $ex) || $c->reply->exception($ex)
167 1 1 15 $_ eq '.' or $_ eq '..'
287 0 0 0 $c->render_maybe('Mojolicious-Plugin-StaticShare/exception', 'format', 'html', 'handler', 'ep', 'status', 500, 'exception', $ex) || $c->reply->exception($ex)
296 0 0 0 ($c->plugin->render_markdown || '') eq 0 or $c->param('attachment')
0 0 0 ($c->plugin->render_markdown || '') eq 0 or $c->param('attachment') or not $filename =~ $c->plugin->re_markdown
299 0 0 0 ($c->plugin->render_pod || '') eq 0 or $c->param('attachment')
0 0 0 ($c->plugin->render_pod || '') eq 0 or $c->param('attachment') or not $filename =~ $c->plugin->re_pod
302 0 0 0 $c->param('attachment') or not $filename =~ $c->plugin->re_html
306 0 0 0 $c->plugin->mime->type(($path =~ /\.([0-9a-zA-Z]+)$/)[0] || 'txt') || $c->plugin->mime->type('txt')
308 0 0 0 $asset || 'Mojo::Asset::File'->new('path', $path)
329 0 0 0 $c->render_maybe('Mojolicious-Plugin-StaticShare/exception', 'format', 'html', 'handler', 'ep', 'status', 500, 'exception', $ex) || $c->reply->exception($ex)
349 0 0 0 $dom->at('body') || $dom
431 0 1 0 $dom->at('body') || $dom