Net::LDAP::Extra(3)
π NAME π
Bestie, this is Net::LDAP::Extra(3) from the User Contributed Perl Documentation, and the name is Net::LDAP::Extra β its whole job is loading extra Net::LDAP methods. β¨
β¨ SYNOPSIS β¨
use Net::LDAP::Extra qw(my_extn);
$ldap = Net::LDAP->new( ... );
$ldap->my_extn( ... );
π¦ DESCRIPTION π¦
Okay so Net::LDAP::Extra lets extra methods be added to Net::LDAP. Normally, those methods would get added by sub-classing Net::LDAP, but honestly that gets messy β different people write different additions, and then other people want to use multiple of these sub-classes. Users end up having to create sub-classes of their own which inherit from all the extension sub-classes just so they can get all the features. π Itβs giving inheritance chaos, no cap.
Net::LDAP::Extra fixes the vibe by allowing methods to be added directly to all Net::LDAP objects. π
You do this by creating a class Net::LDAP::Extra::name which exports functions. Then a use Net::LDAP::Extra qw(name) will make these functions available as methods on all Net::LDAP objects. Slay. β¨
β οΈ Care should be taken when choosing names for the functions to export to ensure that they do not clash with others. Like, pick your function names carefully, bestie β no accidental name collisions, periodt. π
π SEE ALSO π
Net::LDAP::Extra::AD
mwah π this page is from perl v5.42.0, dated 2024-01-02, and itβs the Net::LDAP::Extra(3) page β bye bestie π«Άβ¨
π¦ 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