line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Moose::Meta::Method::Accessor::Native::Array::set; |
2
|
|
|
|
|
|
|
our $VERSION = '2.2206'; |
3
|
|
|
|
|
|
|
|
4
|
7
|
|
|
7
|
|
4606
|
use strict; |
|
7
|
|
|
|
|
19
|
|
|
7
|
|
|
|
|
220
|
|
5
|
7
|
|
|
7
|
|
37
|
use warnings; |
|
7
|
|
|
|
|
30
|
|
|
7
|
|
|
|
|
212
|
|
6
|
|
|
|
|
|
|
|
7
|
7
|
|
|
7
|
|
35
|
use Moose::Role; |
|
7
|
|
|
|
|
17
|
|
|
7
|
|
|
|
|
47
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
with 'Moose::Meta::Method::Accessor::Native::Array::Writer'; |
10
|
|
|
|
|
|
|
|
11
|
31
|
|
|
31
|
|
111
|
sub _minimum_arguments { 2 } |
12
|
|
|
|
|
|
|
|
13
|
31
|
|
|
31
|
|
99
|
sub _maximum_arguments { 2 } |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub _inline_check_arguments { |
16
|
31
|
|
|
31
|
|
84
|
my $self = shift; |
17
|
|
|
|
|
|
|
|
18
|
31
|
|
|
|
|
128
|
return $self->_inline_check_var_is_valid_index('$_[0]'); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
27
|
|
|
27
|
|
85
|
sub _adds_members { 1 } |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub _potential_value { |
24
|
61
|
|
|
61
|
|
119
|
my $self = shift; |
25
|
61
|
|
|
|
|
129
|
my ($slot_access) = @_; |
26
|
|
|
|
|
|
|
|
27
|
61
|
|
|
|
|
258
|
return '(do { ' |
28
|
|
|
|
|
|
|
. 'my @potential = @{ (' . $slot_access . ') }; ' |
29
|
|
|
|
|
|
|
. '$potential[$_[0]] = $_[1]; ' |
30
|
|
|
|
|
|
|
. '\@potential; ' |
31
|
|
|
|
|
|
|
. '})'; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
# We need to override this because while @_ can be written to, we cannot write |
35
|
|
|
|
|
|
|
# directly to $_[1]. |
36
|
|
|
|
|
|
|
sub _inline_coerce_new_values { |
37
|
61
|
|
|
61
|
|
123
|
my $self = shift; |
38
|
|
|
|
|
|
|
|
39
|
61
|
100
|
|
|
|
184
|
return unless $self->associated_attribute->should_coerce; |
40
|
|
|
|
|
|
|
|
41
|
11
|
100
|
|
|
|
52
|
return unless $self->_tc_member_type_can_coerce; |
42
|
|
|
|
|
|
|
|
43
|
1
|
|
|
|
|
5
|
return '@_ = ($_[0], $member_coercion->($_[1]));'; |
44
|
|
|
|
|
|
|
}; |
45
|
|
|
|
|
|
|
|
46
|
27
|
|
|
27
|
|
113
|
sub _new_members { '$_[1]' } |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub _inline_optimized_set_new_value { |
49
|
38
|
|
|
38
|
|
74
|
my $self = shift; |
50
|
38
|
|
|
|
|
109
|
my ($inv, $new, $slot_access) = @_; |
51
|
|
|
|
|
|
|
|
52
|
38
|
|
|
|
|
236
|
return $slot_access . '->[$_[0]] = $_[1];'; |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
sub _return_value { |
56
|
62
|
|
|
62
|
|
126
|
my $self = shift; |
57
|
62
|
|
|
|
|
139
|
my ($slot_access) = @_; |
58
|
|
|
|
|
|
|
|
59
|
62
|
|
|
|
|
271
|
return $slot_access . '->[$_[0]]'; |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
7
|
|
|
7
|
|
60
|
no Moose::Role; |
|
7
|
|
|
|
|
15
|
|
|
7
|
|
|
|
|
49
|
|
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
1; |