1 package Moose::Meta::Method::Accessor::Native::Array::sort;
8 our $AUTHORITY = 'cpan:STEVAN';
12 with 'Moose::Meta::Method::Accessor::Native::Reader' => {
16 _inline_check_arguments
21 sub _maximum_arguments { 1 }
23 sub _inline_check_arguments {
27 'if (@_ && !Params::Util::_CODELIKE($_[0])) {',
28 $self->_inline_throw_error(
29 '"The argument passed to sort must be a code reference"',
37 my ($slot_access) = @_;
40 . '? sort { $_[0]->($a, $b) } @{ (' . $slot_access . ') } '
41 . ': sort @{ (' . $slot_access . ') }';