I am having problems with Modify returning a ZERO (0) even though I know the function 
isn't being called correctly. And, the directory service isn't being updated.
 
What I am trying to do is sort-of funky...I'm trying to modify the directory based on 
the hash method. However, I am building the function based on parameters passed on the 
command line. In any case, here's how the has gets built:
 
    my %ReplaceHash = ( $attribute=>$value1 );
 
I know this is probably wrong but, I figured that I'd try it and see what modify 
returns. That way, I might be able to figure out if it was the attribute name or value 
that was wrong. Then I call:
 
 my $result = LDAPmodifyUsingHash ( $ldap, $dn, \%ReplaceHash, $operation );
 
sub LDAPmodifyUsingHash
{
  my ($ldap, $dn, $whatToChange, $howToChange ) = @_;
  my $result = $ldap->modify ( $dn,
                               $howToChange => { %$whatToChange }
                             );
  return $result;
}
 
In both the subroutine and the main funtion, result is ZERO (0). Why? I expected an 
"Unknown attribute" or something.
 
Thank you in advance,
 
Drue
 
 

Reply via email to