Router/PSGI.pm

filter: Statementstmt 100% 18 / 18 Branchbran 100% 2 / 2 Conditioncond 66.6% 2 / 3 MC/DCmcdc 50.0% 1 / 2 Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 93.5% 29 / 31 CC 3 SCAR 5.7
CC
3
Cov
96%
__ANON__
3.0
__ANON__
1.0
BEGIN
1.0
CRAP 1.8
« Router/Custom.pm ↑ Summary
1 package Plack::App::Path::Router::PSGI;
2 3 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
3 3 $Plack::App::Path::Router::PSGI::AUTHORITY = 'cpan:STEVAN';
4 }
5 3 $Plack::App::Path::Router::PSGI::VERSION = '0.08';
6 3 ▶use Moose 0.90;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 3 ▶use MooseX::NonMoose 0.07;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 # ABSTRACT: A Plack component for dispatching with Path::Router to Pure PSGI targets
9  
10 3 extends 'Plack::App::Path::Router::Custom';
11  
12  
13  
14 has '+target_to_app' => (
15 2 ▶ default => sub {
Subroutine __ANON__: called CC=1 SCAR=0.0
16 12 ▶ sub {
Subroutine __ANON__: called CC=3 SCAR=11.1
17 12 my ($target) = @_;
18  
19 12 ▶ return blessed $target && $target->can('to_app')
Branch: 1 branch
BranchTrueFalseTotal
builtin::blessed($target) && $target->can('to_app') ? : 5 7 12
Condition66%2/3
builtin::blessed($target) and $target->can("to_app")
!ll&&!rl&&r
705
MC/DC50%1/2
builtin::blessed($target) and $target->can("to_app")
builtin::blessed($target) $target->can("to_app")
Truth table66%2/3
A and B
A= builtin::blessed($target)B= $target->can("to_app")
ABresult
0X0
100
111
20 ? $target->to_app
21 : $target;
22 2 };
23 },
24 3 );
25  
26 3 __PACKAGE__->meta->make_immutable;
27 3 ▶no Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
28  
29 3 1;
30  
31 __END__
« Router/Custom.pm ↑ Summary