1Net::LDAP::Control::SorUts(e3r)Contributed Perl DocumentNaetti:o:nLDAP::Control::Sort(3)
2
3
4

NAME

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

SYNOPSIS

9        use Net::LDAP::Control::Sort;
10        use Net::LDAP::Constant qw(LDAP_CONTROL_SORTRESULT);
11
12        $sort = Net::LDAP::Control::Sort->new(
13          order => "cn -phone"
14        );
15
16        $mesg = $ldap->search( @args, control => [ $sort ]);
17
18        ($resp) = $mesg->control( LDAP_CONTROL_SORTRESULT );
19
20        print "Results are sorted\n"  if $resp and !$resp->result;
21

DESCRIPTION

23       "Net::LDAP::Control::Sort" is a sub-class of Net::LDAP::Control.  It
24       provides a class for manipulating the LDAP Server Side Sort (SSS)
25       request control 1.2.840.113556.1.4.473 as defined in RFC-2891
26
27       If the server supports sorting, then the response from a search
28       operation will include a sort result control. This control is handled
29       by Net::LDAP::Control::SortResult.
30

CONSTRUCTOR ARGUMENTS

32       order
33           A string which defines how entries may be sorted. It consists of
34           multiple directives, separated by whitespace. Each directive
35           describes how to sort entries using a single attribute. If two
36           entries have identical attributes, then the next directive in the
37           list is used.
38
39           Each directive specifies a sorting order as follows
40
41             -attributeType:orderingRule
42
43           The leading "-" is optional, and if present indicates that the
44           sorting order should be reversed. "attributeType" is the attribute
45           name to sort by. "orderingRule" is optional and indicates the rule
46           to use for the sort and should be valid for the given
47           "attributeType".
48
49           Any one attributeType should only appear once in the sorting list.
50
51           Examples
52
53             "cn"         sort by cn using the default ordering rule for the cn attribute
54             "-cn"        sort by cn using the reverse of the default ordering rule
55             "age cn"     sort by age first, then by cn using the default ordering rules
56             "cn:1.2.3.4" sort by cn using the ordering rule defined as 1.2.3.4
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

SEE ALSO

65       Net::LDAP, Net::LDAP::Control::SortResult, Net::LDAP::Control,
66       http://www.ietf.org/rfc/rfc2891.txt
67

AUTHOR

69       Graham Barr <gbarr@pobox.com>
70
71       Please report any bugs, or post any suggestions, to the perl-ldap
72       mailing list <perl-ldap@perl.org>
73
75       Copyright (c) 1999-2004 Graham Barr. All rights reserved. This program
76       is free software; you can redistribute it and/or modify it under the
77       same terms as Perl itself.
78
79
80
81perl v5.32.1                      2021-02-16       Net::LDAP::Control::Sort(3)
Impressum