From: Graham B. <gb...@po...> - 2001-04-23 18:05:20
|
On Mon, Apr 23, 2001 at 12:01:22PM +0200, Roland Stigge wrote: > Hi, > > another one: > > I'm trying to modify: > > this works: > ----- > $mesg = $ldap->modify("cn=onemore,o=epigenomics", > replace => {'sn' => 'Jackson'}); > print "code: ",$mesg->code,"\nerror: ",$mesg->error,"\n"; > ----- > > but this way (another documented way for performing that): > ----- > # ... binding ... > > $entry = Net::LDAP::Entry->new; > $entry->dn("cn=onemore,o=epigenomics"); > $entry->replace("sn" => "Jackson"); > $mesg=$ldap->modify($entry); > print "code: ",$mesg->code,"\nerror: ",$mesg->error,"\n"; > ----- Actually the docs are bit ambigious here. But I would say that this is not documented to work as you expect here. Although what should work, and is documented is $entry->update($ldap); The docs should clarify that if an Entry is passed as the DN only the DN is extracted from it. This is the same for ant Net::LDAP method. Graham. |