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

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

Thread Previous | Thread Next
Graham Barr
April 29, 2003 06:47
Re: Subclass proposal: Net::LDAP::Simple
Message ID:
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* :-)

>      directory servers, but it's a bit overkill when you want to do
>      simple short scripts or have big programs that always do the same
>      job again and again, say: open an authenticated connection to a
>      directory server, search entries against the same attributes each
>      time and in the same way (e.g.: approx search against the three
>      attributes cn, uid and loginname). With Net::LDAP this would mean:

>      All Net::LDAP methods are supported via inheritance. Method specific
>      in Net::LDAP::Simple or that override inherited methods are
>      documented below.

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. It would then also be possible for
your class to use Net::LDAPS by passing an extra arg to new().

Other than that, it seems fine (excluding my own personal reservations
about modules with ::Simple in their name)


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