From: Mark W. <mew...@un...> - 2001-01-18 21:32:19
|
Delete occurs as a modify: Like this: $ldap->modify( $dn, delete => { 'telephoneNumber' => '911' }); would delete the telephonenumber of 911 but it would leave the rest alone. As for adds lets say you have an attribute of cn. It has values of Mark Wilcox and Mark E. Wilcox . You want to add Mark Edward Wilcox. This is how you would do it: $ldap->modify( $dn, add => { 'cn' => 'Mark Edward Wilcox' }); Now if those are not working (I imagine we'd have heard by now). Do the following: 1) make sure you're not using Perl 5.6. There are bugs in 5.6 that cause Net::LDAP problems. 2) send the output of $ldap->debug(3) to the list. Mark Brian O'Neill wrote: > On Wed, 17 Jan 2001, Mark Wilcox wrote: > > > if you delete with a specific value then it will delete that particular > > value. If you do a replace and only give a single value, it will replace > > all of the values with that value. > > > > This does not appear to be true. > > The delete() method does not appear to accept a value, only an attribute > (or attributes). Attempting to specify one results in an execution error: > > Can't use string ("directcustomer") as an ARRAY ref while "strict refs" in > use at /usr/local/lib/perl5/site_perl/5.005/Net/LDAP/Entry.pm line 179. > > Using replace() does indeed replace all values, but I want to add/delete > specific values. > > > An add simply adds the value to the existing values. > > This appears to have zero effect, at least as far as the output from > write_cmd() is concerned. > > -- > ====================================================================== > Brian O'Neill @ home on...@oi... > At work I'm: on...@co... |