1 package Moose::Meta::Method::Accessor::Native::Array::reduce;
9 our $VERSION = '1.9900';
10 $VERSION = eval $VERSION;
11 our $AUTHORITY = 'cpan:STEVAN';
15 with 'Moose::Meta::Method::Accessor::Native::Reader' => {
20 _inline_check_arguments
25 sub _minimum_arguments { 1 }
27 sub _maximum_arguments { 1 }
29 sub _inline_check_arguments {
33 'if (!Params::Util::_CODELIKE($_[0])) {',
34 $self->_inline_throw_error(
35 '"The argument passed to reduce must be a code reference"',
43 my ($slot_access) = @_;
45 return 'List::Util::reduce { $_[0]->($a, $b) } @{ (' . $slot_access . ') }';