From: Clif H. <cl...@go...> - 2003-03-11 23:03:59
|
On Tue, Mar 11, 2003 at 11:33:27AM +0000, Graham Barr wrote: > On Mon, Mar 10, 2003 at 02:24:58PM -0600, Clif Harden wrote: > > > As Graham wrote: There is nothing to fix. > > > > > > Then there is nothing to fix, I will just chalk it up as another > > inconsistency in perl-ldap. > > It is not an inconsistency. The general rule is that an entry may > be passed wherever a dn is expected. Add is a special case and was > added as a convienience for adding. If you really think this is an > inconsistency then my suggestion would be that add should be changed, > not update. But changing add would break things. > When doing a ldif, either add or modify, a Net::LDAP::Entry object is retrun. Both Net::LDAP::Entry objects have a DN in their data structures. For ldif add; $entry = $ldif->read_entry(); $mesg = $ldap->add($entry); For ldif modify; $entry = $ldif->read_entry(); $mesg = $entry->update($ldap); This is inconsistence, if a Net::LDAP::Entry is return in both cases the actions take on either $entry should be the same. $mesg = $ldap->add($entry); or $mesg = $ldap->modify($entry); or $mesg = $entry->update($ldap); # for both ldif add and modify. This is consistence. However... We now have another inconsistency, it appears a Net::LDAP::Entry is not a Net::LDAP::Entry object depending on where the Net::LDAP::Entry object came from or what is purpose is. > Graham. > Clif |