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

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

Thread Previous | Thread Next
Marco Marongiu
April 29, 2003 08:11
Re: Subclass proposal: Net::LDAP::Simple
Message ID:
Graham Barr wrote:
> On Mon, Apr 28, 2003 at 12:53:55PM +0200, Marco Marongiu wrote:
>>     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


Marco Marongiu                         Email:
CRS4 Research Center                   Phone: +39 070 2796 336
NCS Division                           Fax:   +39 070 2796 216
NSM Group                              WWW:

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About