in reply to Moose Accessor Question

I'd write a separate method to add thingies:
package Wibble; use Moose; has 'thingies' => (is => 'rw', isa => 'ArrayRef' default => sub { [] } +); sub add_thingies { my $self = shift; push @{ $self->thingies }, ref $_ ? @$_ : $_ for @_; } package main; my $w = Wibble->new( thingies => [ 'this', 'that' ] ); print join( ", ", @{ $w->thingies() } ) . "\n"; # this, that $w->add_thingies('another'); print join( ", ", @{ $w->thingies() } ) . "\n"; # this, that, another $w->add_thingies('and', [qw/some more/]); print join( ", ", @{ $w->thingies() } ) . "\n"; # this, that, another, + and, some, more


Unless I state otherwise, all my code runs with strict and warnings