1 package Moose::Meta::Method::Accessor::Native::Array::first;
11 with 'Moose::Meta::Method::Accessor::Native::Reader' => {
16 _inline_check_arguments
21 sub _minimum_arguments { 1 }
23 sub _maximum_arguments { 1 }
25 sub _inline_check_arguments {
29 'if (!Params::Util::_CODELIKE($_[0])) {',
30 $self->_inline_throw_error(
31 '"The argument passed to first must be a code reference"',
39 my ($slot_access) = @_;
41 return '&List::Util::first($_[0], @{ (' . $slot_access . ') })';