# Done with `auto_deref => 1` @list = $obj-> prop; # Done with a custom writer attribute that takes an array, and stores a reference to it. # internally Moose uses a plain perl hash (most complex datastructure in perl), this # limits it to not having true non-array properties (but a scalar array-ref works) $obj->prop(@list); # assuming you mean $arrayRef # Here the getter would have to call wantarray() which is exactly what auto_deref => 1 # will set up for you. $array = $obj->prop; # assuming you mean $arrayRef, this already works so long as the type is ArrayRef # or, a parent thereof. $obj->prop($array); #### sub foo_writer { if ( length @_ > 1 ) { \@_ } else { die 'invalid arg' unless ref $_[0] eq 'ARRAY'; $_[0]; } }