On Wed, 2005-08-31 at 18:00 -0500, Barrett, John wrote: > More like this: > > use Net::LDAP::Constant; > if ( $mesg->code == LDAP_REFERRAL ) { > foreach my $ref ( $mesg->referrals ) { > . > . > . > > Can Net::LDAP follow referrals automagically? If not why not?
An LDAP referral doesn't say which credentials would work. You'd need a Net::LDAP::Credentials-like thing (that doesn't presently exist) that contained your bind dn/sasl/password/etc for all the LDAP hosts that you communicate with. only then could Net::LDAP follow referrals across-hosts. In the meantime, there's no reason why Net::LDAP couldn't follow referrals back to the same host. They don't happen often, but I suppose it'd be helpful when someone's base=> is broken.