http://qs1969.pair.com?node_id=624461


in reply to Re^2: RFC: Alter - Perl extension for Alter Ego Objects
in thread RFC: Alter - Perl extension for Alter Ego Objects

It is really common for interesting objects to compile their own accessors. If you require that and break on things compiled in the "wrong" class, much of CPAN is in a world of hurt if applied to your code.

⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

  • Comment on Re^3: RFC: Alter - Perl extension for Alter Ego Objects

Replies are listed 'Best First'.
Re^4: RFC: Alter - Perl extension for Alter Ego Objects
by Anno (Deacon) on Jul 02, 2007 at 15:39 UTC
    I don't understand.

    An object from a given class (which doesn't know about alter egos) will continue to access the object body (if that's what it does) with no interference. If an Alter-based class initializes and uses that object, a corona of alter egos will be attached for the Alter-based class(es) to use. The original class will know nothing about that and continue doing what it did all along.

    Where's the problem?

    Anno

    Update: I'm not trying to make old code use the alter technique, that's the next stage :)