| 1 | package Tapper::Reports::Web::Controller::Root; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | 13 | our $AUTHORITY = 'cpan:TAPPER'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | 13 | $Tapper::Reports::Web::Controller::Root::VERSION = '5.0.17'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4 | 13 | ▶ | use strict; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | 13 | ▶ | use warnings; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | 13 | ▶ | use parent 'Catalyst::Controller'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | # Sets the actions in this controller to be registered with no prefix | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | # so they function identically to actions created in MyApp.pm | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | 13 | __PACKAGE__->config->{namespace} = ''; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | 0 | ▶ | sub index :Path :Args(0) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
index: not called CC=1 SCAR=6.9
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | 0 | my ( $self, $c ) = @_; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | # the easy way, to avoid fiddling with Mason autohandlers on | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | # simple redirects | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | 0 | my $body = <<EOF; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | <html> | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | <head> | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | <meta http-equiv="refresh" content="0; URL=/tapper"> | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | <meta name="description" content="Tapper" | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | <title>Tapper</title> | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | </head> | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | EOF | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | 0 | $c->response->body($body); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | 13 | ▶ | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | 0 | ▶ | sub default :Path | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
default: not called CC=1 SCAR=6.9
Pod
undocumented
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | 0 | my ( $self, $c ) = @_; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | 0 | $c->response->body( 'Bummer! Page not found' ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | 0 | $c->response->status(404); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 36 | 13 | ▶ | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 37 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 38 | 21 | ▶ | sub end : ActionClass('RenderView') { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
end: called CC=6 SCAR=18.5
Pod
documented
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 39 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 40 | 21 | my ( $self, $or_c ) = @_; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 41 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 42 | 21 | ▶ | if ( | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition77%7/9
not $or_c->response->body and $or_c->res->status < 300 || $or_c->res->status > 399 and $or_c->res->status != 204
not $or_c->response->body and $or_c->res->status < 300 || $or_c->res->status > 399
$or_c->res->status < 300 or $or_c->res->status > 399
MC/DC50%2/4
not $or_c->response->body and $or_c->res->status < 300 || $or_c->res->status > 399 and $or_c->res->status != 204
not $or_c->response->body
$or_c->res->status < 300
$or_c->res->status > 399
$or_c->res->status != 204
Truth table50%3/6
not(A) and B or C and D
A= not $or_c->response->bodyB= $or_c->res->status < 300C= $or_c->res->status > 399D= $or_c->res->status != 204
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 43 | !$or_c->response->body | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 44 | && ( $or_c->res->status < 300 || $or_c->res->status > 399 ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 45 | && ( $or_c->res->status != 204 ) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 46 | ) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 47 | 12 | ▶ | if ( $or_c->req->params->{json} ) { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 48 | 0 | $or_c->forward('Tapper::Reports::Web::View::JSON'); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 49 | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 50 | else { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 51 | 12 | $or_c->forward('Tapper::Reports::Web::View::Mason'); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 52 | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 53 | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 54 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 55 | 21 | return 1; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 56 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 57 | 13 | ▶ | } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 58 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 59 | 13 | 1; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 60 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 61 | __END__ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||