| blib/lib/Dancer2/Core/App.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| condition | 78 | 124 | 62.9 |
| line | !l | l&&!r | l&&r | condition |
|---|---|---|---|---|
| 326 | 512 | 24 | 24 | defined $config->{'engines'} and defined $config->{'engines'}{$engine} |
| 442 | 0 | 249 | 2 | $config and $config->{'engines'} |
| 921 | 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 | |
| 956 | 0 | 45 | 0 | builtin::blessed($handler_code) and $handler_code->can("supported_hooks") |
| 1073 | 19 | 0 | 0 | builtin::blessed($thing) and $thing->isa("IO::Scalar") |
| 1088 | 9 | 0 | 0 | $prefix and $prefix ne "/" |
| 1125 | 1 | 6 | 12 | $content_type and $charset |
| 1138 | 0 | 1 | 18 | $env->{'psgi.streaming'} and $use_streaming |
| 1184 | 200 | 18 | 0 | @{$self->plugins;} and $self->plugins->[0]->can("_add_postponed_plugin_hooks") |
| 1234 | 0 | 730 | 1 | $Dancer2::Core::Route::RESPONSE and $Dancer2::Core::Route::RESPONSE->is_halted |
| 1313 | 293 | 372 | 11 | $method ne "head" and $route->has_name |
| 1429 | 0 | 42 | 11 | $engine and $self->_has_session |
| 1725 | 0 | 0 | 483 | exists $config->{'content_type'} and my $ct = $config->{'content_type'} |
| 1810 | 8 | 0 | 6 | $splat_params and @token_or_splat |
| line | l | !l | condition |
|---|---|---|---|
| 237 | 13 | 159 | $config->{'session'} || 'simple' |
| 282 | 0 | 174 | $config->{'layout_dir'} || 'layouts' |
| 482 | 3 | 0 | $@ || 'Zombie Error' |
| 726 | 0 | 253 | $ENV{'DANCER_CONTENT_TYPE'} || 'text/html' |
| 0 | 253 | $ENV{'DANCER_CHARSET'} || '' | |
| 0 | 253 | $ENV{'DANCER_LOGGER'} || 'console' | |
| 815 | 1637 | 250 | $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"} |
| 1001 | 1 | 10 | $options ||= {} |
| 1011 | 0 | 5 | $self->config->{'charset'} || 'UTF-8' |
| 1027 | 2 | 0 | $@ || 'Zombie Error' |
| 1032 | 3 | 0 | $self->_get_config_for_engine('serializer', $type, $self->config) || {} |
| 1113 | 9 | 0 | Dancer2::runner()->mime_type->for_file($file_path) || 'text/plain' |
| 1115 | 0 | 5 | $self->config->{'charset'} || 'utf-8' |
| 1132 | 1 | 1 | $options{'content_disposition'} || 'attachment' |
| 1240 | 9 | 0 | $@ || 'Zombie Error' |
| 1292 | 1 | 0 | $@ || 'Zombie Error' |
| 1477 | 1 | 0 | $@ || 'Zombie Error' |
| 1679 | 19 | 558 | $self->settings->{'behind_proxy'} || 0 |
| 1698 | 4 | 0 | $@ || 'Zombie Error' |
| 1711 | 14 | 0 | $@ || 'Zombie Error' |
| line | l | !l&&r | !l&&!r | condition |
|---|---|---|---|---|
| 378 | 618 | 100 | 0 | $defined_engines ||= $self->defined_engines |
| 423 | 4 | 249 | 0 | $ENV{'DANCER_CONFDIR'} || $self->location |
| 493 | 50 | 43 | 0 | $session ||= $engine->create |
| 501 | 452 | 0 | 492 | $self->_has_session || $self->cookie($engine->cookie_name) && !$self->has_destroyed_session |
| 720 | 0 | 253 | 0 | $ENV{'DANCER_PUBLIC'} || path($self->location, 'public') |
| 726 | 0 | 253 | 0 | $ENV{'DANCER_VIEWS'} || path($self->location, 'views') |
| 929 | 0 | 3 | 0 | $local_response ||= shift() |
| 1005 | 2 | 3 | 5 | lc $type eq "html" or lc $type eq "plain" |
| 1013 | 0 | 5 | 0 | $options->{'content_type'} ||= join("/", "text", lc $type) |
| 1036 | 1 | 2 | 0 | $options->{'content_type'} ||= $serializer->content_type |
| 1068 | 0 | 0 | 18 | &Plack::Util::is_real_fh($thing) || is_globref($thing) && *{$thing;}{'IO'} && *{$thing;}{'IO'}->can('getline') || builtin::blessed($thing) && $thing->can('getline') |
| 1096 | 5 | 0 | 0 | $ENV{'DANCER_PUBLIC'} || $self->config->{'public_dir'} || path($self->location, 'public') |
| 1523 | 59 | 565 | 2 | $runner->{'internal_request'} || $self->build_request($env) |