Condition Coverage

blib/lib/Dancer2/Core/App.pm
Criterion Covered Total %
condition 67 109 61.4


and 3 conditions

line !l l&&!r l&&r condition
322 566 15 23 defined $config->{'engines'} and defined $config->{'engines'}{$engine}
883 1 23 6 $self->has_request and $self->has_session
24 4 2 $self->has_request and $self->has_session and not $template->has_session
898 0 45 0 &blessed($handler_code) and $handler_code->can("supported_hooks")
1013 16 0 0 &Scalar::Util::blessed($thing) and $thing->isa("IO::Scalar")
1028 9 0 0 $prefix and $prefix ne "/"
1065 1 6 9 $content_type and $charset
1078 0 1 15 $env->{'psgi.streaming'} and $use_streaming
1126 186 16 0 @{$self->plugins;} and $self->plugins->[0]->can("_add_postponed_plugin_hooks")
1176 0 673 1 $Dancer2::Core::Route::RESPONSE and $Dancer2::Core::Route::RESPONSE->is_halted
1345 0 42 11 $engine and $self->_has_session
1639 0 0 449 exists $config->{'content_type'} and my $ct = $config->{'content_type'}

or 2 conditions

line l !l condition
233 13 145 $config->{'session'} || 'simple'
278 0 161 $config->{'layout_dir'} || 'layouts'
452 3 0 $@ || 'Zombie Error'
690 0 234 $ENV{'DANCER_CONTENT_TYPE'} || 'text/html'
0 234 $ENV{'DANCER_CHARSET'} || ''
0 234 $ENV{'DANCER_LOGGER'} || 'console'
778 1517 233 $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"}
943 1 7 $options ||= {}
953 0 2 $self->config->{'charset'} || 'UTF-8'
967 2 0 $@ || 'Zombie Error'
972 3 0 $self->_get_config_for_engine('serializer', $type, $self->config) || {}
1053 9 0 Dancer2::runner()->mime_type->for_file($file_path) || 'text/plain'
1055 0 5 $self->config->{'charset'} || 'utf-8'
1072 1 1 $options{'content_disposition'} || 'attachment'
1182 4 0 $@ || 'Zombie Error'
1215 1 0 $@ || 'Zombie Error'
1393 0 0 $@ || 'Zombie Error'
1591 19 514 $self->settings->{'behind_proxy'} || 0
1612 4 0 $@ || 'Zombie Error'
1625 13 0 $@ || 'Zombie Error'

or 3 conditions

line l !l&&r !l&&!r condition
374 574 94 0 $defined_engines ||= $self->defined_engines
463 50 43 0 $session ||= $engine->create
471 452 0 447 $self->_has_session || $self->cookie($engine->cookie_name) && !$self->has_destroyed_session
684 0 234 0 $ENV{'DANCER_PUBLIC'} || path($self->location, 'public')
690 0 234 0 $ENV{'DANCER_VIEWS'} || path($self->location, 'views')
947 1 1 5 lc $type eq "html" or lc $type eq "plain"
955 0 2 0 $options->{'content_type'} ||= join("/", "text", lc $type)
976 1 2 0 $options->{'content_type'} ||= $serializer->content_type
1008 0 0 15 &Plack::Util::is_real_fh($thing) || XXX && *{$thing;}{'IO'} && *{$thing;}{'IO'}->can('getline') || &Scalar::Util::blessed($thing) && $thing->can('getline')
1036 5 0 0 $ENV{'DANCER_PUBLIC'} || $self->config->{'public_dir'} || path($self->location, 'public')
1439 59 521 2 $runner->{'internal_request'} || $self->build_request($env)