Condition Coverage

blib/lib/Dancer2/Core/App.pm
Criterion Covered Total %
condition 68 112 60.7


and 3 conditions

line !l l&&!r l&&r condition
322 573 17 24 defined $config->{'engines'} and defined $config->{'engines'}{$engine}
883 1 26 6 $self->has_request and $self->has_session
27 4 2 $self->has_request and $self->has_session and not $template->has_session
911 0 45 0 &blessed($handler_code) and $handler_code->can("supported_hooks")
1026 16 0 0 &Scalar::Util::blessed($thing) and $thing->isa("IO::Scalar")
1041 9 0 0 $prefix and $prefix ne "/"
1078 1 6 9 $content_type and $charset
1091 0 1 15 $env->{'psgi.streaming'} and $use_streaming
1139 188 17 0 @{$self->plugins;} and $self->plugins->[0]->can("_add_postponed_plugin_hooks")
1189 0 680 1 $Dancer2::Core::Route::RESPONSE and $Dancer2::Core::Route::RESPONSE->is_halted
1358 0 42 11 $engine and $self->_has_session
1652 0 0 455 exists $config->{'content_type'} and my $ct = $config->{'content_type'}

or 2 conditions

line l !l condition
233 13 148 $config->{'session'} || 'simple'
278 0 164 $config->{'layout_dir'} || 'layouts'
452 3 0 $@ || 'Zombie Error'
690 0 237 $ENV{'DANCER_CONTENT_TYPE'} || 'text/html'
0 237 $ENV{'DANCER_CHARSET'} || ''
0 237 $ENV{'DANCER_LOGGER'} || 'console'
778 1549 236 $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", "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"}
956 1 7 $options ||= {}
966 0 2 $self->config->{'charset'} || 'UTF-8'
980 2 0 $@ || 'Zombie Error'
985 3 0 $self->_get_config_for_engine('serializer', $type, $self->config) || {}
1066 9 0 Dancer2::runner()->mime_type->for_file($file_path) || 'text/plain'
1068 0 5 $self->config->{'charset'} || 'utf-8'
1085 1 1 $options{'content_disposition'} || 'attachment'
1195 4 0 $@ || 'Zombie Error'
1228 1 0 $@ || 'Zombie Error'
1406 0 0 $@ || 'Zombie Error'
1604 19 527 $self->settings->{'behind_proxy'} || 0
1625 4 0 $@ || 'Zombie Error'
1638 13 0 $@ || 'Zombie Error'

or 3 conditions

line l !l&&r !l&&!r condition
374 587 100 0 $defined_engines ||= $self->defined_engines
463 50 43 0 $session ||= $engine->create
471 452 0 457 $self->_has_session || $self->cookie($engine->cookie_name) && !$self->has_destroyed_session
684 0 237 0 $ENV{'DANCER_PUBLIC'} || path($self->location, 'public')
690 0 237 0 $ENV{'DANCER_VIEWS'} || path($self->location, 'views')
891 0 1 0 $local_response ||= shift()
960 1 1 5 lc $type eq "html" or lc $type eq "plain"
968 0 2 0 $options->{'content_type'} ||= join("/", "text", lc $type)
989 1 2 0 $options->{'content_type'} ||= $serializer->content_type
1021 0 0 15 &Plack::Util::is_real_fh($thing) || XXX && *{$thing;}{'IO'} && *{$thing;}{'IO'}->can('getline') || &Scalar::Util::blessed($thing) && $thing->can('getline')
1049 5 0 0 $ENV{'DANCER_PUBLIC'} || $self->config->{'public_dir'} || path($self->location, 'public')
1452 59 534 2 $runner->{'internal_request'} || $self->build_request($env)