Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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
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 contemplating the Monastery: (9)
As of 2014-12-20 04:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (95 votes), past polls