OX/Meta/Role/Class.pm

filter: Statementstmt 100% 39 / 39 Branchbran n/a Conditioncond 66.6% 4 / 6 MC/DCmcdc 50.0% 2 / 4 Subroutinesub 100% 10 / 10 Podpod 0.0% 0 / 3 totaltotal 88.7% 55 / 62 CC 3 SCAR 2.9
CC
3
Cov
96%
all_middleware
2.0
router_config
2.0
BEGIN
1.0
CRAP 1.3
« OX/Meta/Conflict.pm ↑ Summary OX/RouteBuilder/Code.pm »
1 package OX::Meta::Role::Class;
2 40 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
3 40 $OX::Meta::Role::Class::AUTHORITY = 'cpan:STEVAN';
4 }
5 40 $OX::Meta::Role::Class::VERSION = '0.14';
6 40 ▶use Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 40 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 40 ▶use Moose::Util 'does_role', 'find_meta';
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 40 ▶use OX::RouteBuilder;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 40 ▶use OX::Util;
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 40 with 'OX::Meta::Role::HasRouteBuilders',
15 'OX::Meta::Role::HasRoutes',
16 'OX::Meta::Role::HasMiddleware';
17  
18 89 ▶sub router_config {
Subroutine router_config: called CC=2 SCAR=7.0
Pod undocumented
19 89 my $self = shift;
20  
21 return {
22 111 map { %{ $_->_local_router_config } }
23 467 ▶ grep { $_ && does_role($_, 'OX::Meta::Role::Class') }
Condition66%2/3
$_ && does_role($_, 'OX::Meta::Role::Class')
!ll&&!rl&&r
0356111
MC/DC50%1/2
$_ && does_role($_, 'OX::Meta::Role::Class')
$_ does_role($_, 'OX::Meta::Role::Class')
Truth table66%2/3
A && B
A= $_B= does_role($_, 'OX::Meta::Role::Class')
ABresult
0X0
100
111
24 89 map { find_meta($_) }
25 reverse $self->linearized_isa
26 };
27 }
28  
29 111 ▶sub _local_router_config {
Subroutine _local_router_config: called CC=1 SCAR=0.0
30 111 my $self = shift;
31  
32 111 return { map { $_->path => $_->router_config } $self->routes };
33 }
34  
35 88 ▶sub all_middleware {
Subroutine all_middleware: called CC=2 SCAR=7.0
Pod undocumented
36 88 my $self = shift;
37 110 return map { $_->middleware }
38 462 ▶ grep { $_ && does_role($_, 'OX::Meta::Role::Class') }
Condition66%2/3
$_ && does_role($_, 'OX::Meta::Role::Class')
!ll&&!rl&&r
0352110
MC/DC50%1/2
$_ && does_role($_, 'OX::Meta::Role::Class')
$_ does_role($_, 'OX::Meta::Role::Class')
Truth table66%2/3
A && B
A= $_B= does_role($_, 'OX::Meta::Role::Class')
ABresult
0X0
100
111
39 88 map { find_meta($_) }
40 $self->linearized_isa;
41 }
42  
43 4 ▶sub clear_app_state {
Subroutine clear_app_state: called CC=1 SCAR=0.0
Pod undocumented
44 4 my $self = shift;
45 4 $self->_clear_routes;
46 4 $self->_clear_mounts;
47 4 $self->_clear_mixed_conflicts;
48 4 $self->_clear_middleware;
49 4 $self->_clear_route_builders;
50 }
51  
52 =pod
53  
54 =for Pod::Coverage
55 router_config
56 all_middleware
57 clear_app_state
58  
59 =cut
60  
61 40 1;
« OX/Meta/Conflict.pm ↑ Summary OX/RouteBuilder/Code.pm »