line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Moose::Meta::Method::Accessor::Native::Array::first_index; |
2
|
|
|
|
|
|
|
our $VERSION = '2.2205'; |
3
|
|
|
|
|
|
|
|
4
|
3
|
|
|
3
|
|
2197
|
use strict; |
|
3
|
|
|
|
|
9
|
|
|
3
|
|
|
|
|
105
|
|
5
|
3
|
|
|
3
|
|
17
|
use warnings; |
|
3
|
|
|
|
|
20
|
|
|
3
|
|
|
|
|
93
|
|
6
|
|
|
|
|
|
|
|
7
|
3
|
|
|
3
|
|
34
|
use Params::Util (); |
|
3
|
|
|
|
|
8
|
|
|
3
|
|
|
|
|
132
|
|
8
|
|
|
|
|
|
|
|
9
|
3
|
|
|
3
|
|
22
|
use Moose::Role; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
24
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
with 'Moose::Meta::Method::Accessor::Native::Reader'; |
12
|
|
|
|
|
|
|
|
13
|
17
|
|
|
17
|
|
60
|
sub _minimum_arguments { 1 } |
14
|
|
|
|
|
|
|
|
15
|
17
|
|
|
17
|
|
70
|
sub _maximum_arguments { 1 } |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub _inline_check_arguments { |
18
|
17
|
|
|
17
|
|
41
|
my $self = shift; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
return ( |
21
|
17
|
|
|
|
|
63
|
'if (!Params::Util::_CODELIKE($_[0])) {', |
22
|
|
|
|
|
|
|
$self->_inline_throw_exception( InvalidArgumentToMethod => |
23
|
|
|
|
|
|
|
'argument => $_[0],'. |
24
|
|
|
|
|
|
|
'method_name => "first_index",'. |
25
|
|
|
|
|
|
|
'type_of_argument => "code reference",'. |
26
|
|
|
|
|
|
|
'type => "CodeRef",', |
27
|
|
|
|
|
|
|
) . ';', |
28
|
|
|
|
|
|
|
'}', |
29
|
|
|
|
|
|
|
); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub _inline_return_value { |
33
|
17
|
|
|
17
|
|
43
|
my $self = shift; |
34
|
17
|
|
|
|
|
63
|
my ($slot_access) = @_; |
35
|
|
|
|
|
|
|
|
36
|
17
|
|
|
|
|
189
|
return join '', |
37
|
|
|
|
|
|
|
'my @values = @{ (' . $slot_access . ') };', |
38
|
|
|
|
|
|
|
'my $f = $_[0];', |
39
|
|
|
|
|
|
|
'foreach my $i ( 0 .. $#values ) {', |
40
|
|
|
|
|
|
|
'local *_ = \\$values[$i];', |
41
|
|
|
|
|
|
|
'return $i if $f->();', |
42
|
|
|
|
|
|
|
'}', |
43
|
|
|
|
|
|
|
'return -1;'; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
# Not called, but needed to satisfy the Reader role |
47
|
|
|
|
0
|
|
|
sub _return_value { } |
48
|
|
|
|
|
|
|
|
49
|
3
|
|
|
3
|
|
29
|
no Moose::Role; |
|
3
|
|
|
|
|
9
|
|
|
3
|
|
|
|
|
20
|
|
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
1; |