Skip Menu |

This queue is for tickets about the perl-ldap CPAN distribution.

Report information
The Basics
Id: 36424
Status: resolved
Priority: 0/
Queue: perl-ldap

People
Owner: Nobody in particular
Requestors: as [...] elsewise.de
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Net::LDAP::FilterMatch does not work for substring searches
Date: Wed, 04 Jun 2008 08:13:56 +0200
To: bug-perl-ldap [...] rt.cpan.org
From: as [...] elsewise.de
Perl Module: Net::LDAP::FilterMatch v0.17 (from perl-ldap-0.36) Perl Version: v5.8.8 Problem Description: It seems, that Net::LDAP::FilterMatch does not work with substring searches. The sample code in the perldoc: -------snip------- #!/usr/bin/perl use strict; use Net::LDAP::Entry; use Net::LDAP::Filter; use Net::LDAP::FilterMatch; my $entry = new Net::LDAP::Entry; $entry->dn("cn=dummy entry"); $entry->add ( 'cn' => 'dummy entry', 'street' => [ '1 some road','nowhere' ] ); my @filters = (qw/(cn=dummy*) (ou=*) (&(cn=dummy*)(street=*road)) (&(cn=dummy*)(!(street=nowhere)))/); for (@filters) { my $filter = Net::LDAP::Filter->new($_); print $_,' : ', $filter->match($entry) ? 'match' : 'no match' ,"\n"; } -------snip------- results in: (cn=dummy*) : no match (ou=*) : no match (&(cn=dummy*)(street=*road)) : no match (&(cn=dummy*)(!(street=nowhere))) : no match Equality and Presence work fine. It would be very fine, if this could be fixed. Net::LDAP::FilterMatch is a very useful module. Anyway I'd like to thank you for the very great Net::LDAP Framework. Regards, Alex