1 package Moose::Meta::Method::Accessor::Native::Array::sort_in_place;
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 {
29 return $self->_inline_throw_error(
30 q{'The argument passed to sort_in_place must be a code reference'})
31 . q{ if @_ && ! Params::Util::_CODELIKE( $_[0] );};
34 sub _adds_members { 0 }
36 sub _potential_value {
37 my ( $self, $slot_access ) = @_;
40 "[ \$_[0] ? sort { \$_[0]->( \$a, \$b ) } \@{ ($slot_access) } : sort \@{ ($slot_access) } ]";
43 sub _return_value { return q{} }