1Net::LDAP::Control::EntUrsyeCrhaCnognet(r3i)buted Perl DNoectu:m:eLnDtAaPt:i:oCnontrol::EntryChange(3)
2
3
4

NAME

6       Net::LDAP::Control::EntryChange - LDAPv3 Entry Change Notification
7       control object
8

SYNOPSIS

10        use Net::LDAP;
11        use Net::LDAP::Control::PersistentSearch;
12        use Net::LDAP::Constant qw(LDAP_CONTROL_ENTRYCHANGE);
13
14        $ldap = Net::LDAP->new( "ldap.mydomain.eg" );
15
16        $persist = Net::LDAP::Control::PersistentSearch->new( changeTypes => 15,
17                                                              changesOnly => 1,
18                                                              returnECs => 1 );
19
20        $srch = $ldap->search( base     => "cn=People,dc=mydomain,dc=eg",
21                               filter   => "(objectClass=person)",
22                               callback => \&process_entry, # call for each entry
23                               control  => [ $persist ] );
24
25        die "error: ",$srch->code(),": ",$srch->error()  if ($srch->code());
26
27        sub process_entry {
28          my $message = shift;
29          my $entry = shift;
30          my ($control) = $message->control(LDAP_CONTROL_ENTRYCHANGE);
31
32          print $control->changeType()."\t".$entry->dn()."\n";
33        }
34

DESCRIPTION

36       "Net::LDAP::Control::EntryChange" provides an interface for the
37       creation and manipulation of objects that represent the
38       "EntryChangeNotification" control as described by
39       draft-smith-psearch-ldap-03.txt.
40

CONSTRUCTOR ARGUMENTS

42       In addition to the constructor arguments described in
43       Net::LDAP::Control the following are provided.
44
45       changeType
46           An integer value telling the type of LDAP operation that the entry
47           has undergone.  It is one of the following values (which represent
48           the LDAP operations indicated next to them):
49
50           1 = add
51           2 = delete
52           4 = modify
53           8 = modDN
54       previousDN
55           When changeType is 8 (for modDN) this parameter tells the entry's
56           DN before the modDN operation.  In all other cases this value is
57           not defined.
58
59       changeNumber
60           This is the change number according to
61           <draft-good-ldap-changelog-03.txt> assigned by a server for the
62           change.  If a server supports an LDAP Change Log it should include
63           this field.
64
65       Usually you do not need to create a "Net::LDAP::Control::EntryChange"
66       control yourself because it is provided by the server in response to an
67       option with the "Net::LDAP::Control::PersistentSearch" control.
68

METHODS

70       As with Net::LDAP::Control each constructor argument described above is
71       also available as a method on the object which will return the current
72       value for the attribute if called without an argument, and set a new
73       value for the attribute if called with an argument.
74

SEE ALSO

76       Net::LDAP, Net::LDAP::Control, Net::LDAP::Control::PersistentSearch
77

AUTHOR

79       Peter Marschall <peter@adpm.de>, based on Net::LDAP::Control::Page from
80       Graham Barr <gbarr@pobox.com> and the preparatory work of Don Miller
81       <donm@uidaho.edu>.
82
83       Please report any bugs, or post any suggestions, to the perl-ldap
84       mailing list <perl-ldap@perl.org>
85
87       Copyright (c) 2004 Peter Marschall. All rights reserved. This program
88       is free software; you can redistribute it and/or modify it under the
89       same terms as Perl itself.
90
91
92
93perl v5.16.3                      2013-06-07Net::LDAP::Control::EntryChange(3)
Impressum