in reply to Using ArrayRef data members in Moose
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.
|Replies are listed 'Best First'.|
Re^2: Using ArrayRef data members in Moose
by dmorgo (Pilgrim) on Jul 01, 2008 at 22:55 UTC