OK, as add is different. Anyone want to write a patch that clarifies the docs ?
Graham.
On Mon, Apr 23, 2001 at 09:36:02PM +0200, Roland Stigge wrote:
>
> Hi,
>
> OK, thanks. But I don't understand, why $ldap->add($entry) works just right, not only
> with dn, but with complete attributes of $entry. "add" is documented the same way as
> "modify".
>
> ---- Original Message ----
> From: Graham Barr
> Date: Mon 4/23/01 20:08
> To: Roland Stigge
> Cc: per...@li...
> Subject: Re: Net::LDAP->modify
>
> 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.
>
>
|