| 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
| |||||||||||
| 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 | |||||||||||