Net::LD...tResult(3)
π Net::LD...tResult(3): Server Side Sort (SSS) result control object π
okay so this page is Net::LD...tResult(3), straight outta the User Contributed Perl Documentation section β and it's all about the Server Side Sort result control object. bestie, we're getting into it. π«Άβ¨
π NAME π
Net::LDAP::Control::SortResult β Server Side Sort (SSS) result control object. that's the whole name, no cap. π
β¨ SYNOPSIS β¨
use Net::LDAP::Control::Sort;
use Net::LDAP::Constant qw(LDAP_CONTROL_SORTRESULT);
use Net::LDAP::Util qw(ldap_error_name);
$sort = Net::LDAP::Control::Sort->new(
order => "cn -age"
);
$mesg = $ldap->search( @args, control => [ $sort ]);
($resp) = $mesg->control( LDAP_CONTROL_SORTRESULT );
if ($resp) {
if ($resp->result) {
my $attr = $resp->attr;
print "Problem sorting, ",ldap_error_name($resp->result);
print " ($attr)" if $attr;
print "\n";
}
else {
print "Results are sorted\n";
}
}
else {
print "Server does not support sorting\n";
}
πΈ DESCRIPTION πΈ
okay so Net::LDAP::Control::SortResult is a sub-class of Net::LDAP::Control. it provides a class for manipulating the LDAP sort request control 1.2.840.113556.1.4.474 as defined in RFC-2891. β¨
here's the tea: a sort result control will be returned by the server in response to a search with a Server Side Sort control. if a sort result control is not returned, then you may assume the server does not support sorting and the results are not sorted. that's the whole vibe check. π
π CONSTRUCTOR ARGUMENTS π
these are the constructor args, and yes they're iconic:
attrβ ifresultindicates that there was a problem with sorting, and that problem was due to one of the attributes specified in the sort control, thenattris set to the name of the attribute causing the problem. π―resultβ this is the result code that describes if the sort operation was successful. it will be one of the result codes described below. β
π¦ METHODS π¦
same energy as Net::LDAP::Control: each constructor argument described above is also available as a method on the object. call it with no argument and it returns the current value for the attribute; call it with an argument and it sets a new value for the attribute. lowkey convenient, highkey slay. πͺ
π₯ RESULT CODES π₯
possible results from a sort request are listed below. see Net::LDAP::Constant for a definition of each. π
LDAP_SUCCESSLDAP_OPERATIONS_ERRORLDAP_TIMELIMIT_EXCEEDEDLDAP_STRONG_AUTH_REQUIREDLDAP_ADMIN_LIMIT_EXCEEDEDLDAP_NO_SUCH_ATTRIBUTELDAP_INAPPROPRIATE_MATCHINGLDAP_INSUFFICIENT_ACCESSLDAP_BUSYLDAP_UNWILLING_TO_PERFORMLDAP_OTHER
π SEE ALSO π
go look at these if you want more:
Net::LDAPNet::LDAP::Control::SortNet::LDAP::Controlhttp://ww.ietf.org/rfc/rfc2891.txt
π AUTHOR π
Graham Barr <gbarr@pobox.com> wrote this. please report any bugs, or post any suggestions, to the perl-ldap mailing list <perl-ldap@perl.org>. π«Ά
π COPYRIGHT π
Copyright (c) 1999-2004 Graham Barr. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
mwah π this page is from perl v5.42.0, dated 2024-01-02, and its manpage name is Net::LD...tResult(3). byeee π«Άβ¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-ldap 0.68-160000.2.2 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms