This isn't really a Moose issue, it's a Perl one. push and pop must take an array, not an array reference. So you'll need to dereference the arrayref to use those functions on it. You could easily add a method to wrap push and pop, but that seems kinda lame.
There's MooseX::AttributeHelpers::Collection::Array, which certainly sounds like it would be useful, but it beats the hell outta me what it does. Unfortunately I'm quite the Moose n00b myself.
In reply to Re: Using ArrayRef data members in Moose
by friedo
in thread Using ArrayRef data members in Moose
by dmorgo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |