line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Moose::Meta::Method::Accessor::Native::Array::insert; |
2
|
|
|
|
|
|
|
our $VERSION = '2.2206'; |
3
|
|
|
|
|
|
|
|
4
|
4
|
|
|
4
|
|
3056
|
use strict; |
|
4
|
|
|
|
|
12
|
|
|
4
|
|
|
|
|
144
|
|
5
|
4
|
|
|
4
|
|
44
|
use warnings; |
|
4
|
|
|
|
|
16
|
|
|
4
|
|
|
|
|
130
|
|
6
|
|
|
|
|
|
|
|
7
|
4
|
|
|
4
|
|
27
|
use Moose::Role; |
|
4
|
|
|
|
|
18
|
|
|
4
|
|
|
|
|
51
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
with 'Moose::Meta::Method::Accessor::Native::Array::Writer'; |
10
|
|
|
|
|
|
|
|
11
|
20
|
|
|
20
|
|
73
|
sub _minimum_arguments { 2 } |
12
|
|
|
|
|
|
|
|
13
|
20
|
|
|
20
|
|
87
|
sub _maximum_arguments { 2 } |
14
|
|
|
|
|
|
|
|
15
|
9
|
|
|
9
|
|
36
|
sub _adds_members { 1 } |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub _potential_value { |
18
|
20
|
|
|
20
|
|
70
|
my $self = shift; |
19
|
20
|
|
|
|
|
56
|
my ($slot_access) = @_; |
20
|
|
|
|
|
|
|
|
21
|
20
|
|
|
|
|
97
|
return '(do { ' |
22
|
|
|
|
|
|
|
. 'my @potential = @{ (' . $slot_access . ') }; ' |
23
|
|
|
|
|
|
|
. 'splice @potential, $_[0], 0, $_[1]; ' |
24
|
|
|
|
|
|
|
. '\@potential; ' |
25
|
|
|
|
|
|
|
. '})'; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
# We need to override this because while @_ can be written to, we cannot write |
29
|
|
|
|
|
|
|
# directly to $_[1]. |
30
|
|
|
|
|
|
|
sub _inline_coerce_new_values { |
31
|
20
|
|
|
20
|
|
39
|
my $self = shift; |
32
|
|
|
|
|
|
|
|
33
|
20
|
100
|
|
|
|
65
|
return unless $self->associated_attribute->should_coerce; |
34
|
|
|
|
|
|
|
|
35
|
4
|
100
|
|
|
|
28
|
return unless $self->_tc_member_type_can_coerce; |
36
|
|
|
|
|
|
|
|
37
|
1
|
|
|
|
|
8
|
return '@_ = ($_[0], $member_coercion->($_[1]));'; |
38
|
|
|
|
|
|
|
}; |
39
|
|
|
|
|
|
|
|
40
|
9
|
|
|
9
|
|
35
|
sub _new_members { '$_[1]' } |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub _inline_optimized_set_new_value { |
43
|
12
|
|
|
12
|
|
35
|
my $self = shift; |
44
|
12
|
|
|
|
|
44
|
my ($inv, $new, $slot_access) = @_; |
45
|
|
|
|
|
|
|
|
46
|
12
|
|
|
|
|
67
|
return 'splice @{ (' . $slot_access . ') }, $_[0], 0, $_[1];'; |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub _return_value { |
50
|
40
|
|
|
40
|
|
93
|
my $self = shift; |
51
|
40
|
|
|
|
|
115
|
my ($slot_access) = @_; |
52
|
|
|
|
|
|
|
|
53
|
40
|
|
|
|
|
196
|
return $slot_access . '->[ $_[0] ]'; |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
4
|
|
|
4
|
|
50
|
no Moose::Role; |
|
4
|
|
|
|
|
11
|
|
|
4
|
|
|
|
|
26
|
|
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
1; |