line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
{ |
2
|
|
|
|
|
|
|
use strict; |
3
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
57
|
|
4
|
2
|
|
|
2
|
|
10
|
no warnings qw( once void ); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
53
|
|
5
|
2
|
|
|
2
|
|
9
|
|
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
270
|
|
6
|
|
|
|
|
|
|
our $USES_MITE = "Mite::Class"; |
7
|
|
|
|
|
|
|
our $MITE_SHIM = "Mite::Shim"; |
8
|
|
|
|
|
|
|
our $MITE_VERSION = "0.010008"; |
9
|
|
|
|
|
|
|
# Mite keywords |
10
|
|
|
|
|
|
|
BEGIN { |
11
|
|
|
|
|
|
|
my ( $SHIM, $CALLER ) = ( "Mite::Shim", "PPP" ); |
12
|
2
|
|
|
2
|
|
15
|
( *after, *around, *before, *extends, *has, *signature_for, *with ) = do { |
13
|
2
|
|
|
|
|
4
|
no warnings 'redefine'; |
14
|
|
|
|
|
|
|
( |
15
|
2
|
|
|
2
|
|
12
|
sub { $SHIM->HANDLE_after( $CALLER, "class", @_ ) }, |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
342
|
|
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
|
|
|
|
|
92
|
|
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
|
|
12
|
BUILD => [ |
|
2
|
|
|
|
|
10
|
|
|
2
|
|
|
|
|
1044
|
|
31
|
2
|
|
33
|
2
|
|
5
|
map { ( *{$_}{CODE} ) ? ( *{$_}{CODE} ) : () } |
|
2
|
|
|
|
|
10
|
|
32
|
2
|
|
|
|
|
6
|
map { "$_\::BUILD" } reverse @$linear_isa |
33
|
|
|
|
|
|
|
], |
34
|
|
|
|
|
|
|
DEMOLISH => [ |
35
|
4
|
100
|
|
|
|
6
|
map { ( *{$_}{CODE} ) ? ( *{$_}{CODE} ) : () } |
|
4
|
|
|
|
|
16
|
|
|
2
|
|
|
|
|
5
|
|
36
|
4
|
|
|
|
|
9
|
map { "$_\::DEMOLISH" } @$linear_isa |
37
|
|
|
|
|
|
|
], |
38
|
|
|
|
|
|
|
HAS_BUILDARGS => $class->can('BUILDARGS'), |
39
|
4
|
100
|
|
|
|
5
|
HAS_FOREIGNBUILDARGS => $class->can('FOREIGNBUILDARGS'), |
|
4
|
|
|
|
|
20
|
|
|
2
|
|
|
|
|
19
|
|
40
|
2
|
|
|
|
|
6
|
}; |
|
4
|
|
|
|
|
7
|
|
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
|
|
264
|
|
51
|
2
|
|
33
|
|
|
21
|
|
52
|
2
|
|
|
|
|
5
|
|
53
|
2
|
50
|
|
|
|
11
|
# 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
|
|
|
7
|
} |
|
2
|
100
|
|
|
|
12
|
|
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
|
|
|
|
|
7
|
$_->( @_ ) for @{ $meta->{BUILD} || [] }; |
65
|
|
|
|
|
|
|
} |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
# Destructor should call DEMOLISH methods |
68
|
|
|
|
|
|
|
my $self = shift; |
69
|
1
|
|
|
1
|
|
1
|
my $class = ref( $self ) || $self; |
70
|
1
|
|
33
|
|
|
3
|
my $meta = ( $Mite::META{$class} ||= $class->__META__ ); |
71
|
1
|
50
|
|
|
|
13
|
my $in_global_destruction = defined ${^GLOBAL_PHASE} |
|
1
|
|
|
|
|
7
|
|
72
|
|
|
|
|
|
|
? ${^GLOBAL_PHASE} eq 'DESTRUCT' |
73
|
|
|
|
|
|
|
: Devel::GlobalDestruction::in_global_destruction(); |
74
|
|
|
|
|
|
|
for my $demolisher ( @{ $meta->{DEMOLISH} || [] } ) { |
75
|
|
|
|
|
|
|
my $e = do { |
76
|
2
|
|
|
2
|
|
4445
|
local ( $?, $@ ); |
77
|
2
|
|
33
|
|
|
8
|
eval { $demolisher->( $self, $in_global_destruction ) }; |
78
|
2
|
|
33
|
|
|
11
|
$@; |
79
|
2
|
50
|
|
|
|
11
|
}; |
80
|
|
|
|
|
|
|
no warnings 'misc'; # avoid (in cleanup) warnings |
81
|
|
|
|
|
|
|
die $e if $e; # rethrow |
82
|
2
|
50
|
|
|
|
22
|
} |
|
2
|
|
|
|
|
9
|
|
83
|
2
|
|
|
|
|
2
|
return; |
84
|
2
|
|
|
|
|
5
|
} |
85
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
4
|
|
86
|
2
|
|
|
|
|
5
|
|
87
|
|
|
|
|
|
|
# See UNIVERSAL |
88
|
2
|
|
|
2
|
|
12
|
my ( $self, $role ) = @_; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
436
|
|
89
|
2
|
50
|
|
|
|
5
|
our %DOES; |
90
|
|
|
|
|
|
|
return $DOES{$role} if exists $DOES{$role}; |
91
|
2
|
|
|
|
|
17
|
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
|
|
36
|
|
98
|
28
|
|
|
|
|
20
|
# Alias for Moose/Moo-compatibility |
99
|
28
|
50
|
|
|
|
38
|
shift->DOES( @_ ); |
100
|
28
|
50
|
|
|
|
36
|
} |
101
|
28
|
50
|
0
|
|
|
43
|
|
|
|
|
33
|
|
|
|
|
102
|
0
|
0
|
0
|
|
|
0
|
1; |
103
|
|
|
|
|
|
|
use strict; |
104
|
28
|
|
|
|
|
108
|
use warnings; |
105
|
|
|
|
|
|
|
no warnings qw( once void ); |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
our $USES_MITE = "Mite::Class"; |
108
|
|
|
|
|
|
|
our $MITE_SHIM = "Mite::Shim"; |
109
|
14
|
|
|
14
|
|
3387
|
our $MITE_VERSION = "0.010008"; |
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
|
|
11
|
( |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
62
|
|
116
|
2
|
|
|
2
|
|
9
|
sub { $SHIM->HANDLE_after( $CALLER, "class", @_ ) }, |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
65
|
|
117
|
2
|
|
|
2
|
|
16
|
sub { $SHIM->HANDLE_around( $CALLER, "class", @_ ) }, |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
195
|
|
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
|
|
10
|
}; |
125
|
2
|
|
|
|
|
2
|
|
126
|
|
|
|
|
|
|
|
127
|
2
|
|
|
2
|
|
11
|
BEGIN { |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
330
|
|
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
|
|
|
|
|
81
|
# 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
|
|
10
|
return $self->SUPER::DOES( $role ); |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
25
|
|
145
|
2
|
|
|
2
|
|
79
|
} |
146
|
2
|
|
|
|
|
360
|
|
147
|
|
|
|
|
|
|
# Alias for Moose/Moo-compatibility |
148
|
|
|
|
|
|
|
shift->DOES( @_ ); |
149
|
|
|
|
|
|
|
} |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
1; |