File Coverage

blib/lib/Thunderhorse/Context/Facade.pm
Criterion Covered Total %
statement 15 20 75.0
branch 1 2 50.0
condition n/a
subroutine 4 5 80.0
pod n/a
total 20 27 74.0


line stmt bran cond sub pod time code
1             package Thunderhorse::Context::Facade;
2             $Thunderhorse::Context::Facade::VERSION = '0.102';
3 21     21   968161 use v5.40;
  21         88  
4              
5 21     21   139 use Mooish::Base -standard;
  21         41  
  21         255  
6              
7 21     21   328116 use Devel::StrictMode;
  21         1268  
  21         7728  
8              
9             # use handles for fast access (autoloading is kind of slow)
10             has param 'context' => (
11             (STRICT ? (isa => InstanceOf ['Thunderhorse::Context']) : ()),
12             handles => [
13             qw(
14             app
15             req
16             res
17             )
18             ],
19             );
20              
21             with qw(Thunderhorse::Autoloadable);
22              
23 23         34 sub _run_method ($self, $method, @args)
  23         33  
24 23     23   31 {
  23         31  
  23         31  
25 23 50       51 die "no such method $method"
26             unless ref $self;
27 23         492 return $self->context->$method(@args);
28             }
29              
30 0           sub _can_method ($self, $method)
31 0     0     {
  0            
  0            
32 0           return $self->context->can($method);
33             }
34