From: Chris R. <chr...@me...> - 2001-03-28 16:23:55
|
Graham Barr <gb...@po...> wrote: > ----- Forwarded message from S Balasubramaniyan > <sb...@no...> ----- > > Date: Wed, 28 Mar 2001 10:11:41 -0500 > To: "'gb...@po...'" <gb...@po...> > From: "S Balasubramaniyan" <sb...@no...> > Subject: Perl-LDAP-0.22 > X-Mailer: Internet Mail Service (5.5.2653.19) > > Hi Graham, > Iam currently programming with your perl-ldap-0.22 > module , its quite interesting. > But i have a query , does your module support ldap v3 ? > Perhaps mine is just a layman question as i could not run my piece of > code for ldap v3 server. > My piece of code which runs in v2 but not in v3 is : > ========================================= > #!/usr/bin/perl > use Net::LDAP qw(:all); You do not need (or want) to import all the module's symbols. Just do 'use Net::LDAP;' > $ldap = Net::LDAP->new("ldapv2-server") or die "$@"; > $mesg = $ldap->bind; You have not specified what LDAP version to bind with. The default is LDAPv2. You need to specify if you want LDAPv3. I assume the default is LDAPv2 as that is likely to work with more servers. > my $result = $ldap->search ( > base => "o=nortel", > filter => "unique_key=12345", That is not a legal filter that conforms to RFC 2254. At the very least this should be: filter => "(unique_key=12345)", Cheers, Chris |