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