1 package Moose::Meta::Method::Accessor::Native::Array::sort_in_place;
8 our $VERSION = '1.9900';
9 $VERSION = eval $VERSION;
10 our $AUTHORITY = 'cpan:STEVAN';
14 with 'Moose::Meta::Method::Accessor::Native::Array::Writer' => {
18 _inline_check_arguments
24 sub _maximum_arguments { 1 }
26 sub _inline_check_arguments {
30 'if (@_ && !Params::Util::_CODELIKE($_[0])) {',
31 $self->_inline_throw_error(
32 '"The argument passed to sort_in_place must be a code '
39 sub _adds_members { 0 }
41 sub _potential_value {
43 my ($slot_access) = @_;
46 . '? sort { $_[0]->($a, $b) } @{ (' . $slot_access . ') } '
47 . ': sort @{ (' . $slot_access . ') } ]';
50 sub _return_value { '' }