From: Graham B. <gb...@po...> - 2000-07-27 12:51:13
|
On Thu, Jul 27, 2000 at 01:21:47PM +0100, John Berthels wrote: > On Thu, 27 Jul 2000, Graham Barr wrote: > > > > I can't think of a simple and portable way to do this in LDAPv2. > > > > You mean instead of deliberatly sending a malformed packet and expecting > > an error response. But thats probbaly too evil :) > > Heh. I didn't have the gall to suggest that. > > You could do something like issue a hopefully-low-impact search request. > (scope=single entry, pick a base, have an explicit filter > (cn=hopedoesntexist), ask for only 'cn' attribute back). But it still > feels icky. I suppose the question is "what is the result of ping supposed to mean" If it just means the tcp connection is still alive then we can do anything. But I suspect people want it to look at the result code to determine if the server has decided to refuse to process requests or something. > On the issue of 'layers over Net::LDAP', I must have missed the "we don't > want sizelimit etc. management". Is there a real desire for a more > 'cooked' API? (I quite like the current one...). Things like > $ldap->exists( $dn ) might be nice though. > > Whether that API lived in the Net::LDAP namespace/bundle or elsewhere > shouldn't be relevant to what it could do - what do people want? Do we > want a Net::LDAP::Cooked or Net::LDAPCooked module? If so what kind of > features would people want? I am happy with the idea, but yes the question of where does arise. Although do they have to be methods ? We could just add functions to ::Util that accept $ldap as the first argument. But I suspect people will want a sub-class. Alternatively they could be added to Net::LDAP and would could AUTOLOAD them. But then we really need to ask the question "what do they return?" If in the exists example it returns a boolean, then it is limited to being used in a sync mode. Although I am sure we could do something with ::Message to allow hooks to analyse results. I would certainly invite discussion on the subject of adding extensions to Net::LDAP Graham. > jb > > > |