line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
109
|
|
|
109
|
|
2515
|
use 5.010001; |
|
109
|
|
|
|
|
441
|
|
2
|
109
|
|
|
109
|
|
708
|
use strict; |
|
109
|
|
|
|
|
246
|
|
|
109
|
|
|
|
|
2852
|
|
3
|
109
|
|
|
109
|
|
598
|
use warnings; |
|
109
|
|
|
|
|
264
|
|
|
109
|
|
|
|
|
5436
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Mite::Trait::HasMOP; |
6
|
109
|
|
|
109
|
|
806
|
use Mite::Miteception -role, -all; |
|
109
|
|
|
|
|
333
|
|
|
109
|
|
|
|
|
950
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:TOBYINK'; |
9
|
|
|
|
|
|
|
our $VERSION = '0.012000'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
requires qw( |
12
|
|
|
|
|
|
|
_mop_metaclass |
13
|
|
|
|
|
|
|
_mop_attribute_metaclass |
14
|
|
|
|
|
|
|
); |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub _compile_mop { |
17
|
0
|
|
|
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
|
|
|
|
|
|
|
sub _compile_mop_attributes { |
33
|
0
|
|
|
0
|
|
|
return ''; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub _compile_mop_required_methods { |
37
|
0
|
|
|
0
|
|
|
return ''; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub _compile_mop_modifiers { |
41
|
0
|
|
|
0
|
|
|
return ''; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub _compile_mop_methods { |
45
|
0
|
|
|
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
|
|
|
|
|
|
|
sub _compile_mop_tc { |
58
|
0
|
|
|
0
|
|
|
return sprintf ' Moose::Util::TypeConstraints::find_or_create_isa_type_constraint( %s );', |
59
|
|
|
|
|
|
|
B::perlstring( shift->name ); |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
sub _compile_mop_postamble { |
63
|
0
|
|
|
0
|
|
|
return ''; |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
1; |