Hi Hans, On Sunday, 18. December 2005 21:53, [EMAIL PROTECTED] wrote: > attached is Net::LDAP::FilterMatch, a module to match Net::LDAP::Entry > objects against a Net::LDAP::Filter filter. > It can be used to filter out entries from an LDIF, but also as a simple > solution for searching while using Net::LDAP::Server.
I made a few changes to the file you sent. Fixes compared to your version: - conjunctions (&...) and disjunctions (|...) may comprise any number of elements. - characters with special meaning in Perl regexes are quoted in equality and substring filters i.e. "(cn=Peter?)" matches "Peter?" but not "Pete" or "Peter". - Net::LDAP::FilterMatch is now an extension of Net::LDAP::Filter Thus loading Net::LDAP::FilterMatch after Net::LDAP::Filter allows you to write $filter->match($entry) - If possible greateOrEqual and lessOrEqual filters do numerical comparison. See the attached file. If you do not mind I'd like to include it into the perl-ldap SVN so that it will be in the next release. Please test if it still matches your idea how this module should behave. Regards Peter -- Peter Marschall eMail: [EMAIL PROTECTED]
FilterMatch.pm
Description: application/perl-module
