bmillares wrote:
> I've been working on a module that provides encapsulation, inheritance
> and strong typing.  I know there are several OO frameworks already in
> CPAN, but I have not seen any that implements the OO principles that
> strictly.   The module I'm proposing will provided private, protected
> and public methods and properties.  It will also implement the concept
> of virtual methods as in C#, and only methods marked as such can be
> overridden
> by the children.

Check out Object::InsideOut.  It does most of this already:
    Encapsulation - yes
    Inheritance   - yes
    Strong typing - ready-made and user-definable type-checking is supported
    Private, protected and public methods - yes
    Private, protected and public properties
        (I assume you mean accessors) - yes

> Another key piece of functionality is that when a method is overridden
> by a child,  from the perspective of the parent the method behaves as
> the original method did and the new method or property is only
> available from the child down.  Also private properties and method are
> only visible in the class the implements them and the children are
> free to use the same names without the problem of collisions or
> overriding those entities.

OIO does these.

> In order to make use of the functionality of the proposed module a
> perl developer would simply have to inherit from the proposed module
> and use function attributes to mark the functions as a properties or
> methods and whether they are private, protected or public.

OIO does this.

> Functions
> marked as properties will be used for defining the property type and
> how to handle gets and set

OIO does this.

> within a tied hash which will be to object core structure.

OIO uses lexical structures for object data.  See docs.

> Most of the overhead associated with enforcing the
> encapsulation will take place during the CHECK phase and when classes
> are instantiated, from there on they work off dispatch tables which
> should be pretty fast.  The biggest benefit would be for those folks
> working under mod_perl as they will compile once and use many times.

The CHECK phase doesn't work with mod_perl.  OIO does handle this and
is mod_perl compatible.

> Sorry for the rant, but I was wondering if there is any interest out
> there for such a animal.  If there is please let me know and I will
> post the module for peer review.

If you take a look at OIO, perhaps you could give me some feedback for
features you feel might be beneficial to add.  Thanks.

Reply via email to