line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Moose::Meta::Method::Accessor::Native::Array::set; |
2
|
|
|
|
|
|
|
our $VERSION = '2.2205'; |
3
|
|
|
|
|
|
|
|
4
|
7
|
|
|
7
|
|
4692
|
use strict; |
|
7
|
|
|
|
|
18
|
|
|
7
|
|
|
|
|
234
|
|
5
|
7
|
|
|
7
|
|
38
|
use warnings; |
|
7
|
|
|
|
|
40
|
|
|
7
|
|
|
|
|
199
|
|
6
|
|
|
|
|
|
|
|
7
|
7
|
|
|
7
|
|
47
|
use Moose::Role; |
|
7
|
|
|
|
|
39
|
|
|
7
|
|
|
|
|
48
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
with 'Moose::Meta::Method::Accessor::Native::Array::Writer'; |
10
|
|
|
|
|
|
|
|
11
|
31
|
|
|
31
|
|
100
|
sub _minimum_arguments { 2 } |
12
|
|
|
|
|
|
|
|
13
|
31
|
|
|
31
|
|
99
|
sub _maximum_arguments { 2 } |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub _inline_check_arguments { |
16
|
31
|
|
|
31
|
|
87
|
my $self = shift; |
17
|
|
|
|
|
|
|
|
18
|
31
|
|
|
|
|
155
|
return $self->_inline_check_var_is_valid_index('$_[0]'); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
27
|
|
|
27
|
|
76
|
sub _adds_members { 1 } |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub _potential_value { |
24
|
61
|
|
|
61
|
|
124
|
my $self = shift; |
25
|
61
|
|
|
|
|
133
|
my ($slot_access) = @_; |
26
|
|
|
|
|
|
|
|
27
|
61
|
|
|
|
|
239
|
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
|
|
147
|
my $self = shift; |
38
|
|
|
|
|
|
|
|
39
|
61
|
100
|
|
|
|
203
|
return unless $self->associated_attribute->should_coerce; |
40
|
|
|
|
|
|
|
|
41
|
11
|
100
|
|
|
|
82
|
return unless $self->_tc_member_type_can_coerce; |
42
|
|
|
|
|
|
|
|
43
|
1
|
|
|
|
|
8
|
return '@_ = ($_[0], $member_coercion->($_[1]));'; |
44
|
|
|
|
|
|
|
}; |
45
|
|
|
|
|
|
|
|
46
|
27
|
|
|
27
|
|
127
|
sub _new_members { '$_[1]' } |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub _inline_optimized_set_new_value { |
49
|
38
|
|
|
38
|
|
97
|
my $self = shift; |
50
|
38
|
|
|
|
|
109
|
my ($inv, $new, $slot_access) = @_; |
51
|
|
|
|
|
|
|
|
52
|
38
|
|
|
|
|
226
|
return $slot_access . '->[$_[0]] = $_[1];'; |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
sub _return_value { |
56
|
62
|
|
|
62
|
|
142
|
my $self = shift; |
57
|
62
|
|
|
|
|
146
|
my ($slot_access) = @_; |
58
|
|
|
|
|
|
|
|
59
|
62
|
|
|
|
|
265
|
return $slot_access . '->[$_[0]]'; |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
7
|
|
|
7
|
|
63
|
no Moose::Role; |
|
7
|
|
|
|
|
23
|
|
|
7
|
|
|
|
|
49
|
|
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
1; |