blib/lib/Thunderhorse/Context/Facade.pm

filter: Statementstmt 92.8% 13 / 14 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod n/a totaltotal 85.7% 18 / 21 CC 2 SCAR 4.2
CC
2
Cov
88%
_run_method
2.1
_can_method
2.0
BEGIN
1.0
CRAP 1.5
« blib/lib/Thunderhorse/Controller.pm ↑ Summary blib/lib/Thunderhorse/SSE.pm »
1 package Thunderhorse::Context::Facade;
2 24 $Thunderhorse::Context::Facade::VERSION = '0.107';
3 24 ▶use v5.40;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 24 ▶use Mooish::Base -standard;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 24 ▶use Devel::StrictMode;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 # use handles for fast access (autoloading is kind of slow)
10 24 has param 'context' => (
11 (STRICT ? (isa => InstanceOf ['Thunderhorse::Context']) : ()),
12 handles => [
13 qw(
14 app
15 req
16 res
17 )
18 ],
19 );
20  
21 24 with qw(Thunderhorse::Autoloadable);
22  
23 37 ▶sub _run_method ($self, $method, @args)
Subroutine _run_method: called CC=2 SCAR=7.2
24 {
25 37 ▶ die "no such method $method"
Branch: 1 branch
BranchTrueFalseTotal
unless ref $self 0 37 37
26 unless ref $self;
27 37 return $self->context->$method(@args);
28 }
29  
30 0 ▶sub _can_method ($self, $method)
Subroutine _can_method: not called CC=1 SCAR=6.9
31 {
32 0 return $self->context->can($method);
33 }
34  
« blib/lib/Thunderhorse/Controller.pm ↑ Summary blib/lib/Thunderhorse/SSE.pm »