line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Moose::Meta::Method::Accessor::Native::Array::set; |
2
|
|
|
|
|
|
|
our $VERSION = '2.2203'; |
3
|
|
|
|
|
|
|
|
4
|
7
|
|
|
7
|
|
4018
|
use strict; |
|
7
|
|
|
|
|
17
|
|
|
7
|
|
|
|
|
218
|
|
5
|
7
|
|
|
7
|
|
49
|
use warnings; |
|
7
|
|
|
|
|
13
|
|
|
7
|
|
|
|
|
172
|
|
6
|
|
|
|
|
|
|
|
7
|
7
|
|
|
7
|
|
44
|
use Moose::Role; |
|
7
|
|
|
|
|
14
|
|
|
7
|
|
|
|
|
47
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
with 'Moose::Meta::Method::Accessor::Native::Array::Writer'; |
10
|
|
|
|
|
|
|
|
11
|
31
|
|
|
31
|
|
91
|
sub _minimum_arguments { 2 } |
12
|
|
|
|
|
|
|
|
13
|
31
|
|
|
31
|
|
96
|
sub _maximum_arguments { 2 } |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub _inline_check_arguments { |
16
|
31
|
|
|
31
|
|
64
|
my $self = shift; |
17
|
|
|
|
|
|
|
|
18
|
31
|
|
|
|
|
113
|
return $self->_inline_check_var_is_valid_index('$_[0]'); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
27
|
|
|
27
|
|
80
|
sub _adds_members { 1 } |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub _potential_value { |
24
|
61
|
|
|
61
|
|
106
|
my $self = shift; |
25
|
61
|
|
|
|
|
109
|
my ($slot_access) = @_; |
26
|
|
|
|
|
|
|
|
27
|
61
|
|
|
|
|
205
|
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
|
|
103
|
my $self = shift; |
38
|
|
|
|
|
|
|
|
39
|
61
|
100
|
|
|
|
165
|
return unless $self->associated_attribute->should_coerce; |
40
|
|
|
|
|
|
|
|
41
|
11
|
100
|
|
|
|
54
|
return unless $self->_tc_member_type_can_coerce; |
42
|
|
|
|
|
|
|
|
43
|
1
|
|
|
|
|
5
|
return '@_ = ($_[0], $member_coercion->($_[1]));'; |
44
|
|
|
|
|
|
|
}; |
45
|
|
|
|
|
|
|
|
46
|
27
|
|
|
27
|
|
83
|
sub _new_members { '$_[1]' } |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub _inline_optimized_set_new_value { |
49
|
38
|
|
|
38
|
|
67
|
my $self = shift; |
50
|
38
|
|
|
|
|
108
|
my ($inv, $new, $slot_access) = @_; |
51
|
|
|
|
|
|
|
|
52
|
38
|
|
|
|
|
216
|
return $slot_access . '->[$_[0]] = $_[1];'; |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
sub _return_value { |
56
|
62
|
|
|
62
|
|
114
|
my $self = shift; |
57
|
62
|
|
|
|
|
108
|
my ($slot_access) = @_; |
58
|
|
|
|
|
|
|
|
59
|
62
|
|
|
|
|
223
|
return $slot_access . '->[$_[0]]'; |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
7
|
|
|
7
|
|
52
|
no Moose::Role; |
|
7
|
|
|
|
|
17
|
|
|
7
|
|
|
|
|
64
|
|
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
1; |