line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
{ |
2
|
|
|
|
|
|
|
use strict; |
3
|
1
|
|
|
1
|
|
9
|
use warnings; |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
56
|
|
4
|
1
|
|
|
1
|
|
12
|
no warnings qw( once void ); |
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
73
|
|
5
|
1
|
|
|
1
|
|
9
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
179
|
|
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", "xGP1" ); |
12
|
1
|
|
|
1
|
|
4
|
( *after, *around, *before, *extends, *has, *signature_for, *with ) = do { |
13
|
1
|
|
|
|
|
2
|
no warnings 'redefine'; |
14
|
|
|
|
|
|
|
( |
15
|
1
|
|
|
1
|
|
10
|
sub { $SHIM->HANDLE_after( $CALLER, "class", @_ ) }, |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
228
|
|
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
|
1
|
|
|
|
|
13
|
sub { $SHIM->HANDLE_with( $CALLER, @_ ) }, |
22
|
0
|
|
|
|
|
0
|
); |
23
|
0
|
|
|
|
|
0
|
}; |
24
|
1
|
|
|
|
|
43
|
|
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
|
1
|
|
|
1
|
|
5
|
BUILD => [ |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
642
|
|
31
|
4
|
|
33
|
4
|
|
6
|
map { ( *{$_}{CODE} ) ? ( *{$_}{CODE} ) : () } |
|
4
|
|
|
|
|
13
|
|
32
|
4
|
|
|
|
|
11
|
map { "$_\::BUILD" } reverse @$linear_isa |
33
|
|
|
|
|
|
|
], |
34
|
|
|
|
|
|
|
DEMOLISH => [ |
35
|
9
|
50
|
|
|
|
8
|
map { ( *{$_}{CODE} ) ? ( *{$_}{CODE} ) : () } |
|
9
|
|
|
|
|
26
|
|
|
0
|
|
|
|
|
0
|
|
36
|
9
|
|
|
|
|
18
|
map { "$_\::DEMOLISH" } @$linear_isa |
37
|
|
|
|
|
|
|
], |
38
|
|
|
|
|
|
|
HAS_BUILDARGS => $class->can('BUILDARGS'), |
39
|
9
|
50
|
|
|
|
8
|
HAS_FOREIGNBUILDARGS => $class->can('FOREIGNBUILDARGS'), |
|
9
|
|
|
|
|
72
|
|
|
0
|
|
|
|
|
0
|
|
40
|
4
|
|
|
|
|
6
|
}; |
|
9
|
|
|
|
|
13
|
|
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
|
1
|
50
|
|
1
|
|
164
|
|
51
|
1
|
|
33
|
|
|
8
|
# Attribute foo |
52
|
1
|
|
|
|
|
3
|
# has declaration, file ../../../../tmp/zpGq1he3d5, line 3 |
53
|
1
|
50
|
|
|
|
4
|
$self->{"foo"} = ( exists( $args->{"foo"} ) ? $args->{"foo"} : "gp1 foo default" ); |
|
0
|
50
|
|
|
|
0
|
|
54
|
1
|
|
|
|
|
1
|
|
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
# Call BUILD methods |
57
|
|
|
|
|
|
|
$self->BUILDALL( $args ) if ( ! $no_build and @{ $meta->{BUILD} || [] } ); |
58
|
1
|
50
|
|
|
|
5
|
|
59
|
|
|
|
|
|
|
# Unrecognized parameters |
60
|
|
|
|
|
|
|
my @unknown = grep not( /\Afoo\z/ ), keys %{$args}; @unknown and Mite::Shim::croak( "Unexpected keys in constructor: " . join( q[, ], sort @unknown ) ); |
61
|
|
|
|
|
|
|
|
62
|
1
|
50
|
33
|
|
|
3
|
return $self; |
|
1
|
50
|
|
|
|
3
|
|
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
|
65
|
1
|
50
|
|
|
|
2
|
# Used by constructor to call BUILD methods |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
1
|
|
66
|
|
|
|
|
|
|
my $class = ref( $_[0] ); |
67
|
1
|
|
|
|
|
7
|
my $meta = ( $Mite::META{$class} ||= $class->__META__ ); |
68
|
|
|
|
|
|
|
$_->( @_ ) for @{ $meta->{BUILD} || [] }; |
69
|
|
|
|
|
|
|
} |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
# Destructor should call DEMOLISH methods |
72
|
0
|
|
|
0
|
|
0
|
my $self = shift; |
73
|
0
|
|
0
|
|
|
0
|
my $class = ref( $self ) || $self; |
74
|
0
|
0
|
|
|
|
0
|
my $meta = ( $Mite::META{$class} ||= $class->__META__ ); |
|
0
|
|
|
|
|
0
|
|
75
|
|
|
|
|
|
|
my $in_global_destruction = defined ${^GLOBAL_PHASE} |
76
|
|
|
|
|
|
|
? ${^GLOBAL_PHASE} eq 'DESTRUCT' |
77
|
|
|
|
|
|
|
: Devel::GlobalDestruction::in_global_destruction(); |
78
|
|
|
|
|
|
|
for my $demolisher ( @{ $meta->{DEMOLISH} || [] } ) { |
79
|
4
|
|
|
4
|
|
1512
|
my $e = do { |
80
|
4
|
|
33
|
|
|
7
|
local ( $?, $@ ); |
81
|
4
|
|
33
|
|
|
7
|
eval { $demolisher->( $self, $in_global_destruction ) }; |
82
|
4
|
50
|
|
|
|
10
|
$@; |
83
|
|
|
|
|
|
|
}; |
84
|
|
|
|
|
|
|
no warnings 'misc'; # avoid (in cleanup) warnings |
85
|
4
|
50
|
|
|
|
2
|
die $e if $e; # rethrow |
|
4
|
|
|
|
|
8
|
|
86
|
0
|
|
|
|
|
0
|
} |
87
|
0
|
|
|
|
|
0
|
return; |
88
|
0
|
|
|
|
|
0
|
} |
|
0
|
|
|
|
|
0
|
|
89
|
0
|
|
|
|
|
0
|
|
90
|
|
|
|
|
|
|
my $__XS = !$ENV{PERL_ONLY} && eval { require Class::XSAccessor; Class::XSAccessor->VERSION("1.19") }; |
91
|
1
|
|
|
1
|
|
6
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
397
|
|
92
|
0
|
0
|
|
|
|
0
|
# Accessors for foo |
93
|
|
|
|
|
|
|
# has declaration, file ../../../../tmp/zpGq1he3d5, line 3 |
94
|
4
|
|
|
|
|
12
|
if ( $__XS ) { |
95
|
|
|
|
|
|
|
Class::XSAccessor->import( |
96
|
|
|
|
|
|
|
chained => 1, |
97
|
|
|
|
|
|
|
"accessors" => { "foo" => "foo" }, |
98
|
|
|
|
|
|
|
); |
99
|
|
|
|
|
|
|
} |
100
|
|
|
|
|
|
|
else { |
101
|
|
|
|
|
|
|
*foo = sub { @_ > 1 ? do { $_[0]{"foo"} = $_[1]; $_[0]; } : ( $_[0]{"foo"} ) }; |
102
|
|
|
|
|
|
|
} |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
# See UNIVERSAL |
106
|
|
|
|
|
|
|
my ( $self, $role ) = @_; |
107
|
|
|
|
|
|
|
our %DOES; |
108
|
|
|
|
|
|
|
return $DOES{$role} if exists $DOES{$role}; |
109
|
|
|
|
|
|
|
return 1 if $role eq __PACKAGE__; |
110
|
|
|
|
|
|
|
if ( $INC{'Moose/Util.pm'} and my $meta = Moose::Util::find_meta( ref $self or $self ) ) { |
111
|
|
|
|
|
|
|
$meta->can( 'does_role' ) and $meta->does_role( $role ) and return 1; |
112
|
|
|
|
|
|
|
} |
113
|
|
|
|
|
|
|
return $self->SUPER::DOES( $role ); |
114
|
28
|
|
|
28
|
|
32
|
} |
115
|
28
|
|
|
|
|
28
|
|
116
|
28
|
50
|
|
|
|
34
|
# Alias for Moose/Moo-compatibility |
117
|
28
|
50
|
|
|
|
29
|
shift->DOES( @_ ); |
118
|
28
|
50
|
0
|
|
|
50
|
} |
|
|
|
33
|
|
|
|
|
119
|
0
|
0
|
0
|
|
|
0
|
|
120
|
|
|
|
|
|
|
1; |
121
|
28
|
|
|
|
|
105
|
use strict; |
122
|
|
|
|
|
|
|
use warnings; |
123
|
|
|
|
|
|
|
no warnings qw( once void ); |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
our $USES_MITE = "Mite::Class"; |
126
|
7
|
|
|
7
|
|
569
|
our $MITE_SHIM = "Mite::Shim"; |
127
|
|
|
|
|
|
|
our $MITE_VERSION = "0.010008"; |
128
|
|
|
|
|
|
|
# Mite keywords |
129
|
|
|
|
|
|
|
BEGIN { |
130
|
|
|
|
|
|
|
my ( $SHIM, $CALLER ) = ( "Mite::Shim", "xP1" ); |
131
|
|
|
|
|
|
|
( *after, *around, *before, *extends, *has, *signature_for, *with ) = do { |
132
|
1
|
|
|
1
|
|
6
|
no warnings 'redefine'; |
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
21
|
|
133
|
1
|
|
|
1
|
|
6
|
( |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
42
|
|
134
|
1
|
|
|
1
|
|
5
|
sub { $SHIM->HANDLE_after( $CALLER, "class", @_ ) }, |
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
102
|
|
135
|
|
|
|
|
|
|
sub { $SHIM->HANDLE_around( $CALLER, "class", @_ ) }, |
136
|
|
|
|
|
|
|
sub { $SHIM->HANDLE_before( $CALLER, "class", @_ ) }, |
137
|
|
|
|
|
|
|
sub {}, |
138
|
|
|
|
|
|
|
sub { $SHIM->HANDLE_has( $CALLER, has => @_ ) }, |
139
|
|
|
|
|
|
|
sub { $SHIM->HANDLE_signature_for( $CALLER, "class", @_ ) }, |
140
|
|
|
|
|
|
|
sub { $SHIM->HANDLE_with( $CALLER, @_ ) }, |
141
|
1
|
|
|
1
|
|
4
|
); |
142
|
1
|
|
|
|
|
2
|
}; |
143
|
|
|
|
|
|
|
|
144
|
1
|
|
|
1
|
|
11
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
161
|
|
145
|
|
|
|
|
|
|
BEGIN { |
146
|
0
|
|
|
|
|
0
|
|
147
|
0
|
|
|
|
|
0
|
|
148
|
0
|
|
|
|
|
0
|
use mro 'c3'; |
149
|
|
|
|
|
|
|
our @ISA; |
150
|
1
|
|
|
|
|
3
|
push @ISA, "xGP1"; |
151
|
0
|
|
|
|
|
0
|
} |
152
|
0
|
|
|
|
|
0
|
|
153
|
1
|
|
|
|
|
37
|
# Standard Moose/Moo-style constructor |
154
|
|
|
|
|
|
|
my $class = ref($_[0]) ? ref(shift) : shift; |
155
|
|
|
|
|
|
|
my $meta = ( $Mite::META{$class} ||= $class->__META__ ); |
156
|
|
|
|
|
|
|
my $self = bless {}, $class; |
157
|
|
|
|
|
|
|
my $args = $meta->{HAS_BUILDARGS} ? $class->BUILDARGS( @_ ) : { ( @_ == 1 ) ? %{$_[0]} : @_ }; |
158
|
|
|
|
|
|
|
my $no_build = delete $args->{__no_BUILD__}; |
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
# Attribute foo |
161
|
1
|
|
|
1
|
|
7
|
# has declaration, file ../../../../tmp/zpGq1he3d5, line 3 |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
21
|
|
162
|
1
|
|
|
1
|
|
42
|
$self->{"foo"} = ( exists( $args->{"foo"} ) ? $args->{"foo"} : "gp1 foo default" ); |
163
|
1
|
|
|
|
|
542
|
|
164
|
|
|
|
|
|
|
# Attribute bar |
165
|
|
|
|
|
|
|
# has declaration, file ../../../../tmp/zpGq1he3d5, line 10 |
166
|
|
|
|
|
|
|
$self->{"bar"} = ( exists( $args->{"bar"} ) ? $args->{"bar"} : "p1 bar default" ); |
167
|
|
|
|
|
|
|
|
168
|
1
|
50
|
|
1
|
|
2324
|
|
169
|
1
|
|
33
|
|
|
9
|
# Call BUILD methods |
170
|
1
|
|
|
|
|
3
|
$self->BUILDALL( $args ) if ( ! $no_build and @{ $meta->{BUILD} || [] } ); |
171
|
1
|
50
|
|
|
|
4
|
|
|
0
|
50
|
|
|
|
0
|
|
172
|
1
|
|
|
|
|
2
|
# Unrecognized parameters |
173
|
|
|
|
|
|
|
my @unknown = grep not( /\A(?:bar|foo)\z/ ), keys %{$args}; @unknown and Mite::Shim::croak( "Unexpected keys in constructor: " . join( q[, ], sort @unknown ) ); |
174
|
|
|
|
|
|
|
|
175
|
|
|
|
|
|
|
return $self; |
176
|
1
|
50
|
|
|
|
4
|
} |
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
my $__XS = !$ENV{PERL_ONLY} && eval { require Class::XSAccessor; Class::XSAccessor->VERSION("1.19") }; |
179
|
|
|
|
|
|
|
|
180
|
1
|
50
|
|
|
|
2
|
# Accessors for bar |
181
|
|
|
|
|
|
|
# has declaration, file ../../../../tmp/zpGq1he3d5, line 10 |
182
|
|
|
|
|
|
|
if ( $__XS ) { |
183
|
|
|
|
|
|
|
Class::XSAccessor->import( |
184
|
1
|
50
|
33
|
|
|
3
|
chained => 1, |
|
1
|
50
|
|
|
|
4
|
|
185
|
|
|
|
|
|
|
"accessors" => { "bar" => "bar" }, |
186
|
|
|
|
|
|
|
); |
187
|
1
|
50
|
|
|
|
2
|
} |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
2
|
|
188
|
|
|
|
|
|
|
else { |
189
|
1
|
|
|
|
|
3
|
*bar = sub { @_ > 1 ? do { $_[0]{"bar"} = $_[1]; $_[0]; } : ( $_[0]{"bar"} ) }; |
190
|
|
|
|
|
|
|
} |
191
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
# See UNIVERSAL |
194
|
|
|
|
|
|
|
my ( $self, $role ) = @_; |
195
|
|
|
|
|
|
|
our %DOES; |
196
|
|
|
|
|
|
|
return $DOES{$role} if exists $DOES{$role}; |
197
|
|
|
|
|
|
|
return 1 if $role eq __PACKAGE__; |
198
|
|
|
|
|
|
|
if ( $INC{'Moose/Util.pm'} and my $meta = Moose::Util::find_meta( ref $self or $self ) ) { |
199
|
|
|
|
|
|
|
$meta->can( 'does_role' ) and $meta->does_role( $role ) and return 1; |
200
|
|
|
|
|
|
|
} |
201
|
|
|
|
|
|
|
return $self->SUPER::DOES( $role ); |
202
|
|
|
|
|
|
|
} |
203
|
|
|
|
|
|
|
|
204
|
|
|
|
|
|
|
# Alias for Moose/Moo-compatibility |
205
|
|
|
|
|
|
|
shift->DOES( @_ ); |
206
|
|
|
|
|
|
|
} |
207
|
|
|
|
|
|
|
|
208
|
|
|
|
|
|
|
1; |
209
|
14
|
|
|
14
|
|
17
|
use strict; |
210
|
14
|
|
|
|
|
11
|
use warnings; |
211
|
14
|
50
|
|
|
|
18
|
no warnings qw( once void ); |
212
|
14
|
50
|
|
|
|
15
|
|
213
|
14
|
50
|
0
|
|
|
21
|
our $USES_MITE = "Mite::Class"; |
|
|
|
33
|
|
|
|
|
214
|
0
|
0
|
0
|
|
|
0
|
our $MITE_SHIM = "Mite::Shim"; |
215
|
|
|
|
|
|
|
our $MITE_VERSION = "0.010008"; |
216
|
14
|
|
|
|
|
28
|
# Mite keywords |
217
|
|
|
|
|
|
|
BEGIN { |
218
|
|
|
|
|
|
|
my ( $SHIM, $CALLER ) = ( "Mite::Shim", "xP2" ); |
219
|
|
|
|
|
|
|
( *after, *around, *before, *extends, *has, *signature_for, *with ) = do { |
220
|
|
|
|
|
|
|
no warnings 'redefine'; |
221
|
7
|
|
|
7
|
|
603
|
( |
222
|
|
|
|
|
|
|
sub { $SHIM->HANDLE_after( $CALLER, "class", @_ ) }, |
223
|
|
|
|
|
|
|
sub { $SHIM->HANDLE_around( $CALLER, "class", @_ ) }, |
224
|
|
|
|
|
|
|
sub { $SHIM->HANDLE_before( $CALLER, "class", @_ ) }, |
225
|
|
|
|
|
|
|
sub {}, |
226
|
|
|
|
|
|
|
sub { $SHIM->HANDLE_has( $CALLER, has => @_ ) }, |
227
|
1
|
|
|
1
|
|
6
|
sub { $SHIM->HANDLE_signature_for( $CALLER, "class", @_ ) }, |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
19
|
|
228
|
1
|
|
|
1
|
|
4
|
sub { $SHIM->HANDLE_with( $CALLER, @_ ) }, |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
42
|
|
229
|
1
|
|
|
1
|
|
4
|
); |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
96
|
|
230
|
|
|
|
|
|
|
}; |
231
|
|
|
|
|
|
|
|
232
|
|
|
|
|
|
|
|
233
|
|
|
|
|
|
|
BEGIN { |
234
|
|
|
|
|
|
|
|
235
|
|
|
|
|
|
|
|
236
|
1
|
|
|
1
|
|
4
|
use mro 'c3'; |
237
|
1
|
|
|
|
|
1
|
our @ISA; |
238
|
|
|
|
|
|
|
push @ISA, "xGP1"; |
239
|
1
|
|
|
1
|
|
7
|
} |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
160
|
|
240
|
|
|
|
|
|
|
|
241
|
0
|
|
|
|
|
0
|
# Standard Moose/Moo-style constructor |
242
|
0
|
|
|
|
|
0
|
my $class = ref($_[0]) ? ref(shift) : shift; |
243
|
0
|
|
|
|
|
0
|
my $meta = ( $Mite::META{$class} ||= $class->__META__ ); |
244
|
|
|
|
|
|
|
my $self = bless {}, $class; |
245
|
1
|
|
|
|
|
3
|
my $args = $meta->{HAS_BUILDARGS} ? $class->BUILDARGS( @_ ) : { ( @_ == 1 ) ? %{$_[0]} : @_ }; |
246
|
0
|
|
|
|
|
0
|
my $no_build = delete $args->{__no_BUILD__}; |
247
|
0
|
|
|
|
|
0
|
|
248
|
1
|
|
|
|
|
46
|
# Attribute foo |
249
|
|
|
|
|
|
|
# has declaration, file ../../../../tmp/zpGq1he3d5, line 17 |
250
|
|
|
|
|
|
|
$self->{"foo"} = ( exists( $args->{"foo"} ) ? $args->{"foo"} : "p2 foo default" ); |
251
|
|
|
|
|
|
|
|
252
|
|
|
|
|
|
|
|
253
|
|
|
|
|
|
|
# Call BUILD methods |
254
|
|
|
|
|
|
|
$self->BUILDALL( $args ) if ( ! $no_build and @{ $meta->{BUILD} || [] } ); |
255
|
|
|
|
|
|
|
|
256
|
1
|
|
|
1
|
|
7
|
# Unrecognized parameters |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
9
|
|
257
|
1
|
|
|
1
|
|
64
|
my @unknown = grep not( /\Afoo\z/ ), keys %{$args}; @unknown and Mite::Shim::croak( "Unexpected keys in constructor: " . join( q[, ], sort @unknown ) ); |
258
|
1
|
|
|
|
|
453
|
|
259
|
|
|
|
|
|
|
return $self; |
260
|
|
|
|
|
|
|
} |
261
|
|
|
|
|
|
|
|
262
|
|
|
|
|
|
|
my $__XS = !$ENV{PERL_ONLY} && eval { require Class::XSAccessor; Class::XSAccessor->VERSION("1.19") }; |
263
|
1
|
50
|
|
1
|
|
1448
|
|
264
|
1
|
|
33
|
|
|
8
|
# Accessors for foo |
265
|
1
|
|
|
|
|
3
|
# has declaration, file ../../../../tmp/zpGq1he3d5, line 17 |
266
|
1
|
50
|
|
|
|
3
|
if ( $__XS ) { |
|
0
|
50
|
|
|
|
0
|
|
267
|
1
|
|
|
|
|
2
|
Class::XSAccessor->import( |
268
|
|
|
|
|
|
|
chained => 1, |
269
|
|
|
|
|
|
|
"accessors" => { "foo" => "foo" }, |
270
|
|
|
|
|
|
|
); |
271
|
1
|
50
|
|
|
|
4
|
} |
272
|
|
|
|
|
|
|
else { |
273
|
|
|
|
|
|
|
*foo = sub { @_ > 1 ? do { $_[0]{"foo"} = $_[1]; $_[0]; } : ( $_[0]{"foo"} ) }; |
274
|
|
|
|
|
|
|
} |
275
|
1
|
50
|
33
|
|
|
3
|
|
|
1
|
50
|
|
|
|
4
|
|
276
|
|
|
|
|
|
|
|
277
|
|
|
|
|
|
|
# See UNIVERSAL |
278
|
1
|
50
|
|
|
|
1
|
my ( $self, $role ) = @_; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
2
|
|
279
|
|
|
|
|
|
|
our %DOES; |
280
|
1
|
|
|
|
|
3
|
return $DOES{$role} if exists $DOES{$role}; |
281
|
|
|
|
|
|
|
return 1 if $role eq __PACKAGE__; |
282
|
|
|
|
|
|
|
if ( $INC{'Moose/Util.pm'} and my $meta = Moose::Util::find_meta( ref $self or $self ) ) { |
283
|
|
|
|
|
|
|
$meta->can( 'does_role' ) and $meta->does_role( $role ) and return 1; |
284
|
|
|
|
|
|
|
} |
285
|
|
|
|
|
|
|
return $self->SUPER::DOES( $role ); |
286
|
|
|
|
|
|
|
} |
287
|
|
|
|
|
|
|
|
288
|
|
|
|
|
|
|
# Alias for Moose/Moo-compatibility |
289
|
|
|
|
|
|
|
shift->DOES( @_ ); |
290
|
|
|
|
|
|
|
} |
291
|
|
|
|
|
|
|
|
292
|
|
|
|
|
|
|
1; |
293
|
|
|
|
|
|
|
use strict; |
294
|
|
|
|
|
|
|
use warnings; |
295
|
|
|
|
|
|
|
no warnings qw( once void ); |
296
|
|
|
|
|
|
|
|
297
|
|
|
|
|
|
|
our $USES_MITE = "Mite::Class"; |
298
|
|
|
|
|
|
|
our $MITE_SHIM = "Mite::Shim"; |
299
|
|
|
|
|
|
|
our $MITE_VERSION = "0.010008"; |
300
|
7
|
|
|
7
|
|
9
|
# Mite keywords |
301
|
7
|
|
|
|
|
5
|
BEGIN { |
302
|
7
|
50
|
|
|
|
12
|
my ( $SHIM, $CALLER ) = ( "Mite::Shim", "xC1" ); |
303
|
7
|
50
|
|
|
|
8
|
( *after, *around, *before, *extends, *has, *signature_for, *with ) = do { |
304
|
7
|
50
|
0
|
|
|
11
|
no warnings 'redefine'; |
|
|
|
33
|
|
|
|
|
305
|
0
|
0
|
0
|
|
|
0
|
( |
306
|
|
|
|
|
|
|
sub { $SHIM->HANDLE_after( $CALLER, "class", @_ ) }, |
307
|
7
|
|
|
|
|
10
|
sub { $SHIM->HANDLE_around( $CALLER, "class", @_ ) }, |
308
|
|
|
|
|
|
|
sub { $SHIM->HANDLE_before( $CALLER, "class", @_ ) }, |
309
|
|
|
|
|
|
|
sub {}, |
310
|
|
|
|
|
|
|
sub { $SHIM->HANDLE_has( $CALLER, has => @_ ) }, |
311
|
|
|
|
|
|
|
sub { $SHIM->HANDLE_signature_for( $CALLER, "class", @_ ) }, |
312
|
7
|
|
|
7
|
|
469
|
sub { $SHIM->HANDLE_with( $CALLER, @_ ) }, |
313
|
|
|
|
|
|
|
); |
314
|
|
|
|
|
|
|
}; |
315
|
|
|
|
|
|
|
|
316
|
|
|
|
|
|
|
|
317
|
|
|
|
|
|
|
BEGIN { |
318
|
1
|
|
|
1
|
|
6
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
42
|
|
319
|
1
|
|
|
1
|
|
7
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
23
|
|
320
|
1
|
|
|
1
|
|
10
|
use mro 'c3'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
103
|
|
321
|
|
|
|
|
|
|
our @ISA; |
322
|
|
|
|
|
|
|
push @ISA, "xP1", "xP2"; |
323
|
|
|
|
|
|
|
} |
324
|
|
|
|
|
|
|
|
325
|
|
|
|
|
|
|
# Standard Moose/Moo-style constructor |
326
|
|
|
|
|
|
|
my $class = ref($_[0]) ? ref(shift) : shift; |
327
|
1
|
|
|
1
|
|
5
|
my $meta = ( $Mite::META{$class} ||= $class->__META__ ); |
328
|
1
|
|
|
|
|
1
|
my $self = bless {}, $class; |
329
|
|
|
|
|
|
|
my $args = $meta->{HAS_BUILDARGS} ? $class->BUILDARGS( @_ ) : { ( @_ == 1 ) ? %{$_[0]} : @_ }; |
330
|
1
|
|
|
1
|
|
6
|
my $no_build = delete $args->{__no_BUILD__}; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
166
|
|
331
|
|
|
|
|
|
|
|
332
|
0
|
|
|
|
|
0
|
# Attribute foo |
333
|
0
|
|
|
|
|
0
|
# has declaration, file ../../../../tmp/zpGq1he3d5, line 17 |
334
|
0
|
|
|
|
|
0
|
$self->{"foo"} = ( exists( $args->{"foo"} ) ? $args->{"foo"} : "p2 foo default" ); |
335
|
|
|
|
|
|
|
|
336
|
1
|
|
|
|
|
9
|
# Attribute bar |
337
|
0
|
|
|
|
|
0
|
# has declaration, file ../../../../tmp/zpGq1he3d5, line 24 |
338
|
0
|
|
|
|
|
0
|
if ( exists $args->{"bar"} ) { $self->{"bar"} = $args->{"bar"}; } ; |
339
|
1
|
|
|
|
|
43
|
|
340
|
|
|
|
|
|
|
|
341
|
|
|
|
|
|
|
# Call BUILD methods |
342
|
|
|
|
|
|
|
$self->BUILDALL( $args ) if ( ! $no_build and @{ $meta->{BUILD} || [] } ); |
343
|
|
|
|
|
|
|
|
344
|
|
|
|
|
|
|
# Unrecognized parameters |
345
|
|
|
|
|
|
|
my @unknown = grep not( /\A(?:bar|foo)\z/ ), keys %{$args}; @unknown and Mite::Shim::croak( "Unexpected keys in constructor: " . join( q[, ], sort @unknown ) ); |
346
|
|
|
|
|
|
|
|
347
|
1
|
|
|
1
|
|
6
|
return $self; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
3
|
|
348
|
1
|
|
|
1
|
|
31
|
} |
349
|
1
|
|
|
|
|
486
|
|
350
|
|
|
|
|
|
|
my $__XS = !$ENV{PERL_ONLY} && eval { require Class::XSAccessor; Class::XSAccessor->VERSION("1.19") }; |
351
|
|
|
|
|
|
|
|
352
|
|
|
|
|
|
|
# Accessors for bar |
353
|
|
|
|
|
|
|
# has declaration, file ../../../../tmp/zpGq1he3d5, line 24 |
354
|
1
|
50
|
|
1
|
|
1384
|
if ( $__XS ) { |
355
|
1
|
|
33
|
|
|
10
|
Class::XSAccessor->import( |
356
|
1
|
|
|
|
|
3
|
chained => 1, |
357
|
1
|
50
|
|
|
|
4
|
"accessors" => { "bar" => "bar" }, |
|
0
|
50
|
|
|
|
0
|
|
358
|
1
|
|
|
|
|
1
|
); |
359
|
|
|
|
|
|
|
} |
360
|
|
|
|
|
|
|
else { |
361
|
|
|
|
|
|
|
*bar = sub { @_ > 1 ? do { $_[0]{"bar"} = $_[1]; $_[0]; } : ( $_[0]{"bar"} ) }; |
362
|
1
|
50
|
|
|
|
5
|
} |
363
|
|
|
|
|
|
|
|
364
|
|
|
|
|
|
|
|
365
|
|
|
|
|
|
|
# See UNIVERSAL |
366
|
1
|
50
|
|
|
|
4
|
my ( $self, $role ) = @_; |
|
0
|
|
|
|
|
0
|
|
367
|
|
|
|
|
|
|
our %DOES; |
368
|
|
|
|
|
|
|
return $DOES{$role} if exists $DOES{$role}; |
369
|
|
|
|
|
|
|
return 1 if $role eq __PACKAGE__; |
370
|
1
|
50
|
33
|
|
|
12
|
if ( $INC{'Moose/Util.pm'} and my $meta = Moose::Util::find_meta( ref $self or $self ) ) { |
|
1
|
50
|
|
|
|
6
|
|
371
|
|
|
|
|
|
|
$meta->can( 'does_role' ) and $meta->does_role( $role ) and return 1; |
372
|
|
|
|
|
|
|
} |
373
|
1
|
50
|
|
|
|
1
|
return $self->SUPER::DOES( $role ); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
3
|
|
374
|
|
|
|
|
|
|
} |
375
|
1
|
|
|
|
|
4
|
|
376
|
|
|
|
|
|
|
# Alias for Moose/Moo-compatibility |
377
|
|
|
|
|
|
|
shift->DOES( @_ ); |
378
|
|
|
|
|
|
|
} |
379
|
|
|
|
|
|
|
|
380
|
|
|
|
|
|
|
1; |