[Date Prev][Date Next] [Chronological] [Thread] [Top]

OpenLDAP and Net::LDAP (perl)



Hi,

Is anyone out there using Perl and Net::LDAP to talk to their OpenLDAP server?

I have OpenLDAP (stable tag via CVS) with a few objects in the slapd database.
I can query just fine using ldapsearch:

	ldapsearch -b "o=AustLII, c=AU" -p 2710 'objectclass=*'

But when using Net::LDAP in Perl I get nothing:

	use Net::LDAP;
	my $ldap = new Net::LDAP ('localhost', port => 2710 ) || die "ldap: $!";
	$ldap->bind() || die "bind: $!";
	my $res $ldap->search( base => 'o=AustLII, c=AU",
		filter=>'objectclass=*' );

The "code" that is returned ($res->code) is 32 -- but no error message appears
to be associated with it. 

Is anyone using Perl to talk to OpenLDAP -- which Perl module? I know there
are a few. Any ideas on what might be wrong with my use of Net::LDAP? When I
use Net::LDAP's examples, everything works fine.

Dan
-- 
Daniel Austin (dan@austlii.edu.au)
Primary Materials and Programming Support, AustLII