in reply to Best way to do Mixin Class

there seem to be lots of ways to implement a Mixin pattern. ... Basically, I want to turn groups of methods on/off, but share the same data in the blessed reference

You are using "mixin" in a way I'm not familiar with. The term originally predated languages that supported interfaces (like Java), and meant to "mix in" methods from one class hierarchy into another so that two objects could be used interchangeably in a particular context (i.e., to fake an interface, without the benefit of multiple inheritance). Perhaps the meaning has changed. Do you have a reference you could point me toward to describe the "mixin pattern"?

Replies are listed 'Best First'.
Re: Re: Best way to do Mixin Class
by jcupp (Acolyte) on Apr 16, 2002 at 07:04 UTC
    ...because I'm using the wrong words. Whatever it's called, I need to allow/disallow (turn on/off) methods based on a "role" property of the class, for example: a publisher vs. browser vs. admin role for editing, viewing, and everything for a database API. I think I'll just modify @ISA run-time, that seems to be the easiest answer.