Condition Coverage

blib/lib/Dancer2/Core/App.pm
Criterion Covered Total %
condition 85 140 60.7


and 3 conditions

line !l l&&!r l&&r condition
362 526 24 25 defined $config->{'engines'} and defined $config->{'engines'}{$engine}
484 0 255 2 $config and $config->{'engines'}
987 1 30 6 $self->has_request and $self->has_session
31 4 2 $self->has_request and $self->has_session and not $template->has_session
1022 0 45 0 builtin::blessed($handler_code) and $handler_code->can("supported_hooks")
1068 0 0 5 defined $options->{'charset'} and length $options->{'charset'}
1140 20 0 0 builtin::blessed($thing) and $thing->isa("IO::Scalar")
1155 10 0 0 $prefix and $prefix ne "/"
1206 1 5 13 $content_type and $charset
1219 0 1 18 $env->{'psgi.streaming'} and $use_streaming
1272 202 20 0 @{$self->plugins;} and $self->plugins->[0]->can("_add_postponed_plugin_hooks")
1322 0 730 1 $Dancer2::Core::Route::RESPONSE and $Dancer2::Core::Route::RESPONSE->is_halted
1401 298 377 11 $method ne "head" and $route->has_name
1517 0 42 11 $engine and $self->_has_session
1591 0 2 433 defined $env->{'PATH_INFO'} && length $env->{'PATH_INFO'}
1822 0 0 485 exists $config->{'content_type'} and my $ct = $config->{'content_type'}
1911 8 0 6 $splat_params and @token_or_splat

or 2 conditions

line l !l condition
271 13 163 $config->{'session'} || 'simple'
317 0 179 $config->{'layout_dir'} || 'layouts'
531 3 0 $@ || 'Zombie Error'
776 0 259 $ENV{'DANCER_CONTENT_TYPE'} || 'text/html'
0 259 $ENV{'DANCER_CHARSET'} || 'UTF-8'
0 259 $ENV{'DANCER_STRICT_UTF8'} || 0
0 259 $ENV{'DANCER_LOGGER'} || 'console'
884 1646 256 $self->{'hook_aliases'} ||= {"before", "core.app.before_request", "before_request", "core.app.before_request", "after", "core.app.after_request", "after_request", "core.app.after_request", "init_error", "core.error.init", "before_error", "core.error.before", "after_error", "core.error.after", "on_route_exception", "core.app.route_exception", "on_hook_exception", "core.app.hook_exception", "before_file_render", "core.app.before_file_render", "after_file_render", "core.app.after_file_render", "before_handler_file_render", "handler.file.before_render", "after_handler_file_render", "handler.file.after_render", "before_error_render", "core.error.before", "after_error_render", "core.error.after", "before_error_init", "core.error.init", "before_template_render", "engine.template.before_render", "after_template_render", "engine.template.after_render", "before_layout_render", "engine.template.before_layout_render", "after_layout_render", "engine.template.after_layout_render", "before_serializer", "engine.serializer.before", "after_serializer", "engine.serializer.after"}
1056 1 10 $options ||= {}
1085 2 0 $@ || 'Zombie Error'
1090 3 0 $self->_get_config_for_engine('serializer', $type, $self->config) || {}
1191 9 0 $self->mime_type->for_file($file_path) || 'text/plain'
1213 1 1 $options{'content_disposition'} || 'attachment'
1328 9 0 $@ || 'Zombie Error'
1380 1 0 $@ || 'Zombie Error'
1565 1 0 $@ || 'Zombie Error'
1776 19 561 $self->settings->{'behind_proxy'} || 0
1795 4 0 $@ || 'Zombie Error'
1808 14 0 $@ || 'Zombie Error'

or 3 conditions

line l !l&&r !l&&!r condition
343 0 22 0 $engine_options->{'strict_utf8'} //= $config->{'strict_utf8'}
420 624 100 0 $defined_engines ||= $self->defined_engines
465 4 255 0 $ENV{'DANCER_CONFDIR'} || $self->location
542 50 43 0 $session ||= $engine->create
550 452 0 495 $self->_has_session || $self->cookie($engine->cookie_name) && !$self->has_destroyed_session
769 0 259 0 $ENV{'DANCER_PUBLIC'} || $self->_location_path->child('public')->stringify
776 0 259 0 $ENV{'DANCER_VIEWS'} || $self->_location_path->child('views')->stringify
792 177 0 0 $self->config->{'appdir'} || $self->location
804 86 0 0 $ENV{'DANCER_PUBLIC'} || $self->config->{'public_dir'} || $self->_location_path->child('public')->stringify
995 0 3 0 $local_response ||= shift()
1060 2 3 5 lc $type eq "html" or lc $type eq "plain"
1066 0 5 0 $options->{'charset'} //= $self->config->{'charset'}
1071 0 5 0 $options->{'content_type'} ||= join("/", "text", lc $type)
1092 2 1 0 $engine_options->{'strict_utf8'} //= $self->config->{'strict_utf8'}
1102 1 2 0 $options->{'content_type'} ||= $serializer->content_type
1135 0 0 19 &Plack::Util::is_real_fh($thing) || is_globref($thing) && *{$thing;}{'IO'} && *{$thing;}{'IO'}->can('getline') || builtin::blessed($thing) && $thing->can('getline')
1618 59 568 2 $runner->{'internal_request'} || $self->build_request($env)