in reply to Re^3: Difficulty with Object::InsideOut
in thread Difficulty with Object::InsideOut

Howdy!

Actually, I think that Object::InsideOut does manage it, but there is something going on in Set::Scalar that makes the behavior really weird. Set::Scalar does a lot of overloading, and that may be part of the problem. I'm not sure that the problem lies within Object::InsideOut.

Object::InsideOut tries to provide a clean way to drag a "foreign" class into the inheritance tree so that you can freely inherit from non-Object::InsideOut classes. I think I managed to run into a pathological case.

Inside-out objects can, as a general case, be any sort of blessed reference. The key characteristic is that the attributes of the object are not stored in that reference. The ID of the object is not one of the visible attributes, and I think the innards of Object::InsideOut make the referent read-only as well.

Class::InsideOut includes a discussion of what was available on CPAN to support inside-out objects, including brief critical assessments of each, noting strengths and weaknesses. Object::InsideOut fared well, and I don't see this little exercise in digging into packages and experimenting with -MO=concise as contradicting the essence of that.

yours,
Michael
  • Comment on Re^4: Difficulty with Object::InsideOut

Replies are listed 'Best First'.
Re^5: Difficulty with Object::InsideOut
by Anno (Deacon) on Mar 25, 2007 at 20:52 UTC
    Well, I don't want to dissuade you from using Object::InsideOut. It brings a wealth of features whose utility may require a second glance to appreciate.

    I maintain that an inside-out object that touches its body (visibly or not) is in a state of sin. Its class must labor hard for the accomodation of foreign classes, unlike those whose objects are without that sin.

    Anno, who wonders how he gets to express so puritan views

    Update: Minor change in wording