lib/Mite/Trait/HasMOP.pm

filter: Statementstmt 62.5% 15 / 24 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 36.3% 4 / 11 Podpod n/a totaltotal 54.2% 19 / 35 CC 1 SCAR 4.9
CC
1
Cov
62%
_compile_mop
2.0
_compile_mop_attributes
2.0
_compile_mop_required_methods
2.0
CRAP 1.6
« lib/Mite/Trait/HasDestructor.pm ↑ Summary lib/Mite/App/Command/clean.pm »
1 117 ▶use 5.010001;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 117 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 117 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 package Mite::Trait::HasMOP;
6 117 ▶use Mite::Miteception -role, -all;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 117 our $AUTHORITY = 'cpan:TOBYINK';
9 117 our $VERSION = '0.013000';
10  
11 117 requires qw(
12 _mop_metaclass
13 _mop_attribute_metaclass
14 );
15  
16 0 ▶sub _compile_mop {
Subroutine _compile_mop: not called CC=1 SCAR=6.9
17 0 my $self = shift;
18  
19 0 return sprintf <<'CODE', $self->_mop_metaclass, B::perlstring( $self->name ), B::perlstring( $self->name ), $self->_compile_mop_attributes, $self->_compile_mop_required_methods, $self->_compile_mop_modifiers, $self->_compile_mop_methods, $self->_compile_mop_tc;
20 {
21 my $PACKAGE = %s->initialize( %s, package => %s );
22  
23 %s
24 %s
25 %s
26 %s
27 %s
28 }
29 CODE
30 }
31  
32 0 ▶sub _compile_mop_attributes {
Subroutine _compile_mop_attributes: not called CC=1 SCAR=6.9
33 0 return '';
34 }
35  
36 0 ▶sub _compile_mop_required_methods {
Subroutine _compile_mop_required_methods: not called CC=1 SCAR=6.9
37 0 return '';
38 }
39  
40 0 ▶sub _compile_mop_modifiers {
Subroutine _compile_mop_modifiers: not called CC=1 SCAR=6.9
41 0 return '';
42 }
43  
44 0 ▶sub _compile_mop_methods {
Subroutine _compile_mop_methods: not called CC=1 SCAR=6.9
45 0 my $self = shift;
46 0 return sprintf <<'CODE', $self->name, B::perlstring( $self->name );
47 $PACKAGE->add_method(
48 "meta" => Moose::Meta::Method::Meta->_new(
49 name => "meta",
50 body => \&%s::meta,
51 package_name => %s,
52 ),
53 );
54 CODE
55 }
56  
57 0 ▶sub _compile_mop_tc {
Subroutine _compile_mop_tc: not called CC=1 SCAR=6.9
58 0 return sprintf ' Moose::Util::TypeConstraints::find_or_create_isa_type_constraint( %s );',
59 B::perlstring( shift->name );
60 }
61  
62 0 ▶sub _compile_mop_postamble {
Subroutine _compile_mop_postamble: not called CC=1 SCAR=6.9
63 0 return '';
64 }
65  
66 117 1;
« lib/Mite/Trait/HasDestructor.pm ↑ Summary lib/Mite/App/Command/clean.pm »