Hi,

On Wednesday, 20. July 2011, Graham Barr wrote:
> On Jul 20, 2011, at 07:32 , Francis Swasey wrote:
> > On Jul 20, 2011, at 8:26, Chris Ridd <chrisr...@mac.com> wrote:
> >> Graham, should _escape be made public? It seems like it would be useful.
> > Perhaps a flag on the new call that indicates there are no escapes in the
> > string so that the existing \, is not assumed to be a pre-existing
> > escape and the \ gets escaped?
> 
> That would not work consistently. consider (attr=())
> 
> Some guessing would have to go one to know that the first ) needs to be
> escaped
> 
> I think exporting _escape as escape_ldap_filter is the best approach and
> users should use that as they build their filters

What about using the documented functions in Net::LDAP::Util ?
* escape_filter_value()
* unescape_filter_value()

And for DNs the equivalents
* escape_dn_value()
* unescape_dn_value()

Best regards
Peter

-- 
Peter Marschall
pe...@adpm.de

Reply via email to