line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Moose::Meta::Method::Accessor::Native::Array::natatime; |
2
|
|
|
|
|
|
|
our $VERSION = '2.2206'; |
3
|
|
|
|
|
|
|
|
4
|
4
|
|
|
4
|
|
2574
|
use strict; |
|
4
|
|
|
|
|
14
|
|
|
4
|
|
|
|
|
147
|
|
5
|
4
|
|
|
4
|
|
26
|
use warnings; |
|
4
|
|
|
|
|
11
|
|
|
4
|
|
|
|
|
113
|
|
6
|
|
|
|
|
|
|
|
7
|
4
|
|
|
4
|
|
22
|
use Params::Util (); |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
72
|
|
8
|
|
|
|
|
|
|
|
9
|
4
|
|
|
4
|
|
21
|
use Moose::Role; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
31
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
with 'Moose::Meta::Method::Accessor::Native::Reader'; |
12
|
|
|
|
|
|
|
|
13
|
19
|
|
|
19
|
|
68
|
sub _minimum_arguments { 1 } |
14
|
|
|
|
|
|
|
|
15
|
19
|
|
|
19
|
|
65
|
sub _maximum_arguments { 2 } |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub _inline_check_arguments { |
18
|
19
|
|
|
19
|
|
55
|
my $self = shift; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
return ( |
21
|
19
|
|
|
|
|
81
|
'if (!defined($_[0]) || $_[0] !~ /^\d+$/) {', |
22
|
|
|
|
|
|
|
$self->_inline_throw_exception( InvalidArgumentToMethod => |
23
|
|
|
|
|
|
|
'argument => $_[0],'. |
24
|
|
|
|
|
|
|
'method_name => "natatime",'. |
25
|
|
|
|
|
|
|
'type_of_argument => "integer",'. |
26
|
|
|
|
|
|
|
'type => "Int",'. |
27
|
|
|
|
|
|
|
'argument_noun => "n value"', |
28
|
|
|
|
|
|
|
) . ';', |
29
|
|
|
|
|
|
|
'}', |
30
|
|
|
|
|
|
|
'if (@_ == 2 && !Params::Util::_CODELIKE($_[1])) {', |
31
|
|
|
|
|
|
|
$self->_inline_throw_exception( InvalidArgumentToMethod => |
32
|
|
|
|
|
|
|
'argument => $_[1],'. |
33
|
|
|
|
|
|
|
'method_name => "natatime",'. |
34
|
|
|
|
|
|
|
'type_of_argument => "code reference",'. |
35
|
|
|
|
|
|
|
'type => "CodeRef",'. |
36
|
|
|
|
|
|
|
'ordinal => "second"', |
37
|
|
|
|
|
|
|
) . ';', |
38
|
|
|
|
|
|
|
'}', |
39
|
|
|
|
|
|
|
); |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub _inline_return_value { |
43
|
19
|
|
|
19
|
|
87
|
my $self = shift; |
44
|
19
|
|
|
|
|
67
|
my ($slot_access) = @_; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
return ( |
47
|
19
|
|
|
|
|
273
|
'my $step = $_[0];', |
48
|
|
|
|
|
|
|
'my @values = @{ (' . $slot_access . ') };', |
49
|
|
|
|
|
|
|
'my $iter = sub { splice @values, 0, $step };', |
50
|
|
|
|
|
|
|
'if ($_[1]) {', |
51
|
|
|
|
|
|
|
'while (my @vals = $iter->()) {', |
52
|
|
|
|
|
|
|
'$_[1]->(@vals);', |
53
|
|
|
|
|
|
|
'}', |
54
|
|
|
|
|
|
|
'}', |
55
|
|
|
|
|
|
|
'else {', |
56
|
|
|
|
|
|
|
'return $iter;', |
57
|
|
|
|
|
|
|
'}', |
58
|
|
|
|
|
|
|
); |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
# Not called, but needed to satisfy the Reader role |
62
|
|
|
|
0
|
|
|
sub _return_value { } |
63
|
|
|
|
|
|
|
|
64
|
4
|
|
|
4
|
|
38
|
no Moose::Role; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
32
|
|
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
1; |