| 1 | package ComponentUI::Controller::Root; | ||||||||||||
| 2 | |||||||||||||
| 3 | 3 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 4 | 3 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 5 | |||||||||||||
| 6 | 3 | ▶ | use Moose; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 7 | 3 | ▶ | BEGIN { extends 'Reaction::UI::Controller::Root'; } | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 8 | |||||||||||||
| 9 | 3 | ▶ | use aliased 'Reaction::UI::ViewPort'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 10 | 3 | ▶ | use aliased 'Reaction::UI::ViewPort::SiteLayout'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 11 | |||||||||||||
| 12 | # | ||||||||||||
| 13 | # Sets the actions in this controller to be registered with no prefix | ||||||||||||
| 14 | # so they function identically to actions created in MyApp.pm | ||||||||||||
| 15 | # | ||||||||||||
| 16 | 3 | __PACKAGE__->config( | |||||||||||
| 17 | view_name => 'Site', | ||||||||||||
| 18 | window_title => 'Reaction Test App', | ||||||||||||
| 19 | namespace => '' | ||||||||||||
| 20 | ); | ||||||||||||
| 21 | |||||||||||||
| 22 | 4 | ▶ | sub base :Chained('/') :PathPart('') :CaptureArgs(0) { | ||||||||||
|
Subroutine
base: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||
| 23 | 4 | my ($self, $c) = @_; | |||||||||||
| 24 | 4 | $self->push_viewport(SiteLayout, | |||||||||||
| 25 | title => 'ComponentUI test title', | ||||||||||||
| 26 | 4 | static_base_uri => "${\$c->uri_for('/static')}", | |||||||||||
| 27 | meta_info => { | ||||||||||||
| 28 | http_header => { | ||||||||||||
| 29 | 'Content-Type' => 'text/html;charset=utf-8', | ||||||||||||
| 30 | }, | ||||||||||||
| 31 | }, | ||||||||||||
| 32 | ); | ||||||||||||
| 33 | 3 | ▶ | } | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 34 | |||||||||||||
| 35 | 1 | ▶ | sub root :Chained('base') :PathPart('') :Args(0) { | ||||||||||
|
Subroutine
root: called CC=3 SCAR=11.7
Pod
undocumented
| |||||||||||||
| 36 | 1 | my ($self, $c) = @_; | |||||||||||
| 37 | 1 | ▶ | $self->push_viewport( | ||||||||||
|
Condition50%1/2
$c->request->user_agent || ''
MC/DC0%0/1
$c->request->user_agent || ''
$c->request->user_agent
Truth table50%1/2
A
A= $c->request->user_agent
| |||||||||||||
| 38 | ViewPort, ( | ||||||||||||
| 39 | layout => 'index', | ||||||||||||
| 40 | layout_args => { | ||||||||||||
| 41 | user_agent => $c->request->user_agent || '', | ||||||||||||
| 42 | message_to_layout => 'I hate programming.', | ||||||||||||
| 43 | }, | ||||||||||||
| 44 | ), | ||||||||||||
| 45 | ); | ||||||||||||
| 46 | 1 | ▶ | $c->log->debug('remote', $c->request->remote_user || '' ); | ||||||||||
|
Condition50%1/2
$c->request->remote_user || ''
MC/DC0%0/1
$c->request->remote_user || ''
$c->request->remote_user
Truth table50%1/2
A
A= $c->request->remote_user
| |||||||||||||
| 47 | 3 | ▶ | } | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 48 | |||||||||||||
| 49 | 0 | ▶ | sub bye :Chained('base') :PathPart('bye') :Args(0) { | ||||||||||
|
Subroutine
bye: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||
| 50 | 0 | exit; | |||||||||||
| 51 | 3 | ▶ | } | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 52 | |||||||||||||
| 53 | 0 | ▶ | sub static :Chained('base') :PathPart('static') :Args { | ||||||||||
|
Subroutine
static: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||
| 54 | 0 | my ($self, $c, @args) = @_; | |||||||||||
| 55 | 0 | ▶ | return if $c->stash->{window}->view->serve_static_file($c, \@args); | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 56 | 0 | $c->forward('error_404'); | |||||||||||
| 57 | 3 | ▶ | } | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 58 | |||||||||||||
| 59 | 0 | ▶ | sub error_404 :Private { | ||||||||||
|
Subroutine
error_404: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 60 | 0 | my ($self, $c) = @_; | |||||||||||
| 61 | 0 | $c->res->body("Error 404"); | |||||||||||
| 62 | 0 | $c->res->status(404); | |||||||||||
| 63 | 3 | ▶ | } | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 64 | |||||||||||||
| 65 | 3 | 1; | |||||||||||