blib/lib/Dancer2/Plugin.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
branch | 61 | 80 | 76.2 |
line | true | false | branch |
---|---|---|---|
77 | 0 | 1 | unless $self->isa("Dancer2::Plugin") |
109 | 15 | 8 | unless my $config_name = delete $args{'from_config'} |
114 | 2 | 6 | if (XXX) |
119 | 7 | 1 | if $config_name eq 1 |
124 | 4 | 4 | defined $value ? : |
133 | 8 | 15 | if (my $keyword = delete $args{'plugin_keyword'}) |
135 | 6 | 2 | if $keyword eq 1 |
138 | 1 | 7 | ref $keyword ? : |
152 | 0 | 6 | unless ref $sym_ref |
156 | 1 | 5 | if XXX |
181 | 1 | 65 | if $name eq "no_dsl" |
184 | 37 | 29 | if $name eq "plugin" or $name eq "no_dsl" |
188 | 29 | 0 | if $name eq "app" and $caller->can("app") and not $no_dsl->{$class} |
205 | 0 | 29 | unless my $app = eval "${caller}::app()" || eval { |
208 | 0 | 29 | unless $app->can("with_plugin") |
213 | 0 | 29 | unless $class->can("keywords") |
265 | 0 | 5 | unless $plugin_addr |
279 | 0 | 5 | unless $plugin_config |
0 | 5 | unless $app_plugin_config | |
291 | 2 | 3 | if ($_[0]->isa("Dancer2::Plugin")) |
301 | 0 | 2 | if ($plugin->hooks->{"plugin.$plugin_class.$hook_name"}) |
307 | 0 | 2 | unless $hook_name =~ /^plugin\.$plugin_class/ |
339 | 0 | 6 | unless $keyword =~ /^[a-zA-Z_]+[a-zA-Z0-9_]*$/ |
0 | 6 | if grep(($keyword eq $_), ("response", "send_file", "cookies", "push_header", "send_as", "config", "get", "dancer_app", "debug", "to_dumper", "done", "var", "delayed", "psgi_app", "log", "param", "request_data", "dsl", "prefix", "header", "path", "mime", "options", "dirname", "from_yaml", "splat", "response_headers", "send_error", "body_parameters", "patch", "prepare_app", "true", "app", "from_json", "to_json", "hook", "response_header", "request_header", "status", "flush", "vars", "dancer_major_version", "from_dumper", "content_type", "warning", "to_yaml", "engine", "uri_for", "false", "request", "content", "route_parameters", "forward", "template", "any", "set", "headers", "pass", "encode_json", "info", "decode_json", "put", "setting", "params", "context", "to_app", "push_response_header", "del", "halt", "cookie", "dance", "runner", "upload", "captures", "dancer_version", "session", "redirect", "query_parameters", "start", "post", "error")) | |
1 | 5 | if $Dancer2::Plugin::_keywords_by_plugin->{$keyword} | |
0 | 1 | unless $keyword =~ /^[a-zA-Z_]+[a-zA-Z0-9_]*$/ | |
431 | 36 | 1 | unless $no_dsl->{$caller} |
462 | 0 | 37 | if $@ |
466 | 19 | 18 | if ($app_dsl_cb) |
486 | 30 | 270 | if $class = $caller->can("dsl") |
518 | 0 | 13 | unless $app_dsl_cb |
535 | 7 | 3 | $_[0] ? : |
540 | 741 | 155 | unless $plugin_module->can($keyword) |
549 | 38 | 90 | if $name eq "plugin_keywords" |
552 | 37 | 53 | if $name eq "plugin_hooks" |
555 | 0 | 52 | unless $$exported_app{$global->{'into'}} |
588 | 12 | 2 | &Scalar::Util::blessed($hook) ? : |
608 | 0 | 21 | ref $name ? : |
1 | 20 | XXX ? : | |
611 | 0 | 21 | ref $name ? : |