1 package Moose::Meta::Method::Accessor::Native::Array::sort;
10 with 'Moose::Meta::Method::Accessor::Native::Reader' => {
14 _inline_check_arguments
19 sub _maximum_arguments { 1 }
21 sub _inline_check_arguments {
25 'if (@_ && !Params::Util::_CODELIKE($_[0])) {',
26 $self->_inline_throw_error(
27 '"The argument passed to sort must be a code reference"',
35 my ($slot_access) = @_;
38 . '? sort { $_[0]->($a, $b) } @{ (' . $slot_access . ') } '
39 . ': sort @{ (' . $slot_access . ') }';