1Net::LDAP::Control::PosUtsReeradC(o3n)tributed Perl DocuNmeetn:t:aLtDiAoPn::Control::PostRead(3)
2
3
4

NAME

6       Net::LDAP::Control::PostRead - LDAPv3 Post-Read control object
7

SYNOPSIS

9        use Net::LDAP;
10        use Net::LDAP::Control::PostRead;
11        use Net::LDAP::Constant qw( LDAP_CONTROL_POSTREAD LDAP_SUCCESS );
12
13        $ldap = Net::LDAP->new( "ldap.mydomain.eg" );
14
15        $postread = Net::LDAP::Control::PostRead->new( attrs => [ qw/givenName/ ] );
16
17        my $mesg = $ldap->modify( "cn=Barbara Jensen, o=University of Michigan, c=US",
18                                  replace => { givenName => "Babs" },
19                                  control => $postread );
20
21        if ($mesg->code eq LDAP_SUCCESS) {
22          my ($afterwards) = $mesg->control( LDAP_CONTROL_PREREAD );
23          my $entry = $afterwards ? $afterwards->entry() : undef;
24
25          if ($entry) {
26            print "givenName changed to '" .
27                  join("', '", $entry->get_value(givenName") .
28                  "' to 'Babs'\n");
29          }
30        }
31

DESCRIPTION

33       "Net::LDAP::Control::PostRead" provides an interface for the creation
34       and manipulation of objects that represent the "Post-Read Controls" as
35       described by RFC 4527.
36
37       In modification operations, the "Post-Read request control" indicates
38       to the server that a copy of the modified entry after the update is to
39       be returned.  After the successful completion of the operation, the
40       accompanying "Post-Read response control" allows one to retrieve the
41       updated value from the server's response.
42
43       One use case of this control may be to obtain values of operational
44       attributes, such as the "entryUUID" and "modifyTimestamp" attributes,
45       updated by the server as part of the update operation.
46

CONSTRUCTOR ARGUMENTS

48       In addition to the constructor arguments described in
49       Net::LDAP::Control the following are provided.
50
51       attrs => [ ATTR, ... ]
52           A list of attributes to be returned in the entry returned in the
53           response control.
54
55           If absent, all attributes are returned.
56
57           Operational attributes may be included in the list by explicitly
58           asking for them or by using special "+" feature (provided the
59           server supports this feature).
60

METHODS

62       As with Net::LDAP::Control each constructor argument described above is
63       also available as a method on the object which will return the current
64       value for the attribute if called without an argument, and set a new
65       value for the attribute if called with an argument.
66
67       In addition to these methods, the control also supports the following
68       method:
69
70       entry ()
71           Returns the entry from the response control in the response message
72           to the LDAP request that contained the request control.
73
74           The result is either a Net::LDAP::Entry object or undefined.
75

SEE ALSO

77       Net::LDAP, Net::LDAP::Control, http://www.ietf.org/rfc/rfc4527.txt
78

AUTHOR

80       Peter Marschall <peter@adpm.de>
81
82       Please report any bugs, or post any suggestions, to the perl-ldap
83       mailing list <perl-ldap@perl.org>
84
86       Copyright (c) 2008,2011 Peter Marschall. All rights reserved. This
87       program is free software; you can redistribute it and/or modify it
88       under the same terms as Perl itself.
89
90
91
92perl v5.34.0                      2021-07-22   Net::LDAP::Control::PostRead(3)
Impressum