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