1 package Moose::Meta::Method::Accessor::Native::Array::first;
9 $VERSION = eval $VERSION;
10 our $AUTHORITY = 'cpan:STEVAN';
14 with 'Moose::Meta::Method::Accessor::Native::Reader' => {
19 _inline_check_arguments
24 sub _minimum_arguments { 1 }
26 sub _maximum_arguments { 1 }
28 sub _inline_check_arguments {
31 return $self->_inline_throw_error(
32 q{'The argument passed to first must be a code reference'})
33 . q{if $_[0] && ( ref $_[0] || q{} ) ne 'CODE';};
38 my $slot_access = shift;
40 return "&List::Util::first( \$_[0], \@{ ${slot_access} } )";