line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Moose::Meta::Method::Accessor; |
2
|
|
|
|
|
|
|
our $VERSION = '2.2203'; |
3
|
|
|
|
|
|
|
|
4
|
401
|
|
|
401
|
|
2607
|
use strict; |
|
401
|
|
|
|
|
789
|
|
|
401
|
|
|
|
|
10761
|
|
5
|
401
|
|
|
401
|
|
1819
|
use warnings; |
|
401
|
|
|
|
|
778
|
|
|
401
|
|
|
|
|
8760
|
|
6
|
|
|
|
|
|
|
|
7
|
401
|
|
|
401
|
|
1827
|
use Try::Tiny; |
|
401
|
|
|
|
|
794
|
|
|
401
|
|
|
|
|
20523
|
|
8
|
|
|
|
|
|
|
|
9
|
401
|
|
|
|
|
2507
|
use parent 'Moose::Meta::Method', |
10
|
401
|
|
|
401
|
|
2469
|
'Class::MOP::Method::Accessor'; |
|
401
|
|
|
|
|
836
|
|
11
|
|
|
|
|
|
|
|
12
|
401
|
|
|
401
|
|
31389
|
use Moose::Util 'throw_exception'; |
|
401
|
|
|
|
|
1029
|
|
|
401
|
|
|
|
|
2670
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
# multiple inheritance is terrible |
15
|
|
|
|
|
|
|
sub new { |
16
|
4294
|
|
|
4294
|
1
|
18945
|
goto &Class::MOP::Method::Accessor::new; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub _new { |
20
|
3262
|
|
|
3262
|
|
10142
|
goto &Class::MOP::Method::Accessor::_new; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub _error_thrower { |
24
|
0
|
|
|
0
|
|
0
|
my $self = shift; |
25
|
0
|
0
|
0
|
|
|
0
|
return $self->associated_attribute |
26
|
|
|
|
|
|
|
if ref($self) && defined($self->associated_attribute); |
27
|
0
|
|
|
|
|
0
|
return $self->SUPER::_error_thrower; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub _compile_code { |
31
|
4291
|
|
|
4291
|
|
8403
|
my $self = shift; |
32
|
4291
|
|
|
|
|
10030
|
my @args = @_; |
33
|
|
|
|
|
|
|
try { |
34
|
4291
|
|
|
4291
|
|
180360
|
$self->SUPER::_compile_code(@args); |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
catch { |
37
|
1
|
|
|
1
|
|
20
|
throw_exception( CouldNotCreateWriter => attribute => $self->associated_attribute, |
38
|
|
|
|
|
|
|
error => $_, |
39
|
|
|
|
|
|
|
instance => $self |
40
|
|
|
|
|
|
|
); |
41
|
4291
|
|
|
|
|
28831
|
}; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub _eval_environment { |
45
|
4291
|
|
|
4291
|
|
8054
|
my $self = shift; |
46
|
4291
|
|
|
|
|
10951
|
return $self->associated_attribute->_eval_environment; |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub _instance_is_inlinable { |
50
|
5392
|
|
|
5392
|
|
8508
|
my $self = shift; |
51
|
5392
|
|
|
|
|
15321
|
return $self->associated_attribute->associated_class->instance_metaclass->is_inlinable; |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
sub _generate_reader_method { |
55
|
2328
|
|
|
2328
|
|
4385
|
my $self = shift; |
56
|
2328
|
100
|
|
|
|
6206
|
$self->_instance_is_inlinable ? $self->_generate_reader_method_inline(@_) |
57
|
|
|
|
|
|
|
: $self->SUPER::_generate_reader_method(@_); |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
sub _generate_writer_method { |
61
|
15
|
|
|
15
|
|
30
|
my $self = shift; |
62
|
15
|
50
|
|
|
|
41
|
$self->_instance_is_inlinable ? $self->_generate_writer_method_inline(@_) |
63
|
|
|
|
|
|
|
: $self->SUPER::_generate_writer_method(@_); |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
sub _generate_accessor_method { |
67
|
287
|
|
|
287
|
|
638
|
my $self = shift; |
68
|
287
|
50
|
|
|
|
1180
|
$self->_instance_is_inlinable ? $self->_generate_accessor_method_inline(@_) |
69
|
|
|
|
|
|
|
: $self->SUPER::_generate_accessor_method(@_); |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
sub _generate_predicate_method { |
73
|
163
|
|
|
163
|
|
375
|
my $self = shift; |
74
|
163
|
50
|
|
|
|
447
|
$self->_instance_is_inlinable ? $self->_generate_predicate_method_inline(@_) |
75
|
|
|
|
|
|
|
: $self->SUPER::_generate_predicate_method(@_); |
76
|
|
|
|
|
|
|
} |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
sub _generate_clearer_method { |
79
|
78
|
|
|
78
|
|
184
|
my $self = shift; |
80
|
78
|
50
|
|
|
|
226
|
$self->_instance_is_inlinable ? $self->_generate_clearer_method_inline(@_) |
81
|
|
|
|
|
|
|
: $self->SUPER::_generate_clearer_method(@_); |
82
|
|
|
|
|
|
|
} |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
sub _writer_value_needs_copy { |
85
|
714
|
|
|
714
|
|
1486
|
shift->associated_attribute->_writer_value_needs_copy(@_); |
86
|
|
|
|
|
|
|
} |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
sub _inline_tc_code { |
89
|
114
|
|
|
114
|
|
266
|
shift->associated_attribute->_inline_tc_code(@_); |
90
|
|
|
|
|
|
|
} |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
sub _inline_check_coercion { |
93
|
97
|
|
|
97
|
|
261
|
shift->associated_attribute->_inline_check_coercion(@_); |
94
|
|
|
|
|
|
|
} |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
sub _inline_check_constraint { |
97
|
97
|
|
|
97
|
|
243
|
shift->associated_attribute->_inline_check_constraint(@_); |
98
|
|
|
|
|
|
|
} |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
sub _inline_check_lazy { |
101
|
1116
|
|
|
1116
|
|
3003
|
shift->associated_attribute->_inline_check_lazy(@_); |
102
|
|
|
|
|
|
|
} |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
sub _inline_store_value { |
105
|
232
|
|
|
232
|
|
526
|
shift->associated_attribute->_inline_instance_set(@_) . ';'; |
106
|
|
|
|
|
|
|
} |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
sub _inline_get_old_value_for_trigger { |
109
|
256
|
|
|
256
|
|
711
|
shift->associated_attribute->_inline_get_old_value_for_trigger(@_); |
110
|
|
|
|
|
|
|
} |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
sub _inline_trigger { |
113
|
613
|
|
|
613
|
|
2014
|
shift->associated_attribute->_inline_trigger(@_); |
114
|
|
|
|
|
|
|
} |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
sub _get_value { |
117
|
965
|
|
|
965
|
|
2311
|
shift->associated_attribute->_inline_instance_get(@_); |
118
|
|
|
|
|
|
|
} |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
sub _has_value { |
121
|
35
|
|
|
35
|
|
97
|
shift->associated_attribute->_inline_instance_has(@_); |
122
|
|
|
|
|
|
|
} |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
1; |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
# ABSTRACT: A Moose Method metaclass for accessors |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
__END__ |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
=pod |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
=encoding UTF-8 |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
=head1 NAME |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
Moose::Meta::Method::Accessor - A Moose Method metaclass for accessors |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
=head1 VERSION |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
version 2.2203 |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
=head1 DESCRIPTION |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
This class is a subclass of L<Class::MOP::Method::Accessor> that |
145
|
|
|
|
|
|
|
provides additional Moose-specific functionality, all of which is |
146
|
|
|
|
|
|
|
private. |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
To understand this class, you should read the |
149
|
|
|
|
|
|
|
L<Class::MOP::Method::Accessor> documentation. |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
=head1 BUGS |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
See L<Moose/BUGS> for details on reporting bugs. |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
=head1 AUTHORS |
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
=over 4 |
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
=item * |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
Stevan Little <stevan@cpan.org> |
162
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
=item * |
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
Dave Rolsky <autarch@urth.org> |
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
=item * |
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
Jesse Luehrs <doy@cpan.org> |
170
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
=item * |
172
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
Shawn M Moore <sartak@cpan.org> |
174
|
|
|
|
|
|
|
|
175
|
|
|
|
|
|
|
=item * |
176
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
יובל קוג'מן (Yuval Kogman) <nothingmuch@woobling.org> |
178
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
=item * |
180
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
Karen Etheridge <ether@cpan.org> |
182
|
|
|
|
|
|
|
|
183
|
|
|
|
|
|
|
=item * |
184
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
Florian Ragwitz <rafl@debian.org> |
186
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
=item * |
188
|
|
|
|
|
|
|
|
189
|
|
|
|
|
|
|
Hans Dieter Pearcey <hdp@cpan.org> |
190
|
|
|
|
|
|
|
|
191
|
|
|
|
|
|
|
=item * |
192
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
Chris Prather <chris@prather.org> |
194
|
|
|
|
|
|
|
|
195
|
|
|
|
|
|
|
=item * |
196
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
Matt S Trout <mstrout@cpan.org> |
198
|
|
|
|
|
|
|
|
199
|
|
|
|
|
|
|
=back |
200
|
|
|
|
|
|
|
|
201
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
202
|
|
|
|
|
|
|
|
203
|
|
|
|
|
|
|
This software is copyright (c) 2006 by Infinity Interactive, Inc. |
204
|
|
|
|
|
|
|
|
205
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
206
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
207
|
|
|
|
|
|
|
|
208
|
|
|
|
|
|
|
=cut |