On 11/11/04 8:15 pm, Relho de Couro <[EMAIL PROTECTED]> wrote:

> Hi,
> 
> It maybe a simple question. But I'm having some troubles with it.
> I'm using Net::LDAP::Entry and I'm trying to add an attribute with
> multiple values.
> Unfortunately, until now it didn't work out.
> 
> A simple example:
> 
> attr: value1
> attr: value2
> 
> Just calling entry's add method multiple times does not worked out.
> Replace method didn't work out ether.
> 
> Maybe I'm doing something wrong.
> 
> Could someone give me an better idea or exemple on how to solve this problem?

It works for me:

$e = Net::LDAP::Entry->new;
$e->dn("cn=Test User,c=RU");
$e->add("objectclass" => [qw(top person)]);
$e->add("sn" => "User");
$e->add("cn" => "Test User");
$e->add("sn" => "Frob");
$res = $e->update($ldap);

The resulting entry has two values for sn.

Cheers,

Chris


Reply via email to