1Net::LDAP::Extension::CUasnecrelC(o3n)tributed Perl DocuNmeetn:t:aLtDiAoPn::Extension::Cancel(3)
2
3
4
6 Net::LDAP::Extension::Cancel - LDAP Cancel Operation
7
9 use Net::LDAP;
10 use Net::LDAP::Constant qw(LDAP_SUCCESS LDAP_CANCELED)
11 use Net::LDAP::Extension::Cancel;
12
13 $ldap = Net::LDAP->new( 'ldap.mydomain.eg' );
14
15 $ldap->bind('cn=Joe User,cn=People,dc=example,dc=com',
16 password => 'secret');
17
18 $search = $ldap->search(
19 base => 'c=US',
20 filter => '(&(sn=Barr) (o=Texas Instruments))',
21 callback => \&process_entry, # Call this sub for each entry
22 );
23
24 $mesg = $ldap->cancel($search);
25
26 die "error :", $mesg->code(), ": ", $mesg->error()
27 if ($mesg->code() != LDAP_CANCELED && mesg->code() != LDAP_SUCCESS);
28
30 "Net::LDAP::Extension::Cancel" implements the "Cancel" extended LDAPv3
31 operation as described in RFC 3909.
32
33 The "Cancel" extended operation is very similar to the "Abandon"
34 standard operation, and has the same call signature. Unlike the
35 "Abandon" operation, it has a response which provides an indication of
36 its outcome.
37
38 It implements no object by itself but extends the Net::LDAP object by
39 another method:
40
42 cancel ( OPERATION, OPTIONS )
43 Cancel an outstanding operation. "OPERATION" may be a number or an
44 object which is a sub-class of Net::LDAP::Message, returned from a
45 previous method call.
46
47 OPTIONS is a list of key/value pairs. The following keys are
48 recognized:
49
50 control => CONTROL
51 control => [ CONTROL, .. ]
52 Control(s) to be passed to the operation.
53
55 Net::LDAP, Net::LDAP::Extension
56
58 Peter Marschall <peter@adpm.de>.
59
60 Please report any bugs, or post any suggestions, to the perl-ldap
61 mailing list <perl-ldap@perl.org>
62
64 Copyright (c) 2011 Peter Marschall. All rights reserved. This program
65 is free software; you can redistribute it and/or modify it under the
66 same terms as Perl itself.
67
68
69
70perl v5.28.1 2015-04-02 Net::LDAP::Extension::Cancel(3)