Skip Menu |

This queue is for tickets about the perl-ldap CPAN distribution.

Report information
The Basics
Id: 2514
Status: resolved
Priority: 0/
Queue: perl-ldap

People
Owner: Nobody in particular
Requestors: gbarr [...] pobox.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Date: Tue, 6 May 2003 17:04:40 +0100
From: Graham Barr <gbarr [...] pobox.com>
To: bug-perl-ldap [...] rt.cpan.org
Subject: delete values from attributes
----- Forwarded message from Christoph Haas <email@christoph-haas.de> ----- Date: Mon, 17 Feb 2003 00:53:04 +0100 To: perl-ldap-dev@lists.sourceforge.net From: Christoph Haas <email@christoph-haas.de> Subject: delete values from attributes Hi... This posting is dealing with a topic which Todd Rosenberry brought up two weeks ago. He was asking why the delete method of Net::LDAP::Entry can only act on attributes and not specific values. I struggled with this problem for two days. Finally I went mano-a-mano with the spaghetti sources and found out that the delete method can do more than specified in the man page. What I am doing is group based authorisation based on LDAP groups. These groups are "groupOfNames" objects which contain all the users in that group as "member" attributes. That means that there is not only a single (unique) attribute but many. What I needed is to remove a single user from the member attribute list. To cut it short: this is how I did it: $ldap_search->entry->delete ( 'member' , ['cn=username,ou=people,o=company'] ); $ldap_search->entry->update($ldap); Joseph Kezar posted a reply on this topic and was completely right. If you specify a reference to an array like above then the ->delete method treats the deletion completely different and in the end does a modify to remove this value. Suggestion: Please correct the man page because it only says that the syntax is "delete ( [ ATTR [, ATTR2 ... ]] )" which is not complete! Thanks for reading. Christoph -- ~ ~ ".signature" [Modified] 3 lines --100%-- 3,41 All ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf Show quoted text
----- End forwarded message -----