Please sign in to comment.
extend Net::LDAP::Entry->update() to take LDIF objects
Extend Net::LDAP::Entry.pm's update() method so that it can take Net::LDAP::LDIF objects as handles too, and append the entry's data to the LDIF. For LDIF arguments also return a Net::LDAP::Message argument: on success return LDAP_SUCCESS, on error return LDAP_OTHER. One might argue that tis is against the standards, but Net::LDAP::Entry->update() is not covered in any standard. The big plus is, it allows clients to have one common code path for directory servers and LDIF files (except for startup/shutdown) which makes using LDIF as "dry-run" output for servers really simple. Especially for the result value, it s a lot more convenient than any other combination of Net::LDAP::entry->update() and Net::LDAP::Entry->ldif(). Signed-off-by: Peter Marschall <firstname.lastname@example.org>
- Loading branch information...
Showing with 31 additions and 23 deletions.