From: Chris R. <chr...@me...> - 2002-06-25 08:03:01
|
On 24/6/02 10:44 pm, Adriano Nagelschmidt Rodrigues <an...@es...> wrote: > Hi, > > I'm trying to delete a specific value from an attribute's list of > values, but if I understood the man page correctly, it looks like > Net::LDAP::Entry doesn't support it directly... > > Should I do something like > > @values = $entry->get_value('foo'); > $entry->delete('foo'); > @values = grep { ! /^bar$/ } @values; > $entry->add(foo => \@values); We changed the documentation recently in CVS to describe the delete method more clearly. To delete an entire attribute: $ldap->delete( 'foo' ) That's just syntactic sugar though. More generally you can do this to delete an entire attribute: $ldap->delete( 'foo' => [ ] ) To delete one value of an attribute: $ldap->delete( 'bar' => [ 'delete me' ] ) You can have combinations of the more general cases: $ldap->delete( 'foo' => [ ], 'bar' => [ 'delete me' ]) Cheers, Chris |