Declare/Keyword/Controller.pm

filter: Statementstmt 70.4% 50 / 71 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 76.9% 20 / 26 Podpod n/a totaltotal 67.3% 70 / 104 CC 4 SCAR 8.0
CC
4
Cov
65%
__ANON__
9.6
__ANON__
4.9
__ANON__
1.4
CRAP 2.2
« Declare/Context/StringParsing.pm ↑ Summary Declare/Context/AppSetup.pm »
1 15 ▶use MooseX::Declare;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 15 ▶use Catalyst::Controller;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 class CatalystX::Declare::Keyword::Controller
5 15 ▶ extends CatalystX::Declare::Keyword::Component {
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine __ANON__: called CC=1 SCAR=0.6
6  
7 15 ▶ use MooseX::MethodAttributes ();
Subroutine BEGIN: called CC=1 SCAR=0.0
8 15 ▶ use aliased 'CatalystX::Declare::Keyword::Action', 'ActionKeyword';
Subroutine BEGIN: called CC=1 SCAR=0.0
9 15 ▶ use aliased 'CatalystX::Declare::Controller::DetermineActionClass';
Subroutine BEGIN: called CC=1 SCAR=0.0
10 15 ▶ use aliased 'CatalystX::Declare::Controller::Meta::TypeConstraintMapping';
Subroutine BEGIN: called CC=1 SCAR=0.0
11 15 ▶ use aliased 'CatalystX::Declare::Controller::ActionPreparation';
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 15 ▶ use Data::Dump qw( pp );
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15  
16 0 ▶ before add_namespace_customizations (Object $ctx, Str $package) {
Subroutine BEGIN: called CC=1 SCAR=1.2
Subroutine __ANON__: not called CC=1 SCAR=3.5
17  
18 0 MooseX::MethodAttributes->init_meta(for_class => $package);
19  
20 0 $ctx->add_preamble_code_parts(
21 ['BEGIN',
22 sprintf('Class::MOP::load_class(q(%s))', TypeConstraintMapping),
23 sprintf('%s->meta->apply(%s->meta->meta)', TypeConstraintMapping, $package),
24 ],
25 );
26 15 }
27  
28 0 ▶ after add_extends_option_customizations (Object $ctx, Str $package, $superclasses, $options) {
Subroutine BEGIN: called CC=1 SCAR=1.2
Subroutine __ANON__: not called CC=1 SCAR=2.6
29  
30 0 $ctx->add_scope_code_parts(
31 sprintf('with qw( %s )', join ' ',
32 DetermineActionClass,
33 ActionPreparation,
34 ),
35 );
36 15 }
37  
38 0 ▶ method default_superclasses { 'Catalyst::Controller::ActionRole' }
Subroutine BEGIN: called CC=1 SCAR=1.2
Subroutine __ANON__: not called CC=1 SCAR=1.2
39  
40 0 ▶ method auto_make_immutable { 0 }
Subroutine BEGIN: called CC=1 SCAR=1.2
Subroutine __ANON__: not called CC=1 SCAR=1.2
41  
42 0 ▶ around default_inner {
Subroutine BEGIN: called CC=1 SCAR=1.2
Subroutine __ANON__: not called CC=2 SCAR=15.9
43  
44 0 my @modifiers = qw( );
45  
46 return [
47 0 ▶ ( grep { my $id = $_->identifier; not grep { $id eq $_ } @modifiers } @{ $self->$orig() || [] } ),
Condition0%0/2
$self->$orig || []
l!l
00
MC/DC0%0/1
$self->$orig || []
$self->$orig
Truth table0%0/2
A
A= $self->$orig
Aresult
11
00
48 ActionKeyword->new(identifier => 'action'),
49 ActionKeyword->new(identifier => 'under'),
50 ActionKeyword->new(identifier => 'final'),
51 ];
52 15 }
53  
54 0 ▶ method add_with_option_customizations (Object $ctx, $package, ArrayRef $roles, HashRef $options) {
Subroutine BEGIN: called CC=1 SCAR=1.2
Subroutine __ANON__: not called CC=3 SCAR=22.6
55  
56 0 $package = $ctx->qualify_namespace($package);
57  
58 $ctx->add_cleanup_code_parts('Moose::Util::apply_all_roles("' . $package . '", qw/'
59 0 ▶ . join(' ', map { $ctx->qualify_namespace($_) } @$roles)
Branch: 1 branch
BranchTrueFalseTotal
if scalar @$roles 0 0 0
60 . '/)')
61 if scalar @$roles;
62  
63 $ctx->add_cleanup_code_parts(
64 sprintf '%s->meta->make_immutable', $package
65 0 ▶ ) unless $options->{is}{mutable};
Branch: 1 branch
BranchTrueFalseTotal
unless $options->{"is"}{"mutable"} 0 0 0
66 15 }
67 15 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.0
68  
69 __END__
« Declare/Context/StringParsing.pm ↑ Summary Declare/Context/AppSetup.pm »