line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Moose::Meta::Method::Accessor::Native::Array::natatime; |
2
|
|
|
|
|
|
|
our $VERSION = '2.2205'; |
3
|
|
|
|
|
|
|
|
4
|
4
|
|
|
4
|
|
2820
|
use strict; |
|
4
|
|
|
|
|
13
|
|
|
4
|
|
|
|
|
134
|
|
5
|
4
|
|
|
4
|
|
23
|
use warnings; |
|
4
|
|
|
|
|
12
|
|
|
4
|
|
|
|
|
121
|
|
6
|
|
|
|
|
|
|
|
7
|
4
|
|
|
4
|
|
28
|
use Params::Util (); |
|
4
|
|
|
|
|
13
|
|
|
4
|
|
|
|
|
103
|
|
8
|
|
|
|
|
|
|
|
9
|
4
|
|
|
4
|
|
25
|
use Moose::Role; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
32
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
with 'Moose::Meta::Method::Accessor::Native::Reader'; |
12
|
|
|
|
|
|
|
|
13
|
19
|
|
|
19
|
|
71
|
sub _minimum_arguments { 1 } |
14
|
|
|
|
|
|
|
|
15
|
19
|
|
|
19
|
|
63
|
sub _maximum_arguments { 2 } |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub _inline_check_arguments { |
18
|
19
|
|
|
19
|
|
39
|
my $self = shift; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
return ( |
21
|
19
|
|
|
|
|
102
|
'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
|
|
50
|
my $self = shift; |
44
|
19
|
|
|
|
|
64
|
my ($slot_access) = @_; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
return ( |
47
|
19
|
|
|
|
|
230
|
'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
|
|
36
|
no Moose::Role; |
|
4
|
|
|
|
|
11
|
|
|
4
|
|
|
|
|
22
|
|
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
1; |