line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
{ |
2
|
|
|
|
|
|
|
use strict; |
3
|
2
|
|
|
2
|
|
13
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
58
|
|
4
|
2
|
|
|
2
|
|
10
|
no warnings qw( once void ); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
65
|
|
5
|
2
|
|
|
2
|
|
9
|
|
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
291
|
|
6
|
|
|
|
|
|
|
our $USES_MITE = "Mite::Class"; |
7
|
|
|
|
|
|
|
our $MITE_SHIM = "Mite::Shim"; |
8
|
|
|
|
|
|
|
our $MITE_VERSION = "0.011000"; |
9
|
|
|
|
|
|
|
# Mite keywords |
10
|
|
|
|
|
|
|
BEGIN { |
11
|
|
|
|
|
|
|
my ( $SHIM, $CALLER ) = ( "Mite::Shim", "PPP" ); |
12
|
2
|
|
|
2
|
|
8
|
( *after, *around, *before, *extends, *has, *signature_for, *with ) = do { |
13
|
2
|
|
|
|
|
3
|
no warnings 'redefine'; |
14
|
|
|
|
|
|
|
( |
15
|
2
|
|
|
2
|
|
13
|
sub { $SHIM->HANDLE_after( $CALLER, "class", @_ ) }, |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
372
|
|
16
|
|
|
|
|
|
|
sub { $SHIM->HANDLE_around( $CALLER, "class", @_ ) }, |
17
|
0
|
|
|
|
|
0
|
sub { $SHIM->HANDLE_before( $CALLER, "class", @_ ) }, |
18
|
0
|
|
|
|
|
0
|
sub {}, |
19
|
0
|
|
|
|
|
0
|
sub { $SHIM->HANDLE_has( $CALLER, has => @_ ) }, |
20
|
|
|
|
|
|
|
sub { $SHIM->HANDLE_signature_for( $CALLER, "class", @_ ) }, |
21
|
0
|
|
|
|
|
0
|
sub { $SHIM->HANDLE_with( $CALLER, @_ ) }, |
22
|
0
|
|
|
|
|
0
|
); |
23
|
0
|
|
|
|
|
0
|
}; |
24
|
2
|
|
|
|
|
89
|
|
25
|
|
|
|
|
|
|
# Gather metadata for constructor and destructor |
26
|
|
|
|
|
|
|
no strict 'refs'; |
27
|
|
|
|
|
|
|
my $class = shift; $class = ref($class) || $class; |
28
|
|
|
|
|
|
|
my $linear_isa = mro::get_linear_isa( $class ); |
29
|
|
|
|
|
|
|
return { |
30
|
2
|
|
|
2
|
|
11
|
BUILD => [ |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
1160
|
|
31
|
2
|
|
33
|
2
|
|
5
|
map { ( *{$_}{CODE} ) ? ( *{$_}{CODE} ) : () } |
|
2
|
|
|
|
|
10
|
|
32
|
2
|
|
|
|
|
10
|
map { "$_\::BUILD" } reverse @$linear_isa |
33
|
|
|
|
|
|
|
], |
34
|
|
|
|
|
|
|
DEMOLISH => [ |
35
|
4
|
100
|
|
|
|
7
|
map { ( *{$_}{CODE} ) ? ( *{$_}{CODE} ) : () } |
|
4
|
|
|
|
|
19
|
|
|
2
|
|
|
|
|
5
|
|
36
|
4
|
|
|
|
|
12
|
map { "$_\::DEMOLISH" } @$linear_isa |
37
|
|
|
|
|
|
|
], |
38
|
|
|
|
|
|
|
HAS_BUILDARGS => $class->can('BUILDARGS'), |
39
|
4
|
100
|
|
|
|
6
|
HAS_FOREIGNBUILDARGS => $class->can('FOREIGNBUILDARGS'), |
|
4
|
|
|
|
|
25
|
|
|
2
|
|
|
|
|
17
|
|
40
|
2
|
|
|
|
|
7
|
}; |
|
4
|
|
|
|
|
9
|
|
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
# Standard Moose/Moo-style constructor |
45
|
|
|
|
|
|
|
my $class = ref($_[0]) ? ref(shift) : shift; |
46
|
|
|
|
|
|
|
my $meta = ( $Mite::META{$class} ||= $class->__META__ ); |
47
|
|
|
|
|
|
|
my $self = bless {}, $class; |
48
|
|
|
|
|
|
|
my $args = $meta->{HAS_BUILDARGS} ? $class->BUILDARGS( @_ ) : { ( @_ == 1 ) ? %{$_[0]} : @_ }; |
49
|
|
|
|
|
|
|
my $no_build = delete $args->{__no_BUILD__}; |
50
|
2
|
50
|
|
2
|
|
311
|
|
51
|
2
|
|
33
|
|
|
18
|
|
52
|
2
|
|
|
|
|
6
|
|
53
|
2
|
50
|
|
|
|
10
|
# Call BUILD methods |
|
0
|
50
|
|
|
|
0
|
|
54
|
2
|
|
|
|
|
4
|
$self->BUILDALL( $args ) if ( ! $no_build and @{ $meta->{BUILD} || [] } ); |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
# Unrecognized parameters |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
return $self; |
59
|
2
|
50
|
66
|
|
|
9
|
} |
|
2
|
100
|
|
|
|
14
|
|
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
# Used by constructor to call BUILD methods |
62
|
2
|
0
|
|
|
|
2
|
my $class = ref( $_[0] ); |
|
0
|
0
|
|
|
|
0
|
|
|
0
|
50
|
|
|
|
0
|
|
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
8
|
|
63
|
|
|
|
|
|
|
my $meta = ( $Mite::META{$class} ||= $class->__META__ ); |
64
|
2
|
|
|
|
|
9
|
$_->( @_ ) for @{ $meta->{BUILD} || [] }; |
65
|
|
|
|
|
|
|
} |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
# Destructor should call DEMOLISH methods |
68
|
|
|
|
|
|
|
my $self = shift; |
69
|
1
|
|
|
1
|
|
2
|
my $class = ref( $self ) || $self; |
70
|
1
|
|
33
|
|
|
3
|
my $meta = ( $Mite::META{$class} ||= $class->__META__ ); |
71
|
1
|
50
|
|
|
|
2
|
my $in_global_destruction = defined ${^GLOBAL_PHASE} |
|
1
|
|
|
|
|
6
|
|
72
|
|
|
|
|
|
|
? ${^GLOBAL_PHASE} eq 'DESTRUCT' |
73
|
|
|
|
|
|
|
: Devel::GlobalDestruction::in_global_destruction(); |
74
|
|
|
|
|
|
|
for my $demolisher ( @{ $meta->{DEMOLISH} || [] } ) { |
75
|
|
|
|
|
|
|
my $e = do { |
76
|
2
|
|
|
2
|
|
5060
|
local ( $?, $@ ); |
77
|
2
|
|
33
|
|
|
8
|
eval { $demolisher->( $self, $in_global_destruction ) }; |
78
|
2
|
|
33
|
|
|
10
|
$@; |
79
|
2
|
50
|
|
|
|
11
|
}; |
80
|
|
|
|
|
|
|
no warnings 'misc'; # avoid (in cleanup) warnings |
81
|
|
|
|
|
|
|
die $e if $e; # rethrow |
82
|
2
|
50
|
|
|
|
32
|
} |
|
2
|
|
|
|
|
12
|
|
83
|
2
|
|
|
|
|
2
|
return; |
84
|
2
|
|
|
|
|
4
|
} |
85
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
5
|
|
86
|
2
|
|
|
|
|
5
|
|
87
|
|
|
|
|
|
|
# See UNIVERSAL |
88
|
2
|
|
|
2
|
|
13
|
my ( $self, $role ) = @_; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
481
|
|
89
|
2
|
50
|
|
|
|
6
|
our %DOES; |
90
|
|
|
|
|
|
|
return $DOES{$role} if exists $DOES{$role}; |
91
|
2
|
|
|
|
|
8
|
return 1 if $role eq __PACKAGE__; |
92
|
|
|
|
|
|
|
if ( $INC{'Moose/Util.pm'} and my $meta = Moose::Util::find_meta( ref $self or $self ) ) { |
93
|
|
|
|
|
|
|
$meta->can( 'does_role' ) and $meta->does_role( $role ) and return 1; |
94
|
|
|
|
|
|
|
} |
95
|
|
|
|
|
|
|
return $self->SUPER::DOES( $role ); |
96
|
|
|
|
|
|
|
} |
97
|
28
|
|
|
28
|
|
40
|
|
98
|
28
|
|
|
|
|
27
|
# Alias for Moose/Moo-compatibility |
99
|
28
|
50
|
|
|
|
42
|
shift->DOES( @_ ); |
100
|
28
|
50
|
|
|
|
38
|
} |
101
|
28
|
50
|
0
|
|
|
45
|
|
|
|
|
33
|
|
|
|
|
102
|
0
|
0
|
0
|
|
|
0
|
1; |
103
|
|
|
|
|
|
|
use strict; |
104
|
28
|
|
|
|
|
136
|
use warnings; |
105
|
|
|
|
|
|
|
no warnings qw( once void ); |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
our $USES_MITE = "Mite::Class"; |
108
|
|
|
|
|
|
|
our $MITE_SHIM = "Mite::Shim"; |
109
|
14
|
|
|
14
|
|
4284
|
our $MITE_VERSION = "0.011000"; |
110
|
|
|
|
|
|
|
# Mite keywords |
111
|
|
|
|
|
|
|
BEGIN { |
112
|
|
|
|
|
|
|
my ( $SHIM, $CALLER ) = ( "Mite::Shim", "CCC" ); |
113
|
|
|
|
|
|
|
( *after, *around, *before, *extends, *has, *signature_for, *with ) = do { |
114
|
|
|
|
|
|
|
no warnings 'redefine'; |
115
|
2
|
|
|
2
|
|
13
|
( |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
44
|
|
116
|
2
|
|
|
2
|
|
22
|
sub { $SHIM->HANDLE_after( $CALLER, "class", @_ ) }, |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
60
|
|
117
|
2
|
|
|
2
|
|
9
|
sub { $SHIM->HANDLE_around( $CALLER, "class", @_ ) }, |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
227
|
|
118
|
|
|
|
|
|
|
sub { $SHIM->HANDLE_before( $CALLER, "class", @_ ) }, |
119
|
|
|
|
|
|
|
sub {}, |
120
|
|
|
|
|
|
|
sub { $SHIM->HANDLE_has( $CALLER, has => @_ ) }, |
121
|
|
|
|
|
|
|
sub { $SHIM->HANDLE_signature_for( $CALLER, "class", @_ ) }, |
122
|
|
|
|
|
|
|
sub { $SHIM->HANDLE_with( $CALLER, @_ ) }, |
123
|
|
|
|
|
|
|
); |
124
|
2
|
|
|
2
|
|
8
|
}; |
125
|
2
|
|
|
|
|
3
|
|
126
|
|
|
|
|
|
|
|
127
|
2
|
|
|
2
|
|
11
|
BEGIN { |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
364
|
|
128
|
|
|
|
|
|
|
|
129
|
0
|
|
|
|
|
0
|
|
130
|
0
|
|
|
|
|
0
|
use mro 'c3'; |
131
|
0
|
|
|
|
|
0
|
our @ISA; |
132
|
|
|
|
|
|
|
push @ISA, "PPP"; |
133
|
0
|
|
|
|
|
0
|
} |
134
|
0
|
|
|
|
|
0
|
|
135
|
0
|
|
|
|
|
0
|
|
136
|
2
|
|
|
|
|
68
|
# See UNIVERSAL |
137
|
|
|
|
|
|
|
my ( $self, $role ) = @_; |
138
|
|
|
|
|
|
|
our %DOES; |
139
|
|
|
|
|
|
|
return $DOES{$role} if exists $DOES{$role}; |
140
|
|
|
|
|
|
|
return 1 if $role eq __PACKAGE__; |
141
|
|
|
|
|
|
|
if ( $INC{'Moose/Util.pm'} and my $meta = Moose::Util::find_meta( ref $self or $self ) ) { |
142
|
|
|
|
|
|
|
$meta->can( 'does_role' ) and $meta->does_role( $role ) and return 1; |
143
|
|
|
|
|
|
|
} |
144
|
2
|
|
|
2
|
|
11
|
return $self->SUPER::DOES( $role ); |
|
2
|
|
|
|
|
11
|
|
|
2
|
|
|
|
|
27
|
|
145
|
2
|
|
|
2
|
|
77
|
} |
146
|
2
|
|
|
|
|
400
|
|
147
|
|
|
|
|
|
|
# Alias for Moose/Moo-compatibility |
148
|
|
|
|
|
|
|
shift->DOES( @_ ); |
149
|
|
|
|
|
|
|
} |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
1; |