Having trouble figuring out the syntax (which I'm sure is obvious and I'm stupid) for pushing to a Moose array. This is a continuation of this question. it seems to me that I need to more than a simple value for my specific case. Trying to implement it using a Moose-ish way (maybe that's wrong?) but I'm obviously not doing it right.
use Moose::Role;
has 'tid_stack' => (
traits => ['Array'],
is => 'rw',
isa => 'ArrayRef[Str]',
default => sub { [] },
);
around 'process' => sub {
my $orig = shift;
my $self = shift;
my ( $template ) = @_;
$self->tid_stack->push( get_hrtid( $template ) );
$self->$orig(@_)
};