1Net::LDAP::Control::PreURseeard(C3o)ntributed Perl DocumNeentt:a:tLiDoAnP::Control::PreRead(3)
2
3
4

NAME

6       Net::LDAP::Control::PreRead - LDAPv3 Pre-Read control object
7

SYNOPSIS

9        use Net::LDAP;
10        use Net::LDAP::Control::PreRead;
11        use Net::LDAP::Constant qw( LDAP_CONTROL_PREREAD LDAP_SUCCESS );
12
13        $ldap = Net::LDAP->new( "ldap.mydomain.eg" );
14
15        $preread = Net::LDAP::Control::Paged->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 => $preread );
20
21        if ($mesg->code eq LDAP_SUCCESS) {
22          my ($previous) = $mesg->control( LDAP_CONTROL_PREREAD );
23          my $entry = $previous ? $previous->entry() : undef;
24
25          if ($entry) {
26            print "givenName changed from '" .
27                  join("', '", $entry->get_value(givenName") .
28                  "' to 'Babs'\n");
29          }
30        }
31

DESCRIPTION

33       "Net::LDAP::Control::PreRead" provides an interface for the creation
34       and manipulation of objects that represent the "Pre-Read Control" as
35       described by RFC 4527.
36

CONSTRUCTOR ARGUMENTS

38       In addition to the constructor arguments described in
39       Net::LDAP::Control the following are provided.
40
41       attrs => [ ATTR, ... ]
42           A list of attributes to be returned in the entry returned in the
43           response control.
44
45           If absent, all attributes are returned.
46
47           Operational attributes may be included in the list by explicitely
48           asking for them or by using special "+" feature (provided the
49           server supports this feature).
50

METHODS

52       As with Net::LDAP::Control each constructor argument described above is
53       also avaliable as a method on the object which will return the current
54       value for the attribute if called without an argument, and set a new
55       value for the attribute if called with an argument.
56
57       In addition to these methods, the control also supports the following
58       method:
59
60       entry ()
61           Returns the entry from the response control in the response message
62           to the LDAP request that contained the request control.
63
64           The result is either a Net::LDAP::Entry object or undefined.
65

SEE ALSO

67       Net::LDAP, Net::LDAP::Control, http://www.ietf.org/rfc/rfc4527.txt
68

AUTHOR

70       Peter Marschall <peter@adpm.de>
71
72       Please report any bugs, or post any suggestions, to the perl-ldap
73       mailing list <perl-ldap@perl.org>
74
76       Copyright (c) 2008 Peter Marschall. All rights reserved. This program
77       is free software; you can redistribute it and/or modify it under the
78       same terms as Perl itself.
79
80
81
82perl v5.12.0                      2010-03-12    Net::LDAP::Control::PreRead(3)
Impressum