lib/Catalyst/Component/ContextClosure.pm

filter: Statementstmt 92.8% 13 / 14 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod 100% 1 / 1 totaltotal 90.0% 18 / 20 CC 1 SCAR 0.3
CC
1
Cov
93%
__ANON__
1.1
make_context_closure
1.0
BEGIN
1.0
CRAP 1.0
« lib/Catalyst/DispatchType.pm ↑ Summary lib/Catalyst/Engine/HTTP.pm »
1 package Catalyst::Component::ContextClosure;
2  
3 79 ▶use Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 79 ▶use Scalar::Util 'weaken';
Subroutine BEGIN: called CC=1 SCAR=0.0
5 79 ▶use namespace::clean -except => [ 'meta' ];
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 ▶sub make_context_closure {
Subroutine make_context_closure: called CC=1 SCAR=0.2
Pod documented
8 1 my ($self, $closure, $ctx) = @_;
9 1 weaken $ctx;
10 0 ▶ return sub { $closure->($ctx, @_) };
Subroutine __ANON__: not called CC=1 SCAR=1.2
11 }
12  
13 79 1;
14  
15 __END__
« lib/Catalyst/DispatchType.pm ↑ Summary lib/Catalyst/Engine/HTTP.pm »