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