http://www.perlmonks.org?node_id=505518


in reply to Re^2: New Module Announcement: Object::InsideOut
in thread New Module Announcement: Object::InsideOut

If you treat the scalar as an opaque object, store nothing inside it and use overload::StrVal as the key instead, you can allow ${} to be overloaded as well. Data::Postponed uses blessed scalars as the object and allows anything what so ever to be overloaded.
  • Comment on Re^3: New Module Announcement: Object::InsideOut

Replies are listed 'Best First'.
Re^4: New Module Announcement: Object::InsideOut
by jdhedden (Deacon) on Nov 04, 2005 at 13:11 UTC
    Then you are back to the same performance problems encountered with Class::Std, namely you have to calculate the object ID on every access.

    It is an engineering trade-off that I feel is more than justified. By storing the object ID in the object's scalar, the only thing you give up is the capability to overload the ${} operator.


    Remember: There's always one more bug.

      And the ability to subclass foreign code without knowing about its implementation.

      Makeshifts last the longest.

        [You also give up] the ability to subclass foreign code without knowing about its implementation.
        As of v1.18, Object::InsideOut supports inheritance (i.e., sub-classing) of non-inside-out object classes.

        Remember: There's always one more bug.