From: Graham B. <gb...@po...> - 2000-11-06 21:22:19
|
----- Forwarded message from Marco Marongiu <br...@cr...> ----- Date: Mon, 06 Nov 2000 09:40:01 +0100 From: Marco Marongiu <br...@cr...> X-Mailer: Mozilla 4.61 [en] (X11; I; SunOS 5.7 sun4u) To: gb...@po... Subject: About Net::LDAP versions 1.19-1.22 Dear Mr. Barr My name is Marco Marongiu, I am a perl ``programmer'' from Italy :-) I've been working on a web interface for some services on a directory server based on OpenLDAP 1.2.11 on Debian GNU/Linux 2.11 and SUN Solaris 7 platforms. I had really big problems in deleting attributes from entries. Since in documentation I read modify ( DN, OPTIONS ) Modify the contents of DN on the server. DN May be a string or a Net::LDAP::Entry object. [...] add The add option should be a reference to a HASH. The values of the HASH are the attributes to add, and the values may be a string or a reference to a list of values. [...] replace The <replace> option takes a argument in the same form as add, but will cause any existing attributes with the same name to be replaced. If the value for any attribute in the HASH is a reference to an empty ARRAY the all instances of the attribute will be deleted. But when I issued a request like $msg = $ldap->modify($dn, replace => { attribute => [] }) ; I got an error, and $msg->code returned 2. It turned out that the change didn't take place unless the request was restated as $msg = $ldap->modify($dn, replace => { attribute => undef }) ; Did I go wrong? Or maybe is it a "bug" in documentation/module? Thank you for all the work you've been doing for the perl community! Sincerely Marco Marongiu CRS4 - Center for Research, Development & Advanced Studies in Sardinia -- ____ ____ ____ _ _ / ___)| __ \/ ___)/ /| | Marco Marongiu (br...@cr...) | (___ | /\___ \\__ | Computers & Network Group \____)|_|\_\(____/ |_| Phone: +39 070 2796 336 ----- End forwarded message ----- |