I have a Moose class with an attribute that is an ArrayRef (read-only) and is manipulated internally by the object. But when someone calls the accessor method I want it to return an Array (or list) not a reference. Not only would this cut down on the amount of dereferencing that the user of the class has to do, but it will mean they can't accidentally tamper with the same ref that my object is using.
So what's the best way to do this? Some sort of coercion?