line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
{ |
2
|
|
|
|
|
|
|
package MyParent; |
3
|
4
|
|
|
4
|
|
60
|
use strict; |
|
4
|
|
|
|
|
28
|
|
|
4
|
|
|
|
|
628
|
|
4
|
4
|
|
|
4
|
|
116
|
use warnings; |
|
4
|
|
|
|
|
28
|
|
|
4
|
|
|
|
|
552
|
|
5
|
4
|
|
|
4
|
|
48
|
no warnings qw( once void ); |
|
4
|
|
|
|
|
28
|
|
|
4
|
|
|
|
|
1356
|
|
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
|
4
|
|
|
4
|
|
84
|
my ( $SHIM, $CALLER ) = ( "Mite::Shim", "MyParent" ); |
13
|
4
|
|
|
|
|
16
|
( *after, *around, *before, *extends, *has, *signature_for, *with ) = do { |
14
|
|
|
|
|
|
|
package Mite::Shim; |
15
|
4
|
|
|
4
|
|
60
|
no warnings 'redefine'; |
|
4
|
|
|
|
|
28
|
|
|
4
|
|
|
|
|
1312
|
|
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
|
4
|
|
|
|
|
60
|
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
|
4
|
|
|
|
|
264
|
); |
25
|
|
|
|
|
|
|
}; |
26
|
|
|
|
|
|
|
}; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
# Gather metadata for constructor and destructor |
29
|
|
|
|
|
|
|
sub __META__ { |
30
|
4
|
|
|
4
|
|
60
|
no strict 'refs'; |
|
4
|
|
|
|
|
12
|
|
|
4
|
|
|
|
|
4792
|
|
31
|
8
|
|
33
|
8
|
|
16
|
my $class = shift; $class = ref($class) || $class; |
|
8
|
|
|
|
|
36
|
|
32
|
8
|
|
|
|
|
24
|
my $linear_isa = mro::get_linear_isa( $class ); |
33
|
|
|
|
|
|
|
return { |
34
|
|
|
|
|
|
|
BUILD => [ |
35
|
12
|
50
|
|
|
|
20
|
map { ( *{$_}{CODE} ) ? ( *{$_}{CODE} ) : () } |
|
12
|
|
|
|
|
60
|
|
|
0
|
|
|
|
|
0
|
|
36
|
12
|
|
|
|
|
36
|
map { "$_\::BUILD" } reverse @$linear_isa |
37
|
|
|
|
|
|
|
], |
38
|
|
|
|
|
|
|
DEMOLISH => [ |
39
|
12
|
50
|
|
|
|
16
|
map { ( *{$_}{CODE} ) ? ( *{$_}{CODE} ) : () } |
|
12
|
|
|
|
|
160
|
|
|
0
|
|
|
|
|
0
|
|
40
|
8
|
|
|
|
|
20
|
map { "$_\::DEMOLISH" } @$linear_isa |
|
12
|
|
|
|
|
24
|
|
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
|
4
|
50
|
|
4
|
|
676
|
my $class = ref($_[0]) ? ref(shift) : shift; |
51
|
4
|
|
33
|
|
|
52
|
my $meta = ( $Mite::META{$class} ||= $class->__META__ ); |
52
|
4
|
|
|
|
|
16
|
my $self = bless {}, $class; |
53
|
4
|
50
|
|
|
|
20
|
my $args = $meta->{HAS_BUILDARGS} ? $class->BUILDARGS( @_ ) : { ( @_ == 1 ) ? %{$_[0]} : @_ }; |
|
0
|
50
|
|
|
|
0
|
|
54
|
4
|
|
|
|
|
12
|
my $no_build = delete $args->{__no_BUILD__}; |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
# Attribute list |
57
|
|
|
|
|
|
|
# has declaration, file ../../../../tmp/5T68lTe4z4, line 5 |
58
|
4
|
50
|
|
|
|
60
|
$self->{"list"} = ( exists( $args->{"list"} ) ? $args->{"list"} : $self->_build_list ); |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
# Call BUILD methods |
62
|
4
|
50
|
33
|
|
|
16
|
$self->BUILDALL( $args ) if ( ! $no_build and @{ $meta->{BUILD} || [] } ); |
|
4
|
50
|
|
|
|
24
|
|
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
# Unrecognized parameters |
65
|
4
|
50
|
|
|
|
4
|
my @unknown = grep not( /\Alist\z/ ), keys %{$args}; @unknown and Mite::Shim::croak( "Unexpected keys in constructor: " . join( q[, ], sort @unknown ) ); |
|
4
|
|
|
|
|
12
|
|
|
4
|
|
|
|
|
36
|
|
66
|
|
|
|
|
|
|
|
67
|
4
|
|
|
|
|
116
|
return $self; |
68
|
|
|
|
|
|
|
} |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
# Used by constructor to call BUILD methods |
71
|
|
|
|
|
|
|
sub BUILDALL { |
72
|
0
|
|
|
0
|
|
0
|
my $class = ref( $_[0] ); |
73
|
0
|
|
0
|
|
|
0
|
my $meta = ( $Mite::META{$class} ||= $class->__META__ ); |
74
|
0
|
0
|
|
|
|
0
|
$_->( @_ ) for @{ $meta->{BUILD} || [] }; |
|
0
|
|
|
|
|
0
|
|
75
|
|
|
|
|
|
|
} |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
# Destructor should call DEMOLISH methods |
78
|
|
|
|
|
|
|
sub DESTROY { |
79
|
8
|
|
|
8
|
|
5088
|
my $self = shift; |
80
|
8
|
|
33
|
|
|
36
|
my $class = ref( $self ) || $self; |
81
|
8
|
|
33
|
|
|
20
|
my $meta = ( $Mite::META{$class} ||= $class->__META__ ); |
82
|
8
|
50
|
|
|
|
32
|
my $in_global_destruction = defined ${^GLOBAL_PHASE} |
83
|
|
|
|
|
|
|
? ${^GLOBAL_PHASE} eq 'DESTRUCT' |
84
|
|
|
|
|
|
|
: Devel::GlobalDestruction::in_global_destruction(); |
85
|
8
|
50
|
|
|
|
8
|
for my $demolisher ( @{ $meta->{DEMOLISH} || [] } ) { |
|
8
|
|
|
|
|
32
|
|
86
|
0
|
|
|
|
|
0
|
my $e = do { |
87
|
0
|
|
|
|
|
0
|
local ( $?, $@ ); |
88
|
0
|
|
|
|
|
0
|
eval { $demolisher->( $self, $in_global_destruction ) }; |
|
0
|
|
|
|
|
0
|
|
89
|
0
|
|
|
|
|
0
|
$@; |
90
|
|
|
|
|
|
|
}; |
91
|
4
|
|
|
4
|
|
32
|
no warnings 'misc'; # avoid (in cleanup) warnings |
|
4
|
|
|
|
|
36
|
|
|
4
|
|
|
|
|
2388
|
|
92
|
0
|
0
|
|
|
|
0
|
die $e if $e; # rethrow |
93
|
|
|
|
|
|
|
} |
94
|
8
|
|
|
|
|
72
|
return; |
95
|
|
|
|
|
|
|
} |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
my $__XS = !$ENV{PERL_ONLY} && eval { require Class::XSAccessor; Class::XSAccessor->VERSION("1.19") }; |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
# Accessors for list |
100
|
|
|
|
|
|
|
# has declaration, file ../../../../tmp/5T68lTe4z4, line 5 |
101
|
|
|
|
|
|
|
if ( $__XS ) { |
102
|
|
|
|
|
|
|
Class::XSAccessor->import( |
103
|
|
|
|
|
|
|
chained => 1, |
104
|
|
|
|
|
|
|
"getters" => { "list" => "list" }, |
105
|
|
|
|
|
|
|
); |
106
|
|
|
|
|
|
|
} |
107
|
|
|
|
|
|
|
else { |
108
|
|
|
|
|
|
|
*list = sub { @_ == 1 or Mite::Shim::croak( 'Reader "list" usage: $self->list()' ); $_[0]{"list"} }; |
109
|
|
|
|
|
|
|
} |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
# See UNIVERSAL |
113
|
|
|
|
|
|
|
sub DOES { |
114
|
56
|
|
|
56
|
|
84
|
my ( $self, $role ) = @_; |
115
|
56
|
|
|
|
|
56
|
our %DOES; |
116
|
56
|
50
|
|
|
|
112
|
return $DOES{$role} if exists $DOES{$role}; |
117
|
56
|
50
|
|
|
|
76
|
return 1 if $role eq __PACKAGE__; |
118
|
56
|
50
|
0
|
|
|
108
|
if ( $INC{'Moose/Util.pm'} and my $meta = Moose::Util::find_meta( ref $self or $self ) ) { |
|
|
|
33
|
|
|
|
|
119
|
0
|
0
|
0
|
|
|
0
|
$meta->can( 'does_role' ) and $meta->does_role( $role ) and return 1; |
120
|
|
|
|
|
|
|
} |
121
|
56
|
|
|
|
|
280
|
return $self->SUPER::DOES( $role ); |
122
|
|
|
|
|
|
|
} |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
# Alias for Moose/Moo-compatibility |
125
|
|
|
|
|
|
|
sub does { |
126
|
28
|
|
|
28
|
|
9972
|
shift->DOES( @_ ); |
127
|
|
|
|
|
|
|
} |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
1; |
130
|
|
|
|
|
|
|
}{ |
131
|
|
|
|
|
|
|
package MyChild; |
132
|
4
|
|
|
4
|
|
36
|
use strict; |
|
4
|
|
|
|
|
36
|
|
|
4
|
|
|
|
|
492
|
|
133
|
4
|
|
|
4
|
|
52
|
use warnings; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
152
|
|
134
|
4
|
|
|
4
|
|
132
|
no warnings qw( once void ); |
|
4
|
|
|
|
|
12
|
|
|
4
|
|
|
|
|
644
|
|
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
our $USES_MITE = "Mite::Class"; |
137
|
|
|
|
|
|
|
our $MITE_SHIM = "Mite::Shim"; |
138
|
|
|
|
|
|
|
our $MITE_VERSION = "0.012000"; |
139
|
|
|
|
|
|
|
# Mite keywords |
140
|
|
|
|
|
|
|
BEGIN { |
141
|
4
|
|
|
4
|
|
24
|
my ( $SHIM, $CALLER ) = ( "Mite::Shim", "MyChild" ); |
142
|
4
|
|
|
|
|
36
|
( *after, *around, *before, *extends, *has, *signature_for, *with ) = do { |
143
|
|
|
|
|
|
|
package Mite::Shim; |
144
|
4
|
|
|
4
|
|
64
|
no warnings 'redefine'; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
1308
|
|
145
|
|
|
|
|
|
|
( |
146
|
0
|
|
|
|
|
0
|
sub { $SHIM->HANDLE_after( $CALLER, "class", @_ ) }, |
147
|
0
|
|
|
|
|
0
|
sub { $SHIM->HANDLE_around( $CALLER, "class", @_ ) }, |
148
|
0
|
|
|
|
|
0
|
sub { $SHIM->HANDLE_before( $CALLER, "class", @_ ) }, |
149
|
|
|
|
|
|
|
sub {}, |
150
|
4
|
|
|
|
|
44
|
sub { $SHIM->HANDLE_has( $CALLER, has => @_ ) }, |
151
|
0
|
|
|
|
|
0
|
sub { $SHIM->HANDLE_signature_for( $CALLER, "class", @_ ) }, |
152
|
0
|
|
|
|
|
0
|
sub { $SHIM->HANDLE_with( $CALLER, @_ ) }, |
153
|
4
|
|
|
|
|
288
|
); |
154
|
|
|
|
|
|
|
}; |
155
|
|
|
|
|
|
|
}; |
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
BEGIN { |
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
|
161
|
4
|
|
|
4
|
|
32
|
use mro 'c3'; |
|
4
|
|
|
|
|
28
|
|
|
4
|
|
|
|
|
116
|
|
162
|
4
|
|
|
4
|
|
272
|
our @ISA; |
163
|
4
|
|
|
|
|
3160
|
push @ISA, "MyParent"; |
164
|
|
|
|
|
|
|
} |
165
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
# Standard Moose/Moo-style constructor |
167
|
|
|
|
|
|
|
sub new { |
168
|
4
|
50
|
|
4
|
|
36
|
my $class = ref($_[0]) ? ref(shift) : shift; |
169
|
4
|
|
33
|
|
|
40
|
my $meta = ( $Mite::META{$class} ||= $class->__META__ ); |
170
|
4
|
|
|
|
|
12
|
my $self = bless {}, $class; |
171
|
4
|
50
|
|
|
|
16
|
my $args = $meta->{HAS_BUILDARGS} ? $class->BUILDARGS( @_ ) : { ( @_ == 1 ) ? %{$_[0]} : @_ }; |
|
0
|
50
|
|
|
|
0
|
|
172
|
4
|
|
|
|
|
8
|
my $no_build = delete $args->{__no_BUILD__}; |
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
# Attribute list |
175
|
|
|
|
|
|
|
# has declaration, file ../../../../tmp/5T68lTe4z4, line 15 |
176
|
4
|
50
|
|
|
|
20
|
$self->{"list"} = ( exists( $args->{"list"} ) ? $args->{"list"} : $MyChild::__list_DEFAULT__->( $self ) ); |
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
# Call BUILD methods |
180
|
4
|
50
|
33
|
|
|
20
|
$self->BUILDALL( $args ) if ( ! $no_build and @{ $meta->{BUILD} || [] } ); |
|
4
|
50
|
|
|
|
24
|
|
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
# Unrecognized parameters |
183
|
4
|
50
|
|
|
|
8
|
my @unknown = grep not( /\Alist\z/ ), keys %{$args}; @unknown and Mite::Shim::croak( "Unexpected keys in constructor: " . join( q[, ], sort @unknown ) ); |
|
4
|
|
|
|
|
44
|
|
|
4
|
|
|
|
|
36
|
|
184
|
|
|
|
|
|
|
|
185
|
4
|
|
|
|
|
56
|
return $self; |
186
|
|
|
|
|
|
|
} |
187
|
|
|
|
|
|
|
|
188
|
|
|
|
|
|
|
my $__XS = !$ENV{PERL_ONLY} && eval { require Class::XSAccessor; Class::XSAccessor->VERSION("1.19") }; |
189
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
# Accessors for list |
191
|
|
|
|
|
|
|
# has declaration, file ../../../../tmp/5T68lTe4z4, line 15 |
192
|
|
|
|
|
|
|
if ( $__XS ) { |
193
|
|
|
|
|
|
|
Class::XSAccessor->import( |
194
|
|
|
|
|
|
|
chained => 1, |
195
|
|
|
|
|
|
|
"getters" => { "list" => "list" }, |
196
|
|
|
|
|
|
|
); |
197
|
|
|
|
|
|
|
} |
198
|
|
|
|
|
|
|
else { |
199
|
|
|
|
|
|
|
*list = sub { @_ == 1 or Mite::Shim::croak( 'Reader "list" usage: $self->list()' ); $_[0]{"list"} }; |
200
|
|
|
|
|
|
|
} |
201
|
|
|
|
|
|
|
|
202
|
|
|
|
|
|
|
|
203
|
|
|
|
|
|
|
# See UNIVERSAL |
204
|
|
|
|
|
|
|
sub DOES { |
205
|
28
|
|
|
28
|
|
44
|
my ( $self, $role ) = @_; |
206
|
28
|
|
|
|
|
32
|
our %DOES; |
207
|
28
|
50
|
|
|
|
76
|
return $DOES{$role} if exists $DOES{$role}; |
208
|
28
|
50
|
|
|
|
48
|
return 1 if $role eq __PACKAGE__; |
209
|
28
|
50
|
0
|
|
|
52
|
if ( $INC{'Moose/Util.pm'} and my $meta = Moose::Util::find_meta( ref $self or $self ) ) { |
|
|
|
33
|
|
|
|
|
210
|
0
|
0
|
0
|
|
|
0
|
$meta->can( 'does_role' ) and $meta->does_role( $role ) and return 1; |
211
|
|
|
|
|
|
|
} |
212
|
28
|
|
|
|
|
60
|
return $self->SUPER::DOES( $role ); |
213
|
|
|
|
|
|
|
} |
214
|
|
|
|
|
|
|
|
215
|
|
|
|
|
|
|
# Alias for Moose/Moo-compatibility |
216
|
|
|
|
|
|
|
sub does { |
217
|
28
|
|
|
28
|
|
3148
|
shift->DOES( @_ ); |
218
|
|
|
|
|
|
|
} |
219
|
|
|
|
|
|
|
|
220
|
|
|
|
|
|
|
1; |
221
|
|
|
|
|
|
|
} |