in reply to Re: Difficulty with Object::InsideOut
in thread Difficulty with Object::InsideOut
Object::InsideOut uses lexical arrays to store attribute values, so it needs to store the array index somewhere. The "inside-outness" comes from the fact that even if you know the index, you can't get to the arrays to break encapsulation. That doesn't violate "inside-outness".
I was trying to use the ability to have a class inherit from a foreign (non-Object::InsideOut) package. In this case, I'm wrapping a Set::Scalar::Valued object, and I want a Morsulus::Catalog::SetOf object to be able to inherit the methods from Set::Scalar::Valued. According to the docs for Object::InsideOut, I simply call the inherit method and pass it an instance of the foreign object. In my example, I'm also going so far as to keep that object as an attribute of my SetOf object.
I elected to try Object::InsideOut because it offers a richer set of features than Class::InsideOut, and it's not doing things that Class::Std does that have bad implications (CHECK blocks come to mind as potentially problematic).
Oh, and I looked at the test suite for Object::InsideOut to see how it tests the foreign inheritance functionality. I don't see the difference, and I can't discern just what additional arguments inherit is expecting.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Difficulty with Object::InsideOut
by Anno (Deacon) on Mar 25, 2007 at 01:52 UTC | |
by herveus (Prior) on Mar 25, 2007 at 16:20 UTC | |
by Anno (Deacon) on Mar 25, 2007 at 20:52 UTC |