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 | |
by karavelov (Monk) on Jul 01, 2008 at 23:38 UTC | |
by stvn (Monsignor) on Jul 03, 2008 at 02:40 UTC | |
by dmorgo (Pilgrim) on Jul 05, 2008 at 03:28 UTC |