1 package Moose::Meta::Method::Accessor::Native::Array::reduce;
11 with 'Moose::Meta::Method::Accessor::Native::Reader';
13 sub _minimum_arguments { 1 }
15 sub _maximum_arguments { 1 }
17 sub _inline_check_arguments {
21 'if (!Params::Util::_CODELIKE($_[0])) {',
22 $self->_inline_throw_error(
23 '"The argument passed to reduce must be a code reference"',
31 my ($slot_access) = @_;
33 return 'List::Util::reduce { $_[0]->($a, $b) } @{ (' . $slot_access . ') }';