Net::LD...ssertion(3)

πŸ’… NAME πŸ’…

Net::LDAP::Control::Assertion β€” the LDAPv3 Assertion Control, bestie ✨

(straight out of the User Contributed Perl Documentation, filed under Net::LD...ssertion(3) because the page header is a little dramatic and truncates it, iykyk πŸŽ€)


πŸ¦‹ SYNOPSIS πŸ¦‹

use Net::LDAP;
use Net::LDAP::Control::Assertion;

$ldap = Net::LDAP->new( "ldap.mydomain.eg" );

$assert = Net::LDAP::Control::Assertion->new( assertion => '(sn=Jensen)' );

my $mesg = $ldap->modify( "cn=Barbara Jensen, o=University of Michigan, c=US",
                          replace => { givenName => "Babs" },
                          control => $assert );

🌸 DESCRIPTION 🌸

okay so "Net::LDAP::Control::Assertion" is your whole entire vibe for creating and manipulating objects that represent the "Assertion Control" β€” and that's per RFC 4528, no cap πŸ“œβœ¨

Here's the tea: the "Assertion Control" lets the client specify a condition (an assertion) that must be TRUE for the operation to be processed normally. If it's not TRUE? The operation is just… not performed. Nothing happens. Iconic boundary-setting, honestly πŸš«πŸ’… For instance, you can use the control with the Modify operation to do atomic "test and set" and "test and clear" operations. Literally atomic. She ate πŸ”₯

The control is appropriate for both LDAP interrogation and update operations, including Add, Compare, Delete, Modify, ModifyDN (rename), and Search. So basically the whole friend group 🫢


πŸŽ€ CONSTRUCTOR ARGUMENTS πŸŽ€

on top of the constructor arguments described in Net::LDAP::Control, the following is provided:

  • assertion => FILTER β€” a filter specifying the assertion that must evaluate to TRUE in order to make the operation process normally. Like a bouncer at the club but for LDAP operations 🧚✨

⭐ METHODS ⭐

As with Net::LDAP::Control, each constructor argument described above is also available as a method on the object πŸ‘‘ and here's how she behaves:

  • called with no argument β†’ returns the current value for the attribute 🌈
  • called with an argument β†’ sets a new value for the attribute πŸ’–

πŸ’œ SEE ALSO πŸ’œ


🌟 AUTHOR 🌟

Peter Marschall <peter@adpm.de> 🫢

Please report any bugs, or post any suggestions, to the perl-ldap mailing list <perl-ldap@perl.org> β€” they genuinely want to hear from you, bestie πŸ™ˆπŸ’Œ


Copyright (c) 2011 Peter Marschall. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. πŸ“βœ¨


lowkey important: all those terms and conditions apply fr fr, don't skip them πŸ’€

and that's the whole page, mwah πŸ’‹ β€” brought to you by perl v5.42.0, dated 2024-01-02, and the letter Net::LD...ssertion(3) πŸŽ€πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from