Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^3: New Module Announcement: Object::InsideOut

by diotalevi (Canon)
on Nov 03, 2005 at 21:28 UTC ( #505518=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://505518]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2016-10-01 20:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?






    Results (7 votes). Check out past polls.