blib/lib/Thunderhorse/AppController.pm

filter: Statementstmt 100% 12 / 12 Branchbran 75.0% 3 / 4 Conditioncond 66.6% 2 / 3 MC/DCmcdc 50.0% 1 / 2 Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 88.0% 22 / 25 CC 4 SCAR 7.7
CC
4
Cov
89%
_run_method
3.0
_can_method
2.1
BEGIN
1.0
CRAP 2.2
« blib/lib/Thunderhorse/Router.pm ↑ Summary blib/lib/Thunderhorse/App.pm »
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
BranchTrueFalseTotal
unless ref $self 0 27 27
11 unless ref $self;
12  
13 27 ▶ if ($self->app->can($method)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->app->can($method)) 10 17 27
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)
l!l&&r!l&&!r
6801
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)
ABresult
1X1
011
000
25 // $self->SUPER::_can_method($method);
26 }
27  
28 __END__
« blib/lib/Thunderhorse/Router.pm ↑ Summary blib/lib/Thunderhorse/App.pm »