1Net::LDAP::Control::SorUtsReersuClotn(t3r)ibuted Perl DoNceutm:e:nLtDaAtPi:o:nControl::SortResult(3)
2
3
4

NAME

6       Net::LDAP::Control::SortResult - Server Side Sort (SSS) result control
7       object
8

SYNOPSIS

10        use Net::LDAP::Control::Sort;
11        use Net::LDAP::Constant qw(LDAP_CONTROL_SORTRESULT);
12        use Net::LDAP::Util qw(ldap_error_name);
13
14        $sort = Net::LDAP::Control::Sort->new(
15          order => "cn -age"
16        );
17
18        $mesg = $ldap->search( @args, control => [ $sort ]);
19
20        ($resp) = $mesg->control( LDAP_CONTROL_SORTRESULT );
21
22        if ($resp) {
23          if ($resp->result) {
24            my $attr = $resp->attr;
25            print "Problem sorting, ",ldap_error_name($resp->result);
26            print " ($attr)"  if $attr;
27            print "\n";
28          }
29          else {
30            print "Results are sorted\n";
31          }
32        }
33        else {
34          print "Server does not support sorting\n";
35        }
36

DESCRIPTION

38       "Net::LDAP::Control::SortResult" is a sub-class of Net::LDAP::Control.
39       It provides a class for manipulating the LDAP sort request control
40       1.2.840.113556.1.4.474 as defined in RFC-2891
41
42       A sort result control will be returned by the server in response to a
43       search with a Server Side Sort control. If a sort result control is not
44       returned then the user may assume that the server does not support
45       sorting and the results are not sorted.
46

CONSTRUCTOR ARGUMENTS

48       attr
49           If "result" indicates that there was a problem with sorting and
50           that problem was due to one of the attributes specified in the sort
51           control. "attr" is set to the name of the attribute causing the
52           problem.
53
54       result
55           This is the result code that describes if the sort operation was
56           sucessful. If will be one of the result codes describes below.
57

METHODS

59       As with Net::LDAP::Control each constructor argument described above is
60       also available as a method on the object which will return the current
61       value for the attribute if called without an argument, and set a new
62       value for the attribute if called with an argument.
63

RESULT CODES

65       Possible results from a sort request are listed below. See
66       Net::LDAP::Constant for a definition of each.
67
68       LDAP_SUCCESS
69       LDAP_OPERATIONS_ERROR
70       LDAP_TIMELIMIT_EXCEEDED
71       LDAP_STRONG_AUTH_REQUIRED
72       LDAP_ADMIN_LIMIT_EXCEEDED
73       LDAP_NO_SUCH_ATTRIBUTE
74       LDAP_INAPPROPRIATE_MATCHING
75       LDAP_INSUFFICIENT_ACCESS
76       LDAP_BUSY
77       LDAP_UNWILLING_TO_PERFORM
78       LDAP_OTHER
79

SEE ALSO

81       Net::LDAP, Net::LDAP::Control::Sort, Net::LDAP::Control,
82       http://ww.ietf.org/rfc/rfc2891.txt
83

AUTHOR

85       Graham Barr <gbarr@pobox.com>
86
87       Please report any bugs, or post any suggestions, to the perl-ldap
88       mailing list <perl-ldap@perl.org>
89
91       Copyright (c) 1999-2004 Graham Barr. All rights reserved. This program
92       is free software; you can redistribute it and/or modify it under the
93       same terms as Perl itself.
94
95
96
97perl v5.16.3                      2013-06-07 Net::LDAP::Control::SortResult(3)
Impressum