develooper Front page | perl.ldap | Postings from April 2003

Re: Subclass proposal: Net::LDAP::Simple

Thread Previous | Thread Next
From:
Marco Marongiu
Date:
April 29, 2003 08:11
Subject:
Re: Subclass proposal: Net::LDAP::Simple
Message ID:
3EAE9601.2000209@crs4.it
Graham Barr wrote:
> On Mon, Apr 28, 2003 at 12:53:55PM +0200, Marco Marongiu wrote:
> 
>>DESCRIPTION
>>     Net::LDAP::Simple is a simplified interface to the fantastic Graham
>>     Barr's Net::LDAP. Net::LDAP is a great module for working with
> 
> 
> *Blush* :-)

Don't be ashamed about truth :-)

> If there is one thing that concerns me is that it is implemented
> by inheritance.  inheritance is usually, in my experience, used to
> extend functionality of a class. But in this case you are changing
> it. By that I mean you have overridden methods and changed their
> functionality by changing the return type.
> 
> What I would suggest is that the Net::LDAP object become a property
> of your object and not inherit.

That's what I did at first. Then I realized that I needed all functionalities
of Net::LDAP that I didn't reimplement, and I thus had to proxy every unknown
method back to Net::LDAP. That called for my module to be a subclass rather
than a "composition".

> Other than that, it seems fine

Thanks a lot!

> (excluding my own personal reservations
> about modules with ::Simple in their name)

Yep, I know that ;-) Thanks a lot for feedback, and I am looking forward to
hear more

Ciao
--M

-- 
Marco Marongiu                         Email: bronto@crs4.it
CRS4 Research Center                   Phone: +39 070 2796 336
NCS Division                           Fax:   +39 070 2796 216
NSM Group                              WWW: http://bugs.unica.it:4444/




Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About