| 1 | package Thunderhorse::AppController; | ||||||||||||||||||||
| 2 | 24 | $Thunderhorse::AppController::VERSION = '0.107'; | |||||||||||||||||||
| 3 | 24 | ▶ | use v5.40; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | 24 | ▶ | use Mooish::Base -standard; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | |||||||||||||||||||||
| 6 | 24 | extends 'Thunderhorse::Controller'; | |||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | 27 | ▶ | sub _run_method ($self, $method, @args) | ||||||||||||||||||
|
Subroutine
_run_method: called CC=3 SCAR=11.0
| |||||||||||||||||||||
| 9 | { | ||||||||||||||||||||
| 10 | 27 | ▶ | die "no such method $method" | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 11 | unless ref $self; | ||||||||||||||||||||
| 12 | |||||||||||||||||||||
| 13 | 27 | ▶ | if ($self->app->can($method)) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 14 | 10 | return $self->app->$method(@args); | |||||||||||||||||||
| 15 | } | ||||||||||||||||||||
| 16 | |||||||||||||||||||||
| 17 | 17 | return $self->SUPER::_run_method($method, @args); | |||||||||||||||||||
| 18 | } | ||||||||||||||||||||
| 19 | |||||||||||||||||||||
| 20 | 69 | ▶ | sub _can_method ($self, $method) | ||||||||||||||||||
|
Subroutine
_can_method: called CC=2 SCAR=7.2
| |||||||||||||||||||||
| 21 | { | ||||||||||||||||||||
| 22 | # this returns app's can on purpose, to achieve app method being run by | ||||||||||||||||||||
| 23 | # controller object. | ||||||||||||||||||||
| 24 | 69 | ▶ | return $self->app->can($method) | ||||||||||||||||||
|
Condition66%2/3
$self->app->can($method) // $self->SUPER::_can_method($method)
MC/DC50%1/2
$self->app->can($method) // $self->SUPER::_can_method($method)
$self->app->can($method)
$self->SUPER::_can_method($method)
Truth table66%2/3
A // B
A= $self->app->can($method)B= $self->SUPER::_can_method($method)
| |||||||||||||||||||||
| 25 | // $self->SUPER::_can_method($method); | ||||||||||||||||||||
| 26 | } | ||||||||||||||||||||
| 27 | |||||||||||||||||||||
| 28 | __END__ | ||||||||||||||||||||