From: Ola Bini Date: 2006-07-28T23:54:16+09:00 Subject: Re: Ruby LDAP --- Hooray!! Francis Cianfrocca wrote: > Ola Bini wrote: > > filters was most inspired. The only missing part is real prefix > notation >> for it, but I guess I can manage without. =) > > Ola, if I understand you correctly, you're looking for standard RFC-2254 > filter syntax. Things like (for example): > (&(objectclass=person)(mail=ola*)) > > If that's what you need, it's there now. Look in the Rdoc for > Net::LDAP::Filter#construct, which will accept a string like the above. > The reason we didn't support the standard filter syntax originally was > because IMHO it sucks :-) and we wanted to give people a better > alternative. The recommended way to do filters in Net::LDAP is with the > original API, but we supported the standard filter-syntax because > several people requested it. > Haha, yes, I know it's there, but not as language syntax. That was the neat part about the filter combinations, IMHO. Regarding the standard LDAP filter syntax... well, I'm an avid Lisp lover, so, me likes it quite much. =) Each to his own. But your version is better from a Ruby perspective, of course. -- Ola Bini (http://ola-bini.blogspot.com) JvYAML, RbYAML, JRuby and Jatha contributor System Developer, Karolinska Institutet (http://www.ki.se) OLogix Consulting (http://www.ologix.com) "Yields falsehood when quined" yields falsehood when quined.