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 con‐
7       trol 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 cre‐
37       ation and manipulation of objects that represent the "EntryChangeNoti‐
38       fication" control as described by draft-smith-psearch-ldap-01.txt.
39

CONSTRUCTOR ARGUMENTS

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

METHODS

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

SEE ALSO

75       Net::LDAP, Net::LDAP::Control, Net::LDAP::Control::PersistentSearch
76

AUTHOR

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