Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Entry.{pm,pod}: slightly extend update() and document it

Have Net::LDAP::Entry->update() accept options in the LDIF case too.
Here they need to be options for Net::LDAP::LDIF->write_entry().

Document the "LDIF" case of Net::LDAP::Entry->update().
  • Loading branch information...
commit 892d800425fec79a04c9953856a4ce6a80ec9ba6 1 parent 8dae998
@marschap marschap authored
Showing with 11 additions and 1 deletion.
  1. +1 −1  lib/Net/LDAP/Entry.pm
  2. +10 −0 lib/Net/LDAP/Entry.pod
View
2  lib/Net/LDAP/Entry.pm
@@ -290,7 +290,7 @@ sub update {
}
elsif (ref($target) && UNIVERSAL::isa($target, 'Net::LDAP::LDIF')) {
require Net::LDAP::Message;
- $target->write_entry($self);
+ $target->write_entry($self, %opt);
$mesg = Net::LDAP::Message::Dummy->new();
$mesg->set_error(LDAP_OTHER, $target->error())
if ($target->error());
View
10 lib/Net/LDAP/Entry.pod
@@ -331,6 +331,16 @@ corresponding to the entry's changetype.
The result will be an object of type L<Net::LDAP::Message> as returned
by the add, modify or delete method called on CLIENT.
+Alternatively C<CLIENT> can also be a C<Net::LDAP::LDIF> object, that
+must be an LDIF file opened for writing.
+
+In this case, C<OPTIONS> my be options that the method C<write_entry>
+of C<Net::LDAP::LDIF> takes.
+
+Here too, the result is an object class C<Net::LDAP::Message>.
+On error, the error code is C<LDAP_OTHER> with the LDIF error message
+in the error text.
+
=back
=head1 SEE ALSO
Please sign in to comment.
Something went wrong with that request. Please try again.