Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: Using ArrayRef data members in Mooseby friedo (Prior) |
on Jul 01, 2008 at 21:55 UTC ( [id://695037]=note: print w/replies, xml ) | Need Help?? |
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 Section
Seekers of Perl Wisdom
|
|