line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Moose::Meta::Method::Accessor::Native::Array::natatime; |
2
|
|
|
|
|
|
|
our $VERSION = '2.2203'; |
3
|
|
|
|
|
|
|
|
4
|
4
|
|
|
4
|
|
2303
|
use strict; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
128
|
|
5
|
4
|
|
|
4
|
|
23
|
use warnings; |
|
4
|
|
|
|
|
15
|
|
|
4
|
|
|
|
|
104
|
|
6
|
|
|
|
|
|
|
|
7
|
4
|
|
|
4
|
|
18
|
use Params::Util (); |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
79
|
|
8
|
|
|
|
|
|
|
|
9
|
4
|
|
|
4
|
|
27
|
use Moose::Role; |
|
4
|
|
|
|
|
14
|
|
|
4
|
|
|
|
|
26
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
with 'Moose::Meta::Method::Accessor::Native::Reader'; |
12
|
|
|
|
|
|
|
|
13
|
19
|
|
|
19
|
|
55
|
sub _minimum_arguments { 1 } |
14
|
|
|
|
|
|
|
|
15
|
19
|
|
|
19
|
|
59
|
sub _maximum_arguments { 2 } |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub _inline_check_arguments { |
18
|
19
|
|
|
19
|
|
43
|
my $self = shift; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
return ( |
21
|
19
|
|
|
|
|
65
|
'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
|
|
40
|
my $self = shift; |
44
|
19
|
|
|
|
|
47
|
my ($slot_access) = @_; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
return ( |
47
|
19
|
|
|
|
|
213
|
'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
|
|
32
|
no Moose::Role; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
23
|
|
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
1; |