line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Moose::Meta::Method::Accessor::Native::Array::insert; |
2
|
|
|
|
|
|
|
our $VERSION = '2.2203'; |
3
|
|
|
|
|
|
|
|
4
|
4
|
|
|
4
|
|
2432
|
use strict; |
|
4
|
|
|
|
|
12
|
|
|
4
|
|
|
|
|
123
|
|
5
|
4
|
|
|
4
|
|
21
|
use warnings; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
102
|
|
6
|
|
|
|
|
|
|
|
7
|
4
|
|
|
4
|
|
21
|
use Moose::Role; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
30
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
with 'Moose::Meta::Method::Accessor::Native::Array::Writer'; |
10
|
|
|
|
|
|
|
|
11
|
20
|
|
|
20
|
|
104
|
sub _minimum_arguments { 2 } |
12
|
|
|
|
|
|
|
|
13
|
20
|
|
|
20
|
|
74
|
sub _maximum_arguments { 2 } |
14
|
|
|
|
|
|
|
|
15
|
9
|
|
|
9
|
|
33
|
sub _adds_members { 1 } |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub _potential_value { |
18
|
20
|
|
|
20
|
|
46
|
my $self = shift; |
19
|
20
|
|
|
|
|
81
|
my ($slot_access) = @_; |
20
|
|
|
|
|
|
|
|
21
|
20
|
|
|
|
|
81
|
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
|
|
47
|
my $self = shift; |
32
|
|
|
|
|
|
|
|
33
|
20
|
100
|
|
|
|
55
|
return unless $self->associated_attribute->should_coerce; |
34
|
|
|
|
|
|
|
|
35
|
4
|
100
|
|
|
|
22
|
return unless $self->_tc_member_type_can_coerce; |
36
|
|
|
|
|
|
|
|
37
|
1
|
|
|
|
|
7
|
return '@_ = ($_[0], $member_coercion->($_[1]));'; |
38
|
|
|
|
|
|
|
}; |
39
|
|
|
|
|
|
|
|
40
|
9
|
|
|
9
|
|
32
|
sub _new_members { '$_[1]' } |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub _inline_optimized_set_new_value { |
43
|
12
|
|
|
12
|
|
21
|
my $self = shift; |
44
|
12
|
|
|
|
|
31
|
my ($inv, $new, $slot_access) = @_; |
45
|
|
|
|
|
|
|
|
46
|
12
|
|
|
|
|
62
|
return 'splice @{ (' . $slot_access . ') }, $_[0], 0, $_[1];'; |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
sub _return_value { |
50
|
40
|
|
|
40
|
|
67
|
my $self = shift; |
51
|
40
|
|
|
|
|
76
|
my ($slot_access) = @_; |
52
|
|
|
|
|
|
|
|
53
|
40
|
|
|
|
|
150
|
return $slot_access . '->[ $_[0] ]'; |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
4
|
|
|
4
|
|
32
|
no Moose::Role; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
35
|
|
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
1; |