Monks, I might be doing this wrong, but the documentaion is a bit scanty on the subject. I'm trying to use Net::LDAP to modify a person: changing their DN to reflect the change in their OU.
sub change { my $master = shift; my $entry = shift; my $dn = $entry->dn(); (my $new = $dn) =~ s/\bou=Engineering\b/ou=Research/; my $err = $master->moddn( $entry, newrdn => $new ); warn "could not update $dn: ", $err->text, ' (err=', $err->code, +")\n" if $err->code > 0; $err->code > 0 ? 0 : 1; }
I am aware that the old DN will still exist afterwards, there an attribute that can be passed to clean that up, but one thing at a time...
I get the following error on the $master->moddn call:
Can't locate object method "text" via package "Net::LDAP::ModDN"Short of diving into the code, I don't know what's going on. (There's no perldoc for Net::LDAP::ModDN, for a start). Thanks for clues I can use.
- another intruder with the mooring of the heart of the Perl
In reply to Changing a DN with Net::LDAP by grinder
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |