in reply to Re: Problems I've had with array based objects
in thread Problems I've had with array based objects

Did you intend to support multiple inheritance? If so, you need to remove

## create a nicely named index variable ${ref($self) . '::' . $name . '_idx'} = @$self;

Consider the case wheren Bar isa Foo, and where Baz isa Moo and Foo. The index of a particular attribute of Foo is object-specific, but the code to remove behaves as if the index is class-specific.

Replies are listed 'Best First'.
Re^3: Problems I've had with array based objects
by vanishing (Initiate) on Aug 05, 2006 at 03:39 UTC
    Absolutely correct. I didn't like making indexes object specific to begin with, and hence must have gotten ahead of myself. I think the right way to do this would put the indexes into the class namespace, but I was lazy.

    UPDATE: In fact, the same argument means that the accessor/mutator creation won't work either because new objects will clobber the old closures. I think the solution is to make everything package scoped, but clearly I was, in fact, over-simplifying.